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
677bfee1
Commit
677bfee1
authored
Jul 26, 2021
by
shuiluo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 参数管理国际化
parent
4b216178
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
72 deletions
+84
-72
src/local/system.js
src/local/system.js
+12
-0
src/pages/system/log/operation/index.vue
src/pages/system/log/operation/index.vue
+2
-2
src/pages/system/parameter/operation/form.vue
src/pages/system/parameter/operation/form.vue
+35
-25
src/pages/system/parameter/operation/index.vue
src/pages/system/parameter/operation/index.vue
+35
-45
No files found.
src/local/system.js
View file @
677bfee1
...
...
@@ -45,4 +45,16 @@ export default {
'
log.businessModule
'
:
[
'
业务模块
'
,
'
Business Module
'
],
'
log.operationService
'
:
[
'
操作服务
'
,
'
Operation Service
'
],
'
log.operateTime
'
:
[
'
操作时间
'
,
'
Operate Time
'
],
'
paramter.paramValue
'
:
[
'
参数值
'
,
'
Parameter Value
'
],
'
paramter.paramValueError
'
:
[
'
请输入 @:paramter.paramValue
'
,
'
Please Input @:paramter.paramValue
'
],
'
paramter.parameterCoding
'
:
[
'
参数编码
'
,
'
Parameter Coding
'
],
'
paramter.parameterCodingError
'
:
[
'
请输入 @:paramter.parameterCoding
'
,
'
Please Input @:paramter.parameterCoding
'
,
],
'
paramter.moduleParameters
'
:
[
'
参数模块
'
,
'
Module Parameters
'
],
'
paramter.moduleParametersError
'
:
[
'
请输入 @:paramter.moduleParameters
'
,
'
Please Input @:paramter.moduleParameters
'
,
],
};
src/pages/system/log/operation/index.vue
View file @
677bfee1
...
...
@@ -34,8 +34,8 @@
<
template
#moreSearch=
"{ query }"
>
<MoreItem
:label=
"$t('log.operationService')"
>
<a-select
v-model=
"query.isSuccess"
allowClear
:placeholder=
"$t('select.placeholder')"
>
<a-select-option
value=
"0"
>
失败
</a-select-option>
<a-select-option
value=
"1"
>
成功
</a-select-option>
<a-select-option
value=
"0"
>
{{
$t
(
'
fail
'
)
}}
</a-select-option>
<a-select-option
value=
"1"
>
{{
$t
(
'
success
'
)
}}
</a-select-option>
</a-select>
</MoreItem>
</
template
>
...
...
src/pages/system/parameter/operation/form.vue
View file @
677bfee1
<
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>
<Wraper
:hidden=
"hidden"
:refresh=
"refresh"
:onOk=
"submit"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"form"
>
<a-form-model-item
:label=
"$t('paramter.moduleParameters')"
prop=
"paramModule"
>
<a-input
v-model=
"form.paramModule"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
<a-form-model-item
:label=
"$t('paramter.parameterCoding')"
prop=
"paramCode"
>
<a-input
v-model=
"form.paramCode"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
<a-form-model-item
:label=
"$t('paramter.paramValue')"
prop=
"paramValue"
>
<a-input
v-model=
"form.paramValue"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
<a-form-model-item
:label=
"$t('table.remark')"
prop=
"remark"
>
<a-textarea
v-model=
"form.remark"
:rows=
"4"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model>
</Wraper>
</
template
>
<
script
>
import
Api
from
'
@/api/organization
'
;
import
FormMixin
from
'
@/components/FormMixin
'
;
import
{
WraperMixins
}
from
'
@/components/table
'
;
export
default
{
mixins
:
[
FormMixin
],
mixins
:
[
WraperMixins
],
data
()
{
return
{
form
:
{},
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
'
}],
paramModule
:
[{
required
:
true
,
message
:
this
.
$t
(
'
paramter.moduleParametersError
'
)
}],
paramCode
:
[{
required
:
true
,
message
:
this
.
$t
(
'
paramter.parameterCodingError
'
)
}],
paramValue
:
[{
required
:
true
,
message
:
this
.
$t
(
'
paramter.paramValueError
'
)
}],
},
};
},
methods
:
{
add
()
{
return
Api
.
addOperation
({
...
this
.
form
})
;
computed
:
{
isEdit
()
{
return
this
.
type
===
'
edit
'
;
},
edit
()
{
return
Api
.
updateOperation
({
...
this
.
form
});
},
mounted
()
{
if
(
this
.
type
)
{
this
.
form
=
{
...
this
.
row
};
}
},
methods
:
{
async
submit
()
{
await
this
.
$refs
.
form
.
validate
();
return
this
.
isEdit
?
Api
.
updateOperation
({
...
this
.
form
})
:
Api
.
addOperation
({
...
this
.
form
});
},
},
};
...
...
src/pages/system/parameter/operation/index.vue
View file @
677bfee1
<
template
>
<my-table
url=
"/api/v1/parameters/operation"
rowKey=
"paramId"
:addBtn=
"addBtn"
ref=
"table"
:scroll=
"
{ x: true }"
>
<template
#drawer
>
<Form
ref=
"form"
/>
<Table
url=
"/api/v1/parameters/operation"
rowKey=
"paramId"
addBtn
ref=
"table"
:buttons=
"buttons"
>
<template
#drawer
="
drawer
"
>
<Form
v-bind=
"drawer"
/>
</
template
>
<
template
#search=
"{ query }"
>
<M
yFormModelItem
label=
"参数模块
"
>
<a-input
v-model=
"query.paramModule"
placeholder=
"请输入
"
/>
</M
yFormModel
Item>
<M
yFormModelItem
label=
"参数编码
"
>
<a-input
v-model=
"query.paramCode"
placeholder=
"请输入
"
/>
</M
yFormModel
Item>
<M
yFormModelItem
label=
"参数值
"
>
<a-input
v-model=
"query.paramValue"
placeholder=
"请输入
"
/>
</M
yFormModel
Item>
<M
oreItem
:label=
"$t('paramter.moduleParameters')
"
>
<a-input
v-model=
"query.paramModule"
:placeholder=
"$t('input.placeholder')
"
/>
</M
ore
Item>
<M
oreItem
:label=
"$t('paramter.parameterCoding')
"
>
<a-input
v-model=
"query.paramCode"
:placeholder=
"$t('input.placeholder')
"
/>
</M
ore
Item>
<M
oreItem
:label=
"$t('paramter.paramValue')
"
>
<a-input
v-model=
"query.paramValue"
:placeholder=
"$t('input.placeholder')
"
/>
</M
ore
Item>
</
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>
<a-table-column
:title=
"$t('paramter.moduleParameters')"
data-index=
"paramModule"
/>
<a-table-column
:title=
"$t('paramter.parameterCoding')"
data-index=
"paramCode"
/>
<a-table-column
:title=
"$t('paramter.paramValue')"
data-index=
"paramValue"
/>
<a-table-column
:title=
"$t('table.remark')"
data-index=
"remark"
/>
</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
'
;
import
{
Table
,
MoreItem
}
from
'
@/components/table
'
;
export
default
{
components
:
{
Form
,
PopconfirmDelete
,
MyFormModelItem
},
data
()
{
return
{
addBtn
:
{
width
:
600
,
onOk
:
()
=>
this
.
$refs
[
'
form
'
]?.
submit
()
},
};
components
:
{
Form
,
Table
,
MoreItem
},
computed
:
{
buttons
()
{
return
[
{
label
:
this
.
$t
(
'
table.edit
'
),
click
:
this
.
edit
},
{
type
:
'
confirm
'
,
url
:
(
row
)
=>
`/api/v1/parameters/operation/
${
row
.
paramId
}
`
,
after
:
this
.
refreshTable
,
},
];
},
},
methods
:
{
refreshTable
()
{
this
.
$refs
[
'
table
'
]?.
getData
();
},
view
(
data
,
type
)
{
this
.
$refs
[
'
table
'
]?.
show
({
type
});
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'
form
'
].
setData
({
...
data
},
type
);
});
edit
(
row
)
{
this
.
$refs
[
'
table
'
]?.
show
({
row
,
title
:
this
.
$t
(
'
table.edit
'
),
type
:
'
edit
'
});
},
},
};
</
script
>
\ No newline at end of file
</
script
>
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