update 企标稽查计划

This commit is contained in:
danshihao
2023-11-22 11:53:14 +08:00
parent e006798d74
commit 12631c2eec
6 changed files with 40 additions and 26 deletions
@@ -2,7 +2,7 @@
<div class="selection-wrapper"> <div class="selection-wrapper">
<div class="box-title-text"> <div class="box-title-text">
<a-input class="box-input" v-model="textVals" :title="textVals" <a-input class="box-input" v-model="textVals" :title="textVals"
:disabled="disabledInput" readonly :placeholder="placeholder"> :disabled="disabledInput" :placeholder="placeholder">
<a-icon v-if="storeVals" slot="suffix" type="close-circle" @click="handleEmpty" title="清空"/> <a-icon v-if="storeVals" slot="suffix" type="close-circle" @click="handleEmpty" title="清空"/>
</a-input> </a-input>
<a-button v-if="!disabled" type="primary" class="button-box" @click="workGroupClick"> <a-button v-if="!disabled" type="primary" class="button-box" @click="workGroupClick">
@@ -62,10 +62,10 @@ export default {
default: true, default: true,
required: false required: false
}, },
// 自定义返回字段,默认返回 id // 自定义返回字段,默认返回 name
customReturnField: { customReturnField: {
type: String, type: String,
default: '' default: 'name'
}, },
backDepart: { backDepart: {
type: Boolean, type: Boolean,
@@ -156,9 +156,6 @@ export default {
this.$emit('change', this.storeVals) this.$emit('change', this.storeVals)
this.backDepartInfo() this.backDepartInfo()
}, },
getDepartNames () {
return this.departNames
},
handleEmpty () { handleEmpty () {
this.handleOK('') this.handleOK('')
}, },
@@ -280,7 +280,7 @@ export default {
if (item.id === key) { if (item.id === key) {
return item return item
} }
if (item.children instanceof Array) { if (Array.isArray(item.children)) {
const value = forChildren(item.children, key) const value = forChildren(item.children, key)
if (value != null) { if (value != null) {
return value return value
@@ -231,16 +231,25 @@ export default {
this.loadPage({ projectId, taskId }) this.loadPage({ projectId, taskId })
return return
} }
// 否则就是创建一个新的流程 this.getProjectId()
getInspectPlanProjectId().then(res => {
if (res) {
this.projectId = res + ''
this.currentNode = EsInspectionPlan.initiate.value
this.btn = EsInspectionPlan.initiate.btn
}
})
}, },
methods: { methods: {
/**
* 获取项目id
*/
getProjectId () {
this.loading = true
// 否则就是创建一个新的流程
getInspectPlanProjectId().then(res => {
if (res) {
this.projectId = res + ''
this.currentNode = EsInspectionPlan.initiate.value
this.btn = EsInspectionPlan.initiate.btn
}
}).finally(() => {
this.loading = false
})
},
/** /**
* 获取页面详情 * 获取页面详情
*/ */
@@ -295,7 +304,7 @@ export default {
personnelObj = this.$refs.personnelInfo.getDataObjVerify() personnelObj = this.$refs.personnelInfo.getDataObjVerify()
// List拆成数组 // List拆成数组
for (const key in personnelObj) { for (const key in personnelObj) {
if (key.includes('List')) { if (personnelObj[key] && key.includes('List')) {
personnelObj[key] = personnelObj[key].split(',') personnelObj[key] = personnelObj[key].split(',')
} }
} }
@@ -332,7 +341,7 @@ export default {
personnelObj = this.$refs.personnelInfo.getDataObj() personnelObj = this.$refs.personnelInfo.getDataObj()
// List拆成数组 // List拆成数组
for (const key in personnelObj) { for (const key in personnelObj) {
if (key.includes('List')) { if (personnelObj[key] && key.includes('List')) {
personnelObj[key] = personnelObj[key].split(',') personnelObj[key] = personnelObj[key].split(',')
} }
} }
@@ -64,19 +64,19 @@
<!-- 稽查负责人 --> <!-- 稽查负责人 -->
<a-form-item :label="$t('workCenter.esInspectionPlan.inspectionDirector')" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item :label="$t('workCenter.esInspectionPlan.inspectionDirector')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.solicitingOpinionsFrom')" <user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.solicitingOpinionsFrom')"
type="radio" type="radio" :nameStr="model.inspectUserDictText"
v-decorator="['inspectUser', validatorRules.inspectionDirector]" /> v-decorator="['inspectUser', validatorRules.inspectionDirector]" />
</a-form-item> </a-form-item>
<!-- 标准化组对接人 --> <!-- 标准化组对接人 -->
<a-form-item :label="$t('workCenter.esInspectionPlan.standardizationGroupContactPerson')" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item :label="$t('workCenter.esInspectionPlan.standardizationGroupContactPerson')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.solicitingOpinionsFrom')" <user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.solicitingOpinionsFrom')"
type="radio" type="radio" :nameStr="model.standardizationDockingUserDictText"
v-decorator="['standardizationDockingUser', validatorRules.standardizationGroupContactPerson]" /> v-decorator="['standardizationDockingUser', validatorRules.standardizationGroupContactPerson]" />
</a-form-item> </a-form-item>
<!-- 征求意见对象 --> <!-- 征求意见对象 -->
<a-form-item :label="$t('workCenter.esInspectionPlan.solicitingOpinionsFrom')" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item :label="$t('workCenter.esInspectionPlan.solicitingOpinionsFrom')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.solicitingOpinionsFrom')" <user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.solicitingOpinionsFrom')"
type="checkbox" type="checkbox" :nameStr="model.objectOfConsultationDictText"
v-decorator="['objectOfConsultation', validatorRules.solicitingOpinionsFrom]" /> v-decorator="['objectOfConsultation', validatorRules.solicitingOpinionsFrom]" />
</a-form-item> </a-form-item>
<!-- 备注 --> <!-- 备注 -->
@@ -141,7 +141,7 @@ export default {
title: this.$t('workCenter.esInspectionPlan.mainDutyStandardizationGroup'), title: this.$t('workCenter.esInspectionPlan.mainDutyStandardizationGroup'),
align: 'center', align: 'center',
width: 150, width: 150,
dataIndex: 'standardizationWorkGroup_dictText', dataIndex: 'standardizationWorkGroup',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 所属部门 { // 所属部门
@@ -162,21 +162,21 @@ export default {
title: this.$t('workCenter.esInspectionPlan.inspectionDirector'), title: this.$t('workCenter.esInspectionPlan.inspectionDirector'),
align: 'center', align: 'center',
width: 120, width: 120,
dataIndex: 'inspectUser_dictText', dataIndex: 'inspectUserDictText',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 标准化组对接人 { // 标准化组对接人
title: this.$t('workCenter.esInspectionPlan.standardizationGroupContactPerson'), title: this.$t('workCenter.esInspectionPlan.standardizationGroupContactPerson'),
align: 'center', align: 'center',
width: 140, width: 140,
dataIndex: 'standardizationDockingUser_dictText', dataIndex: 'standardizationDockingUserDictText',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 所属部门人员 { // 所属部门人员
title: this.$t('workCenter.esInspectionPlan.departmentPersonnel'), title: this.$t('workCenter.esInspectionPlan.departmentPersonnel'),
align: 'center', align: 'center',
width: 120, width: 120,
dataIndex: 'objectOfConsultation', dataIndex: 'objectOfConsultationDictText',
showCodeList: [EsInspectionPlan.initiate.value], showCodeList: [EsInspectionPlan.initiate.value],
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
@@ -184,7 +184,7 @@ export default {
title: this.$t('workCenter.esInspectionPlan.creator'), title: this.$t('workCenter.esInspectionPlan.creator'),
align: 'center', align: 'center',
width: 120, width: 120,
dataIndex: 'createBy', dataIndex: 'createByDictText',
showCodeList: [EsInspectionPlan.fillInComments.value], showCodeList: [EsInspectionPlan.fillInComments.value],
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
@@ -229,7 +229,10 @@ export default {
// 列表查询带上项目id // 列表查询带上项目id
projectId: { projectId: {
immediate: true, immediate: true,
handler () { handler (val) {
if (!val) {
return
}
this.filters.projectId = this.projectId this.filters.projectId = this.projectId
if (this.currentNode === EsInspectionPlan.fillInComments.value) { if (this.currentNode === EsInspectionPlan.fillInComments.value) {
this.filters.nodeId = this.$route.query.nodeId this.filters.nodeId = this.$route.query.nodeId
@@ -125,6 +125,10 @@ export default {
}, },
// 确定 // 确定
handleOk () { handleOk () {
if (this.disabled) {
this.close()
return
}
const that = this const that = this
// 触发表单验证 // 触发表单验证
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
@@ -155,6 +159,7 @@ export default {
}, },
close () { close () {
this.$emit('close') this.$emit('close')
this.dataSource = []
this.$refs.form.resetFields() this.$refs.form.resetFields()
this.visible = false this.visible = false
}, },