diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 484f431..c6751b2 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 484f431..c6751b2 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue index f3ed0fb..cfd38e1 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue @@ -68,8 +68,27 @@ const approvalLogsList = [] as any[] item.approvalLogs.forEach((child: any, index: number) => { child.forEach((i: any, iindex: number) => { + // // 合并节点 + let nodeNumberMerge = '' + if (i.approvalStatus === '发起人') { + nodeNumberMerge = 0 + } + else { + if (child.length > 1) { + if (iindex === 0) { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + } + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + } approvalLogsList.push({ - nodeNumber: i.approvalStatus === '发起人' ? 0 : approvalLogsList[iindex].nodeNumber + 1, + // approvalLogsList[iindex] + nodeNumber: nodeNumberMerge, assigneeName: i.assigneeName, // 姓名 approvalStatus: i.approvalStatus, // 审批类型 finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 @@ -77,12 +96,58 @@ comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 cindex, + // countersignOrSign: i.countersignOrSign, }) }) }) - // console.log(approvalLogsList, 'approvalLogsList') item.approvalLogsList = approvalLogsList }) + // response.data.forEach((item: Array, index: number) => { + // console.log(item, item.length, item[0].countersignOrSign === 2) + + // if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + // console.log('或签数据处理', item) + + // let name = ''// 姓名 + // let approvalStatus = ''// 审批类型 + // let finishTime = ''// 审批类型 + // let duration = ''// 用时 + // let comment = ''// 审批意见 + // let type = '-'// 审批意见 + // item.forEach((i: any, index) => { + // name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + // approvalStatus = i.approvalStatus // 审批类型 + // finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + // duration = i.duration ? i.duration : duration // 用时 + // finishTime = finishTime + i.finishTime + // comment = comment + i.comment // 审批意见 + // type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 + // }) + // list.value.push({ + // nodeNumber: index, + // approvalStatus, // 审批类型 + // assigneeName: name, // 姓名 + // finishTime, // 完成时间 + // duration, // 用时 + // comment, // 审批意见 + // type, // 意见类别 + // }) + // console.log('list.v*******alue', list.value) + // } + // else { + // item.forEach((i: any) => { + // list.value.push({ + // nodeNumber: index, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // } + // }) list.value = data // total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 484f431..c6751b2 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue index f3ed0fb..cfd38e1 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue @@ -68,8 +68,27 @@ const approvalLogsList = [] as any[] item.approvalLogs.forEach((child: any, index: number) => { child.forEach((i: any, iindex: number) => { + // // 合并节点 + let nodeNumberMerge = '' + if (i.approvalStatus === '发起人') { + nodeNumberMerge = 0 + } + else { + if (child.length > 1) { + if (iindex === 0) { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + } + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + } approvalLogsList.push({ - nodeNumber: i.approvalStatus === '发起人' ? 0 : approvalLogsList[iindex].nodeNumber + 1, + // approvalLogsList[iindex] + nodeNumber: nodeNumberMerge, assigneeName: i.assigneeName, // 姓名 approvalStatus: i.approvalStatus, // 审批类型 finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 @@ -77,12 +96,58 @@ comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 cindex, + // countersignOrSign: i.countersignOrSign, }) }) }) - // console.log(approvalLogsList, 'approvalLogsList') item.approvalLogsList = approvalLogsList }) + // response.data.forEach((item: Array, index: number) => { + // console.log(item, item.length, item[0].countersignOrSign === 2) + + // if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + // console.log('或签数据处理', item) + + // let name = ''// 姓名 + // let approvalStatus = ''// 审批类型 + // let finishTime = ''// 审批类型 + // let duration = ''// 用时 + // let comment = ''// 审批意见 + // let type = '-'// 审批意见 + // item.forEach((i: any, index) => { + // name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + // approvalStatus = i.approvalStatus // 审批类型 + // finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + // duration = i.duration ? i.duration : duration // 用时 + // finishTime = finishTime + i.finishTime + // comment = comment + i.comment // 审批意见 + // type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 + // }) + // list.value.push({ + // nodeNumber: index, + // approvalStatus, // 审批类型 + // assigneeName: name, // 姓名 + // finishTime, // 完成时间 + // duration, // 用时 + // comment, // 审批意见 + // type, // 意见类别 + // }) + // console.log('list.v*******alue', list.value) + // } + // else { + // item.forEach((i: any) => { + // list.value.push({ + // nodeNumber: index, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // } + // }) list.value = data // total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue index 8ced2c7..59c2b90 100644 --- a/src/views/system/installation/editDialog.vue +++ b/src/views/system/installation/editDialog.vue @@ -26,8 +26,8 @@ } // 表头显示标题 const rules: FormRules = { installLocation: [{ required: true, message: '安装位置不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '分系统不能为空', trigger: ['blur', 'change'] }], - positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], + // positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 484f431..c6751b2 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue index f3ed0fb..cfd38e1 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue @@ -68,8 +68,27 @@ const approvalLogsList = [] as any[] item.approvalLogs.forEach((child: any, index: number) => { child.forEach((i: any, iindex: number) => { + // // 合并节点 + let nodeNumberMerge = '' + if (i.approvalStatus === '发起人') { + nodeNumberMerge = 0 + } + else { + if (child.length > 1) { + if (iindex === 0) { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + } + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + } approvalLogsList.push({ - nodeNumber: i.approvalStatus === '发起人' ? 0 : approvalLogsList[iindex].nodeNumber + 1, + // approvalLogsList[iindex] + nodeNumber: nodeNumberMerge, assigneeName: i.assigneeName, // 姓名 approvalStatus: i.approvalStatus, // 审批类型 finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 @@ -77,12 +96,58 @@ comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 cindex, + // countersignOrSign: i.countersignOrSign, }) }) }) - // console.log(approvalLogsList, 'approvalLogsList') item.approvalLogsList = approvalLogsList }) + // response.data.forEach((item: Array, index: number) => { + // console.log(item, item.length, item[0].countersignOrSign === 2) + + // if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + // console.log('或签数据处理', item) + + // let name = ''// 姓名 + // let approvalStatus = ''// 审批类型 + // let finishTime = ''// 审批类型 + // let duration = ''// 用时 + // let comment = ''// 审批意见 + // let type = '-'// 审批意见 + // item.forEach((i: any, index) => { + // name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + // approvalStatus = i.approvalStatus // 审批类型 + // finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + // duration = i.duration ? i.duration : duration // 用时 + // finishTime = finishTime + i.finishTime + // comment = comment + i.comment // 审批意见 + // type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 + // }) + // list.value.push({ + // nodeNumber: index, + // approvalStatus, // 审批类型 + // assigneeName: name, // 姓名 + // finishTime, // 完成时间 + // duration, // 用时 + // comment, // 审批意见 + // type, // 意见类别 + // }) + // console.log('list.v*******alue', list.value) + // } + // else { + // item.forEach((i: any) => { + // list.value.push({ + // nodeNumber: index, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // } + // }) list.value = data // total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue index 8ced2c7..59c2b90 100644 --- a/src/views/system/installation/editDialog.vue +++ b/src/views/system/installation/editDialog.vue @@ -26,8 +26,8 @@ } // 表头显示标题 const rules: FormRules = { installLocation: [{ required: true, message: '安装位置不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '分系统不能为空', trigger: ['blur', 'change'] }], - positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], + // positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue index 384fb27..aac75ed 100644 --- a/src/views/system/installation/list.vue +++ b/src/views/system/installation/list.vue @@ -21,7 +21,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, { text: '安装位置', value: 'installLocation', align: 'center' }, ]) diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 484f431..c6751b2 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue index f3ed0fb..cfd38e1 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue @@ -68,8 +68,27 @@ const approvalLogsList = [] as any[] item.approvalLogs.forEach((child: any, index: number) => { child.forEach((i: any, iindex: number) => { + // // 合并节点 + let nodeNumberMerge = '' + if (i.approvalStatus === '发起人') { + nodeNumberMerge = 0 + } + else { + if (child.length > 1) { + if (iindex === 0) { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + } + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + } approvalLogsList.push({ - nodeNumber: i.approvalStatus === '发起人' ? 0 : approvalLogsList[iindex].nodeNumber + 1, + // approvalLogsList[iindex] + nodeNumber: nodeNumberMerge, assigneeName: i.assigneeName, // 姓名 approvalStatus: i.approvalStatus, // 审批类型 finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 @@ -77,12 +96,58 @@ comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 cindex, + // countersignOrSign: i.countersignOrSign, }) }) }) - // console.log(approvalLogsList, 'approvalLogsList') item.approvalLogsList = approvalLogsList }) + // response.data.forEach((item: Array, index: number) => { + // console.log(item, item.length, item[0].countersignOrSign === 2) + + // if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + // console.log('或签数据处理', item) + + // let name = ''// 姓名 + // let approvalStatus = ''// 审批类型 + // let finishTime = ''// 审批类型 + // let duration = ''// 用时 + // let comment = ''// 审批意见 + // let type = '-'// 审批意见 + // item.forEach((i: any, index) => { + // name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + // approvalStatus = i.approvalStatus // 审批类型 + // finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + // duration = i.duration ? i.duration : duration // 用时 + // finishTime = finishTime + i.finishTime + // comment = comment + i.comment // 审批意见 + // type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 + // }) + // list.value.push({ + // nodeNumber: index, + // approvalStatus, // 审批类型 + // assigneeName: name, // 姓名 + // finishTime, // 完成时间 + // duration, // 用时 + // comment, // 审批意见 + // type, // 意见类别 + // }) + // console.log('list.v*******alue', list.value) + // } + // else { + // item.forEach((i: any) => { + // list.value.push({ + // nodeNumber: index, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // } + // }) list.value = data // total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue index 8ced2c7..59c2b90 100644 --- a/src/views/system/installation/editDialog.vue +++ b/src/views/system/installation/editDialog.vue @@ -26,8 +26,8 @@ } // 表头显示标题 const rules: FormRules = { installLocation: [{ required: true, message: '安装位置不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '分系统不能为空', trigger: ['blur', 'change'] }], - positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], + // positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue index 384fb27..aac75ed 100644 --- a/src/views/system/installation/list.vue +++ b/src/views/system/installation/list.vue @@ -21,7 +21,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, { text: '安装位置', value: 'installLocation', align: 'center' }, ]) diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue index cb9f3b9..87d95e4 100644 --- a/src/views/system/post/editDialog.vue +++ b/src/views/system/post/editDialog.vue @@ -24,7 +24,7 @@ } // 表头显示标题 const rules: FormRules = { positionName: [{ required: true, message: '岗位名称不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '所在组织不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 484f431..c6751b2 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue index f3ed0fb..cfd38e1 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue @@ -68,8 +68,27 @@ const approvalLogsList = [] as any[] item.approvalLogs.forEach((child: any, index: number) => { child.forEach((i: any, iindex: number) => { + // // 合并节点 + let nodeNumberMerge = '' + if (i.approvalStatus === '发起人') { + nodeNumberMerge = 0 + } + else { + if (child.length > 1) { + if (iindex === 0) { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + } + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + } approvalLogsList.push({ - nodeNumber: i.approvalStatus === '发起人' ? 0 : approvalLogsList[iindex].nodeNumber + 1, + // approvalLogsList[iindex] + nodeNumber: nodeNumberMerge, assigneeName: i.assigneeName, // 姓名 approvalStatus: i.approvalStatus, // 审批类型 finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 @@ -77,12 +96,58 @@ comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 cindex, + // countersignOrSign: i.countersignOrSign, }) }) }) - // console.log(approvalLogsList, 'approvalLogsList') item.approvalLogsList = approvalLogsList }) + // response.data.forEach((item: Array, index: number) => { + // console.log(item, item.length, item[0].countersignOrSign === 2) + + // if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + // console.log('或签数据处理', item) + + // let name = ''// 姓名 + // let approvalStatus = ''// 审批类型 + // let finishTime = ''// 审批类型 + // let duration = ''// 用时 + // let comment = ''// 审批意见 + // let type = '-'// 审批意见 + // item.forEach((i: any, index) => { + // name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + // approvalStatus = i.approvalStatus // 审批类型 + // finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + // duration = i.duration ? i.duration : duration // 用时 + // finishTime = finishTime + i.finishTime + // comment = comment + i.comment // 审批意见 + // type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 + // }) + // list.value.push({ + // nodeNumber: index, + // approvalStatus, // 审批类型 + // assigneeName: name, // 姓名 + // finishTime, // 完成时间 + // duration, // 用时 + // comment, // 审批意见 + // type, // 意见类别 + // }) + // console.log('list.v*******alue', list.value) + // } + // else { + // item.forEach((i: any) => { + // list.value.push({ + // nodeNumber: index, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // } + // }) list.value = data // total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue index 8ced2c7..59c2b90 100644 --- a/src/views/system/installation/editDialog.vue +++ b/src/views/system/installation/editDialog.vue @@ -26,8 +26,8 @@ } // 表头显示标题 const rules: FormRules = { installLocation: [{ required: true, message: '安装位置不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '分系统不能为空', trigger: ['blur', 'change'] }], - positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], + // positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue index 384fb27..aac75ed 100644 --- a/src/views/system/installation/list.vue +++ b/src/views/system/installation/list.vue @@ -21,7 +21,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, { text: '安装位置', value: 'installLocation', align: 'center' }, ]) diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue index cb9f3b9..87d95e4 100644 --- a/src/views/system/post/editDialog.vue +++ b/src/views/system/post/editDialog.vue @@ -24,7 +24,7 @@ } // 表头显示标题 const rules: FormRules = { positionName: [{ required: true, message: '岗位名称不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '所在组织不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue index d7e8457..922d996 100644 --- a/src/views/system/post/list.vue +++ b/src/views/system/post/list.vue @@ -19,7 +19,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, ]) const listLoading = ref(false) diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 484f431..c6751b2 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue index f3ed0fb..cfd38e1 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue @@ -68,8 +68,27 @@ const approvalLogsList = [] as any[] item.approvalLogs.forEach((child: any, index: number) => { child.forEach((i: any, iindex: number) => { + // // 合并节点 + let nodeNumberMerge = '' + if (i.approvalStatus === '发起人') { + nodeNumberMerge = 0 + } + else { + if (child.length > 1) { + if (iindex === 0) { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + } + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + } approvalLogsList.push({ - nodeNumber: i.approvalStatus === '发起人' ? 0 : approvalLogsList[iindex].nodeNumber + 1, + // approvalLogsList[iindex] + nodeNumber: nodeNumberMerge, assigneeName: i.assigneeName, // 姓名 approvalStatus: i.approvalStatus, // 审批类型 finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 @@ -77,12 +96,58 @@ comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 cindex, + // countersignOrSign: i.countersignOrSign, }) }) }) - // console.log(approvalLogsList, 'approvalLogsList') item.approvalLogsList = approvalLogsList }) + // response.data.forEach((item: Array, index: number) => { + // console.log(item, item.length, item[0].countersignOrSign === 2) + + // if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + // console.log('或签数据处理', item) + + // let name = ''// 姓名 + // let approvalStatus = ''// 审批类型 + // let finishTime = ''// 审批类型 + // let duration = ''// 用时 + // let comment = ''// 审批意见 + // let type = '-'// 审批意见 + // item.forEach((i: any, index) => { + // name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + // approvalStatus = i.approvalStatus // 审批类型 + // finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + // duration = i.duration ? i.duration : duration // 用时 + // finishTime = finishTime + i.finishTime + // comment = comment + i.comment // 审批意见 + // type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 + // }) + // list.value.push({ + // nodeNumber: index, + // approvalStatus, // 审批类型 + // assigneeName: name, // 姓名 + // finishTime, // 完成时间 + // duration, // 用时 + // comment, // 审批意见 + // type, // 意见类别 + // }) + // console.log('list.v*******alue', list.value) + // } + // else { + // item.forEach((i: any) => { + // list.value.push({ + // nodeNumber: index, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // } + // }) list.value = data // total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue index 8ced2c7..59c2b90 100644 --- a/src/views/system/installation/editDialog.vue +++ b/src/views/system/installation/editDialog.vue @@ -26,8 +26,8 @@ } // 表头显示标题 const rules: FormRules = { installLocation: [{ required: true, message: '安装位置不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '分系统不能为空', trigger: ['blur', 'change'] }], - positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], + // positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue index 384fb27..aac75ed 100644 --- a/src/views/system/installation/list.vue +++ b/src/views/system/installation/list.vue @@ -21,7 +21,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, { text: '安装位置', value: 'installLocation', align: 'center' }, ]) diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue index cb9f3b9..87d95e4 100644 --- a/src/views/system/post/editDialog.vue +++ b/src/views/system/post/editDialog.vue @@ -24,7 +24,7 @@ } // 表头显示标题 const rules: FormRules = { positionName: [{ required: true, message: '岗位名称不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '所在组织不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue index d7e8457..922d996 100644 --- a/src/views/system/post/list.vue +++ b/src/views/system/post/list.vue @@ -19,7 +19,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, ]) const listLoading = ref(false) diff --git a/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue b/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue index 4dc8725..bc0c347 100644 --- a/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 484f431..c6751b2 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue index f3ed0fb..cfd38e1 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue @@ -68,8 +68,27 @@ const approvalLogsList = [] as any[] item.approvalLogs.forEach((child: any, index: number) => { child.forEach((i: any, iindex: number) => { + // // 合并节点 + let nodeNumberMerge = '' + if (i.approvalStatus === '发起人') { + nodeNumberMerge = 0 + } + else { + if (child.length > 1) { + if (iindex === 0) { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + } + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + } approvalLogsList.push({ - nodeNumber: i.approvalStatus === '发起人' ? 0 : approvalLogsList[iindex].nodeNumber + 1, + // approvalLogsList[iindex] + nodeNumber: nodeNumberMerge, assigneeName: i.assigneeName, // 姓名 approvalStatus: i.approvalStatus, // 审批类型 finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 @@ -77,12 +96,58 @@ comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 cindex, + // countersignOrSign: i.countersignOrSign, }) }) }) - // console.log(approvalLogsList, 'approvalLogsList') item.approvalLogsList = approvalLogsList }) + // response.data.forEach((item: Array, index: number) => { + // console.log(item, item.length, item[0].countersignOrSign === 2) + + // if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + // console.log('或签数据处理', item) + + // let name = ''// 姓名 + // let approvalStatus = ''// 审批类型 + // let finishTime = ''// 审批类型 + // let duration = ''// 用时 + // let comment = ''// 审批意见 + // let type = '-'// 审批意见 + // item.forEach((i: any, index) => { + // name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + // approvalStatus = i.approvalStatus // 审批类型 + // finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + // duration = i.duration ? i.duration : duration // 用时 + // finishTime = finishTime + i.finishTime + // comment = comment + i.comment // 审批意见 + // type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 + // }) + // list.value.push({ + // nodeNumber: index, + // approvalStatus, // 审批类型 + // assigneeName: name, // 姓名 + // finishTime, // 完成时间 + // duration, // 用时 + // comment, // 审批意见 + // type, // 意见类别 + // }) + // console.log('list.v*******alue', list.value) + // } + // else { + // item.forEach((i: any) => { + // list.value.push({ + // nodeNumber: index, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // } + // }) list.value = data // total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue index 8ced2c7..59c2b90 100644 --- a/src/views/system/installation/editDialog.vue +++ b/src/views/system/installation/editDialog.vue @@ -26,8 +26,8 @@ } // 表头显示标题 const rules: FormRules = { installLocation: [{ required: true, message: '安装位置不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '分系统不能为空', trigger: ['blur', 'change'] }], - positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], + // positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue index 384fb27..aac75ed 100644 --- a/src/views/system/installation/list.vue +++ b/src/views/system/installation/list.vue @@ -21,7 +21,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, { text: '安装位置', value: 'installLocation', align: 'center' }, ]) diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue index cb9f3b9..87d95e4 100644 --- a/src/views/system/post/editDialog.vue +++ b/src/views/system/post/editDialog.vue @@ -24,7 +24,7 @@ } // 表头显示标题 const rules: FormRules = { positionName: [{ required: true, message: '岗位名称不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '所在组织不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue index d7e8457..922d996 100644 --- a/src/views/system/post/list.vue +++ b/src/views/system/post/list.vue @@ -19,7 +19,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, ]) const listLoading = ref(false) diff --git a/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue b/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue index 4dc8725..bc0c347 100644 --- a/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue index f8dce5d..6fb9582 100644 --- a/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 484f431..c6751b2 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue index f3ed0fb..cfd38e1 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue @@ -68,8 +68,27 @@ const approvalLogsList = [] as any[] item.approvalLogs.forEach((child: any, index: number) => { child.forEach((i: any, iindex: number) => { + // // 合并节点 + let nodeNumberMerge = '' + if (i.approvalStatus === '发起人') { + nodeNumberMerge = 0 + } + else { + if (child.length > 1) { + if (iindex === 0) { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + } + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + } approvalLogsList.push({ - nodeNumber: i.approvalStatus === '发起人' ? 0 : approvalLogsList[iindex].nodeNumber + 1, + // approvalLogsList[iindex] + nodeNumber: nodeNumberMerge, assigneeName: i.assigneeName, // 姓名 approvalStatus: i.approvalStatus, // 审批类型 finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 @@ -77,12 +96,58 @@ comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 cindex, + // countersignOrSign: i.countersignOrSign, }) }) }) - // console.log(approvalLogsList, 'approvalLogsList') item.approvalLogsList = approvalLogsList }) + // response.data.forEach((item: Array, index: number) => { + // console.log(item, item.length, item[0].countersignOrSign === 2) + + // if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + // console.log('或签数据处理', item) + + // let name = ''// 姓名 + // let approvalStatus = ''// 审批类型 + // let finishTime = ''// 审批类型 + // let duration = ''// 用时 + // let comment = ''// 审批意见 + // let type = '-'// 审批意见 + // item.forEach((i: any, index) => { + // name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + // approvalStatus = i.approvalStatus // 审批类型 + // finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + // duration = i.duration ? i.duration : duration // 用时 + // finishTime = finishTime + i.finishTime + // comment = comment + i.comment // 审批意见 + // type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 + // }) + // list.value.push({ + // nodeNumber: index, + // approvalStatus, // 审批类型 + // assigneeName: name, // 姓名 + // finishTime, // 完成时间 + // duration, // 用时 + // comment, // 审批意见 + // type, // 意见类别 + // }) + // console.log('list.v*******alue', list.value) + // } + // else { + // item.forEach((i: any) => { + // list.value.push({ + // nodeNumber: index, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // } + // }) list.value = data // total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue index 8ced2c7..59c2b90 100644 --- a/src/views/system/installation/editDialog.vue +++ b/src/views/system/installation/editDialog.vue @@ -26,8 +26,8 @@ } // 表头显示标题 const rules: FormRules = { installLocation: [{ required: true, message: '安装位置不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '分系统不能为空', trigger: ['blur', 'change'] }], - positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], + // positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue index 384fb27..aac75ed 100644 --- a/src/views/system/installation/list.vue +++ b/src/views/system/installation/list.vue @@ -21,7 +21,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, { text: '安装位置', value: 'installLocation', align: 'center' }, ]) diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue index cb9f3b9..87d95e4 100644 --- a/src/views/system/post/editDialog.vue +++ b/src/views/system/post/editDialog.vue @@ -24,7 +24,7 @@ } // 表头显示标题 const rules: FormRules = { positionName: [{ required: true, message: '岗位名称不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '所在组织不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue index d7e8457..922d996 100644 --- a/src/views/system/post/list.vue +++ b/src/views/system/post/list.vue @@ -19,7 +19,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, ]) const listLoading = ref(false) diff --git a/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue b/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue index 4dc8725..bc0c347 100644 --- a/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue index f8dce5d..6fb9582 100644 --- a/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue index 13762a7..3cbc69c 100644 --- a/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 484f431..c6751b2 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue index f3ed0fb..cfd38e1 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue @@ -68,8 +68,27 @@ const approvalLogsList = [] as any[] item.approvalLogs.forEach((child: any, index: number) => { child.forEach((i: any, iindex: number) => { + // // 合并节点 + let nodeNumberMerge = '' + if (i.approvalStatus === '发起人') { + nodeNumberMerge = 0 + } + else { + if (child.length > 1) { + if (iindex === 0) { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + } + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + } approvalLogsList.push({ - nodeNumber: i.approvalStatus === '发起人' ? 0 : approvalLogsList[iindex].nodeNumber + 1, + // approvalLogsList[iindex] + nodeNumber: nodeNumberMerge, assigneeName: i.assigneeName, // 姓名 approvalStatus: i.approvalStatus, // 审批类型 finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 @@ -77,12 +96,58 @@ comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 cindex, + // countersignOrSign: i.countersignOrSign, }) }) }) - // console.log(approvalLogsList, 'approvalLogsList') item.approvalLogsList = approvalLogsList }) + // response.data.forEach((item: Array, index: number) => { + // console.log(item, item.length, item[0].countersignOrSign === 2) + + // if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + // console.log('或签数据处理', item) + + // let name = ''// 姓名 + // let approvalStatus = ''// 审批类型 + // let finishTime = ''// 审批类型 + // let duration = ''// 用时 + // let comment = ''// 审批意见 + // let type = '-'// 审批意见 + // item.forEach((i: any, index) => { + // name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + // approvalStatus = i.approvalStatus // 审批类型 + // finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + // duration = i.duration ? i.duration : duration // 用时 + // finishTime = finishTime + i.finishTime + // comment = comment + i.comment // 审批意见 + // type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 + // }) + // list.value.push({ + // nodeNumber: index, + // approvalStatus, // 审批类型 + // assigneeName: name, // 姓名 + // finishTime, // 完成时间 + // duration, // 用时 + // comment, // 审批意见 + // type, // 意见类别 + // }) + // console.log('list.v*******alue', list.value) + // } + // else { + // item.forEach((i: any) => { + // list.value.push({ + // nodeNumber: index, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // } + // }) list.value = data // total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue index 8ced2c7..59c2b90 100644 --- a/src/views/system/installation/editDialog.vue +++ b/src/views/system/installation/editDialog.vue @@ -26,8 +26,8 @@ } // 表头显示标题 const rules: FormRules = { installLocation: [{ required: true, message: '安装位置不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '分系统不能为空', trigger: ['blur', 'change'] }], - positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], + // positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue index 384fb27..aac75ed 100644 --- a/src/views/system/installation/list.vue +++ b/src/views/system/installation/list.vue @@ -21,7 +21,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, { text: '安装位置', value: 'installLocation', align: 'center' }, ]) diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue index cb9f3b9..87d95e4 100644 --- a/src/views/system/post/editDialog.vue +++ b/src/views/system/post/editDialog.vue @@ -24,7 +24,7 @@ } // 表头显示标题 const rules: FormRules = { positionName: [{ required: true, message: '岗位名称不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '所在组织不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue index d7e8457..922d996 100644 --- a/src/views/system/post/list.vue +++ b/src/views/system/post/list.vue @@ -19,7 +19,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, ]) const listLoading = ref(false) diff --git a/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue b/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue index 4dc8725..bc0c347 100644 --- a/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue index f8dce5d..6fb9582 100644 --- a/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue index 13762a7..3cbc69c 100644 --- a/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue index 4ec4cbc..7187554 100644 --- a/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 484f431..c6751b2 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue index f3ed0fb..cfd38e1 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue @@ -68,8 +68,27 @@ const approvalLogsList = [] as any[] item.approvalLogs.forEach((child: any, index: number) => { child.forEach((i: any, iindex: number) => { + // // 合并节点 + let nodeNumberMerge = '' + if (i.approvalStatus === '发起人') { + nodeNumberMerge = 0 + } + else { + if (child.length > 1) { + if (iindex === 0) { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + } + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + } approvalLogsList.push({ - nodeNumber: i.approvalStatus === '发起人' ? 0 : approvalLogsList[iindex].nodeNumber + 1, + // approvalLogsList[iindex] + nodeNumber: nodeNumberMerge, assigneeName: i.assigneeName, // 姓名 approvalStatus: i.approvalStatus, // 审批类型 finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 @@ -77,12 +96,58 @@ comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 cindex, + // countersignOrSign: i.countersignOrSign, }) }) }) - // console.log(approvalLogsList, 'approvalLogsList') item.approvalLogsList = approvalLogsList }) + // response.data.forEach((item: Array, index: number) => { + // console.log(item, item.length, item[0].countersignOrSign === 2) + + // if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + // console.log('或签数据处理', item) + + // let name = ''// 姓名 + // let approvalStatus = ''// 审批类型 + // let finishTime = ''// 审批类型 + // let duration = ''// 用时 + // let comment = ''// 审批意见 + // let type = '-'// 审批意见 + // item.forEach((i: any, index) => { + // name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + // approvalStatus = i.approvalStatus // 审批类型 + // finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + // duration = i.duration ? i.duration : duration // 用时 + // finishTime = finishTime + i.finishTime + // comment = comment + i.comment // 审批意见 + // type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 + // }) + // list.value.push({ + // nodeNumber: index, + // approvalStatus, // 审批类型 + // assigneeName: name, // 姓名 + // finishTime, // 完成时间 + // duration, // 用时 + // comment, // 审批意见 + // type, // 意见类别 + // }) + // console.log('list.v*******alue', list.value) + // } + // else { + // item.forEach((i: any) => { + // list.value.push({ + // nodeNumber: index, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // } + // }) list.value = data // total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue index 8ced2c7..59c2b90 100644 --- a/src/views/system/installation/editDialog.vue +++ b/src/views/system/installation/editDialog.vue @@ -26,8 +26,8 @@ } // 表头显示标题 const rules: FormRules = { installLocation: [{ required: true, message: '安装位置不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '分系统不能为空', trigger: ['blur', 'change'] }], - positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], + // positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue index 384fb27..aac75ed 100644 --- a/src/views/system/installation/list.vue +++ b/src/views/system/installation/list.vue @@ -21,7 +21,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, { text: '安装位置', value: 'installLocation', align: 'center' }, ]) diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue index cb9f3b9..87d95e4 100644 --- a/src/views/system/post/editDialog.vue +++ b/src/views/system/post/editDialog.vue @@ -24,7 +24,7 @@ } // 表头显示标题 const rules: FormRules = { positionName: [{ required: true, message: '岗位名称不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '所在组织不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue index d7e8457..922d996 100644 --- a/src/views/system/post/list.vue +++ b/src/views/system/post/list.vue @@ -19,7 +19,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, ]) const listLoading = ref(false) diff --git a/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue b/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue index 4dc8725..bc0c347 100644 --- a/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue index f8dce5d..6fb9582 100644 --- a/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue index 13762a7..3cbc69c 100644 --- a/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue index 4ec4cbc..7187554 100644 --- a/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/task/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue index 4ce11e7..714cf00 100644 --- a/src/views/tested/MeasurementPlan/task/components/edit.vue +++ b/src/views/tested/MeasurementPlan/task/components/edit.vue @@ -552,7 +552,7 @@ - + diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 484f431..c6751b2 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue index f3ed0fb..cfd38e1 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue @@ -68,8 +68,27 @@ const approvalLogsList = [] as any[] item.approvalLogs.forEach((child: any, index: number) => { child.forEach((i: any, iindex: number) => { + // // 合并节点 + let nodeNumberMerge = '' + if (i.approvalStatus === '发起人') { + nodeNumberMerge = 0 + } + else { + if (child.length > 1) { + if (iindex === 0) { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + } + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + } approvalLogsList.push({ - nodeNumber: i.approvalStatus === '发起人' ? 0 : approvalLogsList[iindex].nodeNumber + 1, + // approvalLogsList[iindex] + nodeNumber: nodeNumberMerge, assigneeName: i.assigneeName, // 姓名 approvalStatus: i.approvalStatus, // 审批类型 finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 @@ -77,12 +96,58 @@ comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 cindex, + // countersignOrSign: i.countersignOrSign, }) }) }) - // console.log(approvalLogsList, 'approvalLogsList') item.approvalLogsList = approvalLogsList }) + // response.data.forEach((item: Array, index: number) => { + // console.log(item, item.length, item[0].countersignOrSign === 2) + + // if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + // console.log('或签数据处理', item) + + // let name = ''// 姓名 + // let approvalStatus = ''// 审批类型 + // let finishTime = ''// 审批类型 + // let duration = ''// 用时 + // let comment = ''// 审批意见 + // let type = '-'// 审批意见 + // item.forEach((i: any, index) => { + // name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + // approvalStatus = i.approvalStatus // 审批类型 + // finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + // duration = i.duration ? i.duration : duration // 用时 + // finishTime = finishTime + i.finishTime + // comment = comment + i.comment // 审批意见 + // type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 + // }) + // list.value.push({ + // nodeNumber: index, + // approvalStatus, // 审批类型 + // assigneeName: name, // 姓名 + // finishTime, // 完成时间 + // duration, // 用时 + // comment, // 审批意见 + // type, // 意见类别 + // }) + // console.log('list.v*******alue', list.value) + // } + // else { + // item.forEach((i: any) => { + // list.value.push({ + // nodeNumber: index, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // } + // }) list.value = data // total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue index 8ced2c7..59c2b90 100644 --- a/src/views/system/installation/editDialog.vue +++ b/src/views/system/installation/editDialog.vue @@ -26,8 +26,8 @@ } // 表头显示标题 const rules: FormRules = { installLocation: [{ required: true, message: '安装位置不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '分系统不能为空', trigger: ['blur', 'change'] }], - positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], + // positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue index 384fb27..aac75ed 100644 --- a/src/views/system/installation/list.vue +++ b/src/views/system/installation/list.vue @@ -21,7 +21,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, { text: '安装位置', value: 'installLocation', align: 'center' }, ]) diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue index cb9f3b9..87d95e4 100644 --- a/src/views/system/post/editDialog.vue +++ b/src/views/system/post/editDialog.vue @@ -24,7 +24,7 @@ } // 表头显示标题 const rules: FormRules = { positionName: [{ required: true, message: '岗位名称不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '所在组织不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue index d7e8457..922d996 100644 --- a/src/views/system/post/list.vue +++ b/src/views/system/post/list.vue @@ -19,7 +19,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, ]) const listLoading = ref(false) diff --git a/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue b/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue index 4dc8725..bc0c347 100644 --- a/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue index f8dce5d..6fb9582 100644 --- a/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue index 13762a7..3cbc69c 100644 --- a/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue index 4ec4cbc..7187554 100644 --- a/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/task/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue index 4ce11e7..714cf00 100644 --- a/src/views/tested/MeasurementPlan/task/components/edit.vue +++ b/src/views/tested/MeasurementPlan/task/components/edit.vue @@ -552,7 +552,7 @@ - + diff --git a/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue b/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue index 2608f40..c1cb2d0 100644 --- a/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue +++ b/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue @@ -10,6 +10,12 @@ import { getAdminDept, getUserDept, getUserDeptSon } from '@/api/system/user' import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' +const props = defineProps({ + measureCompany: { + type: String, + default: '', + }, +}) const emits = defineEmits(['add']) const userStore = useUserStore() const dialogFormVisible = ref(false) @@ -29,6 +35,10 @@ certificateValidEnd: '', directorName: '', companyId: '', + measureCompany: props.measureCompany, +}) +watch(() => props.measureCompany, () => { + listQuery.value.measureCompany = props.measureCompany }) const loadingTable = ref(false) const list = ref([]) // 表格数据 @@ -86,11 +96,11 @@ value: 'usageStatusName', align: 'center', }, - { - text: '检定(校准)单位', - value: 'checkOrganization', - align: 'center', - }, + // { + // text: '检定(校准)单位', + // value: 'checkOrganization', + // align: 'center', + // }, { text: '证书有效期', value: 'certificateValid', @@ -101,6 +111,7 @@ const fetchData = () => { select.value = -1 loadingTable.value = true + listQuery.value.measureCompany = props.measureCompany devcieOrderSelect(listQuery.value).then((response) => { list.value = response.data.rows total.value = parseInt(response.data.total) @@ -129,6 +140,7 @@ certificateValidEnd: '', companyId: '', directorName: '', + measureCompany: props.measureCompany, } search() } diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 484f431..c6751b2 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue index f3ed0fb..cfd38e1 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue @@ -68,8 +68,27 @@ const approvalLogsList = [] as any[] item.approvalLogs.forEach((child: any, index: number) => { child.forEach((i: any, iindex: number) => { + // // 合并节点 + let nodeNumberMerge = '' + if (i.approvalStatus === '发起人') { + nodeNumberMerge = 0 + } + else { + if (child.length > 1) { + if (iindex === 0) { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + } + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + } approvalLogsList.push({ - nodeNumber: i.approvalStatus === '发起人' ? 0 : approvalLogsList[iindex].nodeNumber + 1, + // approvalLogsList[iindex] + nodeNumber: nodeNumberMerge, assigneeName: i.assigneeName, // 姓名 approvalStatus: i.approvalStatus, // 审批类型 finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 @@ -77,12 +96,58 @@ comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 cindex, + // countersignOrSign: i.countersignOrSign, }) }) }) - // console.log(approvalLogsList, 'approvalLogsList') item.approvalLogsList = approvalLogsList }) + // response.data.forEach((item: Array, index: number) => { + // console.log(item, item.length, item[0].countersignOrSign === 2) + + // if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + // console.log('或签数据处理', item) + + // let name = ''// 姓名 + // let approvalStatus = ''// 审批类型 + // let finishTime = ''// 审批类型 + // let duration = ''// 用时 + // let comment = ''// 审批意见 + // let type = '-'// 审批意见 + // item.forEach((i: any, index) => { + // name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + // approvalStatus = i.approvalStatus // 审批类型 + // finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + // duration = i.duration ? i.duration : duration // 用时 + // finishTime = finishTime + i.finishTime + // comment = comment + i.comment // 审批意见 + // type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 + // }) + // list.value.push({ + // nodeNumber: index, + // approvalStatus, // 审批类型 + // assigneeName: name, // 姓名 + // finishTime, // 完成时间 + // duration, // 用时 + // comment, // 审批意见 + // type, // 意见类别 + // }) + // console.log('list.v*******alue', list.value) + // } + // else { + // item.forEach((i: any) => { + // list.value.push({ + // nodeNumber: index, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // } + // }) list.value = data // total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue index 8ced2c7..59c2b90 100644 --- a/src/views/system/installation/editDialog.vue +++ b/src/views/system/installation/editDialog.vue @@ -26,8 +26,8 @@ } // 表头显示标题 const rules: FormRules = { installLocation: [{ required: true, message: '安装位置不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '分系统不能为空', trigger: ['blur', 'change'] }], - positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], + // positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue index 384fb27..aac75ed 100644 --- a/src/views/system/installation/list.vue +++ b/src/views/system/installation/list.vue @@ -21,7 +21,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, { text: '安装位置', value: 'installLocation', align: 'center' }, ]) diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue index cb9f3b9..87d95e4 100644 --- a/src/views/system/post/editDialog.vue +++ b/src/views/system/post/editDialog.vue @@ -24,7 +24,7 @@ } // 表头显示标题 const rules: FormRules = { positionName: [{ required: true, message: '岗位名称不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '所在组织不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue index d7e8457..922d996 100644 --- a/src/views/system/post/list.vue +++ b/src/views/system/post/list.vue @@ -19,7 +19,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, ]) const listLoading = ref(false) diff --git a/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue b/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue index 4dc8725..bc0c347 100644 --- a/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue index f8dce5d..6fb9582 100644 --- a/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue index 13762a7..3cbc69c 100644 --- a/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue index 4ec4cbc..7187554 100644 --- a/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/task/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue index 4ce11e7..714cf00 100644 --- a/src/views/tested/MeasurementPlan/task/components/edit.vue +++ b/src/views/tested/MeasurementPlan/task/components/edit.vue @@ -552,7 +552,7 @@ - + diff --git a/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue b/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue index 2608f40..c1cb2d0 100644 --- a/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue +++ b/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue @@ -10,6 +10,12 @@ import { getAdminDept, getUserDept, getUserDeptSon } from '@/api/system/user' import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' +const props = defineProps({ + measureCompany: { + type: String, + default: '', + }, +}) const emits = defineEmits(['add']) const userStore = useUserStore() const dialogFormVisible = ref(false) @@ -29,6 +35,10 @@ certificateValidEnd: '', directorName: '', companyId: '', + measureCompany: props.measureCompany, +}) +watch(() => props.measureCompany, () => { + listQuery.value.measureCompany = props.measureCompany }) const loadingTable = ref(false) const list = ref([]) // 表格数据 @@ -86,11 +96,11 @@ value: 'usageStatusName', align: 'center', }, - { - text: '检定(校准)单位', - value: 'checkOrganization', - align: 'center', - }, + // { + // text: '检定(校准)单位', + // value: 'checkOrganization', + // align: 'center', + // }, { text: '证书有效期', value: 'certificateValid', @@ -101,6 +111,7 @@ const fetchData = () => { select.value = -1 loadingTable.value = true + listQuery.value.measureCompany = props.measureCompany devcieOrderSelect(listQuery.value).then((response) => { list.value = response.data.rows total.value = parseInt(response.data.total) @@ -129,6 +140,7 @@ certificateValidEnd: '', companyId: '', directorName: '', + measureCompany: props.measureCompany, } search() } diff --git a/src/views/tested/MeasurementPlan/task/components/selectDeviceSinge.vue b/src/views/tested/MeasurementPlan/task/components/selectDeviceSinge.vue index 0f99b4e..44ad9fd 100644 --- a/src/views/tested/MeasurementPlan/task/components/selectDeviceSinge.vue +++ b/src/views/tested/MeasurementPlan/task/components/selectDeviceSinge.vue @@ -10,6 +10,12 @@ import { getAdminDept, getUserDept, getUserDeptSon } from '@/api/system/user' import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model' import { toTreeList } from '@/utils/structure' +const props = defineProps({ + measureCompany: { + type: String, + default: '', + }, +}) const emits = defineEmits(['add']) const userStore = useUserStore() const dialogFormVisible = ref(false) @@ -29,6 +35,10 @@ certificateValidEnd: '', companyId: '', directorName: '', + measureCompany: props.measureCompany, +}) +watch(() => props.measureCompany, () => { + listQuery.value.measureCompany = props.measureCompany }) const loadingTable = ref(false) const list = ref([]) // 表格数据 @@ -86,11 +96,11 @@ value: 'usageStatusName', align: 'center', }, - { - text: '检定(校准)单位', - value: 'checkOrganization', - align: 'center', - }, + // { + // text: '检定(校准)单位', + // value: 'checkOrganization', + // align: 'center', + // }, { text: '证书有效期', value: 'certificateValid', @@ -100,6 +110,7 @@ // 获取数据列表 const fetchData = () => { loadingTable.value = true + listQuery.value.measureCompany = props.measureCompany devcieOrderSelect(listQuery.value).then((response) => { list.value = response.data.rows total.value = parseInt(response.data.total) @@ -128,6 +139,7 @@ certificateValidEnd: '', directorName: '', companyId: '', + measureCompany: props.measureCompany, } search() } diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 484f431..c6751b2 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue index f3ed0fb..cfd38e1 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTableDevice.vue @@ -68,8 +68,27 @@ const approvalLogsList = [] as any[] item.approvalLogs.forEach((child: any, index: number) => { child.forEach((i: any, iindex: number) => { + // // 合并节点 + let nodeNumberMerge = '' + if (i.approvalStatus === '发起人') { + nodeNumberMerge = 0 + } + else { + if (child.length > 1) { + if (iindex === 0) { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + } + } + else { + nodeNumberMerge = approvalLogsList[approvalLogsList.length - 1].nodeNumber + 1 + } + } approvalLogsList.push({ - nodeNumber: i.approvalStatus === '发起人' ? 0 : approvalLogsList[iindex].nodeNumber + 1, + // approvalLogsList[iindex] + nodeNumber: nodeNumberMerge, assigneeName: i.assigneeName, // 姓名 approvalStatus: i.approvalStatus, // 审批类型 finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 @@ -77,12 +96,58 @@ comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 cindex, + // countersignOrSign: i.countersignOrSign, }) }) }) - // console.log(approvalLogsList, 'approvalLogsList') item.approvalLogsList = approvalLogsList }) + // response.data.forEach((item: Array, index: number) => { + // console.log(item, item.length, item[0].countersignOrSign === 2) + + // if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + // console.log('或签数据处理', item) + + // let name = ''// 姓名 + // let approvalStatus = ''// 审批类型 + // let finishTime = ''// 审批类型 + // let duration = ''// 用时 + // let comment = ''// 审批意见 + // let type = '-'// 审批意见 + // item.forEach((i: any, index) => { + // name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + // approvalStatus = i.approvalStatus // 审批类型 + // finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + // duration = i.duration ? i.duration : duration // 用时 + // finishTime = finishTime + i.finishTime + // comment = comment + i.comment // 审批意见 + // type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 + // }) + // list.value.push({ + // nodeNumber: index, + // approvalStatus, // 审批类型 + // assigneeName: name, // 姓名 + // finishTime, // 完成时间 + // duration, // 用时 + // comment, // 审批意见 + // type, // 意见类别 + // }) + // console.log('list.v*******alue', list.value) + // } + // else { + // item.forEach((i: any) => { + // list.value.push({ + // nodeNumber: index, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // } + // }) list.value = data // total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue index 8ced2c7..59c2b90 100644 --- a/src/views/system/installation/editDialog.vue +++ b/src/views/system/installation/editDialog.vue @@ -26,8 +26,8 @@ } // 表头显示标题 const rules: FormRules = { installLocation: [{ required: true, message: '安装位置不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '分系统不能为空', trigger: ['blur', 'change'] }], - positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], + // positionId: [{ required: true, message: '岗位不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue index 384fb27..aac75ed 100644 --- a/src/views/system/installation/list.vue +++ b/src/views/system/installation/list.vue @@ -21,7 +21,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, { text: '安装位置', value: 'installLocation', align: 'center' }, ]) diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue index cb9f3b9..87d95e4 100644 --- a/src/views/system/post/editDialog.vue +++ b/src/views/system/post/editDialog.vue @@ -24,7 +24,7 @@ } // 表头显示标题 const rules: FormRules = { positionName: [{ required: true, message: '岗位名称不能为空', trigger: ['blur', 'change'] }], - subSystemId: [{ required: true, message: '所在组织不能为空', trigger: ['blur', 'change'] }], + subSystemId: [{ required: true, message: '所在单位/部门/分系统不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 // 重置表单 diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue index d7e8457..922d996 100644 --- a/src/views/system/post/list.vue +++ b/src/views/system/post/list.vue @@ -19,7 +19,7 @@ const columns = ref([ { text: '所在单位', value: 'companyName', align: 'center' }, { text: '所在部门', value: 'deptName', align: 'center' }, - { text: '所在分系统', value: 'subSystemName', align: 'center' }, + // { text: '所在分系统', value: 'subSystemName', align: 'center' }, { text: '岗位名称', value: 'positionName', align: 'center' }, ]) const listLoading = ref(false) diff --git a/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue b/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue index 4dc8725..bc0c347 100644 --- a/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementBusiness/review/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue index f8dce5d..6fb9582 100644 --- a/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/early/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue index 13762a7..3cbc69c 100644 --- a/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/plan/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue b/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue index 4ec4cbc..7187554 100644 --- a/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue +++ b/src/views/tested/MeasurementPlan/task/components/ApprovalDialog.vue @@ -45,7 +45,7 @@ const dataFormRef = ref() // 校验规则 const rules: FormRules = reactive({ - comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], + // comments: [{ required: true, message: '审批结论必填', trigger: ['blur', 'change'] }], }) /** * 初始化审批弹窗 diff --git a/src/views/tested/MeasurementPlan/task/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue index 4ce11e7..714cf00 100644 --- a/src/views/tested/MeasurementPlan/task/components/edit.vue +++ b/src/views/tested/MeasurementPlan/task/components/edit.vue @@ -552,7 +552,7 @@ - + diff --git a/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue b/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue index 2608f40..c1cb2d0 100644 --- a/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue +++ b/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue @@ -10,6 +10,12 @@ import { getAdminDept, getUserDept, getUserDeptSon } from '@/api/system/user' import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' +const props = defineProps({ + measureCompany: { + type: String, + default: '', + }, +}) const emits = defineEmits(['add']) const userStore = useUserStore() const dialogFormVisible = ref(false) @@ -29,6 +35,10 @@ certificateValidEnd: '', directorName: '', companyId: '', + measureCompany: props.measureCompany, +}) +watch(() => props.measureCompany, () => { + listQuery.value.measureCompany = props.measureCompany }) const loadingTable = ref(false) const list = ref([]) // 表格数据 @@ -86,11 +96,11 @@ value: 'usageStatusName', align: 'center', }, - { - text: '检定(校准)单位', - value: 'checkOrganization', - align: 'center', - }, + // { + // text: '检定(校准)单位', + // value: 'checkOrganization', + // align: 'center', + // }, { text: '证书有效期', value: 'certificateValid', @@ -101,6 +111,7 @@ const fetchData = () => { select.value = -1 loadingTable.value = true + listQuery.value.measureCompany = props.measureCompany devcieOrderSelect(listQuery.value).then((response) => { list.value = response.data.rows total.value = parseInt(response.data.total) @@ -129,6 +140,7 @@ certificateValidEnd: '', companyId: '', directorName: '', + measureCompany: props.measureCompany, } search() } diff --git a/src/views/tested/MeasurementPlan/task/components/selectDeviceSinge.vue b/src/views/tested/MeasurementPlan/task/components/selectDeviceSinge.vue index 0f99b4e..44ad9fd 100644 --- a/src/views/tested/MeasurementPlan/task/components/selectDeviceSinge.vue +++ b/src/views/tested/MeasurementPlan/task/components/selectDeviceSinge.vue @@ -10,6 +10,12 @@ import { getAdminDept, getUserDept, getUserDeptSon } from '@/api/system/user' import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model' import { toTreeList } from '@/utils/structure' +const props = defineProps({ + measureCompany: { + type: String, + default: '', + }, +}) const emits = defineEmits(['add']) const userStore = useUserStore() const dialogFormVisible = ref(false) @@ -29,6 +35,10 @@ certificateValidEnd: '', companyId: '', directorName: '', + measureCompany: props.measureCompany, +}) +watch(() => props.measureCompany, () => { + listQuery.value.measureCompany = props.measureCompany }) const loadingTable = ref(false) const list = ref([]) // 表格数据 @@ -86,11 +96,11 @@ value: 'usageStatusName', align: 'center', }, - { - text: '检定(校准)单位', - value: 'checkOrganization', - align: 'center', - }, + // { + // text: '检定(校准)单位', + // value: 'checkOrganization', + // align: 'center', + // }, { text: '证书有效期', value: 'certificateValid', @@ -100,6 +110,7 @@ // 获取数据列表 const fetchData = () => { loadingTable.value = true + listQuery.value.measureCompany = props.measureCompany devcieOrderSelect(listQuery.value).then((response) => { list.value = response.data.rows total.value = parseInt(response.data.total) @@ -128,6 +139,7 @@ certificateValidEnd: '', directorName: '', companyId: '', + measureCompany: props.measureCompany, } search() } diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue index ee334b9..b06d2d6 100644 --- a/src/views/tested/MeasurementPlan/task/components/tableList.vue +++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue @@ -14,6 +14,20 @@ type: Array, default: () => ([]), }, + form: { + type: Object, + default: () => ({}), + }, +}) +const measureCompany = ref('') +watch(() => $props.form, (newVal) => { + if (!newVal) { return } + if (newVal.measureCompany) { + measureCompany.value = newVal.measureCompany + } +}, { + deep: true, + immediate: true, }) const $route = useRoute() // 表头显示标题 @@ -318,8 +332,8 @@