diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 242b40e..5234d0b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -198,7 +198,6 @@ } // 点击编辑/详情 const handleEdit = (row: rowReturn, value: string) => { - console.log(row) if (value === '查看') { $router.push({ name: 'standardListAdd', @@ -328,10 +327,8 @@ const uploadAll = () => { upload() } +// 新建 const add = () => { - // buttonArray.value = ['提交', '保存'] - // buttonType.value = '' - // show.value = false $router.push({ name: 'standardListAdd', params: { @@ -340,6 +337,7 @@ query: { title: '新建', name: props.name, + applyType: props.applyType, }, }) } diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 242b40e..5234d0b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -198,7 +198,6 @@ } // 点击编辑/详情 const handleEdit = (row: rowReturn, value: string) => { - console.log(row) if (value === '查看') { $router.push({ name: 'standardListAdd', @@ -328,10 +327,8 @@ const uploadAll = () => { upload() } +// 新建 const add = () => { - // buttonArray.value = ['提交', '保存'] - // buttonType.value = '' - // show.value = false $router.push({ name: 'standardListAdd', params: { @@ -340,6 +337,7 @@ query: { title: '新建', name: props.name, + applyType: props.applyType, }, }) } diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index 96aabeb..002a43b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -4,11 +4,12 @@ import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' import { conditionalExpression } from '@babel/types' import type { IOptions } from '../standard_interface' -import UserListDialog from './userListDialog.vue' +import UserListDialog from '../../../stateManage/components/addRow.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' -import { getStandardLisAdd, getStandardLisdetali, getStandardList, getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { getStandardLisAdd, getStandardList, getStandardListDetail, getUsersDept } from '@/api/device/standard' import { UploadFile } from '@/api/measure/file' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const buttonArray = ref([]) // 顶部按钮数组 @@ -21,6 +22,7 @@ } // 字典 // 从路由中获取页面类型参数 const $route = useRoute() +const { username } = useUserStore() if ($route.params && $route.params.type) { pageType.value = $route.params.type as string if (pageType.value === 'add') { @@ -83,40 +85,17 @@ const fromListInfo = ref({ applyDept: '', - applyEquipmentList: [ - { - createTime: '', - createUser: 0, - equipmentId: 0, - id: 0, - isDel: 0, - remark: '', - standardApplyId: 0, - updateTime: '', - }, - ], + applyEquipmentList: [], applyNo: '', - applyType: '', + applyType: $route.query.applyType, applyTypeName: '', approvalStatus: '', approvalStatusName: '', constructionStandardUnitName: '', - createTime: '', - createUser: '', - fileList: [ - { - createTime: '', - createUser: 0, - fileName: '', - id: 0, - isDel: 0, - minioFileName: '', - remark: '', - standardApplyId: 0, - updateTime: '', - }, - ], - id: '', + createTime: null, + createUser: null, + fileList: [], + id: null, isDel: 0, processId: '', remark: '', @@ -124,8 +103,8 @@ standardName: '', standardNo: '', standardOwner: '', - updateTime: '', - version: '', + updateTime: null, + version: null, }) const checkTypeOptions = ref([]) @@ -220,6 +199,7 @@ align: string required: Boolean choose: Boolean + time: Boolean } // 申请文档列表 const filesList = ref([]) @@ -227,59 +207,67 @@ const columns = ref([ { text: '设备名称', - value: 'name', + value: 'assetTypeName', align: 'center', required: true, choose: true, + time: false, }, { text: '设备编号', - value: 'bianhao', + value: 'assetNo', align: 'center', required: true, choose: false, + time: false, }, { text: '型号', - value: 'xinghao', + value: 'modelNo', align: 'center', required: true, choose: false, + time: false, }, { text: '测量范围', - value: 'fanwei', + value: 'assetTypeName', align: 'center', required: true, choose: false, + time: false, }, { text: '使用部门', - value: 'bumen', + value: 'purpose', align: 'center', required: true, choose: false, + time: false, }, { text: '检定时间', - value: 'time', + value: 'manufacturingDate', align: 'center', required: true, choose: false, + time: false, }, { text: '检定结果', - value: 'jieguo', + value: 'managerStateName', align: 'center', required: true, choose: false, + time: false, }, { text: '有效日期', - value: 'riqi', + value: 'mesureCycleName', align: 'center', required: true, choose: false, + time: false, }, ]) // 标准配套设备更换查询条件 @@ -297,6 +285,7 @@ align: 'center', required: true, choose: false, + time: false, }, { text: '上传时间', @@ -304,12 +293,14 @@ align: 'center', required: true, choose: false, + time: true, }, { text: '文件说明', value: 'remark', align: 'center', required: true, + time: false, choose: false, }, { @@ -317,6 +308,7 @@ value: 'minioFileName', align: 'center', required: true, + time: false, choose: true, }, ]) @@ -404,15 +396,17 @@ } // 选择标准配套设备 const userListDialog = ref() - +// 第几条数据选择 +const listIndex = ref(0) // 点击标准配套设备选择按钮 -const chooseList = (row: object) => { - console.log(row) +const chooseList = (row: object, index: number) => { + listIndex.value = index userListDialog.value.initDialog() } // 选择完成之后的回调 -const confirmPerson = (e: any) => { - console.log(e) +const confirmPerson = (row: any) => { + fromListInfo.value.applyEquipmentList[listIndex.value] = row[0] + console.log(fromListInfo.value) } // 增加申请文档列表 const addRow = () => { @@ -480,7 +474,9 @@ const getAddList = (item: string) => { if (item === '提交' || item === '保存') { getStandardLisAdd(fromListInfo.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } else { @@ -503,14 +499,7 @@ } // 点击增加行 const addRoow = () => { - // const params = { - // equipmentName: '', - // equipmentNo: '', - // equipmentType: '', - // depreciationMethod: '', - - // } - list.value.push({}) + fromListInfo.value.applyEquipmentList.push({}) } // 点击关闭 const handleClose = () => { @@ -612,7 +601,7 @@ - + 批量选择 增加行 @@ -1024,7 +1013,7 @@ 选择 @@ -1065,11 +1054,11 @@ 申请文档 - + 增加行 @@ -1096,7 +1085,16 @@ *{{ item.text }} -
+
审批流程
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 242b40e..5234d0b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -198,7 +198,6 @@ } // 点击编辑/详情 const handleEdit = (row: rowReturn, value: string) => { - console.log(row) if (value === '查看') { $router.push({ name: 'standardListAdd', @@ -328,10 +327,8 @@ const uploadAll = () => { upload() } +// 新建 const add = () => { - // buttonArray.value = ['提交', '保存'] - // buttonType.value = '' - // show.value = false $router.push({ name: 'standardListAdd', params: { @@ -340,6 +337,7 @@ query: { title: '新建', name: props.name, + applyType: props.applyType, }, }) } diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index 96aabeb..002a43b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -4,11 +4,12 @@ import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' import { conditionalExpression } from '@babel/types' import type { IOptions } from '../standard_interface' -import UserListDialog from './userListDialog.vue' +import UserListDialog from '../../../stateManage/components/addRow.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' -import { getStandardLisAdd, getStandardLisdetali, getStandardList, getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { getStandardLisAdd, getStandardList, getStandardListDetail, getUsersDept } from '@/api/device/standard' import { UploadFile } from '@/api/measure/file' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const buttonArray = ref([]) // 顶部按钮数组 @@ -21,6 +22,7 @@ } // 字典 // 从路由中获取页面类型参数 const $route = useRoute() +const { username } = useUserStore() if ($route.params && $route.params.type) { pageType.value = $route.params.type as string if (pageType.value === 'add') { @@ -83,40 +85,17 @@ const fromListInfo = ref({ applyDept: '', - applyEquipmentList: [ - { - createTime: '', - createUser: 0, - equipmentId: 0, - id: 0, - isDel: 0, - remark: '', - standardApplyId: 0, - updateTime: '', - }, - ], + applyEquipmentList: [], applyNo: '', - applyType: '', + applyType: $route.query.applyType, applyTypeName: '', approvalStatus: '', approvalStatusName: '', constructionStandardUnitName: '', - createTime: '', - createUser: '', - fileList: [ - { - createTime: '', - createUser: 0, - fileName: '', - id: 0, - isDel: 0, - minioFileName: '', - remark: '', - standardApplyId: 0, - updateTime: '', - }, - ], - id: '', + createTime: null, + createUser: null, + fileList: [], + id: null, isDel: 0, processId: '', remark: '', @@ -124,8 +103,8 @@ standardName: '', standardNo: '', standardOwner: '', - updateTime: '', - version: '', + updateTime: null, + version: null, }) const checkTypeOptions = ref([]) @@ -220,6 +199,7 @@ align: string required: Boolean choose: Boolean + time: Boolean } // 申请文档列表 const filesList = ref([]) @@ -227,59 +207,67 @@ const columns = ref([ { text: '设备名称', - value: 'name', + value: 'assetTypeName', align: 'center', required: true, choose: true, + time: false, }, { text: '设备编号', - value: 'bianhao', + value: 'assetNo', align: 'center', required: true, choose: false, + time: false, }, { text: '型号', - value: 'xinghao', + value: 'modelNo', align: 'center', required: true, choose: false, + time: false, }, { text: '测量范围', - value: 'fanwei', + value: 'assetTypeName', align: 'center', required: true, choose: false, + time: false, }, { text: '使用部门', - value: 'bumen', + value: 'purpose', align: 'center', required: true, choose: false, + time: false, }, { text: '检定时间', - value: 'time', + value: 'manufacturingDate', align: 'center', required: true, choose: false, + time: false, }, { text: '检定结果', - value: 'jieguo', + value: 'managerStateName', align: 'center', required: true, choose: false, + time: false, }, { text: '有效日期', - value: 'riqi', + value: 'mesureCycleName', align: 'center', required: true, choose: false, + time: false, }, ]) // 标准配套设备更换查询条件 @@ -297,6 +285,7 @@ align: 'center', required: true, choose: false, + time: false, }, { text: '上传时间', @@ -304,12 +293,14 @@ align: 'center', required: true, choose: false, + time: true, }, { text: '文件说明', value: 'remark', align: 'center', required: true, + time: false, choose: false, }, { @@ -317,6 +308,7 @@ value: 'minioFileName', align: 'center', required: true, + time: false, choose: true, }, ]) @@ -404,15 +396,17 @@ } // 选择标准配套设备 const userListDialog = ref() - +// 第几条数据选择 +const listIndex = ref(0) // 点击标准配套设备选择按钮 -const chooseList = (row: object) => { - console.log(row) +const chooseList = (row: object, index: number) => { + listIndex.value = index userListDialog.value.initDialog() } // 选择完成之后的回调 -const confirmPerson = (e: any) => { - console.log(e) +const confirmPerson = (row: any) => { + fromListInfo.value.applyEquipmentList[listIndex.value] = row[0] + console.log(fromListInfo.value) } // 增加申请文档列表 const addRow = () => { @@ -480,7 +474,9 @@ const getAddList = (item: string) => { if (item === '提交' || item === '保存') { getStandardLisAdd(fromListInfo.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } else { @@ -503,14 +499,7 @@ } // 点击增加行 const addRoow = () => { - // const params = { - // equipmentName: '', - // equipmentNo: '', - // equipmentType: '', - // depreciationMethod: '', - - // } - list.value.push({}) + fromListInfo.value.applyEquipmentList.push({}) } // 点击关闭 const handleClose = () => { @@ -612,7 +601,7 @@ - + 批量选择 增加行 @@ -1024,7 +1013,7 @@
选择 @@ -1065,11 +1054,11 @@ 申请文档
- + 增加行 @@ -1096,7 +1085,16 @@ *{{ item.text }} -
+
审批流程
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index eb7ced3..1263b6c 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -93,7 +93,7 @@ ).then(() => { current.value = '基本信息' currentCompRef.value.submitForm().validate().then(() => { - pageType.value === '' + pageType.value === 'add' ? getStandardListAdd(formInline.value).then((res) => { if (res.code === 200) { close() diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 242b40e..5234d0b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -198,7 +198,6 @@ } // 点击编辑/详情 const handleEdit = (row: rowReturn, value: string) => { - console.log(row) if (value === '查看') { $router.push({ name: 'standardListAdd', @@ -328,10 +327,8 @@ const uploadAll = () => { upload() } +// 新建 const add = () => { - // buttonArray.value = ['提交', '保存'] - // buttonType.value = '' - // show.value = false $router.push({ name: 'standardListAdd', params: { @@ -340,6 +337,7 @@ query: { title: '新建', name: props.name, + applyType: props.applyType, }, }) } diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index 96aabeb..002a43b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -4,11 +4,12 @@ import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' import { conditionalExpression } from '@babel/types' import type { IOptions } from '../standard_interface' -import UserListDialog from './userListDialog.vue' +import UserListDialog from '../../../stateManage/components/addRow.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' -import { getStandardLisAdd, getStandardLisdetali, getStandardList, getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { getStandardLisAdd, getStandardList, getStandardListDetail, getUsersDept } from '@/api/device/standard' import { UploadFile } from '@/api/measure/file' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const buttonArray = ref([]) // 顶部按钮数组 @@ -21,6 +22,7 @@ } // 字典 // 从路由中获取页面类型参数 const $route = useRoute() +const { username } = useUserStore() if ($route.params && $route.params.type) { pageType.value = $route.params.type as string if (pageType.value === 'add') { @@ -83,40 +85,17 @@ const fromListInfo = ref({ applyDept: '', - applyEquipmentList: [ - { - createTime: '', - createUser: 0, - equipmentId: 0, - id: 0, - isDel: 0, - remark: '', - standardApplyId: 0, - updateTime: '', - }, - ], + applyEquipmentList: [], applyNo: '', - applyType: '', + applyType: $route.query.applyType, applyTypeName: '', approvalStatus: '', approvalStatusName: '', constructionStandardUnitName: '', - createTime: '', - createUser: '', - fileList: [ - { - createTime: '', - createUser: 0, - fileName: '', - id: 0, - isDel: 0, - minioFileName: '', - remark: '', - standardApplyId: 0, - updateTime: '', - }, - ], - id: '', + createTime: null, + createUser: null, + fileList: [], + id: null, isDel: 0, processId: '', remark: '', @@ -124,8 +103,8 @@ standardName: '', standardNo: '', standardOwner: '', - updateTime: '', - version: '', + updateTime: null, + version: null, }) const checkTypeOptions = ref([]) @@ -220,6 +199,7 @@ align: string required: Boolean choose: Boolean + time: Boolean } // 申请文档列表 const filesList = ref([]) @@ -227,59 +207,67 @@ const columns = ref([ { text: '设备名称', - value: 'name', + value: 'assetTypeName', align: 'center', required: true, choose: true, + time: false, }, { text: '设备编号', - value: 'bianhao', + value: 'assetNo', align: 'center', required: true, choose: false, + time: false, }, { text: '型号', - value: 'xinghao', + value: 'modelNo', align: 'center', required: true, choose: false, + time: false, }, { text: '测量范围', - value: 'fanwei', + value: 'assetTypeName', align: 'center', required: true, choose: false, + time: false, }, { text: '使用部门', - value: 'bumen', + value: 'purpose', align: 'center', required: true, choose: false, + time: false, }, { text: '检定时间', - value: 'time', + value: 'manufacturingDate', align: 'center', required: true, choose: false, + time: false, }, { text: '检定结果', - value: 'jieguo', + value: 'managerStateName', align: 'center', required: true, choose: false, + time: false, }, { text: '有效日期', - value: 'riqi', + value: 'mesureCycleName', align: 'center', required: true, choose: false, + time: false, }, ]) // 标准配套设备更换查询条件 @@ -297,6 +285,7 @@ align: 'center', required: true, choose: false, + time: false, }, { text: '上传时间', @@ -304,12 +293,14 @@ align: 'center', required: true, choose: false, + time: true, }, { text: '文件说明', value: 'remark', align: 'center', required: true, + time: false, choose: false, }, { @@ -317,6 +308,7 @@ value: 'minioFileName', align: 'center', required: true, + time: false, choose: true, }, ]) @@ -404,15 +396,17 @@ } // 选择标准配套设备 const userListDialog = ref() - +// 第几条数据选择 +const listIndex = ref(0) // 点击标准配套设备选择按钮 -const chooseList = (row: object) => { - console.log(row) +const chooseList = (row: object, index: number) => { + listIndex.value = index userListDialog.value.initDialog() } // 选择完成之后的回调 -const confirmPerson = (e: any) => { - console.log(e) +const confirmPerson = (row: any) => { + fromListInfo.value.applyEquipmentList[listIndex.value] = row[0] + console.log(fromListInfo.value) } // 增加申请文档列表 const addRow = () => { @@ -480,7 +474,9 @@ const getAddList = (item: string) => { if (item === '提交' || item === '保存') { getStandardLisAdd(fromListInfo.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } else { @@ -503,14 +499,7 @@ } // 点击增加行 const addRoow = () => { - // const params = { - // equipmentName: '', - // equipmentNo: '', - // equipmentType: '', - // depreciationMethod: '', - - // } - list.value.push({}) + fromListInfo.value.applyEquipmentList.push({}) } // 点击关闭 const handleClose = () => { @@ -612,7 +601,7 @@ - + 批量选择 增加行 @@ -1024,7 +1013,7 @@
选择 @@ -1065,11 +1054,11 @@ 申请文档
- + 增加行 @@ -1096,7 +1085,16 @@ *{{ item.text }} -
+
审批流程
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index eb7ced3..1263b6c 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -93,7 +93,7 @@ ).then(() => { current.value = '基本信息' currentCompRef.value.submitForm().validate().then(() => { - pageType.value === '' + pageType.value === 'add' ? getStandardListAdd(formInline.value).then((res) => { if (res.code === 200) { close() diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index e858700..17367cb 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -46,7 +46,7 @@ }, { text: '传递范围', - value: 'transmitRange', + value: 'transmitRangeName', align: 'center', }, {