diff --git a/src/api/workCenter.js b/src/api/workCenter.js index af1b60f1..d3630023 100644 --- a/src/api/workCenter.js +++ b/src/api/workCenter.js @@ -56,6 +56,20 @@ const standardizationInitReject = (params) => postAction('/process/es/annualInit // 根据流程id获取流程信息 const standardizationInitGetDataById = (taskId, params) => getAction(`/process/es/annualInit/handle/${taskId}`, params) +// 企标制修订流程 +// 保存 +const enStandardEditSave = (params) => postAction('', params) +// 发起 +const enStandardEditApproval = (params) => postAction('', params) +// 转办 +const enStandardEditTurnTo = (params) => postAction('', params) +// 同意 +const enStandardEditAgree = (params) => postAction('', params) +// 拒绝 +const enStandardEditReject = (params) => postAction('', params) +// 根据id查流程数据 +const enStandardEditGetDataById = (taskId, params) => getAction(`/${taskId}`, params) + // 企标更改流程 // 保存 const enStandardChangeSave = (params) => postAction('/process/es/change/save', params) @@ -176,6 +190,13 @@ export { standardizationInitReject, standardizationInitGetDataById, + enStandardEditSave, + enStandardEditApproval, + enStandardEditTurnTo, + enStandardEditAgree, + enStandardEditReject, + enStandardEditGetDataById, + enStandardChangeSave, enStandardChangeApproval, enStandardChangeTurnTo, diff --git a/src/enums/commonEnums.js b/src/enums/commonEnums.js index 94b64a8b..fafbf69a 100644 --- a/src/enums/commonEnums.js +++ b/src/enums/commonEnums.js @@ -167,6 +167,7 @@ export const ProcessKey = { // 年度制修订-标准化部门主动发起 ES_ANNUAL_INIT: { text: 'es-annual-init', value: 'es-annual-init' }, // 企标制修订流程 + ES_EDIT: { text: '', value: '' }, // 企标更改流程 ES_CHANGE: { text: 'es-change', value: 'es-change' }, // 企标复审流程 diff --git a/src/views/workCenter/enterpriseStandardAnnul/EnterpriseStandardAnnulFlow.vue b/src/views/workCenter/enterpriseStandardAnnul/EnterpriseStandardAnnulFlow.vue index 290474ea..1fd35f99 100644 --- a/src/views/workCenter/enterpriseStandardAnnul/EnterpriseStandardAnnulFlow.vue +++ b/src/views/workCenter/enterpriseStandardAnnul/EnterpriseStandardAnnulFlow.vue @@ -163,13 +163,15 @@ export default { } // 获取人员信息结构 this.getPersonInfoStructure(ProcessKey.ES_ABOLISH.value, () => { - if (this.currentNode === 1) { - this.disabled = false - this.initPersonInfoData(true) - } else { - this.disabled = true - // 如果不是第一个节点,人员信息全部不可选 - this.initPersonInfoData(false) + if (this.$route.query.processInstanceId) { + if (this.currentNode === 1) { + this.disabled = false + this.initPersonInfoData(true) + } else { + this.disabled = true + // 如果不是第一个节点,人员信息全部不可选 + this.initPersonInfoData(false) + } } }) if (this.$route.query.taskId) { diff --git a/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue b/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue index 54b921a4..5fa82eab 100644 --- a/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue +++ b/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue @@ -173,9 +173,10 @@ export default { } if (this.currentNode === 1) { this.disabled = false + this.initPersonInfoData(true) } else { this.disabled = true - this.initPersonInfoData() + this.initPersonInfoData(false) } // 如果是查看进入的,不可编辑,不可操作 if (this.$route.query.onlyLook) { diff --git a/src/views/workCenter/enterpriseStandardRecheck/EnterpriseStandardRecheckFlow.vue b/src/views/workCenter/enterpriseStandardRecheck/EnterpriseStandardRecheckFlow.vue index 7a67b319..8b051a5e 100644 --- a/src/views/workCenter/enterpriseStandardRecheck/EnterpriseStandardRecheckFlow.vue +++ b/src/views/workCenter/enterpriseStandardRecheck/EnterpriseStandardRecheckFlow.vue @@ -183,15 +183,17 @@ export default { // 获取人员信息结构 this.getPersonInfoStructure(ProcessKey.ES_RECHECK.value, () => { // 获取完人员信息结构,初始化人员信息是否可更改 - if (this.currentNode === 1) { - this.disabled = false - // 是节点1的话还需要设置是联络人发起还是标准化发起 ?? - this.initRole = 'contact' - this.initPersonInfoData(true) - } else { - this.disabled = true - // 如果不是第一个节点,人员信息全部不可选 - this.initPersonInfoData(false) + if (this.$route.query.processInstanceId) { + if (this.currentNode === 1) { + this.disabled = false + // 是节点1的话还需要设置是联络人发起还是标准化发起 ?? + this.initRole = 'contact' + this.initPersonInfoData(true) + } else { + this.disabled = true + // 如果不是第一个节点,人员信息全部不可选 + this.initPersonInfoData(false) + } } }) if (this.$route.query.taskId) { diff --git a/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue b/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue index 6c011721..390bae05 100644 --- a/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue +++ b/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue @@ -57,36 +57,36 @@ - + - + - + - + - + - + - + - + - + - + - + - + - +
{{ $t('processApprovalInformation') }}
@@ -171,121 +171,15 @@ import MainDrafterCollectUploadMinuteBaseInfo from './modules/MainDrafterCollect import MainDrafterUploadMinuteBaseInfo from './modules/MainDrafterUploadMinuteBaseInfo' import OtherDrafterProofreadBaseInfo from './modules/OtherDrafterProofreadBaseInfo' import MainDrafterPublishBaseInfo from './modules/MainDrafterPublishBaseInfo' - -const personData = [ - { - id: 1, - nodeName: '主起草人起草分发', - nodeRoleName: '主起草人', - canChoose: false - }, - { - id: 2, - nodeName: '其他起草人上传企标', - nodeRoleName: '其他起草人', - canChoose: false - }, - { - id: 3, - nodeName: '主起草人汇总上传会议纪要', - nodeRoleName: '主起草人', - canChoose: false - }, - { - id: 4, - nodeName: '标准化审批', - nodeRoleName: '标准化', - canChoose: true, - chooseType: 'radio', - fieldName: '' - }, - { - id: 5, - nodeName: '评分人打分', - nodeRoleName: '评分人', - canChoose: false - }, - { - id: 6, - nodeName: '标准化确认是否开启征求意见', - nodeRoleName: '标准化', - canChoose: false - }, - { - id: 7, - nodeName: '部所联络人下发', - nodeRoleName: '部所联络人', - canChoose: false - }, - { - id: 8, - nodeName: '征求意见对象填写意见', - nodeRoleName: '征求意见对象', - canChoose: true, - chooseType: 'checkbox', - fieldName: '' - }, - { - id: 9, - nodeName: '部所联络人汇总数据', - nodeRoleName: '部所联络人', - canChoose: false - }, - { - id: 10, - nodeName: '部所联络人主管级领导审批', - nodeRoleName: '部所联络人主管级领导', - canChoose: false - }, - { - id: 11, - nodeName: '主起草人汇总', - nodeRoleName: '主起草人', - canChoose: false - }, - { - id: 12, - nodeName: '主起草人上传会议纪要', - nodeRoleName: '主起草人', - canChoose: false - }, - { - id: 13, - nodeName: '其他起草人校对', - nodeRoleName: '其他起草人', - canChoose: false - }, - { - id: 14, - nodeName: '主管级领导审批', - nodeRoleName: '主管级领导', - canChoose: false - }, - { - id: 15, - nodeName: '标准化审批', - nodeRoleName: '标准化审批人', - canChoose: false - }, - { - id: 16, - nodeName: '相关部门领导会签', - nodeRoleName: '相关部门领导', - canChoose: false - }, - { - id: 17, - nodeName: '总工程师审批', - nodeRoleName: '总工程师', - canChoose: false - }, - { - id: 18, - nodeName: '主起草人发布', - nodeRoleName: '主起草人', - canChoose: false - } -] +import { ProcessKey } from '../../../enums/commonEnums' +import { + enStandardEditAgree, + enStandardEditApproval, + enStandardEditGetDataById, + enStandardEditReject, + enStandardEditSave, + enStandardEditTurnTo +} from '@/api/workCenter' export default { name: 'EnterpriseStandardRevisionFlow', @@ -311,16 +205,70 @@ export default { }, computed: { pageTitle () { - return this.$t('flowCenter') + this.$route.meta.title + return this.$t('flowCenter') + this.$route.meta.title + '(' + this.currentNodeName + ')' } }, mounted () { - if (this.currentNode === 1) { - this.personnelInfoData = personData + // 初始化节点 + const taskName = this.$route.query.taskName + if (taskName) { + if (taskName === '主起草人起草分发') { + this.currentNode = 1 + } else if (taskName === '其他起草人上传企标') { + this.currentNode = 2 + } else if (taskName === '主起草人汇总上传会议纪要') { + this.currentNode = 3 + } else if (taskName === '标准化审核') { + this.currentNode = 4 + } else if (taskName === '评分人评分') { + this.currentNode = 5 + } else if (taskName === '标准化确认是否开启征求意见') { + this.currentNode = 6 + } else if (taskName === '部所联络人下发') { + this.currentNode = 7 + } else if (taskName === '征求意见对象填写意见') { + this.currentNode = 8 + } else if (taskName === '部所联络人汇总数据') { + this.currentNode = 9 + } else if (taskName === '部门联络人主管级领导审批') { + this.currentNode = 10 + } else if (taskName === '主起草人汇总') { + this.currentNode = 11 + } else if (taskName === '主起草人上传会议纪要') { + this.currentNode = 12 + } else if (taskName === '其他起草人校对') { + this.currentNode = 13 + } else if (taskName === '主管级领导审批') { + this.currentNode = 14 + } else if (taskName === '标准化审批') { + this.currentNode = 15 + } else if (taskName === '相关部门领导会签') { + this.currentNode = 16 + } else if (taskName === '总工程师审批') { + this.currentNode = 17 + } else if (taskName === '主起草人发布') { + this.currentNode = 18 + } else { + // 预留加签节点 + this.currentNode = 999 + } + } + // 获取人员信息结构 + this.getPersonInfoStructure(ProcessKey.ES_EDIT.value, () => { + if (this.$route.query.processInstanceId) { + if (this.currentNode === 1) { + this.initPersonInfoData(true) + } else { + this.initPersonInfoData(false) + } + } + }) + if (this.$route.query.taskId) { + this.currentNodeName = this.$route.query.taskName + // 有流程id说明是从流程中心来的,需要初始化数据 + this.getProcessData(this.$route.query.taskId) } else { - this.personnelInfoData = personData.map(item => { - return { ...item, canChoose: false, fieldName: undefined } - }) + this.currentNodeName = '主起草人起草分发' } // 如果是查看进入的,不可编辑,不可操作 if (this.$route.query.onlyLook) { @@ -373,7 +321,9 @@ export default { validateTrigger: 'blur' } }, - currentNode: 18, + model: {}, + currentNode: 1, + currentNodeName: '', // 当前节点名称 approvalInfoForm: this.$form.createForm(this), // 审批信息表单 personnelInfoData: [], // 人员信息数据 url: { @@ -385,10 +335,27 @@ export default { } }, methods: { + // 根据流程id获取数据并回显 + getProcessData (taskId) { + enStandardEditGetDataById(taskId).then(res => { + if (res.success) { + this.model = res.result + this.$nextTick(() => { + // 初始化流程信息 + this.processInfoForm.setFieldsValue(pick(this.model[0], 'prcName', 'dueTime', 'prcMes')) + // 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息 + // this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'commitText', 'commitFile')) + }) + // 初始化业务基本信息中组件内容 + } else { + this.$message.warning(res.message) + } + }) + }, switchChange (value) { this.switchValue = value }, - // 标准化审核节点是否可进行评审会修改 + // 标准化审核节点是否可进行评审会修改,需要修改备注的是否必填和同意、驳回按钮是否可用 standardizationAuditIsMeeting (value) { // 选是的话,驳回按钮置灰,不可点击;选否,备注变成必填,内容自动带入“驳回”,下方同意按钮置灰,不可点击 if (value === 1) { @@ -416,17 +383,29 @@ export default { // 流程审批信息 const approvalInfoForm = this.approvalInfoForm.getFieldsValue() // 人员信息的数据, 处理成对象 - const personnelInfo = this.$refs.personnelInfo.stepsData - const personnelObj = {} - for (const item of personnelInfo) { - if (item.fieldName) { - personnelObj[item.fieldName] = item.user - } - } + const personnelObj = this.$refs.personnelInfo.getDataObj() // 需要传给后端的 + const paramObj = {} + paramObj.common = { ...processInfoForm, ...approvalInfoForm } + paramObj.flowUser = personnelObj // 业务基本信息 - if (this.$refs.basicInfoFormRef) { - + if (this.$refs.baseInfoRef) { + // 业务基本信息 + const baseInfo = this.$refs.baseInfoRef.getData() + const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...baseInfo.formInline } + const flag = Object.values(param).some(v => !!v || v === 0) + if (!flag || (baseInfo.dataSource && baseInfo.dataSource.length <= 0)) { + // 提示至少填写一项 + this.$message.warning(this.$t('pleaseFillInAtLeastOneItem')) + return + } + if (baseInfo.dataSource) { + paramObj.dataList = baseInfo.dataSource.map(item => { + return { ...item, ...baseInfo.formInline } + }) + } else { + paramObj.dataList = [baseInfo.formInline] + } } else { // 需要外层信息至少填了一项 const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj } @@ -437,34 +416,52 @@ export default { return } } + this.loading = true // 保存到草稿 - // enterprisePlanApprovalSave(arr).then(res => { - // if (res.success) { - // this.$message.success(res.message) - // } else { - // this.$message.warning(res.message) - // } - // }) + enStandardEditSave(paramObj).then(res => { + if (res.success) { + this.$message.success(res.message) + this.goBack() + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) }, // 节点一时候的提交,发起变更 handleStart () { if (this.loading) return // 人员信息的数据, 处理成对象 - const personnelInfo = this.$refs.personnelInfo.stepsData - const personnelObj = {} - for (const item of personnelInfo) { - if (item.fieldName) { - personnelObj[item.fieldName] = item.user - } - } - // 校验是否填了所有能填的人员信息 - if (!Object.values(personnelObj).every(v => !!v)) { - this.$message.warning(this.$t('pleaseEnterPersonnelInfo')) + const personnelObj = this.$refs.personnelInfo.getDataObjVerify() + if (!personnelObj) { return } this.processInfoForm.validateFields((err, values) => { - this.approvalInfoForm.validateFields((approvalErr, approvalValues) => { - + this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => { + const data = await this.$refs.baseInfoRef.getDataValidate() + if (!err && !approvalErr && data) { + const param = {} // 需要传给后端的数据 + param.common = { ...values, ...approvalValues } + param.flowUser = personnelObj + if (data.dataSource && data.dataSource.length > 0) { + param.dataList = data.dataSource.map(item => { + return { ...item, ...data.formInline } + }) + } else { + param.dataList = [data.formInline] + } + enStandardEditApproval(param).then(res => { + if (res.success) { + this.$message.success(res.message) + this.goBack() + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + } }) }) }, @@ -482,29 +479,97 @@ export default { const param = Object.assign({}, values) param.userId = userIds param.taskId = this.$route.query.taskId - // enterprisePlanApprovalTurnTo(param).then(res => { - // if (res.success) { - // this.$message.success(res.message) - // } else { - // this.$message.warning(res.message) - // } - // }).finally(() => { - // this.loading = false - // }) + enStandardEditTurnTo(param).then(res => { + if (res.success) { + this.$message.success(res.message) + this.goBack() + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) } }) }, // 提交 handleSubmit () { - + if (this.loading) return + this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => { + const data = await this.$refs.baseInfoRef.getDataValidate() + if (!approvalErr && data) { + const param = {} // 需要传给后端的数据 + param.common = approvalValues + if (data.dataSource && data.dataSource.length > 0) { + param.dataList = data.dataSource.map(item => { + return { ...item, ...data.formInline } + }) + } else { + param.dataList = [data.formInline] + } + enStandardEditAgree(param).then(res => { + if (res.success) { + this.$message.success(res.message) + this.goBack() + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + } + }) }, // 同意 handleAgree () { - + if (this.loading) return + this.approvalInfoForm.validateFields((err, values) => { + if (!err) { + this.loading = true + const param = {} + param.common = Object.assign({}, values) + param.common.taskId = this.$route.query.taskId + enStandardEditAgree(param).then(res => { + if (res.success) { + this.$message.success(res.message) + this.goBack() + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + } + }) }, // 驳回 handleReject () { - + if (this.loading) return + this.validatorRules.commitText.rules[0].required = true + if (!this.approvalInfoForm.getFieldValue('commitText')) { + this.$message.warning(this.$t('pleaseEnterRemarks')) + } + this.$nextTick(() => { + this.approvalInfoForm.validateFields((err, values) => { + if (!err) { + this.loading = true + const param = {} + param.common = Object.assign({}, values) + param.common.taskId = this.$route.query.taskId + enStandardEditReject(param).then(res => { + if (res.success) { + this.$message.success(res.message) + this.goBack() + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + this.validatorRules.commitText.rules[0].required = false + }) + } + }) + }) } } } diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/BaseInfoForm.vue b/src/views/workCenter/enterpriseStandardRevision/modules/BaseInfoForm.vue index 94909246..98ab6cdb 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/BaseInfoForm.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/BaseInfoForm.vue @@ -1,183 +1,196 @@ diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue index c3bde3ad..f88bdc00 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue @@ -111,7 +111,6 @@ export default { methods: { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { - this.data = data // 给表格赋值,在线编辑不知道要怎么赋值? // this.dataSource = // 给表单赋值 diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue index 5980845c..1252fffb 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue @@ -105,7 +105,6 @@ export default { methods: { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { - this.data = data // 给表单赋值,在线编辑不知道要怎么赋值? // this.formInline = // 给表单赋值 @@ -117,18 +116,20 @@ export default { getData () { // 把数据抛出,在线编辑不知道要不要抛 const data = {} - data.isCommentsFormInline = this.formInline + data.formInline = this.formInline return data }, // 外层获取数据要过校验,返回false表示没有通过校验 - getDataValidate () { - this.$refs.ruleForm.validate(valid => { + async getDataValidate () { + let data = {} + await this.$refs.ruleForm.validate(valid => { if (valid) { - const data = {} - data.isCommentsFormInline = this.formInline - return data + data.formInline = this.formInline + } else { + data = false } }) + return data }, // 选择用户得到用户名 userSelectNameChange (value, fieldName) { diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue index 48075c7c..1e308e6f 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue @@ -149,7 +149,6 @@ export default { methods: { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { - this.data = data // 给表格赋值,在线编辑不知道要怎么赋值? // this.dataSource = // 给表单赋值 @@ -165,15 +164,22 @@ export default { return data }, // 外层获取数据要过校验,返回false表示没有通过校验 - getDataValidate () { - if (this.dataSource && this.dataSource.length > 0) { - const data = {} - data.dataSource = this.dataSource - return data - } else { - this.$message.warning(this.$t('addAtLeastOneRowOfData')) - return false - } + async getDataValidate () { + let data = {} // 需要返回的数据 + await this.$refs.ruleForm.validate(valid => { + if (valid) { + if (this.dataSource && this.dataSource.length > 0) { + data.dataSource = this.dataSource + data.formInline = this.formInline + } else { + this.$message.warning(this.$t('addAtLeastOneRowOfData')) + data = false + } + } else { + data = false + } + }) + return data }, // 征求意见的编辑 handleEdit (record, index) { diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue index 13e9def5..1b26800a 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue @@ -19,7 +19,7 @@ - +
* @@ -100,7 +100,6 @@ export default { methods: { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { - this.data = data // 给表单赋值,在线编辑不知道要怎么赋值? // this.formInline = // 给表单赋值 @@ -112,18 +111,20 @@ export default { getData () { // 把数据抛出,在线编辑不知道要不要抛 const data = {} - data.issueFormInline = this.formInline + data.formInline = this.formInline return data }, // 外层获取数据要过校验,返回false表示没有通过校验 - getDataValidate () { - this.$refs.ruleForm.validate(valid => { + async getDataValidate () { + let data = {} + await this.$refs.ruleForm.validate(valid => { if (valid) { - const data = {} - data.issueFormInline = this.formInline - return data + data.formInline = this.formInline + } else { + data = false } }) + return data }, // 选择用户得到用户名 userSelectNameChange (value, fieldName) { diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue index 240a518c..351976c4 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue @@ -118,7 +118,6 @@ export default { methods: { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { - this.data = data // 给表格赋值,在线编辑不知道要怎么赋值? // this.dataSource = // 给表单赋值 diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectBaseInfo.vue index 87314448..84cb7ddf 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectBaseInfo.vue @@ -170,12 +170,14 @@ export default { break } } + let data = {} // 需要返回的数据 if (hasErr) { this.$message.warning(this.$t('workCenter.enStandardRevision.pleaseEnterAllMarkItem')) - return false + data = false } else { - return this.dataSource + data.dataSource = this.dataSource } + return data }, // 新增征求意见 handleAdd () { diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue index abdc85fe..d4c7d947 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue @@ -301,7 +301,6 @@ export default { methods: { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { - this.data = data // 给表格赋值,在线编辑不知道要怎么赋值? // this.drafterDataSource = // this.dataSource = @@ -316,25 +315,27 @@ export default { // 把数据抛出,在线编辑不知道要不要抛 const data = {} data.dataSource = this.dataSource - data.uploadMinuteFormInline = this.formInline + data.formInline = this.formInline return data }, // 外层获取数据要过校验,返回false表示没有通过校验 - getDataValidate () { - this.$refs.ruleForm.validate(valid => { + async getDataValidate () { + let data = {} + await this.$refs.ruleForm.validate(valid => { if (valid) { if (this.dataSource && this.dataSource.length > 0) { // 有数据可以抛出 - const data = {} data.dataSource = this.dataSource - data.uploadMinuteFormInline = this.formInline - return data + data.formInline = this.formInline } else { this.$message.warning(this.$t('addAtLeastOneRowOfData')) - return false + data = false } + } else { + data = false } }) + return data }, // 查看企标文本 handleLookUploadStandard (record) { diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterPublishBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterPublishBaseInfo.vue index 09d9bec8..419e9490 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterPublishBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterPublishBaseInfo.vue @@ -99,7 +99,6 @@ export default { methods: { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { - this.data = data // 给表单赋值,在线编辑不知道要怎么赋值? // this.formInline = // 给表单赋值 @@ -111,18 +110,20 @@ export default { getData () { // 把数据抛出,在线编辑不知道要不要抛 const data = {} - data.publishFormInline = this.formInline + data.formInline = this.formInline return data }, // 外层获取数据要过校验,返回false表示没有通过校验 - getDataValidate () { - this.$refs.ruleForm.validate(valid => { + async getDataValidate () { + let data = {} + await this.$refs.ruleForm.validate(valid => { if (valid) { - const data = {} - data.publishFormInline = this.formInline - return data + data.formInline = this.formInline + } else { + data = false } }) + return data } } } diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterSentBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterSentBaseInfo.vue index a3c1aa29..114c24a5 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterSentBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterSentBaseInfo.vue @@ -107,14 +107,12 @@ export default { ], dataSource: [], loading: false, - data: {}, // 初始化获取的数据 modalType: undefined // 当前是新增还是编辑编辑的话是edit+编辑行的下标 } }, methods: { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { - this.data = data // 给表格赋值,在线编辑不知道要怎么赋值? // this.dataSource = // 给表单赋值 @@ -132,11 +130,12 @@ export default { }, // 外层获取数据要过校验,返回false表示没有通过校验 getDataValidate () { - if (this.dataSource && this.dataSource.length > 0) { + const formData = this.$refs.baseInfoForm.getDataValidate() + if (formData && this.dataSource && this.dataSource.length > 0) { // 有数据可以抛出 const data = {} data.dataSource = this.dataSource - data.formInline = this.$refs.baseInfoForm.formInline + data.formInline = formData.formInline return data } else { this.$message.warning(this.$t('addAtLeastOneRowOfData')) diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterUploadMinuteBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterUploadMinuteBaseInfo.vue index 0416c399..66a8928f 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterUploadMinuteBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterUploadMinuteBaseInfo.vue @@ -274,14 +274,16 @@ export default { return data }, // 外层获取数据要过校验,返回false表示没有通过校验 - getDataValidate () { - this.$refs.ruleForm.validate(valid => { + async getDataValidate () { + let data = {} + await this.$refs.ruleForm.validate(valid => { if (valid) { - const data = {} - data.uploadMinuteFormInline = this.formInline - return data + data.formInline = this.formInline + } else { + data = false } }) + return data }, // 点击文件上传 clickButtonToUpload (fieldName) { diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterProofreadBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterProofreadBaseInfo.vue index 13425335..e9f094d9 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterProofreadBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterProofreadBaseInfo.vue @@ -27,7 +27,6 @@ export default { methods: { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { - this.data = data // 在线编辑不知道要怎么赋值? // 给表单赋值 // this.$nextTick(() => { diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterUploadStandardBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterUploadStandardBaseInfo.vue index c08431df..c3cbf839 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterUploadStandardBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterUploadStandardBaseInfo.vue @@ -96,7 +96,6 @@ export default { } ], loading: false, - data: {}, // 初始化获取的数据 userInfo: {}, // 当前登录人信息 currentDate: '', uploadIndex: undefined // 正在上传企标的下标 @@ -109,7 +108,6 @@ export default { methods: { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { - this.data = data // 给表格赋值,在线编辑不知道要怎么赋值? // this.dataSource = // 给表单赋值 @@ -124,6 +122,7 @@ export default { }, // 外层获取数据要过校验,返回false表示没有通过校验 getDataValidate () { + let data = {}// 需要返回的值 if (this.dataSource && this.dataSource.length > 0) { // 看能上传企标的行是否都上传了 let hasErr = false @@ -136,11 +135,14 @@ export default { // 根据hasErr看有没有通过校验 if (hasErr) { this.$message.warning(this.$t('workCenter.enStandardRevision.pleaseUploadStandard')) - return false + data = false } else { - return this.dataSource + data.dataSource = this.dataSource } + } else { + data = false } + return data }, // 上传企标 handleUploadStandard (record, index) { diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue index e307535f..8f985da8 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue @@ -280,7 +280,6 @@ export default { methods: { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { - this.data = data // 给表格赋值,在线编辑不知道要怎么赋值? // this.dataSource = // 给表单赋值 @@ -304,12 +303,14 @@ export default { break } } + let data = {} // 需要返回的数据 if (hasErr) { this.$message.warning(this.$t('workCenter.enStandardRevision.pleaseEnterAllMarkItem')) - return false + data = false } else { - return this.dataSource + data.dataSource = this.dataSource } + return data }, } } diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/StandardizationAuditBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/StandardizationAuditBaseInfo.vue index 03b02eb8..cfdb929b 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/StandardizationAuditBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/StandardizationAuditBaseInfo.vue @@ -177,7 +177,6 @@ export default { methods: { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { - this.data = data // 给表格赋值,在线编辑不知道要怎么赋值? // this.formInline = // 给表单赋值 @@ -189,18 +188,20 @@ export default { getData () { // 把数据抛出,在线编辑不知道要不要抛 const data = {} - data.standardAuditFormInline = this.formInline + data.formInline = this.formInline return data }, // 外层获取数据要过校验,返回false表示没有通过校验 getDataValidate () { + let data = {} // 要返回的数据 this.$refs.ruleForm.validate(valid => { if (valid) { - const data = {} - data.standardAuditFormInline = this.formInline - return data + data.formInline = this.formInline + } else { + data = false } }) + return data }, // 是否可进行评审会 isCanAuditMeetingChange () { diff --git a/src/views/workCenter/enterpriseStandardSealSave/EnterpriseStandardSealSaveFlow.vue b/src/views/workCenter/enterpriseStandardSealSave/EnterpriseStandardSealSaveFlow.vue index 8865c6b5..11138edd 100644 --- a/src/views/workCenter/enterpriseStandardSealSave/EnterpriseStandardSealSaveFlow.vue +++ b/src/views/workCenter/enterpriseStandardSealSave/EnterpriseStandardSealSaveFlow.vue @@ -163,13 +163,15 @@ export default { } // 获取人员信息结构 this.getPersonInfoStructure(ProcessKey.ES_ARCHIVE.value, () => { - if (this.currentNode === 1) { - this.disabled = false - this.initPersonInfoData(true) - } else { - this.disabled = true - // 如果不是第一个节点,人员信息全部不可选 - this.initPersonInfoData(false) + if (this.$route.query.processInstanceId) { + if (this.currentNode === 1) { + this.disabled = false + this.initPersonInfoData(true) + } else { + this.disabled = true + // 如果不是第一个节点,人员信息全部不可选 + this.initPersonInfoData(false) + } } }) if (this.$route.query.taskId) { diff --git a/src/views/workCenter/enterpriseStandardStartUse/EnterpriseStandardStartUseFlow.vue b/src/views/workCenter/enterpriseStandardStartUse/EnterpriseStandardStartUseFlow.vue index e26f6c7a..78275a35 100644 --- a/src/views/workCenter/enterpriseStandardStartUse/EnterpriseStandardStartUseFlow.vue +++ b/src/views/workCenter/enterpriseStandardStartUse/EnterpriseStandardStartUseFlow.vue @@ -163,13 +163,15 @@ export default { } // 获取人员信息结构 this.getPersonInfoStructure(ProcessKey.ES_ENABLE.value, () => { - if (this.currentNode === 1) { - this.disabled = false - this.initPersonInfoData(true) - } else { - this.disabled = true - // 如果不是第一个节点,人员信息全部不可选 - this.initPersonInfoData(false) + if (this.$route.query.processInstanceId) { + if (this.currentNode === 1) { + this.disabled = false + this.initPersonInfoData(true) + } else { + this.disabled = true + // 如果不是第一个节点,人员信息全部不可选 + this.initPersonInfoData(false) + } } }) if (this.$route.query.taskId) {