[update] 修改企标流程保存后回显的bug

This commit is contained in:
lideqin
2024-01-04 15:30:24 +08:00
parent d0e22cd06b
commit ff76fffa2c
11 changed files with 236 additions and 106 deletions
+2 -1
View File
@@ -114,7 +114,7 @@ export default {
} }
getPersonInfoList(param).then(res => { getPersonInfoList(param).then(res => {
if (res.success) { if (res.success) {
console.log(res.result) console.log('-------------获取人员信息完成', res.result)
// 处理人员信息数据,判断每个节点是否能选人 // 处理人员信息数据,判断每个节点是否能选人
this.personnelInfoData = res.result.map(item => { this.personnelInfoData = res.result.map(item => {
return { return {
@@ -128,6 +128,7 @@ export default {
}, },
// 从草稿进来填过的人员需要回显 // 从草稿进来填过的人员需要回显
draftInitPersonInfo (personInfoObj) { draftInitPersonInfo (personInfoObj) {
console.log('--------------draftInitPersonInfo 草稿进来回显')
this.personnelInfoData = this.personnelInfoData.map(item => { this.personnelInfoData = this.personnelInfoData.map(item => {
return { return {
...item, ...item,
+31 -11
View File
@@ -135,6 +135,7 @@
import ListMixin from '../mixins/ListMixin' import ListMixin from '../mixins/ListMixin'
import CustomHeader from '@/components/CustomHeader' import CustomHeader from '@/components/CustomHeader'
import { queryAllRole, queryDepartTreeList } from '../api/api' import { queryAllRole, queryDepartTreeList } from '../api/api'
import { getAction } from '@/api/manage'
export default { export default {
name: 'SelectUser', name: 'SelectUser',
@@ -167,16 +168,16 @@ export default {
default: 'radio' default: 'radio'
} }
}, },
// watch: { watch: {
// selectedData: { selectedData: {
// immediate: true, immediate: true,
// deep: true, handler (val) {
// handler (val) { if (val) {
// console.log(val) this.getUserListByIds(val)
// this.handleCheckedArr() }
// } }
// } }
// }, },
data () { data () {
return { return {
realname: '', // 搜索框数据 realname: '', // 搜索框数据
@@ -193,7 +194,8 @@ export default {
pageSize: 10 pageSize: 10
}, },
url: { url: {
list: '/sys/user/page' list: '/sys/user/page',
userListByIds: '/sys/user/queryByIds'
}, },
checkedArr: [], checkedArr: [],
selectedDataArr: [], selectedDataArr: [],
@@ -231,6 +233,12 @@ export default {
arr.push(i) arr.push(i)
} }
} }
for (const i of this.selectedDataArr) {
if (!arr.find(item => item.id === i.id)) {
// 已加载完的列表里还没有的选中数据,按顺序推入
arr.push(i)
}
}
this.selectedDataArr = arr this.selectedDataArr = arr
} else { } else {
console.log('------------删除了数据------------') console.log('------------删除了数据------------')
@@ -242,6 +250,18 @@ export default {
} }
console.log(this.selectedDataArr) console.log(this.selectedDataArr)
}, },
// 根据id获取用户信息,初始化选中数据,不查选中数据的话如果没有划到那一页,名字带不出来
getUserListByIds (ids) {
const params = {}
params.userIds = ids
getAction(this.url.userListByIds, params).then((res) => {
if (res.success) {
this.selectedDataArr = res.result || []
} else {
this.$message(res.message)
}
})
},
handleCheckedArr () { handleCheckedArr () {
// 清空选中的数据 // 清空选中的数据
if (this.type === 'checkbox') { if (this.type === 'checkbox') {
+41 -6
View File
@@ -64,7 +64,7 @@
stop-propagation stop-propagation
:before-close="handleBeforeClose"> :before-close="handleBeforeClose">
<div class="item-box"> <div class="item-box">
<van-checkbox :name="item.id" @click="checkboxClick(item)" shape="square" :disabled="readonly"></van-checkbox> <van-checkbox :name="item.userId" @click="checkboxClick(item)" shape="square" :disabled="readonly"></van-checkbox>
<div class="item-container"> <div class="item-container">
<div class="item-title"> <div class="item-title">
{{ item.realname }}({{ item.username }}) {{ item.realname }}({{ item.username }})
@@ -91,7 +91,7 @@
stop-propagation stop-propagation
:before-close="handleBeforeClose"> :before-close="handleBeforeClose">
<div class="item-box"> <div class="item-box">
<van-radio :name="item.id" @click="checkboxClick(item)" :disabled="readonly"></van-radio> <van-radio :name="item.userId" @click="checkboxClick(item)" :disabled="readonly"></van-radio>
<div class="item-container"> <div class="item-container">
<div class="item-title"> <div class="item-title">
{{ item.realname }}({{ item.username }}) {{ item.realname }}({{ item.username }})
@@ -134,6 +134,7 @@
import CustomHeader from '@/components/CustomHeader' import CustomHeader from '@/components/CustomHeader'
import ListMixin from '@/mixins/ListMixin' import ListMixin from '@/mixins/ListMixin'
import { getWorkGroupTreeList, queryAllRole } from '@/api/api' import { getWorkGroupTreeList, queryAllRole } from '@/api/api'
import { getAction } from '@/api/manage'
export default { export default {
name: 'SelectUserByWorkGroup', name: 'SelectUserByWorkGroup',
@@ -166,6 +167,16 @@ export default {
default: 'radio' default: 'radio'
} }
}, },
watch: {
selectedData: {
immediate: true,
handler (val) {
if (val) {
this.getUserListByIds(val)
}
}
}
},
data () { data () {
return { return {
realname: '', // 搜索框数据 realname: '', // 搜索框数据
@@ -182,7 +193,8 @@ export default {
pageSize: 10 pageSize: 10
}, },
url: { url: {
list: '/act/user/workGroupPage' list: '/act/user/workGroupPage',
userListByIds: '/sys/user/queryByIds'
}, },
checkedArr: [], checkedArr: [],
selectedDataArr: [], selectedDataArr: [],
@@ -211,12 +223,18 @@ export default {
checkboxClick (item) { checkboxClick (item) {
console.log(item) console.log(item)
if (this.type === 'checkbox') { if (this.type === 'checkbox') {
if (this.checkedArr.includes(item.id)) { if (this.checkedArr.includes(item.userId)) {
console.log('------------增加了数据------------') console.log('------------增加了数据------------')
// 说明是增加了数据,为了顺序和列表顺序保持一致,用循环设置 // 说明是增加了数据,为了顺序和列表顺序保持一致,用循环设置
const arr = [] const arr = []
for (const i of this.listData) { for (const i of this.listData) {
if (this.checkedArr.includes(i.id)) { if (this.checkedArr.includes(i.userId)) {
arr.push(i)
}
}
for (const i of this.selectedDataArr) {
if (!arr.find(item => item.userId === i.userId)) {
// 已加载完的列表里还没有的选中数据,按顺序推入
arr.push(i) arr.push(i)
} }
} }
@@ -224,13 +242,30 @@ export default {
} else { } else {
console.log('------------删除了数据------------') console.log('------------删除了数据------------')
// 说明是删除了数据 // 说明是删除了数据
this.selectedDataArr = this.selectedDataArr.filter(i => i.id !== item.id) this.selectedDataArr = this.selectedDataArr.filter(i => i.userId !== item.userId)
} }
} else { } else {
this.selectedDataArr = [item] this.selectedDataArr = [item]
} }
console.log(this.selectedDataArr) console.log(this.selectedDataArr)
}, },
// 根据id获取用户信息,初始化选中数据,不查选中数据的话如果没有划到那一页,名字带不出来
getUserListByIds (ids) {
const params = {}
params.userIds = ids
getAction(this.url.userListByIds, params).then((res) => {
if (res.success) {
this.selectedDataArr = res.result.map(item => {
return {
...item,
userId: item.id
}
}) || []
} else {
this.$message(res.message)
}
})
},
handleCheckedArr () { handleCheckedArr () {
// 清空选中的数据 // 清空选中的数据
if (this.type === 'checkbox') { if (this.type === 'checkbox') {
+4 -3
View File
@@ -131,12 +131,13 @@ export const EsRevisionPlanStandardizationInitNodes = new EsEnums({
standardizationStart: { text: '标准化工程师发起', value: 'sid-880237E7-1735-49AE-B9EC-D7DA5D28E17D' }, standardizationStart: { text: '标准化工程师发起', value: 'sid-880237E7-1735-49AE-B9EC-D7DA5D28E17D' },
contactSelectApprover: { text: '部所联络人选取审批人', value: 'sid-C3F65D96-76B0-4901-8C8A-D6B390099381' }, contactSelectApprover: { text: '部所联络人选取审批人', value: 'sid-C3F65D96-76B0-4901-8C8A-D6B390099381' },
standardizationUpdate: { text: '标准化工程师修改调整', value: 'sid-3CB0E6B1-9918-4A21-9C62-9344FF1B7269' }, standardizationUpdate: { text: '标准化工程师修改调整', value: 'sid-3CB0E6B1-9918-4A21-9C62-9344FF1B7269' },
mainDrafterLeaderSend: { text: '主起草单位主管级领导审批下发', value: 'sid-57656F2E-0AE1-45D8-85D0-CE3E37D9E926' }, mainDrafterLeaderSend: { text: '主起草单位主管级领导审批下发', value: 'sid-050827D6-AA12-4561-8B37-4D2023AF6D7F' },
contactUpdate: { text: '部所联络人修改调整', value: 'sid-3AF454B3-1D93-4BF6-B925-98F1A7E125B8' }, contactUpdate: { text: '部所联络人修改调整', value: 'sid-3AF454B3-1D93-4BF6-B925-98F1A7E125B8' },
mainDrafterEnterInfo: { text: '主起草人填写信息', value: 'sid-E2015AB3-9C52-4E49-A261-DA11CB4BAA7E' }, mainDrafterEnterInfo: { text: '主起草人填写信息', value: 'sid-E2015AB3-9C52-4E49-A261-DA11CB4BAA7E' },
contactsApproval: { text: '部所联络人汇总', value: 'sid-158523C5-7D8F-4433-B2DB-8A6C09DFDB1B' }, contactsApproval: { text: '部所联络人汇总', value: 'sid-158523C5-7D8F-4433-B2DB-8A6C09DFDB1B' },
mainDrafterLeaderApproval: { text: '主起草单位主管级领导批准', value: 'sid-050827D6-AA12-4561-8B37-4D2023AF6D7F', isMobile: true }, mainDrafterLeaderApproval: { text: '主起草单位主管级领导批准', value: 'sid-57656F2E-0AE1-45D8-85D0-CE3E37D9E926', isMobile: true },
standardizationSumUp: { text: '标准化归档', value: 'sid-86610E08-1DDB-467A-A32E-C661FE889A57' } standardizationSumUp: { text: '标准化归档', value: 'sid-86610E08-1DDB-467A-A32E-C661FE889A57' },
standardizationTwoUpdate: { text: '标准化工程师二次修改调整', value: 'sid-BEAAC29F-17D8-4162-8C0B-01A4A8ED7729' }
}) })
// 企标制修订流程 // 企标制修订流程
@@ -65,7 +65,7 @@
bordered bordered
:scroll="{x: '100%'}" :scroll="{x: '100%'}"
ref="table" ref="table"
rowKey="espId" rowKey="id"
:columns="columns" :columns="columns"
:dataSource="baseInfoForm" :dataSource="baseInfoForm"
:pagination="false"> :pagination="false">
@@ -125,7 +125,7 @@
<script> <script>
import ProcessCommonLayout from '@/components/ProcessCommonLayout' import ProcessCommonLayout from '@/components/ProcessCommonLayout'
import {EsInitChangeNodes, EsInspectionPlan, ProcessKey} from '@/enums/commonEnums' import { EsRevisionPlanActivityReportNodes, ProcessKey } from '@/enums/commonEnums'
import CalendarField from '@/components/CalendarField' import CalendarField from '@/components/CalendarField'
import SelectUser from '@/components/SelectUser' import SelectUser from '@/components/SelectUser'
import { import {
@@ -285,13 +285,13 @@ export default {
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
} }
], ],
baseInfoForm: {} baseInfoForm: []
} }
}, },
// 组件内路由拦截 // 组件内路由拦截
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
// 如果不是移动端支持的节点,就跳转NoMobile // 如果不是移动端支持的节点,就跳转NoMobile
if (!EsInitChangeNodes.propertyOfValue('isMobile', to.query.nodeId)) { if (!EsRevisionPlanActivityReportNodes.propertyOfValue('isMobile', to.query.nodeId)) {
next({ path: '/noMobile' }) next({ path: '/noMobile' })
} }
next() next()
@@ -306,7 +306,21 @@ export default {
activelyReportGetDataById(this.$route.query.taskId).then(res => { activelyReportGetDataById(this.$route.query.taskId).then(res => {
if (res.success) { if (res.success) {
const result = res.result const result = res.result
this.processInfoForm = result.common // 有草稿json按草稿进来的回显
if (result.infoJsonStr) {
// 初始化流程信息
const prcObj = Object.assign({}, result)
prcObj.dueTime = result.processDueDate
prcObj.prcMes = result.processDescription
// 初始化流程审批信息
prcObj.commitText = result.handleText
prcObj.commitFile = result.handleFile
this.processInfoForm = Object.assign({}, prcObj)
result.dataList = JSON.parse(result.infoJsonStr).dataList
console.log(result.data)
} else {
this.processInfoForm = result.common
}
this.baseInfoForm = result.dataList this.baseInfoForm = result.dataList
} else { } else {
this.$message(res.message) this.$message(res.message)
@@ -113,14 +113,14 @@
<script> <script>
import ProcessCommonLayout from '@/components/ProcessCommonLayout' import ProcessCommonLayout from '@/components/ProcessCommonLayout'
import {EsInitChangeNodes, ProcessKey} from '@/enums/commonEnums' import {EsInitChangeNodes, EsRevisionPlanStandardizationInitNodes, ProcessKey} from '@/enums/commonEnums'
import CalendarField from '@/components/CalendarField' import CalendarField from '@/components/CalendarField'
import SelectUser from '@/components/SelectUser' import SelectUser from '@/components/SelectUser'
import { import {
standardizationInitGetDataById, standardizationInitGetDataById,
standardizationInitTurnTo, standardizationInitTurnTo,
standardizationInitAgree, standardizationInitAgree,
standardizationInitReject, activelyReportGetDataById, activelyReportTurnTo, activelyReportAgree, activelyReportReject standardizationInitReject
} from '@/api/api' } from '@/api/api'
export default { export default {
@@ -272,7 +272,7 @@ export default {
// 组件内路由拦截 // 组件内路由拦截
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
// 如果不是移动端支持的节点,就跳转NoMobile // 如果不是移动端支持的节点,就跳转NoMobile
if (!EsInitChangeNodes.propertyOfValue('isMobile', to.query.nodeId)) { if (!EsRevisionPlanStandardizationInitNodes.propertyOfValue('isMobile', to.query.nodeId)) {
next({ path: '/noMobile' }) next({ path: '/noMobile' })
} }
next() next()
@@ -287,7 +287,21 @@ export default {
standardizationInitGetDataById(this.$route.query.taskId).then(res => { standardizationInitGetDataById(this.$route.query.taskId).then(res => {
if (res.success) { if (res.success) {
const result = res.result const result = res.result
this.processInfoForm = result.common // 有草稿json按草稿进来的回显
if (result.infoJsonStr) {
// 初始化流程信息
const prcObj = Object.assign({}, result)
prcObj.dueTime = result.processDueDate
prcObj.prcMes = result.processDescription
// 初始化流程审批信息
prcObj.commitText = result.handleText
prcObj.commitFile = result.handleFile
this.processInfoForm = Object.assign({}, prcObj)
result.dataList = JSON.parse(result.infoJsonStr)
console.log(result.data)
} else {
this.processInfoForm = result.common
}
this.baseInfoForm = result.dataList this.baseInfoForm = result.dataList
} else { } else {
this.$message(res.message) this.$message(res.message)
@@ -1109,7 +1109,21 @@ export default {
getProcessDataById(this.$route.query.taskId).then(res => { getProcessDataById(this.$route.query.taskId).then(res => {
if (res.success) { if (res.success) {
const result = res.result const result = res.result
this.processInfoForm = result.common // 有草稿json按草稿进来的回显
if (result.infoJsonStr) {
// 初始化流程信息
const prcObj = Object.assign({}, result)
prcObj.dueTime = result.processDueDate
prcObj.prcMes = result.processDescription
// 初始化流程审批信息
prcObj.commitText = result.handleText
prcObj.commitFile = result.handleFile
this.processInfoForm = Object.assign({}, prcObj)
result.dataList = JSON.parse(result.infoJsonStr).arr
console.log(result.data)
} else {
this.processInfoForm = result.common
}
this.baseInfoForm = result.dataList this.baseInfoForm = result.dataList
// 节点7或者节点8需要回显选人表单 // 节点7或者节点8需要回显选人表单
if (this.currentNode === 7) { if (this.currentNode === 7) {
@@ -53,17 +53,17 @@
></standardization-check-base-info> ></standardization-check-base-info>
<!-- 5评分人打分 --> <!-- 5评分人打分 -->
<scorer-mark-base-info <scorer-mark-base-info
v-if="currentNode === 5" v-else-if="currentNode === 5"
ref="baseInfoRef" ref="baseInfoRef"
></scorer-mark-base-info> ></scorer-mark-base-info>
<!-- 6标准化确认是否开启征求意见 --> <!-- 6标准化确认是否开启征求意见 -->
<confirm-whether-comment-base-info <confirm-whether-comment-base-info
v-if="currentNode === 6" v-else-if="currentNode === 6"
ref="baseInfoRef" ref="baseInfoRef"
></confirm-whether-comment-base-info> ></confirm-whether-comment-base-info>
<!-- 7部所联络人下发 --> <!-- 7部所联络人下发 -->
<depart-liaison-issue-base-info <depart-liaison-issue-base-info
v-if="currentNode === 7" v-else-if="currentNode === 7"
ref="baseInfoRef" ref="baseInfoRef"
></depart-liaison-issue-base-info> ></depart-liaison-issue-base-info>
<!-- 13其他起草人校对 --> <!-- 13其他起草人校对 -->
@@ -151,7 +151,7 @@ import SelectUser from '@/components/SelectUser'
import CalendarField from '@/components/CalendarField' import CalendarField from '@/components/CalendarField'
import StandardizationCheckBaseInfo import StandardizationCheckBaseInfo
from '@/views/workCenter/enterpriseStandardRevision/module/StandardizationCheckBaseInfo' from '@/views/workCenter/enterpriseStandardRevision/module/StandardizationCheckBaseInfo'
import {EsInitChangeNodes, EsRevisionNodes, ProcessKey} from '@/enums/commonEnums' import { EsRevisionNodes, ProcessKey } from '@/enums/commonEnums'
import { import {
enStandardEditSave, enStandardEditSave,
enStandardEditTurnTo, enStandardEditTurnTo,
@@ -159,12 +159,12 @@ import {
enStandardEditReject, enStandardEditReject,
enStandardEditGetDataById enStandardEditGetDataById
} from '@/api/api' } from '@/api/api'
import ScorerMarkBaseInfo from "@/views/workCenter/enterpriseStandardRevision/module/ScorerMarkBaseInfo"; import ScorerMarkBaseInfo from '@/views/workCenter/enterpriseStandardRevision/module/ScorerMarkBaseInfo'
import ConfirmWhetherCommentBaseInfo import ConfirmWhetherCommentBaseInfo
from "@/views/workCenter/enterpriseStandardRevision/module/ConfirmWhetherCommentBaseInfo"; from '@/views/workCenter/enterpriseStandardRevision/module/ConfirmWhetherCommentBaseInfo'
import DepartLiaisonIssueBaseInfo import DepartLiaisonIssueBaseInfo
from "@/views/workCenter/enterpriseStandardRevision/module/DepartLiaisonIssueBaseInfo"; from '@/views/workCenter/enterpriseStandardRevision/module/DepartLiaisonIssueBaseInfo'
import OnlyOnlineEditBaseInfo from "@/views/workCenter/enterpriseStandardRevision/module/OnlyOnlineEditBaseInfo"; import OnlyOnlineEditBaseInfo from '@/views/workCenter/enterpriseStandardRevision/module/OnlyOnlineEditBaseInfo'
export default { export default {
name: 'EnterpriseStandardRevision', name: 'EnterpriseStandardRevision',
@@ -246,6 +246,7 @@ export default {
this.currentNode = 999 this.currentNode = 999
} }
} }
this.initData()
}, },
data () { data () {
return { return {
@@ -265,9 +266,6 @@ export default {
baseInfoForm: {} baseInfoForm: {}
} }
}, },
created () {
this.initData()
},
methods: { methods: {
// 初始化数据 // 初始化数据
initData () { initData () {
@@ -286,9 +284,11 @@ export default {
prcObj.commitFile = result.handleFile prcObj.commitFile = result.handleFile
this.processInfoForm = Object.assign({}, prcObj) this.processInfoForm = Object.assign({}, prcObj)
result.data = JSON.parse(result.infoJsonStr).data result.data = JSON.parse(result.infoJsonStr).data
// 如果是节点1的保存回显人员信息 // 如果是节点7的保存回显人员信息
if (this.currentNode === 7) { if (this.currentNode === 7) {
this.$refs.processCommonLayout.draftInitPersonInfo(JSON.parse(result.infoJsonStr).personnelObj) this.$refs.processCommonLayout.$nextTick(() => {
this.$refs.processCommonLayout.draftInitPersonInfo(JSON.parse(result.infoJsonStr).personnelObj)
})
} }
console.log(result.data) console.log(result.data)
} else { } else {
@@ -372,6 +372,7 @@ export default {
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem')) this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
return return
} else { } else {
console.log(personnelObj)
// 业务基本信息和人员信息 // 业务基本信息和人员信息
paramObj.infoJsonStr = JSON.stringify({ paramObj.infoJsonStr = JSON.stringify({
data: Object.assign({}, baseInfo), data: Object.assign({}, baseInfo),
@@ -470,6 +471,7 @@ export default {
}) })
}).catch((errorInfo) => { }).catch((errorInfo) => {
console.log(errorInfo) console.log(errorInfo)
this.$refs.processCommonLayout.activeTab = 'basic'
if (errorInfo.find(item => item.name === 'commitText')) { if (errorInfo.find(item => item.name === 'commitText')) {
// 没通过校验的有备注,弹窗提示输入备注 // 没通过校验的有备注,弹窗提示输入备注
this.$message(this.$t('pleaseEnterRemarks')) this.$message(this.$t('pleaseEnterRemarks'))
@@ -49,8 +49,7 @@ export default {
contactUser: [ contactUser: [
{ {
required: true, required: true,
message: this.$t('pleaseSelect') + this.$t('enStandardRevision.departmentalLiaison'), message: this.$t('pleaseSelect') + this.$t('enStandardRevision.departmentalLiaison')
trigger: 'change'
} }
] ]
}, },
@@ -63,9 +62,9 @@ export default {
handler (val) { handler (val) {
if (val && val === '1') { if (val && val === '1') {
// 开启征求意见,部门联络人必填 // 开启征求意见,部门联络人必填
this.rules.contactUser[0].required = true this.baseInfoRule.contactUser[0].required = true
} else { } else {
this.rules.contactUser[0].required = false this.baseInfoRule.contactUser[0].required = false
} }
} }
} }
@@ -66,6 +66,9 @@ export default {
methods: { methods: {
initData (data) { initData (data) {
this.formInline = Object.assign({}, data) this.formInline = Object.assign({}, data)
if (!this.formInline.workGroup) {
this.formInline.workGroup = undefined
}
// 给表单赋值 // 给表单赋值
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data) this.$refs.baseInfoForm.initData(data)
@@ -1,62 +1,69 @@
<template> <template>
<div> <div>
<base-info-form ref="baseInfoForm"></base-info-form> <base-info-form ref="baseInfoForm"></base-info-form>
<van-form <!-- 标准文本 -->
ref="baseInfoFormRef" <div class="process-part process-right-box">
input-align="right" <div class="title-wrapper">
error-message-align="right" <div class="process-part-title">{{ $t('standardText') }}</div>
:readonly="readonly" <van-button plain color="#E63636">{{ $t('look') }}</van-button>
> </div>
<!-- 是否可进行评审会 --> <van-form
<picker-field ref="baseInfoFormRef"
:rules="baseInfoRule.reviewMeetingFlag" input-align="right"
:label="$t('enStandardRevision.isCanAuditMeeting')" error-message-align="right"
:placeholder="$t('pleaseSelect') + $t('enStandardRevision.isCanAuditMeeting')" :readonly="readonly"
:columnData="isColumnData" >
@change="reviewMeetingFlagChange" <!-- 是否可进行评审会 -->
v-model="formInline.reviewMeetingFlag" /> <picker-field
<template v-if="formInline.reviewMeetingFlag === '1'"> :rules="baseInfoRule.reviewMeetingFlag"
<!-- 评审人 --> :label="$t('enStandardRevision.isCanAuditMeeting')"
<select-user-field :placeholder="$t('pleaseSelect') + $t('enStandardRevision.isCanAuditMeeting')"
:rules="baseInfoRule.reviewUser" :columnData="isColumnData"
:label="$t('enStandardRevision.assessor')" @change="reviewMeetingFlagChange"
v-model="formInline.reviewUser" v-model="formInline.reviewMeetingFlag" />
fieldName="reviewUser" <template v-if="formInline.reviewMeetingFlag === '1'">
@selectNameChange="userNameChange" <!-- 评审人 -->
:checkedNames="formInline.reviewUser_dictText" <select-user-field
type="radio" :rules="baseInfoRule.reviewUser"
/> :label="$t('enStandardRevision.assessor')"
<!-- 评分人 --> v-model="formInline.reviewUser"
<select-user-field fieldName="reviewUser"
:rules="baseInfoRule.raters" @selectNameChange="userNameChange"
:label="$t('enStandardRevision.scorer')" :checkedNames="formInline.reviewUser_dictText"
v-model="formInline.raters" type="radio"
fieldName="raters" />
@selectNameChange="userNameChange" <!-- 评分人 -->
:checkedNames="formInline.raters_dictText" <select-user-field
type="checkbox" :rules="baseInfoRule.raters"
/> :label="$t('enStandardRevision.scorer')"
<!-- 评审日期 --> v-model="formInline.raters"
<calendar-field fieldName="raters"
:rules="baseInfoRule.reviewDate" @selectNameChange="userNameChange"
:label="$t('enStandardRevision.reviewDate')" :checkedNames="formInline.raters_dictText"
v-model="formInline.reviewDate" type="checkbox"
:placeholder="$t('pleaseSelect') + $t('enStandardRevision.reviewDate')" />
type="date" <!-- 评审日期 -->
/> <calendar-field
<!-- 评审地点 --> :rules="baseInfoRule.reviewDate"
<van-field :label="$t('enStandardRevision.reviewDate')"
:rules="baseInfoRule.reviewPlace" v-model="formInline.reviewDate"
v-model="formInline.reviewPlace" :placeholder="$t('pleaseSelect') + $t('enStandardRevision.reviewDate')"
:label="$t('enStandardRevision.judgingVenue')" type="date"
:placeholder="$t('pleaseEnter') + $t('enStandardRevision.judgingVenue')" />
type="textarea" <!-- 评审地点 -->
autosize <van-field
rows="1" :rules="baseInfoRule.reviewPlace"
:border="false" v-model="formInline.reviewPlace"
/> :label="$t('enStandardRevision.judgingVenue')"
</template> :placeholder="$t('pleaseEnter') + $t('enStandardRevision.judgingVenue')"
</van-form> type="textarea"
autosize
rows="1"
:border="false"
/>
</template>
</van-form>
</div>
</div> </div>
</template> </template>
@@ -117,9 +124,16 @@ export default {
methods: { methods: {
initData (data) { initData (data) {
this.formInline = Object.assign({}, data) this.formInline = Object.assign({}, data)
// 是否进行评审会没有值,设置默认选是
if (!this.formInline.reviewMeetingFlag) { if (!this.formInline.reviewMeetingFlag) {
this.formInline.reviewMeetingFlag = '1' this.formInline.reviewMeetingFlag = '1'
} }
if (!this.formInline.reviewUser) {
this.formInline.reviewUser = undefined
}
if (!this.formInline.raters) {
this.formInline.raters = undefined
}
this.reviewMeetingFlagChange() this.reviewMeetingFlagChange()
// 给表单赋值 // 给表单赋值
this.$nextTick(() => { this.$nextTick(() => {
@@ -155,6 +169,19 @@ export default {
} }
</script> </script>
<style scoped> <style scoped lang="less">
@import '~@assets/less/common.less';
.process-right-box {
.title-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
/deep/ .van-button {
width: 1.22rem;
height: 0.57rem;
margin: 0 0.32rem 0.24rem 0;
font-size: 0.28rem;
}
}
}
</style> </style>