Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Starter Web Vue
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
product
kim3-web-vue
Starter Web Vue
Commits
19a2fbc9
Commit
19a2fbc9
authored
Jul 01, 2021
by
陈浩玮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
参数管理
parent
9b58ab4c
Pipeline
#285
failed with stages
in 0 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
199 additions
and
23 deletions
+199
-23
src/api/organization.js
src/api/organization.js
+19
-0
src/components/table/index.vue
src/components/table/index.vue
+1
-1
src/components/table/my_item.vue
src/components/table/my_item.vue
+2
-2
src/pages/system/view/parameter/business/form.vue
src/pages/system/view/parameter/business/form.vue
+40
-11
src/pages/system/view/parameter/business/index.vue
src/pages/system/view/parameter/business/index.vue
+26
-9
src/pages/system/view/parameter/operation/form.vue
src/pages/system/view/parameter/operation/form.vue
+43
-0
src/pages/system/view/parameter/operation/index.vue
src/pages/system/view/parameter/operation/index.vue
+62
-0
src/router/config.js
src/router/config.js
+6
-0
No files found.
src/api/organization.js
View file @
19a2fbc9
...
@@ -28,6 +28,21 @@ function updateOrgApi(data) {
...
@@ -28,6 +28,21 @@ function updateOrgApi(data) {
return
putReq
(
'
/api/v1/organizations
'
,
data
);
return
putReq
(
'
/api/v1/organizations
'
,
data
);
}
}
function
addBusinessApi
(
data
)
{
return
postReq
(
'
/api/v1/parameters/business
'
,
data
);
}
function
updateBusinessApi
(
data
)
{
return
putReq
(
'
/api/v1/parameters/business
'
,
data
);
}
function
addOperationApi
(
data
)
{
return
postReq
(
'
/api/v1/parameters/operation
'
,
data
);
}
function
updateOperationApi
(
data
)
{
return
putReq
(
'
/api/v1/parameters/operation
'
,
data
);
}
export
default
{
export
default
{
addJobs
:
addJobsApi
,
addJobs
:
addJobsApi
,
updateJobs
:
updateJobsApi
,
updateJobs
:
updateJobsApi
,
...
@@ -36,4 +51,8 @@ export default {
...
@@ -36,4 +51,8 @@ export default {
getOrganizationDetails
:
getOrganizationDetailsApi
,
getOrganizationDetails
:
getOrganizationDetailsApi
,
addOrg
:
addOrgApi
,
addOrg
:
addOrgApi
,
updateOrg
:
updateOrgApi
,
updateOrg
:
updateOrgApi
,
addBusiness
:
addBusinessApi
,
updateBusiness
:
updateBusinessApi
,
addOperation
:
addOperationApi
,
updateOperation
:
updateOperationApi
,
};
};
src/components/table/index.vue
View file @
19a2fbc9
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div>
<div>
<my-card
v-if=
"$scopedSlots.search"
>
<my-card
v-if=
"$scopedSlots.search"
>
<a-form-model
:model=
"queryForm"
layout=
"horizontal"
>
<a-form-model
:model=
"queryForm"
layout=
"horizontal"
>
<a-row
:gutter=
"
24
"
>
<a-row
:gutter=
"
16
"
>
<slot
name=
"search"
:query=
"queryForm"
/>
<slot
name=
"search"
:query=
"queryForm"
/>
</a-row>
</a-row>
</a-form-model>
</a-form-model>
...
...
src/components/table/my_item.vue
View file @
19a2fbc9
<
template
>
<
template
>
<a-col
v-bind=
"span"
>
<a-col
v-bind=
"span"
>
<a-form-model-item
v-bind=
"layout"
>
<a-form-model-item
v-bind=
"layout"
>
<slot
class=
"tw-w-full"
/>
<slot
/>
</a-form-model-item>
</a-form-model-item>
</a-col>
</a-col>
</
template
>
</
template
>
...
@@ -11,7 +11,7 @@ export default {
...
@@ -11,7 +11,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
span
:
{
xs
:
24
,
sm
:
24
,
lg
:
12
,
xl
:
6
},
span
:
{
xs
:
24
,
sm
:
24
,
lg
:
12
,
xl
:
6
},
layout
:
{
labelCol
:
{
span
:
5
},
wrapperCol
:
{
span
:
19
},
...
this
.
$attrs
},
layout
:
{
labelCol
:
{
span
:
6
},
wrapperCol
:
{
span
:
18
},
...
this
.
$attrs
},
};
};
},
},
};
};
...
...
src/pages/system/view/parameter/business/form.vue
View file @
19a2fbc9
<
template
>
<
template
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"DrawerForm"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"DrawerForm"
>
<a-form-model-item
label=
"名称"
prop=
"jobName"
>
<a-form-model-item
label=
"语言"
prop=
"paramLocale"
>
<a-input
v-model=
"form.jobName"
:disabled=
"isView"
/>
<a-select
v-model=
"form.paramLocale"
:options=
"langList"
placeholder=
"请选择"
:disabled=
"isView"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"描述"
prop=
"jobDescription"
>
<a-form-model-item
label=
"参数模块"
prop=
"paramModule"
>
<a-textarea
v-model=
"form.jobDescription"
:disabled=
"isView"
:rows=
"4"
/>
<a-input
v-model=
"form.paramModule"
placeholder=
"请输入"
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"参数编码"
prop=
"paramCode"
>
<a-input
v-model=
"form.paramCode"
placeholder=
"请输入"
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"参数值"
prop=
"paramValue"
>
<a-input
v-model=
"form.paramValue"
placeholder=
"请输入"
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"参数名称"
prop=
"paramName"
>
<a-input
v-model=
"form.paramName"
placeholder=
"请输入"
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"显示顺序"
prop=
"paramIndex"
>
<a-input
v-model=
"form.paramIndex"
placeholder=
"请输入"
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"说明"
prop=
"remark"
>
<a-textarea
v-model=
"form.remark"
:disabled=
"isView"
:rows=
"4"
/>
</a-form-model-item>
</a-form-model-item>
</a-form-model>
</a-form-model>
</
template
>
</
template
>
<
script
>
<
script
>
import
Jobs
Api
from
'
@/api/organization
'
;
import
Api
from
'
@/api/organization
'
;
import
FormMixin
from
'
@/components/FormMixin
'
;
import
FormMixin
from
'
@/components/FormMixin
'
;
import
{
globalConfig
}
from
'
@/config
'
;
import
{
formatObj
}
from
'
@/utils
'
;
export
default
{
export
default
{
mixins
:
[
FormMixin
],
mixins
:
[
FormMixin
],
data
()
{
data
()
{
return
{
return
{
rules
:
{
rules
:
{
jobName
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
paramLocale
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
jobDescription
:
[
paramModule
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
},
paramCode
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
],
paramValue
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
paramName
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
paramIndex
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
},
},
langList
:
[],
};
};
},
},
async
mounted
()
{
this
.
langList
=
await
formatObj
(
globalConfig
.
langs
,
{
value
:
'
key
'
,
label
:
'
name
'
,
key
:
'
key
'
});
},
methods
:
{
methods
:
{
add
()
{
add
()
{
return
JobsApi
.
addJob
s
({
...
this
.
form
});
return
Api
.
addBusines
s
({
...
this
.
form
});
},
},
edit
()
{
edit
()
{
return
JobsApi
.
updateJob
s
({
...
this
.
form
});
return
Api
.
updateBusines
s
({
...
this
.
form
});
},
},
},
},
};
};
...
...
src/pages/system/view/parameter/business/index.vue
View file @
19a2fbc9
<
template
>
<
template
>
<my-table
url=
"/api/v1/parameters/business"
rowKey=
"paramId"
:addBtn=
"addBtn"
ref=
"table"
>
<my-table
url=
"/api/v1/parameters/business"
rowKey=
"paramId"
:addBtn=
"addBtn"
ref=
"table"
:scroll=
"
{ x: true }"
>
<template
#drawer
>
<template
#drawer
>
<Form
ref=
"form"
/>
<Form
ref=
"form"
/>
</
template
>
</
template
>
<
template
#search=
"{ query }"
>
<
template
#search=
"{ query }"
>
<MyFormModelItem
label=
"归属部门"
>
<MyFormModelItem
label=
"语言"
>
<a-input
v-model=
"query.jobName"
/>
<a-select
v-model=
"query.paramLocale"
:options=
"langList"
placeholder=
"请选择"
/>
</MyFormModelItem>
<MyFormModelItem
label=
"参数模块"
>
<a-input
v-model=
"query.paramModule"
placeholder=
"请输入"
/>
</MyFormModelItem>
<MyFormModelItem
label=
"参数编码"
>
<a-input
v-model=
"query.paramCode"
placeholder=
"请输入"
/>
</MyFormModelItem>
<MyFormModelItem
label=
"参数名称"
>
<a-input
v-model=
"query.paramName"
placeholder=
"请输入"
/>
</MyFormModelItem>
</MyFormModelItem>
</
template
>
</
template
>
<a-table-column
title=
"语言"
data-index=
"paramLocale"
/>
<a-table-column
title=
"语言"
data-index=
"paramLocale"
/>
...
@@ -15,30 +30,32 @@
...
@@ -15,30 +30,32 @@
<a-table-column
title=
"参数名称"
data-index=
"paramName"
/>
<a-table-column
title=
"参数名称"
data-index=
"paramName"
/>
<a-table-column
title=
"说明"
data-index=
"remark"
/>
<a-table-column
title=
"说明"
data-index=
"remark"
/>
<a-table-column
title=
"显示顺序"
data-index=
"paramIndex"
/>
<a-table-column
title=
"显示顺序"
data-index=
"paramIndex"
/>
<a-table-column
title=
"操作"
>
<a-table-column
title=
"操作"
fixed=
"right"
>
<
template
#default=
"row"
>
<
template
#default=
"row"
>
<a
@
click=
"() => view(row, 1)"
>
编辑
</a>
<a
@
click=
"() => view(row, 1)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
<a-divider
type=
"vertical"
/>
<PopconfirmDelete
:url=
"`/api/v1/
jobs/$
{row.job
Id}`" :cb="refreshTable" />
<PopconfirmDelete
:url=
"`/api/v1/
parameters/business/$
{row.param
Id}`" :cb="refreshTable" />
</
template
>
</
template
>
</a-table-column>
</a-table-column>
</my-table>
</my-table>
</template>
</template>
<
script
>
<
script
>
import
Form
from
'
./form.vue
'
;
import
PopconfirmDelete
from
'
@/components/popconfirm_delete/index.vue
'
;
import
PopconfirmDelete
from
'
@/components/popconfirm_delete/index.vue
'
;
import
MyFormModelItem
from
'
@/components/table/my_item.vue
'
;
import
MyFormModelItem
from
'
@/components/table/my_item.vue
'
;
import
{
globalConfig
}
from
'
@/config
'
;
import
{
globalConfig
}
from
'
@/config
'
;
import
{
formatObj
}
from
'
@/utils
'
;
import
Form
from
'
./form.vue
'
;
export
default
{
export
default
{
components
:
{
Form
,
PopconfirmDelete
,
MyFormModelItem
},
components
:
{
Form
,
PopconfirmDelete
,
MyFormModelItem
},
data
()
{
data
()
{
return
{
return
{
addBtn
:
{
width
:
600
,
onOk
:
()
=>
this
.
$refs
[
'
form
'
]?.
submit
()
},
addBtn
:
{
width
:
600
,
onOk
:
()
=>
this
.
$refs
[
'
form
'
]?.
submit
()
},
langList
:
globalConfig
.
langs
,
langList
:
[]
,
};
};
},
},
mounted
()
{
async
mounted
()
{
console
.
log
(
this
.
langList
);
this
.
langList
=
await
formatObj
(
globalConfig
.
langs
,
{
value
:
'
key
'
,
label
:
'
name
'
,
key
:
'
key
'
}
);
},
},
methods
:
{
methods
:
{
refreshTable
()
{
refreshTable
()
{
...
...
src/pages/system/view/parameter/operation/form.vue
0 → 100644
View file @
19a2fbc9
<
template
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"DrawerForm"
>
<a-form-model-item
label=
"参数模块"
prop=
"paramModule"
>
<a-input
v-model=
"form.paramModule"
placeholder=
"请输入"
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"参数编码"
prop=
"paramCode"
>
<a-input
v-model=
"form.paramCode"
placeholder=
"请输入"
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"参数值"
prop=
"paramValue"
>
<a-input
v-model=
"form.paramValue"
placeholder=
"请输入"
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"说明"
prop=
"remark"
>
<a-textarea
v-model=
"form.remark"
:disabled=
"isView"
:rows=
"4"
/>
</a-form-model-item>
</a-form-model>
</
template
>
<
script
>
import
Api
from
'
@/api/organization
'
;
import
FormMixin
from
'
@/components/FormMixin
'
;
export
default
{
mixins
:
[
FormMixin
],
data
()
{
return
{
rules
:
{
paramModule
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
paramCode
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
paramValue
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
paramIndex
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
},
};
},
methods
:
{
add
()
{
return
Api
.
addOperation
({
...
this
.
form
});
},
edit
()
{
return
Api
.
updateOperation
({
...
this
.
form
});
},
},
};
</
script
>
src/pages/system/view/parameter/operation/index.vue
0 → 100644
View file @
19a2fbc9
<
template
>
<my-table
url=
"/api/v1/parameters/operation"
rowKey=
"paramId"
:addBtn=
"addBtn"
ref=
"table"
:scroll=
"
{ x: true }"
>
<template
#drawer
>
<Form
ref=
"form"
/>
</
template
>
<
template
#search=
"{ query }"
>
<MyFormModelItem
label=
"参数模块"
>
<a-input
v-model=
"query.paramModule"
placeholder=
"请输入"
/>
</MyFormModelItem>
<MyFormModelItem
label=
"参数编码"
>
<a-input
v-model=
"query.paramCode"
placeholder=
"请输入"
/>
</MyFormModelItem>
<MyFormModelItem
label=
"参数值"
>
<a-input
v-model=
"query.paramValue"
placeholder=
"请输入"
/>
</MyFormModelItem>
</
template
>
<a-table-column
title=
"参数模块"
data-index=
"paramModule"
/>
<a-table-column
title=
"参数编码"
data-index=
"paramCode"
/>
<a-table-column
title=
"参数值"
data-index=
"paramValue"
/>
<a-table-column
title=
"说明"
data-index=
"remark"
/>
<a-table-column
title=
"操作"
fixed=
"right"
>
<
template
#default=
"row"
>
<a
@
click=
"() => view(row, 1)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
<PopconfirmDelete
:url=
"`/api/v1/parameters/operation/$
{row.paramId}`" :cb="refreshTable" />
</
template
>
</a-table-column>
</my-table>
</template>
<
script
>
import
PopconfirmDelete
from
'
@/components/popconfirm_delete/index.vue
'
;
import
MyFormModelItem
from
'
@/components/table/my_item.vue
'
;
import
{
globalConfig
}
from
'
@/config
'
;
import
{
formatObj
}
from
'
@/utils
'
;
import
Form
from
'
./form.vue
'
;
export
default
{
components
:
{
Form
,
PopconfirmDelete
,
MyFormModelItem
},
data
()
{
return
{
addBtn
:
{
width
:
600
,
onOk
:
()
=>
this
.
$refs
[
'
form
'
]?.
submit
()
},
};
},
methods
:
{
refreshTable
()
{
this
.
$refs
[
'
table
'
]?.
getData
();
},
view
(
data
,
type
)
{
this
.
$refs
[
'
table
'
]?.
show
({
type
});
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'
form
'
].
setData
({
...
data
},
type
);
});
},
},
};
</
script
>
\ No newline at end of file
src/router/config.js
View file @
19a2fbc9
...
@@ -118,6 +118,12 @@ const options = {
...
@@ -118,6 +118,12 @@ const options = {
component
:
()
=>
component
:
()
=>
import
(
'
@/pages/system/view/parameter/business/index.vue
'
),
import
(
'
@/pages/system/view/parameter/business/index.vue
'
),
},
},
{
path
:
'
operation_management
'
,
name
:
'
运维参数
'
,
component
:
()
=>
import
(
'
@/pages/system/view/parameter/operation/index.vue
'
),
},
],
],
},
},
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment