| | |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | :title="title" |
| | | width="950px" |
| | | width="1100px" |
| | | :before-close="handleClose" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | |
| | | </el-form-item> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="受审核部门" prop="deptId" align="center"> |
| | | <el-table-column label="受审核部门" prop="deptId" align="center" width="190"> |
| | | <template #default="{row,$index}"> |
| | | <el-form-item :prop="'deptList.' + '[' + $index + ']' + '.deptId'" :rules="state.rules.deptId"> |
| | | <el-select |
| | |
| | | <span>{{row.termNum}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="审核员" prop="dept" align="center"> |
| | | <el-table-column label="审核员" prop="dept" align="center" width="230"> |
| | | <template #default="{row,$index}"> |
| | | <el-form-item :prop="'deptList.' + '[' + $index + ']' + '.checkId'" :rules="state.rules.checkId"> |
| | | <el-select clearable v-model="row.checkId" :disabled="title =='查看'" filterable style="width: 240px"> |
| | | <el-select clearable v-model="row.checkId" :disabled="title =='查看'" collapse-tags collapse-tags-tooltip filterable multiple style="width: 240px"> |
| | | <el-option |
| | | v-for="item in state.interUserList" |
| | | :key="item.personId" |
| | |
| | | checkTime.value = [state.form.reviewStart,state.form.reviewEnd] |
| | | checkStartTime.value = [state.form.firstStarttime,state.form.firstEndtime] |
| | | checkEndTime.value = [state.form.lastStarttime,state.form.lastEndtime] |
| | | state.form.deptList = state.form.deptList.map(item => { |
| | | return { |
| | | ...item, |
| | | checkId:item.checkId.split(',').map(Number) |
| | | } |
| | | }) |
| | | await nextTick(()=> { |
| | | state.form.deptList.forEach(item => { |
| | | |
| | | |
| | | state.deptList.forEach(i => { |
| | | if(i.deptId == item.deptId){ |
| | | item.termNum = sortVersionNumbers(i.caluseVO1List?.map(x=>x.clauseNum)).join('、') |
| | |
| | | ElMessage.warning('请添加受审部门信息') |
| | | return |
| | | } |
| | | |
| | | console.log('111',state.form) |
| | | state.form.deptList.forEach(item => { |
| | | item.checkId = item.checkId.join(',') |
| | | }) |
| | | if(valid){ |
| | | if(title.value === '新增'){ |
| | | const {id, ...data} = JSON.parse(JSON.stringify(state.form)) |
| | | const res = await addPlan(data) |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '新增成功' |
| | | }); |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | try { |
| | | const res = await addPlan(data) |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '新增成功' |
| | | }); |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | emit("getList") |
| | | busRef.value.clearValidate(); |
| | | reset(); |
| | | dialogVisible.value = false; |
| | | }catch (e) { |
| | | state.form.deptList.forEach(item => { |
| | | item.checkId = item.checkId.split(',').map(Number) |
| | | }) |
| | | } |
| | | emit("getList") |
| | | busRef.value.clearValidate(); |
| | | reset(); |
| | | dialogVisible.value = false; |
| | | |
| | | }else if(title.value === '编辑'){ |
| | | const {...data} = JSON.parse(JSON.stringify(state.form)) |
| | | const res = await editPlan(data) |
| | |
| | | state.form.proofreadId = null |
| | | state.form.checkId = null |
| | | state.form.ratifyId = null |
| | | state.form.deptList.forEach(item => { |
| | | item.checkId = [] |
| | | }) |
| | | getPeopleList() |
| | | getUserList() |
| | | getDeptList() |