diff --git a/.env.development b/.env.development index 3a717ae..e743953 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ VITE_APP_TITLE = 计量信息系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://139.198.29.133:8089 -VITE_APP_API_BASEURL = http://192.168.8.107:5909 +VITE_APP_API_BASEURL = http://111.198.10.15:21611 # VITE_APP_API_BASEURL = http://111.198.10.15:21609 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 diff --git a/.env.development b/.env.development index 3a717ae..e743953 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ VITE_APP_TITLE = 计量信息系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://139.198.29.133:8089 -VITE_APP_API_BASEURL = http://192.168.8.107:5909 +VITE_APP_API_BASEURL = http://111.198.10.15:21611 # VITE_APP_API_BASEURL = http://111.198.10.15:21609 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 diff --git a/public/config/config.json b/public/config/config.json index 0127d2f..3bd0a89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,4 +1,4 @@ { "title":"计量业务系统", - "baseUrl": "http://192.168.8.107:5909" + "baseUrl": "http://111.198.10.15:21611" } diff --git a/.env.development b/.env.development index 3a717ae..e743953 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ VITE_APP_TITLE = 计量信息系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://139.198.29.133:8089 -VITE_APP_API_BASEURL = http://192.168.8.107:5909 +VITE_APP_API_BASEURL = http://111.198.10.15:21611 # VITE_APP_API_BASEURL = http://111.198.10.15:21609 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 diff --git a/public/config/config.json b/public/config/config.json index 0127d2f..3bd0a89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,4 +1,4 @@ { "title":"计量业务系统", - "baseUrl": "http://192.168.8.107:5909" + "baseUrl": "http://111.198.10.15:21611" } diff --git a/src/views/tested/MeasurementPlan/plan/components/dataList.vue b/src/views/tested/MeasurementPlan/plan/components/dataList.vue index d4e7c8e..e39a72d 100644 --- a/src/views/tested/MeasurementPlan/plan/components/dataList.vue +++ b/src/views/tested/MeasurementPlan/plan/components/dataList.vue @@ -22,7 +22,7 @@ }, { text: '使用部门', - value: 'succeed', + value: 'deptName', align: 'center', }, { @@ -32,12 +32,12 @@ }, { text: '负责人', - value: 'meterIdentify', + value: 'directorName', align: 'center', }, { text: '检定(校准)单位', - value: 'checkCycle', + value: 'checkOrganization', align: 'center', }, { @@ -47,22 +47,22 @@ }, { text: '执行状态', - value: 'certificateValid', + value: 'executeStatusName', align: 'center', }, { text: '执行时间', - value: 'certificateValid', + value: '', align: 'center', }, { text: '检定完成度', - value: 'certificateValid', + value: '', align: 'center', }, { text: '检定完成时间', - value: 'certificateValid', + value: '', align: 'center', }, ]) diff --git a/.env.development b/.env.development index 3a717ae..e743953 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ VITE_APP_TITLE = 计量信息系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://139.198.29.133:8089 -VITE_APP_API_BASEURL = http://192.168.8.107:5909 +VITE_APP_API_BASEURL = http://111.198.10.15:21611 # VITE_APP_API_BASEURL = http://111.198.10.15:21609 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 diff --git a/public/config/config.json b/public/config/config.json index 0127d2f..3bd0a89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,4 +1,4 @@ { "title":"计量业务系统", - "baseUrl": "http://192.168.8.107:5909" + "baseUrl": "http://111.198.10.15:21611" } diff --git a/src/views/tested/MeasurementPlan/plan/components/dataList.vue b/src/views/tested/MeasurementPlan/plan/components/dataList.vue index d4e7c8e..e39a72d 100644 --- a/src/views/tested/MeasurementPlan/plan/components/dataList.vue +++ b/src/views/tested/MeasurementPlan/plan/components/dataList.vue @@ -22,7 +22,7 @@ }, { text: '使用部门', - value: 'succeed', + value: 'deptName', align: 'center', }, { @@ -32,12 +32,12 @@ }, { text: '负责人', - value: 'meterIdentify', + value: 'directorName', align: 'center', }, { text: '检定(校准)单位', - value: 'checkCycle', + value: 'checkOrganization', align: 'center', }, { @@ -47,22 +47,22 @@ }, { text: '执行状态', - value: 'certificateValid', + value: 'executeStatusName', align: 'center', }, { text: '执行时间', - value: 'certificateValid', + value: '', align: 'center', }, { text: '检定完成度', - value: 'certificateValid', + value: '', align: 'center', }, { text: '检定完成时间', - value: 'certificateValid', + value: '', align: 'center', }, ]) diff --git a/src/views/tested/MeasurementPlan/plan/components/edit.vue b/src/views/tested/MeasurementPlan/plan/components/edit.vue index 76b6194..5de5517 100644 --- a/src/views/tested/MeasurementPlan/plan/components/edit.vue +++ b/src/views/tested/MeasurementPlan/plan/components/edit.vue @@ -4,7 +4,7 @@ import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import dayjs from 'dayjs' import planList from './table.vue' -import { detailPlan, editPlan, getInfoList, submitPlan } from '@/api/eqpt/measurementPlan/paln' +import { cancelPlan, delPlan, detailPlan, editPlan, getInfoList, submitPlan } from '@/api/eqpt/measurementPlan/paln' import { getDictByCode } from '@/api/system/dict' import useUserStore from '@/store/modules/user' import { SCHEDULE } from '@/utils/scheduleDict' @@ -92,6 +92,11 @@ if ($route.query.append) { // 修改计量计划为追加 ruleForm.value.planCategory = '1' + ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 + ruleForm.value.createUserId = userStore.id + ruleForm.value.createUserName = userStore.name + ruleForm.value.createDeptId = userStore.deptId + ruleForm.value.createDeptName = userStore.deptName } // detailPlan(data.id).then((res) => { // // ruleForm.value = res.data @@ -141,13 +146,21 @@ ruleForm.value.planType = '2' } ruleForm.value.equipmentIds = tableRef.value.list.map((item: any) => item.equipmentId) + // console.log(tableRef.value.list, 'tableRef.value.list') editPlan(ruleForm.value).then((res) => { submitId.value = res.data - ElMessage.success('保存成功') - // close() - }).catch((_err) => { - ruleForm.value.equipmentIds = tableRef.value.list + // close() + if (statusName === '已取消' || statusName === '未通过') { + submitPlan({ id: submitId.value, formId: SCHEDULE.METERING_PLAN_APPROVAL }).then((res) => { + ElMessage.success('已提交') + close() + }) + } + else { + ElMessage.success('保存成功') + } }) + ruleForm.value.equipmentIds = tableRef.value.list }) } else { @@ -184,6 +197,59 @@ formEl?.resetFields() close() } +// 打印 +const print = () => { + +} +// 审批 +const approvalDialogRef = ref() +const apply = (type: string) => { + const data = JSON.parse($route.query.row as string) + approvalDialogRef.value.initDialog(type, data.taskId, data.processId, ruleForm.value.id) +} +// 编辑 +const editForm = () => { + $router.push({ + params: { ...$route.params, type: 'update' }, + query: { ...$route.query }, + }) +} +const delForm = () => { + ElMessageBox.confirm( + '确认删除此记录吗?', + '确认', + { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }, + ).then(() => { + const row = JSON.parse($route.query.row as string) + delPlan(row.id).then((res) => { + ElMessage.success('操作成功') + close() + // search() + }) + }) +} +const cancelForm = () => { + ElMessageBox.confirm( + '确认取消此申请吗?', + '确认', + { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }, + ).then(() => { + const row = JSON.parse($route.query.row as string) + cancelPlan({ id: row.id, processInstanceId: row.processId, comments: '' }).then((res) => { + ElMessage.success('操作成功') + close() + // search() + }) + }) +}