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
Show 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 {
...
@@ -45,4 +45,16 @@ export default {
'
log.businessModule
'
:
[
'
业务模块
'
,
'
Business Module
'
],
'
log.businessModule
'
:
[
'
业务模块
'
,
'
Business Module
'
],
'
log.operationService
'
:
[
'
操作服务
'
,
'
Operation Service
'
],
'
log.operationService
'
:
[
'
操作服务
'
,
'
Operation Service
'
],
'
log.operateTime
'
:
[
'
操作时间
'
,
'
Operate Time
'
],
'
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 @@
...
@@ -34,8 +34,8 @@
<
template
#moreSearch=
"{ query }"
>
<
template
#moreSearch=
"{ query }"
>
<MoreItem
:label=
"$t('log.operationService')"
>
<MoreItem
:label=
"$t('log.operationService')"
>
<a-select
v-model=
"query.isSuccess"
allowClear
:placeholder=
"$t('select.placeholder')"
>
<a-select
v-model=
"query.isSuccess"
allowClear
:placeholder=
"$t('select.placeholder')"
>
<a-select-option
value=
"0"
>
失败
</a-select-option>
<a-select-option
value=
"0"
>
{{
$t
(
'
fail
'
)
}}
</a-select-option>
<a-select-option
value=
"1"
>
成功
</a-select-option>
<a-select-option
value=
"1"
>
{{
$t
(
'
success
'
)
}}
</a-select-option>
</a-select>
</a-select>
</MoreItem>
</MoreItem>
</
template
>
</
template
>
...
...
src/pages/system/parameter/operation/form.vue
View file @
677bfee1
<
template
>
<
template
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"DrawerForm"
>
<Wraper
:hidden=
"hidden"
:refresh=
"refresh"
:onOk=
"submit"
>
<a-form-model-item
label=
"参数模块"
prop=
"paramModule"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"form"
>
<a-input
v-model=
"form.paramModule"
placeholder=
"请输入"
:disabled=
"isView"
/>
<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>
<a-form-model-item
label=
"参数编码
"
prop=
"paramCode"
>
<a-form-model-item
:label=
"$t('paramter.parameterCoding')
"
prop=
"paramCode"
>
<a-input
v-model=
"form.paramCode"
placeholder=
"请输入"
:disabled=
"isView
"
/>
<a-input
v-model=
"form.paramCode"
:placeholder=
"$t('input.placeholder')
"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"参数值
"
prop=
"paramValue"
>
<a-form-model-item
:label=
"$t('paramter.paramValue')
"
prop=
"paramValue"
>
<a-input
v-model=
"form.paramValue"
placeholder=
"请输入"
:disabled=
"isView
"
/>
<a-input
v-model=
"form.paramValue"
:placeholder=
"$t('input.placeholder')
"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"说明
"
prop=
"remark"
>
<a-form-model-item
:label=
"$t('table.remark')
"
prop=
"remark"
>
<a-textarea
v-model=
"form.remark"
:disabled=
"isView"
:rows=
"4
"
/>
<a-textarea
v-model=
"form.remark"
:rows=
"4"
:placeholder=
"$t('input.placeholder')
"
/>
</a-form-model-item>
</a-form-model-item>
</a-form-model>
</a-form-model>
</Wraper>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'
@/api/organization
'
;
import
Api
from
'
@/api/organization
'
;
import
FormMixin
from
'
@/components/FormMixin
'
;
import
{
WraperMixins
}
from
'
@/components/table
'
;
export
default
{
export
default
{
mixins
:
[
FormMixin
],
mixins
:
[
WraperMixins
],
data
()
{
data
()
{
return
{
return
{
form
:
{},
rules
:
{
rules
:
{
paramModule
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
paramModule
:
[{
required
:
true
,
message
:
this
.
$t
(
'
paramter.moduleParametersError
'
)
}],
paramCode
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
paramCode
:
[{
required
:
true
,
message
:
this
.
$t
(
'
paramter.parameterCodingError
'
)
}],
paramValue
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
paramValue
:
[{
required
:
true
,
message
:
this
.
$t
(
'
paramter.paramValueError
'
)
}],
paramIndex
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
},
},
};
};
},
},
methods
:
{
computed
:
{
add
()
{
isEdit
()
{
return
Api
.
addOperation
({
...
this
.
form
});
return
this
.
type
===
'
edit
'
;
},
},
},
edit
()
{
mounted
()
{
return
Api
.
updateOperation
({
...
this
.
form
});
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
>
<
template
>
<my-table
<Table
url=
"/api/v1/parameters/operation"
rowKey=
"paramId"
addBtn
ref=
"table"
:buttons=
"buttons"
>
url=
"/api/v1/parameters/operation"
<template
#drawer
="
drawer
"
>
rowKey=
"paramId"
<Form
v-bind=
"drawer"
/>
:addBtn=
"addBtn"
ref=
"table"
:scroll=
"
{ x: true }"
>
<template
#drawer
>
<Form
ref=
"form"
/>
</
template
>
</
template
>
<
template
#search=
"{ query }"
>
<
template
#search=
"{ query }"
>
<M
yFormModelItem
label=
"参数模块
"
>
<M
oreItem
:label=
"$t('paramter.moduleParameters')
"
>
<a-input
v-model=
"query.paramModule"
placeholder=
"请输入
"
/>
<a-input
v-model=
"query.paramModule"
:placeholder=
"$t('input.placeholder')
"
/>
</M
yFormModel
Item>
</M
ore
Item>
<M
yFormModelItem
label=
"参数编码
"
>
<M
oreItem
:label=
"$t('paramter.parameterCoding')
"
>
<a-input
v-model=
"query.paramCode"
placeholder=
"请输入
"
/>
<a-input
v-model=
"query.paramCode"
:placeholder=
"$t('input.placeholder')
"
/>
</M
yFormModel
Item>
</M
ore
Item>
<M
yFormModelItem
label=
"参数值
"
>
<M
oreItem
:label=
"$t('paramter.paramValue')
"
>
<a-input
v-model=
"query.paramValue"
placeholder=
"请输入
"
/>
<a-input
v-model=
"query.paramValue"
:placeholder=
"$t('input.placeholder')
"
/>
</M
yFormModel
Item>
</M
ore
Item>
</
template
>
</
template
>
<a-table-column
title=
"参数模块"
data-index=
"paramModule"
/>
<a-table-column
:title=
"$t('paramter.moduleParameters')"
data-index=
"paramModule"
/>
<a-table-column
title=
"参数编码"
data-index=
"paramCode"
/>
<a-table-column
:title=
"$t('paramter.parameterCoding')"
data-index=
"paramCode"
/>
<a-table-column
title=
"参数值"
data-index=
"paramValue"
/>
<a-table-column
:title=
"$t('paramter.paramValue')"
data-index=
"paramValue"
/>
<a-table-column
title=
"说明"
data-index=
"remark"
/>
<a-table-column
:title=
"$t('table.remark')"
data-index=
"remark"
/>
<a-table-column
title=
"操作"
fixed=
"right"
>
</Table>
<
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>
</template>
<
script
>
<
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
Form
from
'
./form.vue
'
;
import
{
Table
,
MoreItem
}
from
'
@/components/table
'
;
export
default
{
export
default
{
components
:
{
Form
,
PopconfirmDelete
,
MyFormModelItem
},
components
:
{
Form
,
Table
,
MoreItem
},
data
()
{
computed
:
{
return
{
buttons
()
{
addBtn
:
{
width
:
600
,
onOk
:
()
=>
this
.
$refs
[
'
form
'
]?.
submit
()
},
return
[
};
{
label
:
this
.
$t
(
'
table.edit
'
),
click
:
this
.
edit
},
{
type
:
'
confirm
'
,
url
:
(
row
)
=>
`/api/v1/parameters/operation/
${
row
.
paramId
}
`
,
after
:
this
.
refreshTable
,
},
];
},
},
},
methods
:
{
methods
:
{
refreshTable
()
{
refreshTable
()
{
this
.
$refs
[
'
table
'
]?.
getData
();
this
.
$refs
[
'
table
'
]?.
getData
();
},
},
view
(
data
,
type
)
{
this
.
$refs
[
'
table
'
]?.
show
({
type
});
edit
(
row
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'
table
'
]?.
show
({
row
,
title
:
this
.
$t
(
'
table.edit
'
),
type
:
'
edit
'
});
this
.
$refs
[
'
form
'
].
setData
({
...
data
},
type
);
});
},
},
},
},
};
};
...
...
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