修改参数模板管理
This commit is contained in:
@@ -2038,4 +2038,7 @@ module.exports = {
|
|||||||
experienceReference:'Experience reference',
|
experienceReference:'Experience reference',
|
||||||
onlyTheDataFilledUrged:'Only the data whose status is to be filled in or To be processed by eng. interface can be urged',
|
onlyTheDataFilledUrged:'Only the data whose status is to be filled in or To be processed by eng. interface can be urged',
|
||||||
onlyTheDataWhoseStatusUrged:'Only the data whose status is to be filled in can be urged',
|
onlyTheDataWhoseStatusUrged:'Only the data whose status is to be filled in can be urged',
|
||||||
|
maintainer:'Maintainer',
|
||||||
|
setupMaintainer:'Setup maintainer',
|
||||||
|
maximumOfBeSelected:'A maximum of 30 personnel can be selected',
|
||||||
}
|
}
|
||||||
@@ -3772,4 +3772,7 @@ module.exports = {
|
|||||||
experienceReference:'经验参考',
|
experienceReference:'经验参考',
|
||||||
onlyTheDataFilledUrged:'只能催办状态为待填写或待工程接口人处理的数据',
|
onlyTheDataFilledUrged:'只能催办状态为待填写或待工程接口人处理的数据',
|
||||||
onlyTheDataWhoseStatusUrged:'只能催办状态为待填写的数据',
|
onlyTheDataWhoseStatusUrged:'只能催办状态为待填写的数据',
|
||||||
|
maintainer:'维护人',
|
||||||
|
setupMaintainer:'设置维护人',
|
||||||
|
maximumOfBeSelected:'最多只能选择30个人员',
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,253 @@
|
|||||||
|
<template>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:maskClosable="false"
|
||||||
|
:width="500"
|
||||||
|
placement="right"
|
||||||
|
:closable="true"
|
||||||
|
@close="handleCancel"
|
||||||
|
:visible="visible"
|
||||||
|
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<a-form>
|
||||||
|
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span class="title-text-text" :title="$t('maintainer')">{{$t('maintainer')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="maintainerName">
|
||||||
|
<PersonnelSelection :query="{db_field_name:'maintainer',db_field_txt:$t('maintainer')}"
|
||||||
|
:personneQuery="formInline"
|
||||||
|
v-if="visible"
|
||||||
|
class="maintainerClass"
|
||||||
|
@change="PersonnelSelectionChange"
|
||||||
|
v-model="formInline.maintainerName"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
</a-form>
|
||||||
|
</a-spin>
|
||||||
|
<div class="drawer-bootom-button">
|
||||||
|
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
|
||||||
|
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||||
|
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'setupMaintainerModel',
|
||||||
|
components: {
|
||||||
|
PersonnelSelection
|
||||||
|
},
|
||||||
|
props: ['url'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formInline: {},
|
||||||
|
confirmLoading: false,
|
||||||
|
visible: false,
|
||||||
|
rules: {
|
||||||
|
maintainerName: [
|
||||||
|
{ required: true, message: this.$t('PleaseSelect') + this.$t('maintainer'), trigger: 'change' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
disabled: false,
|
||||||
|
projectNameList: [],
|
||||||
|
title: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
editModel(value) {
|
||||||
|
this.visible = true
|
||||||
|
this.title = this.$t('setupMaintainer')
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.formInline = JSON.parse(JSON.stringify(value))
|
||||||
|
this.$refs['ruleForm'].clearValidate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
this.$refs.ruleForm.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
let query = JSON.parse(JSON.stringify(this.formInline))
|
||||||
|
let maintainerName = query.maintainerName.split(',')
|
||||||
|
if (maintainerName.length > 30) {
|
||||||
|
this.$message.warning(this.$t('maximumOfBeSelected'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
Object.keys(query).forEach(res => {
|
||||||
|
if (query[res] && query[res] instanceof Array) {
|
||||||
|
query[res] = query[res].join(',')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.confirmLoading = true
|
||||||
|
putAction('params/template/edit', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.confirmLoading = false
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('setupMaintainerModelForm')
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
|
this.confirmLoading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleInput(value) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
this.$refs.ruleForm.validateField([value])
|
||||||
|
})
|
||||||
|
},
|
||||||
|
PersonnelSelectionChange(value, id) {
|
||||||
|
this.formInline[value] = id
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
projectNameChange(value) {
|
||||||
|
console.log(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.formAdd .ant-form-item-label {
|
||||||
|
width: 130px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formAdd .ant-form-item-control-wrapper {
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*.formAdd .ant-form-item {*/
|
||||||
|
/* margin-bottom: 20px;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
.itemModel .ant-form-item-control-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input .ant-select-selection--single {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input .ant-select-selection--multiple {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input .ant-select-selection__rendered {
|
||||||
|
line-height: 38px;
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
|
||||||
|
margin-top: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input .ant-calendar-picker {
|
||||||
|
line-height: 38px;
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input .ant-calendar-picker-input {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input .ant-input-number-input-wrap {
|
||||||
|
line-height: 38px;
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
.ant-input-disabled {
|
||||||
|
color: rgba(0, 0, 0, 0.65) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<style scoped>
|
||||||
|
.box-title-text {
|
||||||
|
line-height: 1.4;
|
||||||
|
display: flex;
|
||||||
|
/*align-items: center;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text {
|
||||||
|
width: 74px;
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 16px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input {
|
||||||
|
display: inline-block;
|
||||||
|
height: 38px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemModel {
|
||||||
|
width: calc(100% - 90px);
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Required {
|
||||||
|
color: red;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text-text {
|
||||||
|
margin-top: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.formAdd {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.drawer-bootom-button {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 100;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .add-input {
|
||||||
|
min-height: 135px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .maintainerClass .itemModelStand-input{
|
||||||
|
height: 120px;
|
||||||
|
}
|
||||||
|
::v-deep .maintainerClass .itemModelStand-input .ant-select-selection--multiple{
|
||||||
|
min-height: 120px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user