diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue new file mode 100644 index 0000000..bf71edd --- /dev/null +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -0,0 +1,799 @@ + + + + + + + + + + + 提交 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm1.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加行 + + + 删除行 + + + + + + + + + {{ + item.value === 'useDept' + ? useDeptListNoTree.filter(dept => dept.id === scope.row[item.value])[0]?.name + : item.value === 'usePerson' + ? usePersonList.filter(person => person.id === scope.row[item.value])[0]?.name + : scope.row[item.value] + }} + + + + + 选择 + + + + + + + + + + + + + + + + + + + + Update Github template + Tom committed 2018/4/12 20:46 + + + + + Update Github template + Tom committed 2018/4/3 20:46 + + + + + Update Github template + Tom committed 2018/4/2 20:46 + + + + + + + + + diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue new file mode 100644 index 0000000..bf71edd --- /dev/null +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -0,0 +1,799 @@ + + + + + + + + + + + 提交 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm1.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加行 + + + 删除行 + + + + + + + + + {{ + item.value === 'useDept' + ? useDeptListNoTree.filter(dept => dept.id === scope.row[item.value])[0]?.name + : item.value === 'usePerson' + ? usePersonList.filter(person => person.id === scope.row[item.value])[0]?.name + : scope.row[item.value] + }} + + + + + 选择 + + + + + + + + + + + + + + + + + + + + Update Github template + Tom committed 2018/4/12 20:46 + + + + + Update Github template + Tom committed 2018/4/3 20:46 + + + + + Update Github template + Tom committed 2018/4/2 20:46 + + + + + + + + + diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index 7cc9075..131b636 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -2,7 +2,7 @@ diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue new file mode 100644 index 0000000..bf71edd --- /dev/null +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -0,0 +1,799 @@ + + + + + + + + + + + 提交 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm1.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加行 + + + 删除行 + + + + + + + + + {{ + item.value === 'useDept' + ? useDeptListNoTree.filter(dept => dept.id === scope.row[item.value])[0]?.name + : item.value === 'usePerson' + ? usePersonList.filter(person => person.id === scope.row[item.value])[0]?.name + : scope.row[item.value] + }} + + + + + 选择 + + + + + + + + + + + + + + + + + + + + Update Github template + Tom committed 2018/4/12 20:46 + + + + + Update Github template + Tom committed 2018/4/3 20:46 + + + + + Update Github template + Tom committed 2018/4/2 20:46 + + + + + + + + + diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index 7cc9075..131b636 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/stateManage/components/templatePage.vue b/src/views/device/stateManage/components/templatePage.vue index fce7685..eaccced 100644 --- a/src/views/device/stateManage/components/templatePage.vue +++ b/src/views/device/stateManage/components/templatePage.vue @@ -7,6 +7,7 @@ import passed from './status/passed.vue'// 已通过 import pending from './status/pending.vue' // 待审批 import unPassed from './status/unPassed.vue' // 未通过 +import { getDictByCode } from '@/api/system/dict' const props = defineProps({ name: { type: String, @@ -16,10 +17,16 @@ type: String, required: true, }, + applyType: { // 设备申请类型 + type: String, + default: '', + }, }) interface menuType { name: string - comp: any + comp?: any + id?: string + value?: string } const menu = shallowRef([ { name: '全部', comp: all }, @@ -30,10 +37,31 @@ { name: '未通过', comp: unPassed }, { name: '已取消', comp: cancel }, ]) +const statusList = ref([]) +const type = ref('') // 当前状态的value const current = ref('全部') const currentComp = shallowRef(all) -watch(current, (newValue) => { +watch(current, async (newValue) => { currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp + if (statusList.value.length > 0) { + type.value = statusList.value.filter(item => item.name === newValue)[0].value || '' + } + else { + getDictByCode('approvalStatus').then((res) => { + statusList.value = (res.data as menuType[]) + type.value = res.data.filter((item: menuType) => item.name === newValue)[0].value + }) + } +}, { + immediate: true, + deep: true, +}) +onUnmounted(() => { + sessionStorage.setItem(`${props.authority}Menu`, current.value) +}) +onMounted(() => { + current.value = sessionStorage.getItem(`${props.authority}Menu`) || '全部' + sessionStorage.getItem(`${props.authority}Menu`) ? sessionStorage.removeItem(`${props.authority}Menu`) : '' }) @@ -48,7 +76,7 @@ - + diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue new file mode 100644 index 0000000..bf71edd --- /dev/null +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -0,0 +1,799 @@ + + + + + + + + + + + 提交 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm1.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加行 + + + 删除行 + + + + + + + + + {{ + item.value === 'useDept' + ? useDeptListNoTree.filter(dept => dept.id === scope.row[item.value])[0]?.name + : item.value === 'usePerson' + ? usePersonList.filter(person => person.id === scope.row[item.value])[0]?.name + : scope.row[item.value] + }} + + + + + 选择 + + + + + + + + + + + + + + + + + + + + Update Github template + Tom committed 2018/4/12 20:46 + + + + + Update Github template + Tom committed 2018/4/3 20:46 + + + + + Update Github template + Tom committed 2018/4/2 20:46 + + + + + + + + + diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index 7cc9075..131b636 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/stateManage/components/templatePage.vue b/src/views/device/stateManage/components/templatePage.vue index fce7685..eaccced 100644 --- a/src/views/device/stateManage/components/templatePage.vue +++ b/src/views/device/stateManage/components/templatePage.vue @@ -7,6 +7,7 @@ import passed from './status/passed.vue'// 已通过 import pending from './status/pending.vue' // 待审批 import unPassed from './status/unPassed.vue' // 未通过 +import { getDictByCode } from '@/api/system/dict' const props = defineProps({ name: { type: String, @@ -16,10 +17,16 @@ type: String, required: true, }, + applyType: { // 设备申请类型 + type: String, + default: '', + }, }) interface menuType { name: string - comp: any + comp?: any + id?: string + value?: string } const menu = shallowRef([ { name: '全部', comp: all }, @@ -30,10 +37,31 @@ { name: '未通过', comp: unPassed }, { name: '已取消', comp: cancel }, ]) +const statusList = ref([]) +const type = ref('') // 当前状态的value const current = ref('全部') const currentComp = shallowRef(all) -watch(current, (newValue) => { +watch(current, async (newValue) => { currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp + if (statusList.value.length > 0) { + type.value = statusList.value.filter(item => item.name === newValue)[0].value || '' + } + else { + getDictByCode('approvalStatus').then((res) => { + statusList.value = (res.data as menuType[]) + type.value = res.data.filter((item: menuType) => item.name === newValue)[0].value + }) + } +}, { + immediate: true, + deep: true, +}) +onUnmounted(() => { + sessionStorage.setItem(`${props.authority}Menu`, current.value) +}) +onMounted(() => { + current.value = sessionStorage.getItem(`${props.authority}Menu`) || '全部' + sessionStorage.getItem(`${props.authority}Menu`) ? sessionStorage.removeItem(`${props.authority}Menu`) : '' }) @@ -48,7 +76,7 @@ - + diff --git a/src/views/device/stateManage/handleApply.vue b/src/views/device/stateManage/handleApply.vue index 703674f..b2c2357 100644 --- a/src/views/device/stateManage/handleApply.vue +++ b/src/views/device/stateManage/handleApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue new file mode 100644 index 0000000..bf71edd --- /dev/null +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -0,0 +1,799 @@ + + + + + + + + + + + 提交 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm1.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加行 + + + 删除行 + + + + + + + + + {{ + item.value === 'useDept' + ? useDeptListNoTree.filter(dept => dept.id === scope.row[item.value])[0]?.name + : item.value === 'usePerson' + ? usePersonList.filter(person => person.id === scope.row[item.value])[0]?.name + : scope.row[item.value] + }} + + + + + 选择 + + + + + + + + + + + + + + + + + + + + Update Github template + Tom committed 2018/4/12 20:46 + + + + + Update Github template + Tom committed 2018/4/3 20:46 + + + + + Update Github template + Tom committed 2018/4/2 20:46 + + + + + + + + + diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index 7cc9075..131b636 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/stateManage/components/templatePage.vue b/src/views/device/stateManage/components/templatePage.vue index fce7685..eaccced 100644 --- a/src/views/device/stateManage/components/templatePage.vue +++ b/src/views/device/stateManage/components/templatePage.vue @@ -7,6 +7,7 @@ import passed from './status/passed.vue'// 已通过 import pending from './status/pending.vue' // 待审批 import unPassed from './status/unPassed.vue' // 未通过 +import { getDictByCode } from '@/api/system/dict' const props = defineProps({ name: { type: String, @@ -16,10 +17,16 @@ type: String, required: true, }, + applyType: { // 设备申请类型 + type: String, + default: '', + }, }) interface menuType { name: string - comp: any + comp?: any + id?: string + value?: string } const menu = shallowRef([ { name: '全部', comp: all }, @@ -30,10 +37,31 @@ { name: '未通过', comp: unPassed }, { name: '已取消', comp: cancel }, ]) +const statusList = ref([]) +const type = ref('') // 当前状态的value const current = ref('全部') const currentComp = shallowRef(all) -watch(current, (newValue) => { +watch(current, async (newValue) => { currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp + if (statusList.value.length > 0) { + type.value = statusList.value.filter(item => item.name === newValue)[0].value || '' + } + else { + getDictByCode('approvalStatus').then((res) => { + statusList.value = (res.data as menuType[]) + type.value = res.data.filter((item: menuType) => item.name === newValue)[0].value + }) + } +}, { + immediate: true, + deep: true, +}) +onUnmounted(() => { + sessionStorage.setItem(`${props.authority}Menu`, current.value) +}) +onMounted(() => { + current.value = sessionStorage.getItem(`${props.authority}Menu`) || '全部' + sessionStorage.getItem(`${props.authority}Menu`) ? sessionStorage.removeItem(`${props.authority}Menu`) : '' }) @@ -48,7 +76,7 @@ - + diff --git a/src/views/device/stateManage/handleApply.vue b/src/views/device/stateManage/handleApply.vue index 703674f..b2c2357 100644 --- a/src/views/device/stateManage/handleApply.vue +++ b/src/views/device/stateManage/handleApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/openApply.vue b/src/views/device/stateManage/openApply.vue index 35c2af6..744f0f3 100644 --- a/src/views/device/stateManage/openApply.vue +++ b/src/views/device/stateManage/openApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue new file mode 100644 index 0000000..bf71edd --- /dev/null +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -0,0 +1,799 @@ + + + + + + + + + + + 提交 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm1.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加行 + + + 删除行 + + + + + + + + + {{ + item.value === 'useDept' + ? useDeptListNoTree.filter(dept => dept.id === scope.row[item.value])[0]?.name + : item.value === 'usePerson' + ? usePersonList.filter(person => person.id === scope.row[item.value])[0]?.name + : scope.row[item.value] + }} + + + + + 选择 + + + + + + + + + + + + + + + + + + + + Update Github template + Tom committed 2018/4/12 20:46 + + + + + Update Github template + Tom committed 2018/4/3 20:46 + + + + + Update Github template + Tom committed 2018/4/2 20:46 + + + + + + + + + diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index 7cc9075..131b636 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/stateManage/components/templatePage.vue b/src/views/device/stateManage/components/templatePage.vue index fce7685..eaccced 100644 --- a/src/views/device/stateManage/components/templatePage.vue +++ b/src/views/device/stateManage/components/templatePage.vue @@ -7,6 +7,7 @@ import passed from './status/passed.vue'// 已通过 import pending from './status/pending.vue' // 待审批 import unPassed from './status/unPassed.vue' // 未通过 +import { getDictByCode } from '@/api/system/dict' const props = defineProps({ name: { type: String, @@ -16,10 +17,16 @@ type: String, required: true, }, + applyType: { // 设备申请类型 + type: String, + default: '', + }, }) interface menuType { name: string - comp: any + comp?: any + id?: string + value?: string } const menu = shallowRef([ { name: '全部', comp: all }, @@ -30,10 +37,31 @@ { name: '未通过', comp: unPassed }, { name: '已取消', comp: cancel }, ]) +const statusList = ref([]) +const type = ref('') // 当前状态的value const current = ref('全部') const currentComp = shallowRef(all) -watch(current, (newValue) => { +watch(current, async (newValue) => { currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp + if (statusList.value.length > 0) { + type.value = statusList.value.filter(item => item.name === newValue)[0].value || '' + } + else { + getDictByCode('approvalStatus').then((res) => { + statusList.value = (res.data as menuType[]) + type.value = res.data.filter((item: menuType) => item.name === newValue)[0].value + }) + } +}, { + immediate: true, + deep: true, +}) +onUnmounted(() => { + sessionStorage.setItem(`${props.authority}Menu`, current.value) +}) +onMounted(() => { + current.value = sessionStorage.getItem(`${props.authority}Menu`) || '全部' + sessionStorage.getItem(`${props.authority}Menu`) ? sessionStorage.removeItem(`${props.authority}Menu`) : '' }) @@ -48,7 +76,7 @@ - + diff --git a/src/views/device/stateManage/handleApply.vue b/src/views/device/stateManage/handleApply.vue index 703674f..b2c2357 100644 --- a/src/views/device/stateManage/handleApply.vue +++ b/src/views/device/stateManage/handleApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/openApply.vue b/src/views/device/stateManage/openApply.vue index 35c2af6..744f0f3 100644 --- a/src/views/device/stateManage/openApply.vue +++ b/src/views/device/stateManage/openApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/scrapApply.vue b/src/views/device/stateManage/scrapApply.vue index 282ecd8..94c6475 100644 --- a/src/views/device/stateManage/scrapApply.vue +++ b/src/views/device/stateManage/scrapApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue new file mode 100644 index 0000000..bf71edd --- /dev/null +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -0,0 +1,799 @@ + + + + + + + + + + + 提交 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm1.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加行 + + + 删除行 + + + + + + + + + {{ + item.value === 'useDept' + ? useDeptListNoTree.filter(dept => dept.id === scope.row[item.value])[0]?.name + : item.value === 'usePerson' + ? usePersonList.filter(person => person.id === scope.row[item.value])[0]?.name + : scope.row[item.value] + }} + + + + + 选择 + + + + + + + + + + + + + + + + + + + + Update Github template + Tom committed 2018/4/12 20:46 + + + + + Update Github template + Tom committed 2018/4/3 20:46 + + + + + Update Github template + Tom committed 2018/4/2 20:46 + + + + + + + + + diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index 7cc9075..131b636 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/stateManage/components/templatePage.vue b/src/views/device/stateManage/components/templatePage.vue index fce7685..eaccced 100644 --- a/src/views/device/stateManage/components/templatePage.vue +++ b/src/views/device/stateManage/components/templatePage.vue @@ -7,6 +7,7 @@ import passed from './status/passed.vue'// 已通过 import pending from './status/pending.vue' // 待审批 import unPassed from './status/unPassed.vue' // 未通过 +import { getDictByCode } from '@/api/system/dict' const props = defineProps({ name: { type: String, @@ -16,10 +17,16 @@ type: String, required: true, }, + applyType: { // 设备申请类型 + type: String, + default: '', + }, }) interface menuType { name: string - comp: any + comp?: any + id?: string + value?: string } const menu = shallowRef([ { name: '全部', comp: all }, @@ -30,10 +37,31 @@ { name: '未通过', comp: unPassed }, { name: '已取消', comp: cancel }, ]) +const statusList = ref([]) +const type = ref('') // 当前状态的value const current = ref('全部') const currentComp = shallowRef(all) -watch(current, (newValue) => { +watch(current, async (newValue) => { currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp + if (statusList.value.length > 0) { + type.value = statusList.value.filter(item => item.name === newValue)[0].value || '' + } + else { + getDictByCode('approvalStatus').then((res) => { + statusList.value = (res.data as menuType[]) + type.value = res.data.filter((item: menuType) => item.name === newValue)[0].value + }) + } +}, { + immediate: true, + deep: true, +}) +onUnmounted(() => { + sessionStorage.setItem(`${props.authority}Menu`, current.value) +}) +onMounted(() => { + current.value = sessionStorage.getItem(`${props.authority}Menu`) || '全部' + sessionStorage.getItem(`${props.authority}Menu`) ? sessionStorage.removeItem(`${props.authority}Menu`) : '' }) @@ -48,7 +76,7 @@ - + diff --git a/src/views/device/stateManage/handleApply.vue b/src/views/device/stateManage/handleApply.vue index 703674f..b2c2357 100644 --- a/src/views/device/stateManage/handleApply.vue +++ b/src/views/device/stateManage/handleApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/openApply.vue b/src/views/device/stateManage/openApply.vue index 35c2af6..744f0f3 100644 --- a/src/views/device/stateManage/openApply.vue +++ b/src/views/device/stateManage/openApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/scrapApply.vue b/src/views/device/stateManage/scrapApply.vue index 282ecd8..94c6475 100644 --- a/src/views/device/stateManage/scrapApply.vue +++ b/src/views/device/stateManage/scrapApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/sealupApply.vue b/src/views/device/stateManage/sealupApply.vue index 1c8544d..a9e6733 100644 --- a/src/views/device/stateManage/sealupApply.vue +++ b/src/views/device/stateManage/sealupApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue new file mode 100644 index 0000000..bf71edd --- /dev/null +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -0,0 +1,799 @@ + + + + + + + + + + + 提交 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm1.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加行 + + + 删除行 + + + + + + + + + {{ + item.value === 'useDept' + ? useDeptListNoTree.filter(dept => dept.id === scope.row[item.value])[0]?.name + : item.value === 'usePerson' + ? usePersonList.filter(person => person.id === scope.row[item.value])[0]?.name + : scope.row[item.value] + }} + + + + + 选择 + + + + + + + + + + + + + + + + + + + + Update Github template + Tom committed 2018/4/12 20:46 + + + + + Update Github template + Tom committed 2018/4/3 20:46 + + + + + Update Github template + Tom committed 2018/4/2 20:46 + + + + + + + + + diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index 7cc9075..131b636 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/stateManage/components/templatePage.vue b/src/views/device/stateManage/components/templatePage.vue index fce7685..eaccced 100644 --- a/src/views/device/stateManage/components/templatePage.vue +++ b/src/views/device/stateManage/components/templatePage.vue @@ -7,6 +7,7 @@ import passed from './status/passed.vue'// 已通过 import pending from './status/pending.vue' // 待审批 import unPassed from './status/unPassed.vue' // 未通过 +import { getDictByCode } from '@/api/system/dict' const props = defineProps({ name: { type: String, @@ -16,10 +17,16 @@ type: String, required: true, }, + applyType: { // 设备申请类型 + type: String, + default: '', + }, }) interface menuType { name: string - comp: any + comp?: any + id?: string + value?: string } const menu = shallowRef([ { name: '全部', comp: all }, @@ -30,10 +37,31 @@ { name: '未通过', comp: unPassed }, { name: '已取消', comp: cancel }, ]) +const statusList = ref([]) +const type = ref('') // 当前状态的value const current = ref('全部') const currentComp = shallowRef(all) -watch(current, (newValue) => { +watch(current, async (newValue) => { currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp + if (statusList.value.length > 0) { + type.value = statusList.value.filter(item => item.name === newValue)[0].value || '' + } + else { + getDictByCode('approvalStatus').then((res) => { + statusList.value = (res.data as menuType[]) + type.value = res.data.filter((item: menuType) => item.name === newValue)[0].value + }) + } +}, { + immediate: true, + deep: true, +}) +onUnmounted(() => { + sessionStorage.setItem(`${props.authority}Menu`, current.value) +}) +onMounted(() => { + current.value = sessionStorage.getItem(`${props.authority}Menu`) || '全部' + sessionStorage.getItem(`${props.authority}Menu`) ? sessionStorage.removeItem(`${props.authority}Menu`) : '' }) @@ -48,7 +76,7 @@ - + diff --git a/src/views/device/stateManage/handleApply.vue b/src/views/device/stateManage/handleApply.vue index 703674f..b2c2357 100644 --- a/src/views/device/stateManage/handleApply.vue +++ b/src/views/device/stateManage/handleApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/openApply.vue b/src/views/device/stateManage/openApply.vue index 35c2af6..744f0f3 100644 --- a/src/views/device/stateManage/openApply.vue +++ b/src/views/device/stateManage/openApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/scrapApply.vue b/src/views/device/stateManage/scrapApply.vue index 282ecd8..94c6475 100644 --- a/src/views/device/stateManage/scrapApply.vue +++ b/src/views/device/stateManage/scrapApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/sealupApply.vue b/src/views/device/stateManage/sealupApply.vue index 1c8544d..a9e6733 100644 --- a/src/views/device/stateManage/sealupApply.vue +++ b/src/views/device/stateManage/sealupApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/unusedApply.vue b/src/views/device/stateManage/unusedApply.vue index 4b02b09..8f15c63 100644 --- a/src/views/device/stateManage/unusedApply.vue +++ b/src/views/device/stateManage/unusedApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue new file mode 100644 index 0000000..bf71edd --- /dev/null +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -0,0 +1,799 @@ + + + + + + + + + + + 提交 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm1.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加行 + + + 删除行 + + + + + + + + + {{ + item.value === 'useDept' + ? useDeptListNoTree.filter(dept => dept.id === scope.row[item.value])[0]?.name + : item.value === 'usePerson' + ? usePersonList.filter(person => person.id === scope.row[item.value])[0]?.name + : scope.row[item.value] + }} + + + + + 选择 + + + + + + + + + + + + + + + + + + + + Update Github template + Tom committed 2018/4/12 20:46 + + + + + Update Github template + Tom committed 2018/4/3 20:46 + + + + + Update Github template + Tom committed 2018/4/2 20:46 + + + + + + + + + diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index 7cc9075..131b636 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/stateManage/components/templatePage.vue b/src/views/device/stateManage/components/templatePage.vue index fce7685..eaccced 100644 --- a/src/views/device/stateManage/components/templatePage.vue +++ b/src/views/device/stateManage/components/templatePage.vue @@ -7,6 +7,7 @@ import passed from './status/passed.vue'// 已通过 import pending from './status/pending.vue' // 待审批 import unPassed from './status/unPassed.vue' // 未通过 +import { getDictByCode } from '@/api/system/dict' const props = defineProps({ name: { type: String, @@ -16,10 +17,16 @@ type: String, required: true, }, + applyType: { // 设备申请类型 + type: String, + default: '', + }, }) interface menuType { name: string - comp: any + comp?: any + id?: string + value?: string } const menu = shallowRef([ { name: '全部', comp: all }, @@ -30,10 +37,31 @@ { name: '未通过', comp: unPassed }, { name: '已取消', comp: cancel }, ]) +const statusList = ref([]) +const type = ref('') // 当前状态的value const current = ref('全部') const currentComp = shallowRef(all) -watch(current, (newValue) => { +watch(current, async (newValue) => { currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp + if (statusList.value.length > 0) { + type.value = statusList.value.filter(item => item.name === newValue)[0].value || '' + } + else { + getDictByCode('approvalStatus').then((res) => { + statusList.value = (res.data as menuType[]) + type.value = res.data.filter((item: menuType) => item.name === newValue)[0].value + }) + } +}, { + immediate: true, + deep: true, +}) +onUnmounted(() => { + sessionStorage.setItem(`${props.authority}Menu`, current.value) +}) +onMounted(() => { + current.value = sessionStorage.getItem(`${props.authority}Menu`) || '全部' + sessionStorage.getItem(`${props.authority}Menu`) ? sessionStorage.removeItem(`${props.authority}Menu`) : '' }) @@ -48,7 +76,7 @@ - + diff --git a/src/views/device/stateManage/handleApply.vue b/src/views/device/stateManage/handleApply.vue index 703674f..b2c2357 100644 --- a/src/views/device/stateManage/handleApply.vue +++ b/src/views/device/stateManage/handleApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/openApply.vue b/src/views/device/stateManage/openApply.vue index 35c2af6..744f0f3 100644 --- a/src/views/device/stateManage/openApply.vue +++ b/src/views/device/stateManage/openApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/scrapApply.vue b/src/views/device/stateManage/scrapApply.vue index 282ecd8..94c6475 100644 --- a/src/views/device/stateManage/scrapApply.vue +++ b/src/views/device/stateManage/scrapApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/sealupApply.vue b/src/views/device/stateManage/sealupApply.vue index 1c8544d..a9e6733 100644 --- a/src/views/device/stateManage/sealupApply.vue +++ b/src/views/device/stateManage/sealupApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/unusedApply.vue b/src/views/device/stateManage/unusedApply.vue index 4b02b09..8f15c63 100644 --- a/src/views/device/stateManage/unusedApply.vue +++ b/src/views/device/stateManage/unusedApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue index c758059..e2ff064 100644 --- a/src/views/measure/file/components/addDialog.vue +++ b/src/views/measure/file/components/addDialog.vue @@ -77,7 +77,7 @@ if (row.title === '新建') { // 默认发布人和发布单位 ruleForm.createUserId = userInfo.$state.id - ruleForm.publisher = userInfo.$state.deptName + ruleForm.publisher = userInfo.$state.deptId ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } else if (row.title === '详情') { @@ -126,9 +126,6 @@ type: 'warning', }, ).then((res) => { - if (ruleForm.publisher === userInfo.$state.deptName) { - ruleForm.publisher = userInfo.$state.deptId - } if (flag == '提交') { confirmDrafts(ruleForm).then((res) => { if (res.code == 200) { @@ -257,15 +254,7 @@ - - - - + diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue new file mode 100644 index 0000000..bf71edd --- /dev/null +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -0,0 +1,799 @@ + + + + + + + + + + + 提交 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm1.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加行 + + + 删除行 + + + + + + + + + {{ + item.value === 'useDept' + ? useDeptListNoTree.filter(dept => dept.id === scope.row[item.value])[0]?.name + : item.value === 'usePerson' + ? usePersonList.filter(person => person.id === scope.row[item.value])[0]?.name + : scope.row[item.value] + }} + + + + + 选择 + + + + + + + + + + + + + + + + + + + + Update Github template + Tom committed 2018/4/12 20:46 + + + + + Update Github template + Tom committed 2018/4/3 20:46 + + + + + Update Github template + Tom committed 2018/4/2 20:46 + + + + + + + + + diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index 7cc9075..131b636 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/stateManage/components/templatePage.vue b/src/views/device/stateManage/components/templatePage.vue index fce7685..eaccced 100644 --- a/src/views/device/stateManage/components/templatePage.vue +++ b/src/views/device/stateManage/components/templatePage.vue @@ -7,6 +7,7 @@ import passed from './status/passed.vue'// 已通过 import pending from './status/pending.vue' // 待审批 import unPassed from './status/unPassed.vue' // 未通过 +import { getDictByCode } from '@/api/system/dict' const props = defineProps({ name: { type: String, @@ -16,10 +17,16 @@ type: String, required: true, }, + applyType: { // 设备申请类型 + type: String, + default: '', + }, }) interface menuType { name: string - comp: any + comp?: any + id?: string + value?: string } const menu = shallowRef([ { name: '全部', comp: all }, @@ -30,10 +37,31 @@ { name: '未通过', comp: unPassed }, { name: '已取消', comp: cancel }, ]) +const statusList = ref([]) +const type = ref('') // 当前状态的value const current = ref('全部') const currentComp = shallowRef(all) -watch(current, (newValue) => { +watch(current, async (newValue) => { currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp + if (statusList.value.length > 0) { + type.value = statusList.value.filter(item => item.name === newValue)[0].value || '' + } + else { + getDictByCode('approvalStatus').then((res) => { + statusList.value = (res.data as menuType[]) + type.value = res.data.filter((item: menuType) => item.name === newValue)[0].value + }) + } +}, { + immediate: true, + deep: true, +}) +onUnmounted(() => { + sessionStorage.setItem(`${props.authority}Menu`, current.value) +}) +onMounted(() => { + current.value = sessionStorage.getItem(`${props.authority}Menu`) || '全部' + sessionStorage.getItem(`${props.authority}Menu`) ? sessionStorage.removeItem(`${props.authority}Menu`) : '' }) @@ -48,7 +76,7 @@ - + diff --git a/src/views/device/stateManage/handleApply.vue b/src/views/device/stateManage/handleApply.vue index 703674f..b2c2357 100644 --- a/src/views/device/stateManage/handleApply.vue +++ b/src/views/device/stateManage/handleApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/openApply.vue b/src/views/device/stateManage/openApply.vue index 35c2af6..744f0f3 100644 --- a/src/views/device/stateManage/openApply.vue +++ b/src/views/device/stateManage/openApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/scrapApply.vue b/src/views/device/stateManage/scrapApply.vue index 282ecd8..94c6475 100644 --- a/src/views/device/stateManage/scrapApply.vue +++ b/src/views/device/stateManage/scrapApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/sealupApply.vue b/src/views/device/stateManage/sealupApply.vue index 1c8544d..a9e6733 100644 --- a/src/views/device/stateManage/sealupApply.vue +++ b/src/views/device/stateManage/sealupApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/unusedApply.vue b/src/views/device/stateManage/unusedApply.vue index 4b02b09..8f15c63 100644 --- a/src/views/device/stateManage/unusedApply.vue +++ b/src/views/device/stateManage/unusedApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue index c758059..e2ff064 100644 --- a/src/views/measure/file/components/addDialog.vue +++ b/src/views/measure/file/components/addDialog.vue @@ -77,7 +77,7 @@ if (row.title === '新建') { // 默认发布人和发布单位 ruleForm.createUserId = userInfo.$state.id - ruleForm.publisher = userInfo.$state.deptName + ruleForm.publisher = userInfo.$state.deptId ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } else if (row.title === '详情') { @@ -126,9 +126,6 @@ type: 'warning', }, ).then((res) => { - if (ruleForm.publisher === userInfo.$state.deptName) { - ruleForm.publisher = userInfo.$state.deptId - } if (flag == '提交') { confirmDrafts(ruleForm).then((res) => { if (res.code == 200) { @@ -257,15 +254,7 @@ - - - - + diff --git a/src/views/measure/file/quality.vue b/src/views/measure/file/quality.vue index f8f7528..a1c6722 100644 --- a/src/views/measure/file/quality.vue +++ b/src/views/measure/file/quality.vue @@ -22,6 +22,10 @@ watch(current, (newValue) => { console.log(newValue, 'newValue') currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp +}, +{ + immediate: true, + deep: true, }) onUnmounted(() => { sessionStorage.setItem('fileMenu', current.value) diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue new file mode 100644 index 0000000..bf71edd --- /dev/null +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -0,0 +1,799 @@ + + + + + + + + + + + 提交 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm1.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加行 + + + 删除行 + + + + + + + + + {{ + item.value === 'useDept' + ? useDeptListNoTree.filter(dept => dept.id === scope.row[item.value])[0]?.name + : item.value === 'usePerson' + ? usePersonList.filter(person => person.id === scope.row[item.value])[0]?.name + : scope.row[item.value] + }} + + + + + 选择 + + + + + + + + + + + + + + + + + + + + Update Github template + Tom committed 2018/4/12 20:46 + + + + + Update Github template + Tom committed 2018/4/3 20:46 + + + + + Update Github template + Tom committed 2018/4/2 20:46 + + + + + + + + + diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index 7cc9075..131b636 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/stateManage/components/templatePage.vue b/src/views/device/stateManage/components/templatePage.vue index fce7685..eaccced 100644 --- a/src/views/device/stateManage/components/templatePage.vue +++ b/src/views/device/stateManage/components/templatePage.vue @@ -7,6 +7,7 @@ import passed from './status/passed.vue'// 已通过 import pending from './status/pending.vue' // 待审批 import unPassed from './status/unPassed.vue' // 未通过 +import { getDictByCode } from '@/api/system/dict' const props = defineProps({ name: { type: String, @@ -16,10 +17,16 @@ type: String, required: true, }, + applyType: { // 设备申请类型 + type: String, + default: '', + }, }) interface menuType { name: string - comp: any + comp?: any + id?: string + value?: string } const menu = shallowRef([ { name: '全部', comp: all }, @@ -30,10 +37,31 @@ { name: '未通过', comp: unPassed }, { name: '已取消', comp: cancel }, ]) +const statusList = ref([]) +const type = ref('') // 当前状态的value const current = ref('全部') const currentComp = shallowRef(all) -watch(current, (newValue) => { +watch(current, async (newValue) => { currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp + if (statusList.value.length > 0) { + type.value = statusList.value.filter(item => item.name === newValue)[0].value || '' + } + else { + getDictByCode('approvalStatus').then((res) => { + statusList.value = (res.data as menuType[]) + type.value = res.data.filter((item: menuType) => item.name === newValue)[0].value + }) + } +}, { + immediate: true, + deep: true, +}) +onUnmounted(() => { + sessionStorage.setItem(`${props.authority}Menu`, current.value) +}) +onMounted(() => { + current.value = sessionStorage.getItem(`${props.authority}Menu`) || '全部' + sessionStorage.getItem(`${props.authority}Menu`) ? sessionStorage.removeItem(`${props.authority}Menu`) : '' }) @@ -48,7 +76,7 @@ - + diff --git a/src/views/device/stateManage/handleApply.vue b/src/views/device/stateManage/handleApply.vue index 703674f..b2c2357 100644 --- a/src/views/device/stateManage/handleApply.vue +++ b/src/views/device/stateManage/handleApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/openApply.vue b/src/views/device/stateManage/openApply.vue index 35c2af6..744f0f3 100644 --- a/src/views/device/stateManage/openApply.vue +++ b/src/views/device/stateManage/openApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/scrapApply.vue b/src/views/device/stateManage/scrapApply.vue index 282ecd8..94c6475 100644 --- a/src/views/device/stateManage/scrapApply.vue +++ b/src/views/device/stateManage/scrapApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/sealupApply.vue b/src/views/device/stateManage/sealupApply.vue index 1c8544d..a9e6733 100644 --- a/src/views/device/stateManage/sealupApply.vue +++ b/src/views/device/stateManage/sealupApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/unusedApply.vue b/src/views/device/stateManage/unusedApply.vue index 4b02b09..8f15c63 100644 --- a/src/views/device/stateManage/unusedApply.vue +++ b/src/views/device/stateManage/unusedApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue index c758059..e2ff064 100644 --- a/src/views/measure/file/components/addDialog.vue +++ b/src/views/measure/file/components/addDialog.vue @@ -77,7 +77,7 @@ if (row.title === '新建') { // 默认发布人和发布单位 ruleForm.createUserId = userInfo.$state.id - ruleForm.publisher = userInfo.$state.deptName + ruleForm.publisher = userInfo.$state.deptId ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } else if (row.title === '详情') { @@ -126,9 +126,6 @@ type: 'warning', }, ).then((res) => { - if (ruleForm.publisher === userInfo.$state.deptName) { - ruleForm.publisher = userInfo.$state.deptId - } if (flag == '提交') { confirmDrafts(ruleForm).then((res) => { if (res.code == 200) { @@ -257,15 +254,7 @@ - - - - + diff --git a/src/views/measure/file/quality.vue b/src/views/measure/file/quality.vue index f8f7528..a1c6722 100644 --- a/src/views/measure/file/quality.vue +++ b/src/views/measure/file/quality.vue @@ -22,6 +22,10 @@ watch(current, (newValue) => { console.log(newValue, 'newValue') currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp +}, +{ + immediate: true, + deep: true, }) onUnmounted(() => { sessionStorage.setItem('fileMenu', current.value) diff --git a/src/views/measure/person/certificateLog.vue b/src/views/measure/person/certificateLog.vue index 16a8c9d..fa7b761 100644 --- a/src/views/measure/person/certificateLog.vue +++ b/src/views/measure/person/certificateLog.vue @@ -207,7 +207,6 @@ const search = () => { getList() } -const selectTreeRef = ref() // 重置 const reset = () => { searchQuery.staffNo = '' @@ -215,7 +214,6 @@ searchQuery.deptId = '' searchQuery.certificateStatus = '' searchQuery.verifierCertificateNo = '' - selectTreeRef.value.clearSelected() getList() } // 模板下载 @@ -313,10 +311,11 @@ :value="item.id" /> --> - + /> --> + diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue new file mode 100644 index 0000000..bf71edd --- /dev/null +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -0,0 +1,799 @@ + + + + + + + + + + + 提交 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm1.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加行 + + + 删除行 + + + + + + + + + {{ + item.value === 'useDept' + ? useDeptListNoTree.filter(dept => dept.id === scope.row[item.value])[0]?.name + : item.value === 'usePerson' + ? usePersonList.filter(person => person.id === scope.row[item.value])[0]?.name + : scope.row[item.value] + }} + + + + + 选择 + + + + + + + + + + + + + + + + + + + + Update Github template + Tom committed 2018/4/12 20:46 + + + + + Update Github template + Tom committed 2018/4/3 20:46 + + + + + Update Github template + Tom committed 2018/4/2 20:46 + + + + + + + + + diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index 7cc9075..131b636 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/stateManage/components/templatePage.vue b/src/views/device/stateManage/components/templatePage.vue index fce7685..eaccced 100644 --- a/src/views/device/stateManage/components/templatePage.vue +++ b/src/views/device/stateManage/components/templatePage.vue @@ -7,6 +7,7 @@ import passed from './status/passed.vue'// 已通过 import pending from './status/pending.vue' // 待审批 import unPassed from './status/unPassed.vue' // 未通过 +import { getDictByCode } from '@/api/system/dict' const props = defineProps({ name: { type: String, @@ -16,10 +17,16 @@ type: String, required: true, }, + applyType: { // 设备申请类型 + type: String, + default: '', + }, }) interface menuType { name: string - comp: any + comp?: any + id?: string + value?: string } const menu = shallowRef([ { name: '全部', comp: all }, @@ -30,10 +37,31 @@ { name: '未通过', comp: unPassed }, { name: '已取消', comp: cancel }, ]) +const statusList = ref([]) +const type = ref('') // 当前状态的value const current = ref('全部') const currentComp = shallowRef(all) -watch(current, (newValue) => { +watch(current, async (newValue) => { currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp + if (statusList.value.length > 0) { + type.value = statusList.value.filter(item => item.name === newValue)[0].value || '' + } + else { + getDictByCode('approvalStatus').then((res) => { + statusList.value = (res.data as menuType[]) + type.value = res.data.filter((item: menuType) => item.name === newValue)[0].value + }) + } +}, { + immediate: true, + deep: true, +}) +onUnmounted(() => { + sessionStorage.setItem(`${props.authority}Menu`, current.value) +}) +onMounted(() => { + current.value = sessionStorage.getItem(`${props.authority}Menu`) || '全部' + sessionStorage.getItem(`${props.authority}Menu`) ? sessionStorage.removeItem(`${props.authority}Menu`) : '' }) @@ -48,7 +76,7 @@ - + diff --git a/src/views/device/stateManage/handleApply.vue b/src/views/device/stateManage/handleApply.vue index 703674f..b2c2357 100644 --- a/src/views/device/stateManage/handleApply.vue +++ b/src/views/device/stateManage/handleApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/openApply.vue b/src/views/device/stateManage/openApply.vue index 35c2af6..744f0f3 100644 --- a/src/views/device/stateManage/openApply.vue +++ b/src/views/device/stateManage/openApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/scrapApply.vue b/src/views/device/stateManage/scrapApply.vue index 282ecd8..94c6475 100644 --- a/src/views/device/stateManage/scrapApply.vue +++ b/src/views/device/stateManage/scrapApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/sealupApply.vue b/src/views/device/stateManage/sealupApply.vue index 1c8544d..a9e6733 100644 --- a/src/views/device/stateManage/sealupApply.vue +++ b/src/views/device/stateManage/sealupApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/unusedApply.vue b/src/views/device/stateManage/unusedApply.vue index 4b02b09..8f15c63 100644 --- a/src/views/device/stateManage/unusedApply.vue +++ b/src/views/device/stateManage/unusedApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue index c758059..e2ff064 100644 --- a/src/views/measure/file/components/addDialog.vue +++ b/src/views/measure/file/components/addDialog.vue @@ -77,7 +77,7 @@ if (row.title === '新建') { // 默认发布人和发布单位 ruleForm.createUserId = userInfo.$state.id - ruleForm.publisher = userInfo.$state.deptName + ruleForm.publisher = userInfo.$state.deptId ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } else if (row.title === '详情') { @@ -126,9 +126,6 @@ type: 'warning', }, ).then((res) => { - if (ruleForm.publisher === userInfo.$state.deptName) { - ruleForm.publisher = userInfo.$state.deptId - } if (flag == '提交') { confirmDrafts(ruleForm).then((res) => { if (res.code == 200) { @@ -257,15 +254,7 @@ - - - - + diff --git a/src/views/measure/file/quality.vue b/src/views/measure/file/quality.vue index f8f7528..a1c6722 100644 --- a/src/views/measure/file/quality.vue +++ b/src/views/measure/file/quality.vue @@ -22,6 +22,10 @@ watch(current, (newValue) => { console.log(newValue, 'newValue') currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp +}, +{ + immediate: true, + deep: true, }) onUnmounted(() => { sessionStorage.setItem('fileMenu', current.value) diff --git a/src/views/measure/person/certificateLog.vue b/src/views/measure/person/certificateLog.vue index 16a8c9d..fa7b761 100644 --- a/src/views/measure/person/certificateLog.vue +++ b/src/views/measure/person/certificateLog.vue @@ -207,7 +207,6 @@ const search = () => { getList() } -const selectTreeRef = ref() // 重置 const reset = () => { searchQuery.staffNo = '' @@ -215,7 +214,6 @@ searchQuery.deptId = '' searchQuery.certificateStatus = '' searchQuery.verifierCertificateNo = '' - selectTreeRef.value.clearSelected() getList() } // 模板下载 @@ -313,10 +311,11 @@ :value="item.id" /> --> - + /> --> + diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue index 7850502..0de6eb3 100644 --- a/src/views/measure/person/components/addPerson.vue +++ b/src/views/measure/person/components/addPerson.vue @@ -3,8 +3,9 @@ import type { FormInstance, FormRules, UploadProps, UploadUserFile } from 'element-plus' import { ElMessage, ElMessageBox, ElTable } from 'element-plus' import { Plus } from '@element-plus/icons-vue' +import lodash from 'lodash' +import { ITEM_RENDER_EVT } from 'element-plus/es/components/virtual-list/src/defaults' import type { technologyJobType } from '../person-interface' -import certificateAddDialog from './certificateAddDialog.vue' import userListDialog from './userListDialog.vue' import { getUserList } from '@/api/system/user' import { getDeptTreeList } from '@/api/system/dept' @@ -12,7 +13,6 @@ import { toTreeList } from '@/utils/structure' import type { TreeStructure, userType } from '@/views/system/user/user-interface' import { getDictByCode } from '@/api/system/dict' -import comTreeSelect from '@/views/system/user/selecTree.vue' import { getStaffAdd, getStaffDetail, getStaffupdate } from '@/api/measure/person' import { getPhotoUrl } from '@/api/system/tool' // import showPhoto from '@/views/system/tool/showPhoto.vue' @@ -228,6 +228,7 @@ { name: '证书基本信息', data: [] as any[], + deepData: [] as any[], column: [ { text: '发证单位', @@ -269,6 +270,7 @@ { name: '计量工作培训记录', data: [] as any[], + deepData: [] as any[], column: [ { text: '培训时间', @@ -317,6 +319,7 @@ { name: '业务记录', data: [] as any[], + deepData: [] as any[], column: [ { text: '样品编号', @@ -415,11 +418,17 @@ }) } } +// const deleteArrID = ref([]) // 删除行 const removeRow = () => { currentShow.value.data = currentShow.value.data.filter((item) => { return !SelectionList.value.includes(item) }) + // 需要删除的行的id + // deleteArrID.value = currentShow.value.data.filter((item) => { + // return SelectionList.value.includes(item) + // }).map(row => (row.id as string)) + // console.log() } // 提交 const submitForm = async (formEl: FormInstance | undefined) => { @@ -435,27 +444,45 @@ type: 'warning', }, ).then(() => { - changeList.value[0].data = changeList.value[0].data.filter(item => item.certificateName !== '') - if (changeList.value[0].data.length) { - for (const key in ruleForm.value) { - if (ruleForm.value[key] === '') { - ruleForm.value[key] = null - } + // 处理编辑后的证书信息数据 + console.log(changeList.value[0].data) + console.log(changeList.value[0].deepData) + const certificateList = [] + // 1.先拿新增的 + changeList.value[0].data.forEach((item) => { + if (!item.id) { + certificateList.push(item) } - (title.value === '新建' - ? getStaffAdd - : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => { - if (res.code == 200) { - formEl?.resetFields() - ElMessage.success('提交成功') - resetFormData() - $router.go(-1) - } - }) - } - else { - ElMessage.warning('请先填写证书信息') - } + }) + // 2.再拿删除的 + const deleteArr = changeList.value[0].data.filter((item) => { + return changeList.value[0].deepData.includes(item) + }) + console.log(deleteArr) + const aaa = changeList.value[0].deepData.filter((item) => { + return deleteArr.includes(item.id) + }) + // changeList.value[0].data = changeList.value[0].data.filter(item => item.certificateName !== '') + // if (changeList.value[0].data.length) { + // for (const key in ruleForm.value) { + // if (ruleForm.value[key] === '') { + // ruleForm.value[key] = null + // } + // } + // (title.value === '新建' + // ? getStaffAdd({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }) + // : getStaffupdate({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` })).then((res) => { + // if (res.code == 200) { + // formEl?.resetFields() + // ElMessage.success('提交成功') + // resetFormData() + // $router.go(-1) + // } + // }) + // } + // else { + // ElMessage.warning('请先填写证书信息') + // } }) } }) @@ -467,14 +494,12 @@ $router.go(-1) resetFormData() } -const selectTreeRef = ref() // 弹窗初始化 const initDialog = (row: any) => { changeList.value[0].data = [] dialogVisible.value = true title.value = row.title resetFormData() - selectTreeRef.value?.clearSelected() getuser() getPubList() getSexList() @@ -489,6 +514,7 @@ if (res.code === 200) { ruleForm.value = res.data changeList.value[0].data = res.data.certificateList + changeList.value[0].deepData = lodash.cloneDeep(res.data.certificateList) } }) } @@ -557,14 +583,15 @@ /> - + + diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue new file mode 100644 index 0000000..bf71edd --- /dev/null +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -0,0 +1,799 @@ + + + + + + + + + + + 提交 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm1.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加行 + + + 删除行 + + + + + + + + + {{ + item.value === 'useDept' + ? useDeptListNoTree.filter(dept => dept.id === scope.row[item.value])[0]?.name + : item.value === 'usePerson' + ? usePersonList.filter(person => person.id === scope.row[item.value])[0]?.name + : scope.row[item.value] + }} + + + + + 选择 + + + + + + + + + + + + + + + + + + + + Update Github template + Tom committed 2018/4/12 20:46 + + + + + Update Github template + Tom committed 2018/4/3 20:46 + + + + + Update Github template + Tom committed 2018/4/2 20:46 + + + + + + + + + diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index 7cc9075..131b636 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/stateManage/components/templatePage.vue b/src/views/device/stateManage/components/templatePage.vue index fce7685..eaccced 100644 --- a/src/views/device/stateManage/components/templatePage.vue +++ b/src/views/device/stateManage/components/templatePage.vue @@ -7,6 +7,7 @@ import passed from './status/passed.vue'// 已通过 import pending from './status/pending.vue' // 待审批 import unPassed from './status/unPassed.vue' // 未通过 +import { getDictByCode } from '@/api/system/dict' const props = defineProps({ name: { type: String, @@ -16,10 +17,16 @@ type: String, required: true, }, + applyType: { // 设备申请类型 + type: String, + default: '', + }, }) interface menuType { name: string - comp: any + comp?: any + id?: string + value?: string } const menu = shallowRef([ { name: '全部', comp: all }, @@ -30,10 +37,31 @@ { name: '未通过', comp: unPassed }, { name: '已取消', comp: cancel }, ]) +const statusList = ref([]) +const type = ref('') // 当前状态的value const current = ref('全部') const currentComp = shallowRef(all) -watch(current, (newValue) => { +watch(current, async (newValue) => { currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp + if (statusList.value.length > 0) { + type.value = statusList.value.filter(item => item.name === newValue)[0].value || '' + } + else { + getDictByCode('approvalStatus').then((res) => { + statusList.value = (res.data as menuType[]) + type.value = res.data.filter((item: menuType) => item.name === newValue)[0].value + }) + } +}, { + immediate: true, + deep: true, +}) +onUnmounted(() => { + sessionStorage.setItem(`${props.authority}Menu`, current.value) +}) +onMounted(() => { + current.value = sessionStorage.getItem(`${props.authority}Menu`) || '全部' + sessionStorage.getItem(`${props.authority}Menu`) ? sessionStorage.removeItem(`${props.authority}Menu`) : '' }) @@ -48,7 +76,7 @@ - + diff --git a/src/views/device/stateManage/handleApply.vue b/src/views/device/stateManage/handleApply.vue index 703674f..b2c2357 100644 --- a/src/views/device/stateManage/handleApply.vue +++ b/src/views/device/stateManage/handleApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/openApply.vue b/src/views/device/stateManage/openApply.vue index 35c2af6..744f0f3 100644 --- a/src/views/device/stateManage/openApply.vue +++ b/src/views/device/stateManage/openApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/scrapApply.vue b/src/views/device/stateManage/scrapApply.vue index 282ecd8..94c6475 100644 --- a/src/views/device/stateManage/scrapApply.vue +++ b/src/views/device/stateManage/scrapApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/sealupApply.vue b/src/views/device/stateManage/sealupApply.vue index 1c8544d..a9e6733 100644 --- a/src/views/device/stateManage/sealupApply.vue +++ b/src/views/device/stateManage/sealupApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/unusedApply.vue b/src/views/device/stateManage/unusedApply.vue index 4b02b09..8f15c63 100644 --- a/src/views/device/stateManage/unusedApply.vue +++ b/src/views/device/stateManage/unusedApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue index c758059..e2ff064 100644 --- a/src/views/measure/file/components/addDialog.vue +++ b/src/views/measure/file/components/addDialog.vue @@ -77,7 +77,7 @@ if (row.title === '新建') { // 默认发布人和发布单位 ruleForm.createUserId = userInfo.$state.id - ruleForm.publisher = userInfo.$state.deptName + ruleForm.publisher = userInfo.$state.deptId ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } else if (row.title === '详情') { @@ -126,9 +126,6 @@ type: 'warning', }, ).then((res) => { - if (ruleForm.publisher === userInfo.$state.deptName) { - ruleForm.publisher = userInfo.$state.deptId - } if (flag == '提交') { confirmDrafts(ruleForm).then((res) => { if (res.code == 200) { @@ -257,15 +254,7 @@ - - - - + diff --git a/src/views/measure/file/quality.vue b/src/views/measure/file/quality.vue index f8f7528..a1c6722 100644 --- a/src/views/measure/file/quality.vue +++ b/src/views/measure/file/quality.vue @@ -22,6 +22,10 @@ watch(current, (newValue) => { console.log(newValue, 'newValue') currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp +}, +{ + immediate: true, + deep: true, }) onUnmounted(() => { sessionStorage.setItem('fileMenu', current.value) diff --git a/src/views/measure/person/certificateLog.vue b/src/views/measure/person/certificateLog.vue index 16a8c9d..fa7b761 100644 --- a/src/views/measure/person/certificateLog.vue +++ b/src/views/measure/person/certificateLog.vue @@ -207,7 +207,6 @@ const search = () => { getList() } -const selectTreeRef = ref() // 重置 const reset = () => { searchQuery.staffNo = '' @@ -215,7 +214,6 @@ searchQuery.deptId = '' searchQuery.certificateStatus = '' searchQuery.verifierCertificateNo = '' - selectTreeRef.value.clearSelected() getList() } // 模板下载 @@ -313,10 +311,11 @@ :value="item.id" /> --> - + /> --> + diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue index 7850502..0de6eb3 100644 --- a/src/views/measure/person/components/addPerson.vue +++ b/src/views/measure/person/components/addPerson.vue @@ -3,8 +3,9 @@ import type { FormInstance, FormRules, UploadProps, UploadUserFile } from 'element-plus' import { ElMessage, ElMessageBox, ElTable } from 'element-plus' import { Plus } from '@element-plus/icons-vue' +import lodash from 'lodash' +import { ITEM_RENDER_EVT } from 'element-plus/es/components/virtual-list/src/defaults' import type { technologyJobType } from '../person-interface' -import certificateAddDialog from './certificateAddDialog.vue' import userListDialog from './userListDialog.vue' import { getUserList } from '@/api/system/user' import { getDeptTreeList } from '@/api/system/dept' @@ -12,7 +13,6 @@ import { toTreeList } from '@/utils/structure' import type { TreeStructure, userType } from '@/views/system/user/user-interface' import { getDictByCode } from '@/api/system/dict' -import comTreeSelect from '@/views/system/user/selecTree.vue' import { getStaffAdd, getStaffDetail, getStaffupdate } from '@/api/measure/person' import { getPhotoUrl } from '@/api/system/tool' // import showPhoto from '@/views/system/tool/showPhoto.vue' @@ -228,6 +228,7 @@ { name: '证书基本信息', data: [] as any[], + deepData: [] as any[], column: [ { text: '发证单位', @@ -269,6 +270,7 @@ { name: '计量工作培训记录', data: [] as any[], + deepData: [] as any[], column: [ { text: '培训时间', @@ -317,6 +319,7 @@ { name: '业务记录', data: [] as any[], + deepData: [] as any[], column: [ { text: '样品编号', @@ -415,11 +418,17 @@ }) } } +// const deleteArrID = ref([]) // 删除行 const removeRow = () => { currentShow.value.data = currentShow.value.data.filter((item) => { return !SelectionList.value.includes(item) }) + // 需要删除的行的id + // deleteArrID.value = currentShow.value.data.filter((item) => { + // return SelectionList.value.includes(item) + // }).map(row => (row.id as string)) + // console.log() } // 提交 const submitForm = async (formEl: FormInstance | undefined) => { @@ -435,27 +444,45 @@ type: 'warning', }, ).then(() => { - changeList.value[0].data = changeList.value[0].data.filter(item => item.certificateName !== '') - if (changeList.value[0].data.length) { - for (const key in ruleForm.value) { - if (ruleForm.value[key] === '') { - ruleForm.value[key] = null - } + // 处理编辑后的证书信息数据 + console.log(changeList.value[0].data) + console.log(changeList.value[0].deepData) + const certificateList = [] + // 1.先拿新增的 + changeList.value[0].data.forEach((item) => { + if (!item.id) { + certificateList.push(item) } - (title.value === '新建' - ? getStaffAdd - : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => { - if (res.code == 200) { - formEl?.resetFields() - ElMessage.success('提交成功') - resetFormData() - $router.go(-1) - } - }) - } - else { - ElMessage.warning('请先填写证书信息') - } + }) + // 2.再拿删除的 + const deleteArr = changeList.value[0].data.filter((item) => { + return changeList.value[0].deepData.includes(item) + }) + console.log(deleteArr) + const aaa = changeList.value[0].deepData.filter((item) => { + return deleteArr.includes(item.id) + }) + // changeList.value[0].data = changeList.value[0].data.filter(item => item.certificateName !== '') + // if (changeList.value[0].data.length) { + // for (const key in ruleForm.value) { + // if (ruleForm.value[key] === '') { + // ruleForm.value[key] = null + // } + // } + // (title.value === '新建' + // ? getStaffAdd({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }) + // : getStaffupdate({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` })).then((res) => { + // if (res.code == 200) { + // formEl?.resetFields() + // ElMessage.success('提交成功') + // resetFormData() + // $router.go(-1) + // } + // }) + // } + // else { + // ElMessage.warning('请先填写证书信息') + // } }) } }) @@ -467,14 +494,12 @@ $router.go(-1) resetFormData() } -const selectTreeRef = ref() // 弹窗初始化 const initDialog = (row: any) => { changeList.value[0].data = [] dialogVisible.value = true title.value = row.title resetFormData() - selectTreeRef.value?.clearSelected() getuser() getPubList() getSexList() @@ -489,6 +514,7 @@ if (res.code === 200) { ruleForm.value = res.data changeList.value[0].data = res.data.certificateList + changeList.value[0].deepData = lodash.cloneDeep(res.data.certificateList) } }) } @@ -557,14 +583,15 @@ /> - + + diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue index e2403ed..cbdea0b 100644 --- a/src/views/measure/person/components/addRecord.vue +++ b/src/views/measure/person/components/addRecord.vue @@ -199,14 +199,12 @@ $router.go(-1) resetFormData() } -const selectTreeRef = ref() // 弹窗初始化 const initDialog = (row: any) => { resetFormData() dialogVisible.value = true title.value = row.title name.value = row.name - selectTreeRef.value?.clearSelected() getuser() getPubList() getSexList() @@ -299,7 +297,8 @@ - + + diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue new file mode 100644 index 0000000..bf71edd --- /dev/null +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -0,0 +1,799 @@ + + + + + + + + + + + 提交 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm1.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加行 + + + 删除行 + + + + + + + + + {{ + item.value === 'useDept' + ? useDeptListNoTree.filter(dept => dept.id === scope.row[item.value])[0]?.name + : item.value === 'usePerson' + ? usePersonList.filter(person => person.id === scope.row[item.value])[0]?.name + : scope.row[item.value] + }} + + + + + 选择 + + + + + + + + + + + + + + + + + + + + Update Github template + Tom committed 2018/4/12 20:46 + + + + + Update Github template + Tom committed 2018/4/3 20:46 + + + + + Update Github template + Tom committed 2018/4/2 20:46 + + + + + + + + + diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index 7cc9075..131b636 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/stateManage/components/templatePage.vue b/src/views/device/stateManage/components/templatePage.vue index fce7685..eaccced 100644 --- a/src/views/device/stateManage/components/templatePage.vue +++ b/src/views/device/stateManage/components/templatePage.vue @@ -7,6 +7,7 @@ import passed from './status/passed.vue'// 已通过 import pending from './status/pending.vue' // 待审批 import unPassed from './status/unPassed.vue' // 未通过 +import { getDictByCode } from '@/api/system/dict' const props = defineProps({ name: { type: String, @@ -16,10 +17,16 @@ type: String, required: true, }, + applyType: { // 设备申请类型 + type: String, + default: '', + }, }) interface menuType { name: string - comp: any + comp?: any + id?: string + value?: string } const menu = shallowRef([ { name: '全部', comp: all }, @@ -30,10 +37,31 @@ { name: '未通过', comp: unPassed }, { name: '已取消', comp: cancel }, ]) +const statusList = ref([]) +const type = ref('') // 当前状态的value const current = ref('全部') const currentComp = shallowRef(all) -watch(current, (newValue) => { +watch(current, async (newValue) => { currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp + if (statusList.value.length > 0) { + type.value = statusList.value.filter(item => item.name === newValue)[0].value || '' + } + else { + getDictByCode('approvalStatus').then((res) => { + statusList.value = (res.data as menuType[]) + type.value = res.data.filter((item: menuType) => item.name === newValue)[0].value + }) + } +}, { + immediate: true, + deep: true, +}) +onUnmounted(() => { + sessionStorage.setItem(`${props.authority}Menu`, current.value) +}) +onMounted(() => { + current.value = sessionStorage.getItem(`${props.authority}Menu`) || '全部' + sessionStorage.getItem(`${props.authority}Menu`) ? sessionStorage.removeItem(`${props.authority}Menu`) : '' }) @@ -48,7 +76,7 @@ - + diff --git a/src/views/device/stateManage/handleApply.vue b/src/views/device/stateManage/handleApply.vue index 703674f..b2c2357 100644 --- a/src/views/device/stateManage/handleApply.vue +++ b/src/views/device/stateManage/handleApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/openApply.vue b/src/views/device/stateManage/openApply.vue index 35c2af6..744f0f3 100644 --- a/src/views/device/stateManage/openApply.vue +++ b/src/views/device/stateManage/openApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/scrapApply.vue b/src/views/device/stateManage/scrapApply.vue index 282ecd8..94c6475 100644 --- a/src/views/device/stateManage/scrapApply.vue +++ b/src/views/device/stateManage/scrapApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/sealupApply.vue b/src/views/device/stateManage/sealupApply.vue index 1c8544d..a9e6733 100644 --- a/src/views/device/stateManage/sealupApply.vue +++ b/src/views/device/stateManage/sealupApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/unusedApply.vue b/src/views/device/stateManage/unusedApply.vue index 4b02b09..8f15c63 100644 --- a/src/views/device/stateManage/unusedApply.vue +++ b/src/views/device/stateManage/unusedApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue index c758059..e2ff064 100644 --- a/src/views/measure/file/components/addDialog.vue +++ b/src/views/measure/file/components/addDialog.vue @@ -77,7 +77,7 @@ if (row.title === '新建') { // 默认发布人和发布单位 ruleForm.createUserId = userInfo.$state.id - ruleForm.publisher = userInfo.$state.deptName + ruleForm.publisher = userInfo.$state.deptId ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } else if (row.title === '详情') { @@ -126,9 +126,6 @@ type: 'warning', }, ).then((res) => { - if (ruleForm.publisher === userInfo.$state.deptName) { - ruleForm.publisher = userInfo.$state.deptId - } if (flag == '提交') { confirmDrafts(ruleForm).then((res) => { if (res.code == 200) { @@ -257,15 +254,7 @@ - - - - + diff --git a/src/views/measure/file/quality.vue b/src/views/measure/file/quality.vue index f8f7528..a1c6722 100644 --- a/src/views/measure/file/quality.vue +++ b/src/views/measure/file/quality.vue @@ -22,6 +22,10 @@ watch(current, (newValue) => { console.log(newValue, 'newValue') currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp +}, +{ + immediate: true, + deep: true, }) onUnmounted(() => { sessionStorage.setItem('fileMenu', current.value) diff --git a/src/views/measure/person/certificateLog.vue b/src/views/measure/person/certificateLog.vue index 16a8c9d..fa7b761 100644 --- a/src/views/measure/person/certificateLog.vue +++ b/src/views/measure/person/certificateLog.vue @@ -207,7 +207,6 @@ const search = () => { getList() } -const selectTreeRef = ref() // 重置 const reset = () => { searchQuery.staffNo = '' @@ -215,7 +214,6 @@ searchQuery.deptId = '' searchQuery.certificateStatus = '' searchQuery.verifierCertificateNo = '' - selectTreeRef.value.clearSelected() getList() } // 模板下载 @@ -313,10 +311,11 @@ :value="item.id" /> --> - + /> --> + diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue index 7850502..0de6eb3 100644 --- a/src/views/measure/person/components/addPerson.vue +++ b/src/views/measure/person/components/addPerson.vue @@ -3,8 +3,9 @@ import type { FormInstance, FormRules, UploadProps, UploadUserFile } from 'element-plus' import { ElMessage, ElMessageBox, ElTable } from 'element-plus' import { Plus } from '@element-plus/icons-vue' +import lodash from 'lodash' +import { ITEM_RENDER_EVT } from 'element-plus/es/components/virtual-list/src/defaults' import type { technologyJobType } from '../person-interface' -import certificateAddDialog from './certificateAddDialog.vue' import userListDialog from './userListDialog.vue' import { getUserList } from '@/api/system/user' import { getDeptTreeList } from '@/api/system/dept' @@ -12,7 +13,6 @@ import { toTreeList } from '@/utils/structure' import type { TreeStructure, userType } from '@/views/system/user/user-interface' import { getDictByCode } from '@/api/system/dict' -import comTreeSelect from '@/views/system/user/selecTree.vue' import { getStaffAdd, getStaffDetail, getStaffupdate } from '@/api/measure/person' import { getPhotoUrl } from '@/api/system/tool' // import showPhoto from '@/views/system/tool/showPhoto.vue' @@ -228,6 +228,7 @@ { name: '证书基本信息', data: [] as any[], + deepData: [] as any[], column: [ { text: '发证单位', @@ -269,6 +270,7 @@ { name: '计量工作培训记录', data: [] as any[], + deepData: [] as any[], column: [ { text: '培训时间', @@ -317,6 +319,7 @@ { name: '业务记录', data: [] as any[], + deepData: [] as any[], column: [ { text: '样品编号', @@ -415,11 +418,17 @@ }) } } +// const deleteArrID = ref([]) // 删除行 const removeRow = () => { currentShow.value.data = currentShow.value.data.filter((item) => { return !SelectionList.value.includes(item) }) + // 需要删除的行的id + // deleteArrID.value = currentShow.value.data.filter((item) => { + // return SelectionList.value.includes(item) + // }).map(row => (row.id as string)) + // console.log() } // 提交 const submitForm = async (formEl: FormInstance | undefined) => { @@ -435,27 +444,45 @@ type: 'warning', }, ).then(() => { - changeList.value[0].data = changeList.value[0].data.filter(item => item.certificateName !== '') - if (changeList.value[0].data.length) { - for (const key in ruleForm.value) { - if (ruleForm.value[key] === '') { - ruleForm.value[key] = null - } + // 处理编辑后的证书信息数据 + console.log(changeList.value[0].data) + console.log(changeList.value[0].deepData) + const certificateList = [] + // 1.先拿新增的 + changeList.value[0].data.forEach((item) => { + if (!item.id) { + certificateList.push(item) } - (title.value === '新建' - ? getStaffAdd - : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => { - if (res.code == 200) { - formEl?.resetFields() - ElMessage.success('提交成功') - resetFormData() - $router.go(-1) - } - }) - } - else { - ElMessage.warning('请先填写证书信息') - } + }) + // 2.再拿删除的 + const deleteArr = changeList.value[0].data.filter((item) => { + return changeList.value[0].deepData.includes(item) + }) + console.log(deleteArr) + const aaa = changeList.value[0].deepData.filter((item) => { + return deleteArr.includes(item.id) + }) + // changeList.value[0].data = changeList.value[0].data.filter(item => item.certificateName !== '') + // if (changeList.value[0].data.length) { + // for (const key in ruleForm.value) { + // if (ruleForm.value[key] === '') { + // ruleForm.value[key] = null + // } + // } + // (title.value === '新建' + // ? getStaffAdd({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }) + // : getStaffupdate({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` })).then((res) => { + // if (res.code == 200) { + // formEl?.resetFields() + // ElMessage.success('提交成功') + // resetFormData() + // $router.go(-1) + // } + // }) + // } + // else { + // ElMessage.warning('请先填写证书信息') + // } }) } }) @@ -467,14 +494,12 @@ $router.go(-1) resetFormData() } -const selectTreeRef = ref() // 弹窗初始化 const initDialog = (row: any) => { changeList.value[0].data = [] dialogVisible.value = true title.value = row.title resetFormData() - selectTreeRef.value?.clearSelected() getuser() getPubList() getSexList() @@ -489,6 +514,7 @@ if (res.code === 200) { ruleForm.value = res.data changeList.value[0].data = res.data.certificateList + changeList.value[0].deepData = lodash.cloneDeep(res.data.certificateList) } }) } @@ -557,14 +583,15 @@ /> - + + diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue index e2403ed..cbdea0b 100644 --- a/src/views/measure/person/components/addRecord.vue +++ b/src/views/measure/person/components/addRecord.vue @@ -199,14 +199,12 @@ $router.go(-1) resetFormData() } -const selectTreeRef = ref() // 弹窗初始化 const initDialog = (row: any) => { resetFormData() dialogVisible.value = true title.value = row.title name.value = row.name - selectTreeRef.value?.clearSelected() getuser() getPubList() getSexList() @@ -299,7 +297,8 @@ - + + diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue index e119e0d..31ea6c1 100644 --- a/src/views/measure/person/list.vue +++ b/src/views/measure/person/list.vue @@ -141,7 +141,6 @@ const search = () => { getList() } -const selectTreeRef = ref() // 重置 const reset = () => { searchQuery.staffNo = '' @@ -149,7 +148,6 @@ searchQuery.deptId = '' searchQuery.major = '' searchQuery.verifierCertificateNo = '' - selectTreeRef.value.clearSelected() getList() } // 模板下载 @@ -245,10 +243,11 @@ :value="item.id" /> --> - + /> --> + diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue new file mode 100644 index 0000000..bf71edd --- /dev/null +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -0,0 +1,799 @@ + + + + + + + + + + + 提交 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm1.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加行 + + + 删除行 + + + + + + + + + {{ + item.value === 'useDept' + ? useDeptListNoTree.filter(dept => dept.id === scope.row[item.value])[0]?.name + : item.value === 'usePerson' + ? usePersonList.filter(person => person.id === scope.row[item.value])[0]?.name + : scope.row[item.value] + }} + + + + + 选择 + + + + + + + + + + + + + + + + + + + + Update Github template + Tom committed 2018/4/12 20:46 + + + + + Update Github template + Tom committed 2018/4/3 20:46 + + + + + Update Github template + Tom committed 2018/4/2 20:46 + + + + + + + + + diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index 7cc9075..131b636 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/stateManage/components/templatePage.vue b/src/views/device/stateManage/components/templatePage.vue index fce7685..eaccced 100644 --- a/src/views/device/stateManage/components/templatePage.vue +++ b/src/views/device/stateManage/components/templatePage.vue @@ -7,6 +7,7 @@ import passed from './status/passed.vue'// 已通过 import pending from './status/pending.vue' // 待审批 import unPassed from './status/unPassed.vue' // 未通过 +import { getDictByCode } from '@/api/system/dict' const props = defineProps({ name: { type: String, @@ -16,10 +17,16 @@ type: String, required: true, }, + applyType: { // 设备申请类型 + type: String, + default: '', + }, }) interface menuType { name: string - comp: any + comp?: any + id?: string + value?: string } const menu = shallowRef([ { name: '全部', comp: all }, @@ -30,10 +37,31 @@ { name: '未通过', comp: unPassed }, { name: '已取消', comp: cancel }, ]) +const statusList = ref([]) +const type = ref('') // 当前状态的value const current = ref('全部') const currentComp = shallowRef(all) -watch(current, (newValue) => { +watch(current, async (newValue) => { currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp + if (statusList.value.length > 0) { + type.value = statusList.value.filter(item => item.name === newValue)[0].value || '' + } + else { + getDictByCode('approvalStatus').then((res) => { + statusList.value = (res.data as menuType[]) + type.value = res.data.filter((item: menuType) => item.name === newValue)[0].value + }) + } +}, { + immediate: true, + deep: true, +}) +onUnmounted(() => { + sessionStorage.setItem(`${props.authority}Menu`, current.value) +}) +onMounted(() => { + current.value = sessionStorage.getItem(`${props.authority}Menu`) || '全部' + sessionStorage.getItem(`${props.authority}Menu`) ? sessionStorage.removeItem(`${props.authority}Menu`) : '' }) @@ -48,7 +76,7 @@ - + diff --git a/src/views/device/stateManage/handleApply.vue b/src/views/device/stateManage/handleApply.vue index 703674f..b2c2357 100644 --- a/src/views/device/stateManage/handleApply.vue +++ b/src/views/device/stateManage/handleApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/openApply.vue b/src/views/device/stateManage/openApply.vue index 35c2af6..744f0f3 100644 --- a/src/views/device/stateManage/openApply.vue +++ b/src/views/device/stateManage/openApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/scrapApply.vue b/src/views/device/stateManage/scrapApply.vue index 282ecd8..94c6475 100644 --- a/src/views/device/stateManage/scrapApply.vue +++ b/src/views/device/stateManage/scrapApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/sealupApply.vue b/src/views/device/stateManage/sealupApply.vue index 1c8544d..a9e6733 100644 --- a/src/views/device/stateManage/sealupApply.vue +++ b/src/views/device/stateManage/sealupApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/unusedApply.vue b/src/views/device/stateManage/unusedApply.vue index 4b02b09..8f15c63 100644 --- a/src/views/device/stateManage/unusedApply.vue +++ b/src/views/device/stateManage/unusedApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue index c758059..e2ff064 100644 --- a/src/views/measure/file/components/addDialog.vue +++ b/src/views/measure/file/components/addDialog.vue @@ -77,7 +77,7 @@ if (row.title === '新建') { // 默认发布人和发布单位 ruleForm.createUserId = userInfo.$state.id - ruleForm.publisher = userInfo.$state.deptName + ruleForm.publisher = userInfo.$state.deptId ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } else if (row.title === '详情') { @@ -126,9 +126,6 @@ type: 'warning', }, ).then((res) => { - if (ruleForm.publisher === userInfo.$state.deptName) { - ruleForm.publisher = userInfo.$state.deptId - } if (flag == '提交') { confirmDrafts(ruleForm).then((res) => { if (res.code == 200) { @@ -257,15 +254,7 @@ - - - - + diff --git a/src/views/measure/file/quality.vue b/src/views/measure/file/quality.vue index f8f7528..a1c6722 100644 --- a/src/views/measure/file/quality.vue +++ b/src/views/measure/file/quality.vue @@ -22,6 +22,10 @@ watch(current, (newValue) => { console.log(newValue, 'newValue') currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp +}, +{ + immediate: true, + deep: true, }) onUnmounted(() => { sessionStorage.setItem('fileMenu', current.value) diff --git a/src/views/measure/person/certificateLog.vue b/src/views/measure/person/certificateLog.vue index 16a8c9d..fa7b761 100644 --- a/src/views/measure/person/certificateLog.vue +++ b/src/views/measure/person/certificateLog.vue @@ -207,7 +207,6 @@ const search = () => { getList() } -const selectTreeRef = ref() // 重置 const reset = () => { searchQuery.staffNo = '' @@ -215,7 +214,6 @@ searchQuery.deptId = '' searchQuery.certificateStatus = '' searchQuery.verifierCertificateNo = '' - selectTreeRef.value.clearSelected() getList() } // 模板下载 @@ -313,10 +311,11 @@ :value="item.id" /> --> - + /> --> + diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue index 7850502..0de6eb3 100644 --- a/src/views/measure/person/components/addPerson.vue +++ b/src/views/measure/person/components/addPerson.vue @@ -3,8 +3,9 @@ import type { FormInstance, FormRules, UploadProps, UploadUserFile } from 'element-plus' import { ElMessage, ElMessageBox, ElTable } from 'element-plus' import { Plus } from '@element-plus/icons-vue' +import lodash from 'lodash' +import { ITEM_RENDER_EVT } from 'element-plus/es/components/virtual-list/src/defaults' import type { technologyJobType } from '../person-interface' -import certificateAddDialog from './certificateAddDialog.vue' import userListDialog from './userListDialog.vue' import { getUserList } from '@/api/system/user' import { getDeptTreeList } from '@/api/system/dept' @@ -12,7 +13,6 @@ import { toTreeList } from '@/utils/structure' import type { TreeStructure, userType } from '@/views/system/user/user-interface' import { getDictByCode } from '@/api/system/dict' -import comTreeSelect from '@/views/system/user/selecTree.vue' import { getStaffAdd, getStaffDetail, getStaffupdate } from '@/api/measure/person' import { getPhotoUrl } from '@/api/system/tool' // import showPhoto from '@/views/system/tool/showPhoto.vue' @@ -228,6 +228,7 @@ { name: '证书基本信息', data: [] as any[], + deepData: [] as any[], column: [ { text: '发证单位', @@ -269,6 +270,7 @@ { name: '计量工作培训记录', data: [] as any[], + deepData: [] as any[], column: [ { text: '培训时间', @@ -317,6 +319,7 @@ { name: '业务记录', data: [] as any[], + deepData: [] as any[], column: [ { text: '样品编号', @@ -415,11 +418,17 @@ }) } } +// const deleteArrID = ref([]) // 删除行 const removeRow = () => { currentShow.value.data = currentShow.value.data.filter((item) => { return !SelectionList.value.includes(item) }) + // 需要删除的行的id + // deleteArrID.value = currentShow.value.data.filter((item) => { + // return SelectionList.value.includes(item) + // }).map(row => (row.id as string)) + // console.log() } // 提交 const submitForm = async (formEl: FormInstance | undefined) => { @@ -435,27 +444,45 @@ type: 'warning', }, ).then(() => { - changeList.value[0].data = changeList.value[0].data.filter(item => item.certificateName !== '') - if (changeList.value[0].data.length) { - for (const key in ruleForm.value) { - if (ruleForm.value[key] === '') { - ruleForm.value[key] = null - } + // 处理编辑后的证书信息数据 + console.log(changeList.value[0].data) + console.log(changeList.value[0].deepData) + const certificateList = [] + // 1.先拿新增的 + changeList.value[0].data.forEach((item) => { + if (!item.id) { + certificateList.push(item) } - (title.value === '新建' - ? getStaffAdd - : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => { - if (res.code == 200) { - formEl?.resetFields() - ElMessage.success('提交成功') - resetFormData() - $router.go(-1) - } - }) - } - else { - ElMessage.warning('请先填写证书信息') - } + }) + // 2.再拿删除的 + const deleteArr = changeList.value[0].data.filter((item) => { + return changeList.value[0].deepData.includes(item) + }) + console.log(deleteArr) + const aaa = changeList.value[0].deepData.filter((item) => { + return deleteArr.includes(item.id) + }) + // changeList.value[0].data = changeList.value[0].data.filter(item => item.certificateName !== '') + // if (changeList.value[0].data.length) { + // for (const key in ruleForm.value) { + // if (ruleForm.value[key] === '') { + // ruleForm.value[key] = null + // } + // } + // (title.value === '新建' + // ? getStaffAdd({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }) + // : getStaffupdate({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` })).then((res) => { + // if (res.code == 200) { + // formEl?.resetFields() + // ElMessage.success('提交成功') + // resetFormData() + // $router.go(-1) + // } + // }) + // } + // else { + // ElMessage.warning('请先填写证书信息') + // } }) } }) @@ -467,14 +494,12 @@ $router.go(-1) resetFormData() } -const selectTreeRef = ref() // 弹窗初始化 const initDialog = (row: any) => { changeList.value[0].data = [] dialogVisible.value = true title.value = row.title resetFormData() - selectTreeRef.value?.clearSelected() getuser() getPubList() getSexList() @@ -489,6 +514,7 @@ if (res.code === 200) { ruleForm.value = res.data changeList.value[0].data = res.data.certificateList + changeList.value[0].deepData = lodash.cloneDeep(res.data.certificateList) } }) } @@ -557,14 +583,15 @@ /> - + + diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue index e2403ed..cbdea0b 100644 --- a/src/views/measure/person/components/addRecord.vue +++ b/src/views/measure/person/components/addRecord.vue @@ -199,14 +199,12 @@ $router.go(-1) resetFormData() } -const selectTreeRef = ref() // 弹窗初始化 const initDialog = (row: any) => { resetFormData() dialogVisible.value = true title.value = row.title name.value = row.name - selectTreeRef.value?.clearSelected() getuser() getPubList() getSexList() @@ -299,7 +297,8 @@ - + + diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue index e119e0d..31ea6c1 100644 --- a/src/views/measure/person/list.vue +++ b/src/views/measure/person/list.vue @@ -141,7 +141,6 @@ const search = () => { getList() } -const selectTreeRef = ref() // 重置 const reset = () => { searchQuery.staffNo = '' @@ -149,7 +148,6 @@ searchQuery.deptId = '' searchQuery.major = '' searchQuery.verifierCertificateNo = '' - selectTreeRef.value.clearSelected() getList() } // 模板下载 @@ -245,10 +243,11 @@ :value="item.id" /> --> - + /> --> + diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue index 21d9af6..eaa60ae 100644 --- a/src/views/system/notice/noteList.vue +++ b/src/views/system/notice/noteList.vue @@ -153,15 +153,15 @@ - + - + diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index 28ca2ed..47a713e 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -25,3 +25,36 @@ data, }) } +// 设备借用申请编辑 +export function editApply(data: object) { + return request({ + url: '/equipmentApply/updateEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请删除 +export function deleteApply(data: object) { + return request({ + url: '/equipmentApply/deleteEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请提交 +export function submitApply(data: object) { + return request({ + url: '/equipmentApply/borrowEquipmentApply', + method: 'post', + data, + }) +} +// 设备借用申请导出 +export function exportApply(data: object) { + return request({ + url: '/equipmentApply/exportList', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts new file mode 100644 index 0000000..ea79535 --- /dev/null +++ b/src/api/device/stateManage.ts @@ -0,0 +1,10 @@ +// 状态管理相关接口api +import request from '../index' +// 设备申请列表 +export function getApplyList(data: any) { + return request({ + url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 2344541..ef7bd91 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -174,6 +174,7 @@ check-on-click-node filterable class="full-width-input" + :disabled="props.disabled" /> diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 93f7084..cd62c8b 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -1,5 +1,6 @@ @@ -330,14 +343,20 @@ - + + - + diff --git a/src/views/device/standingBook/components/fixedAssetsAdd.vue b/src/views/device/standingBook/components/fixedAssetsAdd.vue index e59c2a7..755138a 100644 --- a/src/views/device/standingBook/components/fixedAssetsAdd.vue +++ b/src/views/device/standingBook/components/fixedAssetsAdd.vue @@ -37,7 +37,7 @@ overallDimension: '', // 外形尺寸 manufacturingNo: '', // 出厂编号 manufacturingDate: '', // 出厂年月 - cardEstablishmentDate: '', // 立卡年月 + cardEstablishmentDate: '', // 立卡日期 weight: '', // 重量 enableDate: '', // 启用年月 singlePrice: '', // 单价 @@ -81,6 +81,14 @@ enableDate: [{ required: true, message: '启用日期不能为空', trigger: 'blur' }], mesureDate: [{ required: true, message: '检定日期不能为空', trigger: 'blur' }], validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }], + useDept: [{ required: true, message: '使用部门不能为空', trigger: 'blur' }], + usePerson: [{ required: true, message: '使用人不能为空', trigger: 'blur' }], + equipmentCategory: [{ required: true, message: '设备类别不能为空', trigger: 'blur' }], + equipmentType: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }], + equipmentSpecifications: [{ required: true, message: '设备规格不能为空', trigger: 'blur' }], + purpose: [{ required: true, message: '用途不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + managerLevel: [{ required: true, message: '管理级别不能为空', trigger: 'blur' }], }) // 表单验证规则 const assetTypeList = ref([]) // 资产类型 const ABCList = ref([]) // ABC @@ -107,9 +115,6 @@ value: '0', }, ]) -const deptProps = reactive({ - parent: 'pid', value: 'id', label: 'name', children: 'children', -}) // 检定周期 const mesureCycleList = ref([ { @@ -199,8 +204,6 @@ useDeptList.value = toTreeList(res.data, '0', true) }) } -const selectTreeRef1 = ref() -const selectTreeRef2 = ref() // 重置 const resetDATA = () => { ruleForm.value = { @@ -256,10 +259,6 @@ isStandardSupportEquipment: '', // 是否标准配套设备 id: '', } - if (title.value !== '详情') { - selectTreeRef1.value.clearSelected() - selectTreeRef2.value.clearSelected() - } } // 弹窗初始化 const initDialog = (row: any) => { @@ -460,10 +459,10 @@ - + @@ -507,7 +506,8 @@ - + @@ -537,10 +537,11 @@ + - - + --> diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index d0ceefb..caf81b3 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -2,10 +2,8 @@ + + 提交 - + + 同意 + + + 驳回 + + + 拒绝 + + + 打印 + + + 提交 + + + 编辑 + + + 编辑 + + + 删除 + + 关闭 @@ -537,15 +640,7 @@ - - - - + @@ -620,16 +715,13 @@ + + + + + - - - - + @@ -642,7 +734,7 @@ @@ -652,7 +744,7 @@ - + @@ -668,39 +760,16 @@ 删除行 - - + - *{{ item.text }} + {{ item.text }} - {{ scope.row[item.value] }} - - - - - - - - + {{ scope.row[item.value] + }} diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue new file mode 100644 index 0000000..bf71edd --- /dev/null +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -0,0 +1,799 @@ + + + + + + + + + + + 提交 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm1.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加行 + + + 删除行 + + + + + + + + + {{ + item.value === 'useDept' + ? useDeptListNoTree.filter(dept => dept.id === scope.row[item.value])[0]?.name + : item.value === 'usePerson' + ? usePersonList.filter(person => person.id === scope.row[item.value])[0]?.name + : scope.row[item.value] + }} + + + + + 选择 + + + + + + + + + + + + + + + + + + + + Update Github template + Tom committed 2018/4/12 20:46 + + + + + Update Github template + Tom committed 2018/4/3 20:46 + + + + + Update Github template + Tom committed 2018/4/2 20:46 + + + + + + + + + diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index 7cc9075..131b636 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/stateManage/components/templatePage.vue b/src/views/device/stateManage/components/templatePage.vue index fce7685..eaccced 100644 --- a/src/views/device/stateManage/components/templatePage.vue +++ b/src/views/device/stateManage/components/templatePage.vue @@ -7,6 +7,7 @@ import passed from './status/passed.vue'// 已通过 import pending from './status/pending.vue' // 待审批 import unPassed from './status/unPassed.vue' // 未通过 +import { getDictByCode } from '@/api/system/dict' const props = defineProps({ name: { type: String, @@ -16,10 +17,16 @@ type: String, required: true, }, + applyType: { // 设备申请类型 + type: String, + default: '', + }, }) interface menuType { name: string - comp: any + comp?: any + id?: string + value?: string } const menu = shallowRef([ { name: '全部', comp: all }, @@ -30,10 +37,31 @@ { name: '未通过', comp: unPassed }, { name: '已取消', comp: cancel }, ]) +const statusList = ref([]) +const type = ref('') // 当前状态的value const current = ref('全部') const currentComp = shallowRef(all) -watch(current, (newValue) => { +watch(current, async (newValue) => { currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp + if (statusList.value.length > 0) { + type.value = statusList.value.filter(item => item.name === newValue)[0].value || '' + } + else { + getDictByCode('approvalStatus').then((res) => { + statusList.value = (res.data as menuType[]) + type.value = res.data.filter((item: menuType) => item.name === newValue)[0].value + }) + } +}, { + immediate: true, + deep: true, +}) +onUnmounted(() => { + sessionStorage.setItem(`${props.authority}Menu`, current.value) +}) +onMounted(() => { + current.value = sessionStorage.getItem(`${props.authority}Menu`) || '全部' + sessionStorage.getItem(`${props.authority}Menu`) ? sessionStorage.removeItem(`${props.authority}Menu`) : '' }) @@ -48,7 +76,7 @@ - + diff --git a/src/views/device/stateManage/handleApply.vue b/src/views/device/stateManage/handleApply.vue index 703674f..b2c2357 100644 --- a/src/views/device/stateManage/handleApply.vue +++ b/src/views/device/stateManage/handleApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/openApply.vue b/src/views/device/stateManage/openApply.vue index 35c2af6..744f0f3 100644 --- a/src/views/device/stateManage/openApply.vue +++ b/src/views/device/stateManage/openApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/scrapApply.vue b/src/views/device/stateManage/scrapApply.vue index 282ecd8..94c6475 100644 --- a/src/views/device/stateManage/scrapApply.vue +++ b/src/views/device/stateManage/scrapApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/sealupApply.vue b/src/views/device/stateManage/sealupApply.vue index 1c8544d..a9e6733 100644 --- a/src/views/device/stateManage/sealupApply.vue +++ b/src/views/device/stateManage/sealupApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/device/stateManage/unusedApply.vue b/src/views/device/stateManage/unusedApply.vue index 4b02b09..8f15c63 100644 --- a/src/views/device/stateManage/unusedApply.vue +++ b/src/views/device/stateManage/unusedApply.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue index c758059..e2ff064 100644 --- a/src/views/measure/file/components/addDialog.vue +++ b/src/views/measure/file/components/addDialog.vue @@ -77,7 +77,7 @@ if (row.title === '新建') { // 默认发布人和发布单位 ruleForm.createUserId = userInfo.$state.id - ruleForm.publisher = userInfo.$state.deptName + ruleForm.publisher = userInfo.$state.deptId ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } else if (row.title === '详情') { @@ -126,9 +126,6 @@ type: 'warning', }, ).then((res) => { - if (ruleForm.publisher === userInfo.$state.deptName) { - ruleForm.publisher = userInfo.$state.deptId - } if (flag == '提交') { confirmDrafts(ruleForm).then((res) => { if (res.code == 200) { @@ -257,15 +254,7 @@ - - - - + diff --git a/src/views/measure/file/quality.vue b/src/views/measure/file/quality.vue index f8f7528..a1c6722 100644 --- a/src/views/measure/file/quality.vue +++ b/src/views/measure/file/quality.vue @@ -22,6 +22,10 @@ watch(current, (newValue) => { console.log(newValue, 'newValue') currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp +}, +{ + immediate: true, + deep: true, }) onUnmounted(() => { sessionStorage.setItem('fileMenu', current.value) diff --git a/src/views/measure/person/certificateLog.vue b/src/views/measure/person/certificateLog.vue index 16a8c9d..fa7b761 100644 --- a/src/views/measure/person/certificateLog.vue +++ b/src/views/measure/person/certificateLog.vue @@ -207,7 +207,6 @@ const search = () => { getList() } -const selectTreeRef = ref() // 重置 const reset = () => { searchQuery.staffNo = '' @@ -215,7 +214,6 @@ searchQuery.deptId = '' searchQuery.certificateStatus = '' searchQuery.verifierCertificateNo = '' - selectTreeRef.value.clearSelected() getList() } // 模板下载 @@ -313,10 +311,11 @@ :value="item.id" /> --> - + /> --> + diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue index 7850502..0de6eb3 100644 --- a/src/views/measure/person/components/addPerson.vue +++ b/src/views/measure/person/components/addPerson.vue @@ -3,8 +3,9 @@ import type { FormInstance, FormRules, UploadProps, UploadUserFile } from 'element-plus' import { ElMessage, ElMessageBox, ElTable } from 'element-plus' import { Plus } from '@element-plus/icons-vue' +import lodash from 'lodash' +import { ITEM_RENDER_EVT } from 'element-plus/es/components/virtual-list/src/defaults' import type { technologyJobType } from '../person-interface' -import certificateAddDialog from './certificateAddDialog.vue' import userListDialog from './userListDialog.vue' import { getUserList } from '@/api/system/user' import { getDeptTreeList } from '@/api/system/dept' @@ -12,7 +13,6 @@ import { toTreeList } from '@/utils/structure' import type { TreeStructure, userType } from '@/views/system/user/user-interface' import { getDictByCode } from '@/api/system/dict' -import comTreeSelect from '@/views/system/user/selecTree.vue' import { getStaffAdd, getStaffDetail, getStaffupdate } from '@/api/measure/person' import { getPhotoUrl } from '@/api/system/tool' // import showPhoto from '@/views/system/tool/showPhoto.vue' @@ -228,6 +228,7 @@ { name: '证书基本信息', data: [] as any[], + deepData: [] as any[], column: [ { text: '发证单位', @@ -269,6 +270,7 @@ { name: '计量工作培训记录', data: [] as any[], + deepData: [] as any[], column: [ { text: '培训时间', @@ -317,6 +319,7 @@ { name: '业务记录', data: [] as any[], + deepData: [] as any[], column: [ { text: '样品编号', @@ -415,11 +418,17 @@ }) } } +// const deleteArrID = ref([]) // 删除行 const removeRow = () => { currentShow.value.data = currentShow.value.data.filter((item) => { return !SelectionList.value.includes(item) }) + // 需要删除的行的id + // deleteArrID.value = currentShow.value.data.filter((item) => { + // return SelectionList.value.includes(item) + // }).map(row => (row.id as string)) + // console.log() } // 提交 const submitForm = async (formEl: FormInstance | undefined) => { @@ -435,27 +444,45 @@ type: 'warning', }, ).then(() => { - changeList.value[0].data = changeList.value[0].data.filter(item => item.certificateName !== '') - if (changeList.value[0].data.length) { - for (const key in ruleForm.value) { - if (ruleForm.value[key] === '') { - ruleForm.value[key] = null - } + // 处理编辑后的证书信息数据 + console.log(changeList.value[0].data) + console.log(changeList.value[0].deepData) + const certificateList = [] + // 1.先拿新增的 + changeList.value[0].data.forEach((item) => { + if (!item.id) { + certificateList.push(item) } - (title.value === '新建' - ? getStaffAdd - : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => { - if (res.code == 200) { - formEl?.resetFields() - ElMessage.success('提交成功') - resetFormData() - $router.go(-1) - } - }) - } - else { - ElMessage.warning('请先填写证书信息') - } + }) + // 2.再拿删除的 + const deleteArr = changeList.value[0].data.filter((item) => { + return changeList.value[0].deepData.includes(item) + }) + console.log(deleteArr) + const aaa = changeList.value[0].deepData.filter((item) => { + return deleteArr.includes(item.id) + }) + // changeList.value[0].data = changeList.value[0].data.filter(item => item.certificateName !== '') + // if (changeList.value[0].data.length) { + // for (const key in ruleForm.value) { + // if (ruleForm.value[key] === '') { + // ruleForm.value[key] = null + // } + // } + // (title.value === '新建' + // ? getStaffAdd({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }) + // : getStaffupdate({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` })).then((res) => { + // if (res.code == 200) { + // formEl?.resetFields() + // ElMessage.success('提交成功') + // resetFormData() + // $router.go(-1) + // } + // }) + // } + // else { + // ElMessage.warning('请先填写证书信息') + // } }) } }) @@ -467,14 +494,12 @@ $router.go(-1) resetFormData() } -const selectTreeRef = ref() // 弹窗初始化 const initDialog = (row: any) => { changeList.value[0].data = [] dialogVisible.value = true title.value = row.title resetFormData() - selectTreeRef.value?.clearSelected() getuser() getPubList() getSexList() @@ -489,6 +514,7 @@ if (res.code === 200) { ruleForm.value = res.data changeList.value[0].data = res.data.certificateList + changeList.value[0].deepData = lodash.cloneDeep(res.data.certificateList) } }) } @@ -557,14 +583,15 @@ /> - + + diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue index e2403ed..cbdea0b 100644 --- a/src/views/measure/person/components/addRecord.vue +++ b/src/views/measure/person/components/addRecord.vue @@ -199,14 +199,12 @@ $router.go(-1) resetFormData() } -const selectTreeRef = ref() // 弹窗初始化 const initDialog = (row: any) => { resetFormData() dialogVisible.value = true title.value = row.title name.value = row.name - selectTreeRef.value?.clearSelected() getuser() getPubList() getSexList() @@ -299,7 +297,8 @@ - + + diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue index e119e0d..31ea6c1 100644 --- a/src/views/measure/person/list.vue +++ b/src/views/measure/person/list.vue @@ -141,7 +141,6 @@ const search = () => { getList() } -const selectTreeRef = ref() // 重置 const reset = () => { searchQuery.staffNo = '' @@ -149,7 +148,6 @@ searchQuery.deptId = '' searchQuery.major = '' searchQuery.verifierCertificateNo = '' - selectTreeRef.value.clearSelected() getList() } // 模板下载 @@ -245,10 +243,11 @@ :value="item.id" /> --> - + /> --> + diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue index 21d9af6..eaa60ae 100644 --- a/src/views/system/notice/noteList.vue +++ b/src/views/system/notice/noteList.vue @@ -153,15 +153,15 @@ - + - + diff --git a/src/views/system/user/userAdd.vue b/src/views/system/user/userAdd.vue index ad997df..2e314c9 100644 --- a/src/views/system/user/userAdd.vue +++ b/src/views/system/user/userAdd.vue @@ -285,10 +285,11 @@ - + /> --> +
Tom committed 2018/4/12 20:46
Tom committed 2018/4/3 20:46
Tom committed 2018/4/2 20:46