diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index 0046fa3..a9f3bf7 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -35,49 +35,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index 0046fa3..a9f3bf7 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -35,49 +35,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index a8e1295..1666540 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -402,7 +402,6 @@ res.data.equipmentInfoList.map((item: objectReturn) => { if (item.id) { item.equipmentId = item.id - item.id = '' } // 如果选择的没有id则就让装置数组置空 else { @@ -443,7 +442,6 @@ diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index 0046fa3..a9f3bf7 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -35,49 +35,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index a8e1295..1666540 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -402,7 +402,6 @@ res.data.equipmentInfoList.map((item: objectReturn) => { if (item.id) { item.equipmentId = item.id - item.id = '' } // 如果选择的没有id则就让装置数组置空 else { @@ -443,7 +442,6 @@ diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index 0046fa3..a9f3bf7 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -35,49 +35,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index a8e1295..1666540 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -402,7 +402,6 @@ res.data.equipmentInfoList.map((item: objectReturn) => { if (item.id) { item.equipmentId = item.id - item.id = '' } // 如果选择的没有id则就让装置数组置空 else { @@ -443,7 +442,6 @@ diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index 0046fa3..a9f3bf7 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -35,49 +35,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index a8e1295..1666540 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -402,7 +402,6 @@ res.data.equipmentInfoList.map((item: objectReturn) => { if (item.id) { item.equipmentId = item.id - item.id = '' } // 如果选择的没有id则就让装置数组置空 else { @@ -443,7 +442,6 @@ diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index 0046fa3..a9f3bf7 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -35,49 +35,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index a8e1295..1666540 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -402,7 +402,6 @@ res.data.equipmentInfoList.map((item: objectReturn) => { if (item.id) { item.equipmentId = item.id - item.id = '' } // 如果选择的没有id则就让装置数组置空 else { @@ -443,7 +442,6 @@ diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index 0046fa3..a9f3bf7 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -35,49 +35,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index a8e1295..1666540 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -402,7 +402,6 @@ res.data.equipmentInfoList.map((item: objectReturn) => { if (item.id) { item.equipmentId = item.id - item.id = '' } // 如果选择的没有id则就让装置数组置空 else { @@ -443,7 +442,6 @@ diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index 0046fa3..a9f3bf7 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -35,49 +35,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index a8e1295..1666540 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -402,7 +402,6 @@ res.data.equipmentInfoList.map((item: objectReturn) => { if (item.id) { item.equipmentId = item.id - item.id = '' } // 如果选择的没有id则就让装置数组置空 else { @@ -443,7 +442,6 @@ diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index 0046fa3..a9f3bf7 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -35,49 +35,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index a8e1295..1666540 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -402,7 +402,6 @@ res.data.equipmentInfoList.map((item: objectReturn) => { if (item.id) { item.equipmentId = item.id - item.id = '' } // 如果选择的没有id则就让装置数组置空 else { @@ -443,7 +442,6 @@ diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index 0046fa3..a9f3bf7 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -35,49 +35,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index a8e1295..1666540 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -402,7 +402,6 @@ res.data.equipmentInfoList.map((item: objectReturn) => { if (item.id) { item.equipmentId = item.id - item.id = '' } // 如果选择的没有id则就让装置数组置空 else { @@ -443,7 +442,6 @@ diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index 0046fa3..a9f3bf7 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -35,49 +35,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index a8e1295..1666540 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -402,7 +402,6 @@ res.data.equipmentInfoList.map((item: objectReturn) => { if (item.id) { item.equipmentId = item.id - item.id = '' } // 如果选择的没有id则就让装置数组置空 else { @@ -443,7 +442,6 @@ diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue index f86c881..2e80544 100644 --- a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue +++ b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue @@ -2,7 +2,7 @@ diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index 0046fa3..a9f3bf7 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -35,49 +35,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index a8e1295..1666540 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -402,7 +402,6 @@ res.data.equipmentInfoList.map((item: objectReturn) => { if (item.id) { item.equipmentId = item.id - item.id = '' } // 如果选择的没有id则就让装置数组置空 else { @@ -443,7 +442,6 @@ diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue index f86c881..2e80544 100644 --- a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue +++ b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index b28f5d6..cf3712f 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -2,26 +2,27 @@ import { reactive, ref } from 'vue' import type { PropType, Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IOptions, Ibuttoms, IlistQuery, IlistTypes } from '../../standard_interface' +import type { IOptions, Ibuttons, IlistQuery, IlistTypes } from '../../standard_interface' import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' import { submitApproval } from '@/api/approval' const props = defineProps({ name: { type: String, default: '', }, + // 表单id schedule: { type: String, default: '', }, - buttoms: { - type: Array as PropType, + buttons: { + type: Array as PropType, default: () => [], }, applyType: { @@ -331,22 +332,10 @@ text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0) { - exportExcel({ - json: list.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } - else { - exportExcel({ - json: checkoutList.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } + getExportList(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置申请列表.xlsx') + }) loading.close() } // 审批结束回调 @@ -516,7 +505,7 @@ diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue index f86c881..2e80544 100644 --- a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue +++ b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index b28f5d6..cf3712f 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -2,26 +2,27 @@ import { reactive, ref } from 'vue' import type { PropType, Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IOptions, Ibuttoms, IlistQuery, IlistTypes } from '../../standard_interface' +import type { IOptions, Ibuttons, IlistQuery, IlistTypes } from '../../standard_interface' import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' import { submitApproval } from '@/api/approval' const props = defineProps({ name: { type: String, default: '', }, + // 表单id schedule: { type: String, default: '', }, - buttoms: { - type: Array as PropType, + buttons: { + type: Array as PropType, default: () => [], }, applyType: { @@ -331,22 +332,10 @@ text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0) { - exportExcel({ - json: list.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } - else { - exportExcel({ - json: checkoutList.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } + getExportList(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置申请列表.xlsx') + }) loading.close() } // 审批结束回调 @@ -516,7 +505,7 @@ - diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue index f86c881..2e80544 100644 --- a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue +++ b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index b28f5d6..cf3712f 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -2,26 +2,27 @@ import { reactive, ref } from 'vue' import type { PropType, Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IOptions, Ibuttoms, IlistQuery, IlistTypes } from '../../standard_interface' +import type { IOptions, Ibuttons, IlistQuery, IlistTypes } from '../../standard_interface' import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' import { submitApproval } from '@/api/approval' const props = defineProps({ name: { type: String, default: '', }, + // 表单id schedule: { type: String, default: '', }, - buttoms: { - type: Array as PropType, + buttons: { + type: Array as PropType, default: () => [], }, applyType: { @@ -331,22 +332,10 @@ text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0) { - exportExcel({ - json: list.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } - else { - exportExcel({ - json: checkoutList.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } + getExportList(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置申请列表.xlsx') + }) loading.close() } // 审批结束回调 @@ -516,7 +505,7 @@ - diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue index f86c881..2e80544 100644 --- a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue +++ b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index b28f5d6..cf3712f 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -2,26 +2,27 @@ import { reactive, ref } from 'vue' import type { PropType, Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IOptions, Ibuttoms, IlistQuery, IlistTypes } from '../../standard_interface' +import type { IOptions, Ibuttons, IlistQuery, IlistTypes } from '../../standard_interface' import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' import { submitApproval } from '@/api/approval' const props = defineProps({ name: { type: String, default: '', }, + // 表单id schedule: { type: String, default: '', }, - buttoms: { - type: Array as PropType, + buttons: { + type: Array as PropType, default: () => [], }, applyType: { @@ -331,22 +332,10 @@ text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0) { - exportExcel({ - json: list.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } - else { - exportExcel({ - json: checkoutList.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } + getExportList(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置申请列表.xlsx') + }) loading.close() } // 审批结束回调 @@ -516,7 +505,7 @@ - diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue index f86c881..2e80544 100644 --- a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue +++ b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index b28f5d6..cf3712f 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -2,26 +2,27 @@ import { reactive, ref } from 'vue' import type { PropType, Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IOptions, Ibuttoms, IlistQuery, IlistTypes } from '../../standard_interface' +import type { IOptions, Ibuttons, IlistQuery, IlistTypes } from '../../standard_interface' import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' import { submitApproval } from '@/api/approval' const props = defineProps({ name: { type: String, default: '', }, + // 表单id schedule: { type: String, default: '', }, - buttoms: { - type: Array as PropType, + buttons: { + type: Array as PropType, default: () => [], }, applyType: { @@ -331,22 +332,10 @@ text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0) { - exportExcel({ - json: list.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } - else { - exportExcel({ - json: checkoutList.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } + getExportList(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置申请列表.xlsx') + }) loading.close() } // 审批结束回调 @@ -516,7 +505,7 @@ - diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue index f86c881..2e80544 100644 --- a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue +++ b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index b28f5d6..cf3712f 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -2,26 +2,27 @@ import { reactive, ref } from 'vue' import type { PropType, Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IOptions, Ibuttoms, IlistQuery, IlistTypes } from '../../standard_interface' +import type { IOptions, Ibuttons, IlistQuery, IlistTypes } from '../../standard_interface' import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' import { submitApproval } from '@/api/approval' const props = defineProps({ name: { type: String, default: '', }, + // 表单id schedule: { type: String, default: '', }, - buttoms: { - type: Array as PropType, + buttons: { + type: Array as PropType, default: () => [], }, applyType: { @@ -331,22 +332,10 @@ text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0) { - exportExcel({ - json: list.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } - else { - exportExcel({ - json: checkoutList.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } + getExportList(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置申请列表.xlsx') + }) loading.close() } // 审批结束回调 @@ -516,7 +505,7 @@ - diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue index f86c881..2e80544 100644 --- a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue +++ b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index b28f5d6..cf3712f 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -2,26 +2,27 @@ import { reactive, ref } from 'vue' import type { PropType, Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IOptions, Ibuttoms, IlistQuery, IlistTypes } from '../../standard_interface' +import type { IOptions, Ibuttons, IlistQuery, IlistTypes } from '../../standard_interface' import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' import { submitApproval } from '@/api/approval' const props = defineProps({ name: { type: String, default: '', }, + // 表单id schedule: { type: String, default: '', }, - buttoms: { - type: Array as PropType, + buttons: { + type: Array as PropType, default: () => [], }, applyType: { @@ -331,22 +332,10 @@ text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0) { - exportExcel({ - json: list.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } - else { - exportExcel({ - json: checkoutList.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } + getExportList(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置申请列表.xlsx') + }) loading.close() } // 审批结束回调 @@ -516,7 +505,7 @@ - diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue index f86c881..2e80544 100644 --- a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue +++ b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index b28f5d6..cf3712f 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -2,26 +2,27 @@ import { reactive, ref } from 'vue' import type { PropType, Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IOptions, Ibuttoms, IlistQuery, IlistTypes } from '../../standard_interface' +import type { IOptions, Ibuttons, IlistQuery, IlistTypes } from '../../standard_interface' import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' import { submitApproval } from '@/api/approval' const props = defineProps({ name: { type: String, default: '', }, + // 表单id schedule: { type: String, default: '', }, - buttoms: { - type: Array as PropType, + buttons: { + type: Array as PropType, default: () => [], }, applyType: { @@ -331,22 +332,10 @@ text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0) { - exportExcel({ - json: list.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } - else { - exportExcel({ - json: checkoutList.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } + getExportList(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置申请列表.xlsx') + }) loading.close() } // 审批结束回调 @@ -516,7 +505,7 @@ - diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue index f86c881..2e80544 100644 --- a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue +++ b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index b28f5d6..cf3712f 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -2,26 +2,27 @@ import { reactive, ref } from 'vue' import type { PropType, Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IOptions, Ibuttoms, IlistQuery, IlistTypes } from '../../standard_interface' +import type { IOptions, Ibuttons, IlistQuery, IlistTypes } from '../../standard_interface' import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' import { submitApproval } from '@/api/approval' const props = defineProps({ name: { type: String, default: '', }, + // 表单id schedule: { type: String, default: '', }, - buttoms: { - type: Array as PropType, + buttons: { + type: Array as PropType, default: () => [], }, applyType: { @@ -331,22 +332,10 @@ text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0) { - exportExcel({ - json: list.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } - else { - exportExcel({ - json: checkoutList.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } + getExportList(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置申请列表.xlsx') + }) loading.close() } // 审批结束回调 @@ -516,7 +505,7 @@ - diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue index f86c881..2e80544 100644 --- a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue +++ b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index b28f5d6..cf3712f 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -2,26 +2,27 @@ import { reactive, ref } from 'vue' import type { PropType, Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IOptions, Ibuttoms, IlistQuery, IlistTypes } from '../../standard_interface' +import type { IOptions, Ibuttons, IlistQuery, IlistTypes } from '../../standard_interface' import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' import { submitApproval } from '@/api/approval' const props = defineProps({ name: { type: String, default: '', }, + // 表单id schedule: { type: String, default: '', }, - buttoms: { - type: Array as PropType, + buttons: { + type: Array as PropType, default: () => [], }, applyType: { @@ -331,22 +332,10 @@ text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0) { - exportExcel({ - json: list.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } - else { - exportExcel({ - json: checkoutList.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } + getExportList(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置申请列表.xlsx') + }) loading.close() } // 审批结束回调 @@ -516,7 +505,7 @@ - diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue index f86c881..2e80544 100644 --- a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue +++ b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index b28f5d6..cf3712f 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -2,26 +2,27 @@ import { reactive, ref } from 'vue' import type { PropType, Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IOptions, Ibuttoms, IlistQuery, IlistTypes } from '../../standard_interface' +import type { IOptions, Ibuttons, IlistQuery, IlistTypes } from '../../standard_interface' import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' import { submitApproval } from '@/api/approval' const props = defineProps({ name: { type: String, default: '', }, + // 表单id schedule: { type: String, default: '', }, - buttoms: { - type: Array as PropType, + buttons: { + type: Array as PropType, default: () => [], }, applyType: { @@ -331,22 +332,10 @@ text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0) { - exportExcel({ - json: list.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } - else { - exportExcel({ - json: checkoutList.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } + getExportList(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置申请列表.xlsx') + }) loading.close() } // 审批结束回调 @@ -516,7 +505,7 @@ - - + - - - + + + + - + + + + + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index 0046fa3..a9f3bf7 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -35,49 +35,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index a8e1295..1666540 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -402,7 +402,6 @@ res.data.equipmentInfoList.map((item: objectReturn) => { if (item.id) { item.equipmentId = item.id - item.id = '' } // 如果选择的没有id则就让装置数组置空 else { @@ -443,7 +442,6 @@ diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue index f86c881..2e80544 100644 --- a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue +++ b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index b28f5d6..cf3712f 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -2,26 +2,27 @@ import { reactive, ref } from 'vue' import type { PropType, Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IOptions, Ibuttoms, IlistQuery, IlistTypes } from '../../standard_interface' +import type { IOptions, Ibuttons, IlistQuery, IlistTypes } from '../../standard_interface' import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' import { submitApproval } from '@/api/approval' const props = defineProps({ name: { type: String, default: '', }, + // 表单id schedule: { type: String, default: '', }, - buttoms: { - type: Array as PropType, + buttons: { + type: Array as PropType, default: () => [], }, applyType: { @@ -331,22 +332,10 @@ text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0) { - exportExcel({ - json: list.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } - else { - exportExcel({ - json: checkoutList.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } + getExportList(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置申请列表.xlsx') + }) loading.close() } // 审批结束回调 @@ -516,7 +505,7 @@ - - + - - - + + + + - + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 5e7a7ca..9eefd7a 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -5,8 +5,8 @@ import type { IOptions, IexpiraListQuery, IlistType } from './standard_interface' import { getTypeSelect } from '@/api/system/price' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard' -import { exportExcel } from '@/utils/exportXlsx' +import { getExportExcel, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard' +import { exportFile } from '@/utils/exportUtils' import { printJSON } from '@/utils/printUtils' // 逻辑代码 const listQuery: Ref = ref({ @@ -216,19 +216,9 @@ background: 'rgba(255, 255, 255, 0.8)', }) if (checkoutList.value.length <= 0 && list.value.length > 0) { - exportExcel({ - json: list.value.map((item: IlistType, index: number) => ({ index: index + 1, standardNo: item.standardNo, standardName: item.standardName, managerStateName: item.managerStateName, standardLaboratoryName: item.standardLaboratoryName, standardOwnerName: item.standardOwnerName, preparationDate: item.preparationDate, remark: item.remark })), - name: '到期提醒列表', - titleArr: ['序号', '标准代码', '标准名称', '管理状态', '标准所在部门', '负责人', '筹建日期', '备注'], - sheetName: 'sheet1', - }) - } - else if (checkoutList.value.length > 0) { - exportExcel({ - json: checkoutList.value.map((item: IlistType, index: number) => ({ index: index + 1, standardNo: item.standardNo, standardName: item.standardName, managerStateName: item.managerStateName, standardLaboratoryName: item.standardLaboratoryName, standardOwnerName: item.standardOwnerName, preparationDate: item.preparationDate, remark: item.remark })), - name: '到期提醒列表', - titleArr: ['序号', '标准代码', '标准名称', '管理状态', '标准所在部门', '负责人', '筹建日期', '备注'], - sheetName: 'sheet1', + getExportExcel(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '到期提醒列表.xlsx') }) } else { diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index 0046fa3..a9f3bf7 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -35,49 +35,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index a8e1295..1666540 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -402,7 +402,6 @@ res.data.equipmentInfoList.map((item: objectReturn) => { if (item.id) { item.equipmentId = item.id - item.id = '' } // 如果选择的没有id则就让装置数组置空 else { @@ -443,7 +442,6 @@ diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue index f86c881..2e80544 100644 --- a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue +++ b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index b28f5d6..cf3712f 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -2,26 +2,27 @@ import { reactive, ref } from 'vue' import type { PropType, Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IOptions, Ibuttoms, IlistQuery, IlistTypes } from '../../standard_interface' +import type { IOptions, Ibuttons, IlistQuery, IlistTypes } from '../../standard_interface' import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' import { submitApproval } from '@/api/approval' const props = defineProps({ name: { type: String, default: '', }, + // 表单id schedule: { type: String, default: '', }, - buttoms: { - type: Array as PropType, + buttons: { + type: Array as PropType, default: () => [], }, applyType: { @@ -331,22 +332,10 @@ text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0) { - exportExcel({ - json: list.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } - else { - exportExcel({ - json: checkoutList.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } + getExportList(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置申请列表.xlsx') + }) loading.close() } // 审批结束回调 @@ -516,7 +505,7 @@ - - + - - - + + + + - + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 5e7a7ca..9eefd7a 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -5,8 +5,8 @@ import type { IOptions, IexpiraListQuery, IlistType } from './standard_interface' import { getTypeSelect } from '@/api/system/price' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard' -import { exportExcel } from '@/utils/exportXlsx' +import { getExportExcel, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard' +import { exportFile } from '@/utils/exportUtils' import { printJSON } from '@/utils/printUtils' // 逻辑代码 const listQuery: Ref = ref({ @@ -216,19 +216,9 @@ background: 'rgba(255, 255, 255, 0.8)', }) if (checkoutList.value.length <= 0 && list.value.length > 0) { - exportExcel({ - json: list.value.map((item: IlistType, index: number) => ({ index: index + 1, standardNo: item.standardNo, standardName: item.standardName, managerStateName: item.managerStateName, standardLaboratoryName: item.standardLaboratoryName, standardOwnerName: item.standardOwnerName, preparationDate: item.preparationDate, remark: item.remark })), - name: '到期提醒列表', - titleArr: ['序号', '标准代码', '标准名称', '管理状态', '标准所在部门', '负责人', '筹建日期', '备注'], - sheetName: 'sheet1', - }) - } - else if (checkoutList.value.length > 0) { - exportExcel({ - json: checkoutList.value.map((item: IlistType, index: number) => ({ index: index + 1, standardNo: item.standardNo, standardName: item.standardName, managerStateName: item.managerStateName, standardLaboratoryName: item.standardLaboratoryName, standardOwnerName: item.standardOwnerName, preparationDate: item.preparationDate, remark: item.remark })), - name: '到期提醒列表', - titleArr: ['序号', '标准代码', '标准名称', '管理状态', '标准所在部门', '负责人', '筹建日期', '备注'], - sheetName: 'sheet1', + getExportExcel(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '到期提醒列表.xlsx') }) } else { diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 216f572..9ea0948 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -5,22 +5,27 @@ import type { IOptions, IlistQuerys, IlistType } from './standard_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getTypeSelect } from '@/api/system/price' -import { getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard' -import { exportExcel } from '@/utils/exportXlsx' +import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' // 逻辑代码 // 列表查询条件 const listQuery: Ref = ref({ - standardNo: '', // 标准代码 - standardName: '', // 标准名称 category: '', // 类别 + id: '', managerState: '', // 管理状态 - standardLaboratory: '', // 标准所在部门 - preparationDate: '', // 筹建日期 - id: null, - offset: 1, // 当前页 - limit: 20, // 多少条 + preparationEndDate: '', // 筹建日期结束 + preparationStartDate: '', // 筹建日期开始 + standardLaboratory: '', // 标准所在实验室 + standardName: '', // 标准名称 + standardNo: '', // 标准代码 + validEndTime: '', // 到期结束时间 + validStartTime: '', // 到期开始时间 + offset: 1, // 多少页 + limit: 20, // 一页多少条 }) +// 筹建日期 +const preparationDate = ref('') const list = ref([]) // 存放数据 // 获得权限 const { proxy } = getCurrentInstance() as any @@ -99,6 +104,9 @@ // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } + // 筹建日期 + listQuery.value.preparationStartDate = preparationDate.value[0] || '' + listQuery.value.preparationEndDate = preparationDate.value[1] || '' getStandardList(listQuery.value).then((response) => { list.value = response.data.rows total.value = parseInt(response.data.total) @@ -136,7 +144,7 @@ meterMajor: '', organizeName: '', organizeNo: '', - organizeType: '2', + organizeType: '3', pdeptId: null, offset: 1, limit: 999999, @@ -149,15 +157,18 @@ // 点击重置 const clearList = () => { listQuery.value = { - standardNo: '', // 标准代码 - standardName: '', // 标准名称 category: '', // 类别 - managerState: '', - standardLaboratory: '', - preparationDate: '', - id: null, - offset: 1, - limit: 10, + id: '', + managerState: '', // 管理状态 + preparationEndDate: '', // 筹建日期结束 + preparationStartDate: '', // 筹建日期开始 + standardLaboratory: '', // 标准所在实验室 + standardName: '', // 标准名称 + standardNo: '', // 标准代码 + validEndTime: '', // 到期结束时间 + validStartTime: '', // 到期开始时间 + offset: 1, // 多少页 + limit: 20, // 一页多少条 } } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 @@ -168,6 +179,7 @@ if (val && val.page) { listQuery.value.offset = val.page } + // 发送请求 fetchData(true) } // 多选发生改变时 @@ -198,27 +210,30 @@ const exportExcelBtn = () => { const loading = ElLoading.service({ lock: true, - text: 'Loading', + text: '下载中请稍后', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0 && list.value.length > 0) { - exportExcel({ - json: list.value.map((item: IlistType, index: number) => ({ index: index + 1, standardNo: item.standardNo, standardName: item.standardName, categoryName: item.categoryName, standardLevel: item.standardLevel, transmitRange: item.transmitRange, managerStateName: item.managerStateName, standardLaboratoryName: item.standardLaboratoryName, standardOwnerName: item.standardOwnerName, preparationDate: item.preparationDate, remark: item.remark })), - name: '标准装置列表', - titleArr: ['序号', '标准代码', '标准名称', '类别', '标准等级', '传递范围', '管理状态', '标准所在部门', '负责人', '筹建日期', '备注'], - sheetName: 'sheet1', - }) - } - else if (checkoutList.value.length > 0) { - exportExcel({ - json: checkoutList.value.map((item: IlistType, index: number) => ({ index: index + 1, standardNo: item.standardNo, standardName: item.standardName, categoryName: item.categoryName, standardLevel: item.standardLevel, transmitRange: item.transmitRange, managerStateName: item.managerStateName, standardLaboratoryName: item.standardLaboratoryName, standardOwnerName: item.standardOwnerName, preparationDate: item.preparationDate, remark: item.remark })), - name: '标准装置列表', - titleArr: ['序号', '标准代码', '标准名称', '类别', '标准等级', '传递范围', '管理状态', '标准所在部门', '负责人', '筹建日期', '备注'], - sheetName: 'sheet1', + if (list.value.length > 0) { + const params = { + category: listQuery.value.category, // 类别 + id: listQuery.value.id, // 主键 + managerState: listQuery.value.managerState, // 管理状态 + preparationEndDate: listQuery.value.preparationEndDate, // 筹建结束日期 + preparationStartDate: listQuery.value.preparationStartDate, // 筹建结束日期 + standardLaboratory: listQuery.value.standardLaboratory, // 标准所在实验室 + standardName: listQuery.value.standardName, // 标准名称 + standardNo: listQuery.value.standardNo, // 标准代码 + validEndTime: listQuery.value.validEndTime, // 到期结束日期 + validStartTime: listQuery.value.validStartTime, // 到期开始日期 + ids: checkoutList.value, + } + getExportExcel(params).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置列表.xlsx') }) } else { - ElMessage.warning('暂无数据') + ElMessage.warning('无数据可导出数据') } loading.close() } @@ -274,21 +289,21 @@ :need-clear="true" @search="searchList" @clear="clearList" > - + - + - + - + - + - + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index 0046fa3..a9f3bf7 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -35,49 +35,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index a8e1295..1666540 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -402,7 +402,6 @@ res.data.equipmentInfoList.map((item: objectReturn) => { if (item.id) { item.equipmentId = item.id - item.id = '' } // 如果选择的没有id则就让装置数组置空 else { @@ -443,7 +442,6 @@ diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue index f86c881..2e80544 100644 --- a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue +++ b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index b28f5d6..cf3712f 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -2,26 +2,27 @@ import { reactive, ref } from 'vue' import type { PropType, Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IOptions, Ibuttoms, IlistQuery, IlistTypes } from '../../standard_interface' +import type { IOptions, Ibuttons, IlistQuery, IlistTypes } from '../../standard_interface' import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' import { submitApproval } from '@/api/approval' const props = defineProps({ name: { type: String, default: '', }, + // 表单id schedule: { type: String, default: '', }, - buttoms: { - type: Array as PropType, + buttons: { + type: Array as PropType, default: () => [], }, applyType: { @@ -331,22 +332,10 @@ text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0) { - exportExcel({ - json: list.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } - else { - exportExcel({ - json: checkoutList.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } + getExportList(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置申请列表.xlsx') + }) loading.close() } // 审批结束回调 @@ -516,7 +505,7 @@ - - + - - - + + + + - + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 5e7a7ca..9eefd7a 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -5,8 +5,8 @@ import type { IOptions, IexpiraListQuery, IlistType } from './standard_interface' import { getTypeSelect } from '@/api/system/price' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard' -import { exportExcel } from '@/utils/exportXlsx' +import { getExportExcel, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard' +import { exportFile } from '@/utils/exportUtils' import { printJSON } from '@/utils/printUtils' // 逻辑代码 const listQuery: Ref = ref({ @@ -216,19 +216,9 @@ background: 'rgba(255, 255, 255, 0.8)', }) if (checkoutList.value.length <= 0 && list.value.length > 0) { - exportExcel({ - json: list.value.map((item: IlistType, index: number) => ({ index: index + 1, standardNo: item.standardNo, standardName: item.standardName, managerStateName: item.managerStateName, standardLaboratoryName: item.standardLaboratoryName, standardOwnerName: item.standardOwnerName, preparationDate: item.preparationDate, remark: item.remark })), - name: '到期提醒列表', - titleArr: ['序号', '标准代码', '标准名称', '管理状态', '标准所在部门', '负责人', '筹建日期', '备注'], - sheetName: 'sheet1', - }) - } - else if (checkoutList.value.length > 0) { - exportExcel({ - json: checkoutList.value.map((item: IlistType, index: number) => ({ index: index + 1, standardNo: item.standardNo, standardName: item.standardName, managerStateName: item.managerStateName, standardLaboratoryName: item.standardLaboratoryName, standardOwnerName: item.standardOwnerName, preparationDate: item.preparationDate, remark: item.remark })), - name: '到期提醒列表', - titleArr: ['序号', '标准代码', '标准名称', '管理状态', '标准所在部门', '负责人', '筹建日期', '备注'], - sheetName: 'sheet1', + getExportExcel(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '到期提醒列表.xlsx') }) } else { diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 216f572..9ea0948 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -5,22 +5,27 @@ import type { IOptions, IlistQuerys, IlistType } from './standard_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getTypeSelect } from '@/api/system/price' -import { getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard' -import { exportExcel } from '@/utils/exportXlsx' +import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' // 逻辑代码 // 列表查询条件 const listQuery: Ref = ref({ - standardNo: '', // 标准代码 - standardName: '', // 标准名称 category: '', // 类别 + id: '', managerState: '', // 管理状态 - standardLaboratory: '', // 标准所在部门 - preparationDate: '', // 筹建日期 - id: null, - offset: 1, // 当前页 - limit: 20, // 多少条 + preparationEndDate: '', // 筹建日期结束 + preparationStartDate: '', // 筹建日期开始 + standardLaboratory: '', // 标准所在实验室 + standardName: '', // 标准名称 + standardNo: '', // 标准代码 + validEndTime: '', // 到期结束时间 + validStartTime: '', // 到期开始时间 + offset: 1, // 多少页 + limit: 20, // 一页多少条 }) +// 筹建日期 +const preparationDate = ref('') const list = ref([]) // 存放数据 // 获得权限 const { proxy } = getCurrentInstance() as any @@ -99,6 +104,9 @@ // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } + // 筹建日期 + listQuery.value.preparationStartDate = preparationDate.value[0] || '' + listQuery.value.preparationEndDate = preparationDate.value[1] || '' getStandardList(listQuery.value).then((response) => { list.value = response.data.rows total.value = parseInt(response.data.total) @@ -136,7 +144,7 @@ meterMajor: '', organizeName: '', organizeNo: '', - organizeType: '2', + organizeType: '3', pdeptId: null, offset: 1, limit: 999999, @@ -149,15 +157,18 @@ // 点击重置 const clearList = () => { listQuery.value = { - standardNo: '', // 标准代码 - standardName: '', // 标准名称 category: '', // 类别 - managerState: '', - standardLaboratory: '', - preparationDate: '', - id: null, - offset: 1, - limit: 10, + id: '', + managerState: '', // 管理状态 + preparationEndDate: '', // 筹建日期结束 + preparationStartDate: '', // 筹建日期开始 + standardLaboratory: '', // 标准所在实验室 + standardName: '', // 标准名称 + standardNo: '', // 标准代码 + validEndTime: '', // 到期结束时间 + validStartTime: '', // 到期开始时间 + offset: 1, // 多少页 + limit: 20, // 一页多少条 } } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 @@ -168,6 +179,7 @@ if (val && val.page) { listQuery.value.offset = val.page } + // 发送请求 fetchData(true) } // 多选发生改变时 @@ -198,27 +210,30 @@ const exportExcelBtn = () => { const loading = ElLoading.service({ lock: true, - text: 'Loading', + text: '下载中请稍后', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0 && list.value.length > 0) { - exportExcel({ - json: list.value.map((item: IlistType, index: number) => ({ index: index + 1, standardNo: item.standardNo, standardName: item.standardName, categoryName: item.categoryName, standardLevel: item.standardLevel, transmitRange: item.transmitRange, managerStateName: item.managerStateName, standardLaboratoryName: item.standardLaboratoryName, standardOwnerName: item.standardOwnerName, preparationDate: item.preparationDate, remark: item.remark })), - name: '标准装置列表', - titleArr: ['序号', '标准代码', '标准名称', '类别', '标准等级', '传递范围', '管理状态', '标准所在部门', '负责人', '筹建日期', '备注'], - sheetName: 'sheet1', - }) - } - else if (checkoutList.value.length > 0) { - exportExcel({ - json: checkoutList.value.map((item: IlistType, index: number) => ({ index: index + 1, standardNo: item.standardNo, standardName: item.standardName, categoryName: item.categoryName, standardLevel: item.standardLevel, transmitRange: item.transmitRange, managerStateName: item.managerStateName, standardLaboratoryName: item.standardLaboratoryName, standardOwnerName: item.standardOwnerName, preparationDate: item.preparationDate, remark: item.remark })), - name: '标准装置列表', - titleArr: ['序号', '标准代码', '标准名称', '类别', '标准等级', '传递范围', '管理状态', '标准所在部门', '负责人', '筹建日期', '备注'], - sheetName: 'sheet1', + if (list.value.length > 0) { + const params = { + category: listQuery.value.category, // 类别 + id: listQuery.value.id, // 主键 + managerState: listQuery.value.managerState, // 管理状态 + preparationEndDate: listQuery.value.preparationEndDate, // 筹建结束日期 + preparationStartDate: listQuery.value.preparationStartDate, // 筹建结束日期 + standardLaboratory: listQuery.value.standardLaboratory, // 标准所在实验室 + standardName: listQuery.value.standardName, // 标准名称 + standardNo: listQuery.value.standardNo, // 标准代码 + validEndTime: listQuery.value.validEndTime, // 到期结束日期 + validStartTime: listQuery.value.validStartTime, // 到期开始日期 + ids: checkoutList.value, + } + getExportExcel(params).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置列表.xlsx') }) } else { - ElMessage.warning('暂无数据') + ElMessage.warning('无数据可导出数据') } loading.close() } @@ -274,21 +289,21 @@ :need-clear="true" @search="searchList" @clear="clearList" > - + - + - + - + - + - + diff --git a/src/views/device/standardEquipment/standard_interface.ts b/src/views/device/standardEquipment/standard_interface.ts index 8917584..97c4b60 100644 --- a/src/views/device/standardEquipment/standard_interface.ts +++ b/src/views/device/standardEquipment/standard_interface.ts @@ -30,13 +30,16 @@ // 标准装置列表查询条件类型 export interface IlistQuerys { - standardNo: string - standardName: string category: string + id: string managerState: string + preparationEndDate: string + preparationStartDate: string standardLaboratory: string - preparationDate: string - id: null | string + standardName: string + standardNo: string + validEndTime: string + validStartTime: string offset: number limit: number } @@ -80,7 +83,7 @@ } // 按钮类型 -export interface Ibuttoms { +export interface Ibuttons { type: 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' name: string } diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 6e6fdfa..655d6e7 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -127,3 +127,86 @@ }) } +// 批量添加标准装置底部计量人员 +export function setBatchAdd(data: object) { + return request({ + url: '/meter/standard/user/batchAdd', + method: 'post', + data, + }) +} + +// 标准装置-计量人员列表(分页) +export function getuserListPage(data: object) { + return request({ + url: '/meter/standard/user/listPage', + method: 'post', + data, + }) +} + +// 标准装置-删除计量人员 +export function getuserDelete(data: object) { + return request({ + url: '/meter/standard/user/delete', + method: 'post', + data, + }) +} + +// 标准装置-配套设备列表(分页) +export function getEquipmentListPage(data: object) { + return request({ + url: '/meter/standard/equipment/listPage', + method: 'post', + data, + }) +} + +// 添加标准配套设备 +export function getEquipmenteAdd(data: object) { + return request({ + url: '/meter/standard/equipment/add', + method: 'post', + data, + }) +} + +// 添加检定规程 +export function getRegulationAdd(data: object) { + return request({ + url: '/meter/standard/regulation/add', + method: 'post', + data, + }) +} + +// 标准装置-检定规程列表(分页) +export function getRegulationListPage(data: object) { + return request({ + url: '/meter/standard/regulation/listPage', + method: 'post', + data, + }) +} + +// 标准装置导出 +export function getExportExcel(data: object) { + return request({ + url: '/meter/standard/exportExcel', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 标准装置申请导出 +export function getExportList(data: object) { + return request({ + url: '/standard/exportList', + method: 'post', + responseType: 'blob', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 5c85016..919591d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -196,6 +196,28 @@ activeMenu: '/lab/deptMeasureList', }, }, + { + path: 'reportOnCredentialsApproval', + name: 'ReportOnCredentialsApproval', + component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), + meta: { + title: '证书报告', + icon: 'ep:key', + auth: '/lab/reportOnCredentialsApproval', + }, + }, + { + path: 'reportOnCredentialsApproval/:type/:id?', + name: 'reportOnCredentialsAdd', + component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), + meta: { + title: '检测详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/reportOnCredentialsApproval', + }, + }, ], }, ] diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 1f5af41..fad9269 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -243,7 +243,7 @@ - +
+import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import type { IOptions } from '../../standard_interface' +import { getStaffList } from '@/api/measure/person' +import { getTypeSelect } from '@/api/system/price' +import { getStandardListDetail, getUsersDept } from '@/api/device/standard' +import { UploadFile } from '@/api/measure/file' +const props = defineProps({ + infoId: { + type: String, + default: '0', + }, + buttonType: { + type: String, + default: '', + }, +}) +const emit = defineEmits(['close', 'setData']) // 关闭 +const ruleFormRef = ref() +// 逻辑代码 +const formInline = ref({ + assessDate: '', + assessmentUnit: '', + category: '', + categoryName: '', + constructionStandardProject: '', + constructionStandardUnitName: '', + contactInfo: '', + createTime: null, + createUser: null, + id: '', + isDel: null, + laboratoryOwner: '', + laboratoryOwnerContact: '', + laboratoryOwnerName: null, + managerState: '', + managerStateName: '', + measureMajor: '', + fileList: [], + measureMajorName: '', + mesureRange: '', + organizeNo: '', + preparationDate: '', + projectNo: '', + remark: '', + standardHumidity: null, + standardLaboratory: '', + standardLaboratoryName: '', + standardLevel: '', + standardLevelName: '', + standardName: '', + standardNo: '', + standardOwner: '', + standardOwnerName: '', + standardTemperature: null, + totalInvestment: null, + transmitRange: '', + transmitRangeName: '', + uncertainty: '', + updateTime: null, + version: null, +}) +const checkTypeOptions = ref([]) +const standardOwnerOptions = ref([]) // 标准负责人 +const fileList = ref([]) // 文件对象数组 +const measureMajorList = ref([]) // 计量专业下拉框 +const standardManagerStateList = ref([]) // 管理状态下拉框 +const standardLevelList = ref([]) // 标准等级下拉框 +const transmitRangeList = ref([]) // 传递范围下拉框 +// 标准所在部门下拉框 +const standardUsersDeptList = ref([]) +// 获取下拉框 +const getSelectList = (code: string) => { + getTypeSelect(code).then((res) => { + if (code === 'measureMajor') { + measureMajorList.value = res.data + } + else if (code === 'standardManagerState') { + standardManagerStateList.value = res.data + } + else if (code === 'standardLevel') { + standardLevelList.value = res.data + } + else if (code === 'transmitRange') { + transmitRangeList.value = res.data + } + else if (code === 'standardCategory') { + checkTypeOptions.value = res.data + } + }) +} +getSelectList('measureMajor') // 获取计量专业下拉框 +getSelectList('standardManagerState') // 获取管理状态下拉框 +getSelectList('standardLevel') // 获取标准等级下拉框 +getSelectList('transmitRange') // 获取传递范围下拉框 +getSelectList('standardCategory') // 获取类别下拉框 +// 获取部门信息参数 +const DeptParams = ref({ + createEndTime: '', + createstartTime: '', + director: '', + meterMajor: '', + organizeName: '', + organizeNo: '', + organizeType: '2', + pdeptId: null, + offset: 1, + limit: 999999, +}) +// 获取部门信息 +getUsersDept(DeptParams.value).then((res) => { + standardUsersDeptList.value = res.data.rows +}) +// 获取到标准负责人数组 +const getStandardOwnerOptions = () => { + const params = { + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: '', // 工作部门 + major: '', // 计量专业 + verifierCertificateNo: '', // 证书号 + certificateStatus: '', // 证书状态 + limit: 100000, + offset: 1, + } + getStaffList(params).then((res) => { + standardOwnerOptions.value = res.data.records + }) +} +getStandardOwnerOptions() +// 关闭 +const close = () => { + emit('close') +} +const rules = ref({ + standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], + constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], + organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], + constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], + standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], + contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], + standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], + transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], + preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], + managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], + measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], + assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], + assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], + uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], + mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], + standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], + standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], +}) // 表单验证规则 +const fileRef = ref() // 文件上传input +const upload = () => { + fileRef.value.click() +} +const testForm = ref({ + fileList: [], + fileContent: '', +}) +const handleFileChange = (files: any, fileList: any) => { + testForm.value.fileList = fileList + const reader = new FileReader() + reader.readAsText(files.raw) + // reader.onload = (e) => { + // testForm.value.fileContent = e.target!.result?.replace( + // /\n|\r\n/g, + // '
', + // ) + // } +} +// 标准实验室发生改变row类型 +interface rowReturn { + phone: string + director: string +} +// 标准实验室发生改变 +const changeDeptList = (row: rowReturn) => { + formInline.value.laboratoryOwnerContact = row.phone + formInline.value.laboratoryOwner = row.director +} +// 标准实验室清空时 +const clearDeptList = () => { + formInline.value.laboratoryOwnerContact = '' + formInline.value.laboratoryOwner = '' +} +// 获取detail信息 +const getInfo = () => { + getStandardListDetail({ id: props.infoId }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof (res.data[item]) === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + }) +} +if (props.buttonType !== 'add') { + getInfo() +} +watch(() => formInline.value, (newVal) => { +// 变化后存储 + emit('setData', newVal) +}, +{ deep: true, immediate: true }) +// 提交 +const submitForm = () => { + return ruleFormRef.value +} +defineExpose({ submitForm }) + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue new file mode 100644 index 0000000..bd02885 --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue new file mode 100644 index 0000000..5bf6f0f --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue new file mode 100644 index 0000000..007d8dc --- /dev/null +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -0,0 +1,373 @@ + + + + diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index 0046fa3..a9f3bf7 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -35,49 +35,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index a8e1295..1666540 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -402,7 +402,6 @@ res.data.equipmentInfoList.map((item: objectReturn) => { if (item.id) { item.equipmentId = item.id - item.id = '' } // 如果选择的没有id则就让装置数组置空 else { @@ -443,7 +442,6 @@ diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 4ff3806..0fda7a8 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -59,49 +59,32 @@ const columns = ref([ { text: '检修申请编号', - value: 'checkApplyNo', - width: '120', - align: 'center', - }, - { - text: '检修申请名称', - value: 'checkApplyName', - width: '120', - align: 'center', - }, - { - text: '设备编号', value: 'applyNo', align: 'center', }, { - text: '设备名称', + text: '检修申请名称', value: 'applyName', align: 'center', }, { - text: '出厂编号', - value: 'overhaulPerson', + text: '申请单位', + value: 'applyUnitName', align: 'center', }, { - text: '设备型号', - value: 'createTime', + text: '申请人', + value: 'applyPersonName', align: 'center', }, { - text: '送修单位', - value: 'createTime', + text: '检修时间', + value: 'time', align: 'center', }, { - text: '送修人', - value: 'createTime', - align: 'center', - }, - { - text: '申请日期', - value: 'createTime', + text: '备注', + value: 'remark', align: 'center', }, { diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 0a3dd34..4e2432f 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -450,7 +450,6 @@ diff --git a/src/views/device/standardEquipment/cancelApply.vue b/src/views/device/standardEquipment/cancelApply.vue index 10ae252..936151c 100644 --- a/src/views/device/standardEquipment/cancelApply.vue +++ b/src/views/device/standardEquipment/cancelApply.vue @@ -1,5 +1,5 @@ diff --git a/src/views/device/standardEquipment/components/applyList.vue b/src/views/device/standardEquipment/components/applyList.vue index f5510c1..37839c3 100644 --- a/src/views/device/standardEquipment/components/applyList.vue +++ b/src/views/device/standardEquipment/components/applyList.vue @@ -16,8 +16,7 @@ default: '', }, }) -console.log(props.schedule, '11111') -export interface menuType { +interface menuType { name: string comp: any } @@ -36,7 +35,7 @@ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp }) const disabled = ref(false) -const setData = (newIsShow) => { +const setData = (newIsShow: boolean) => { if (newIsShow === false) { disabled.value = true } diff --git a/src/views/device/standardEquipment/components/listApply/all.vue b/src/views/device/standardEquipment/components/listApply/all.vue index aec5c4e..e5eef0f 100644 --- a/src/views/device/standardEquipment/components/listApply/all.vue +++ b/src/views/device/standardEquipment/components/listApply/all.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/approvalPending.vue b/src/views/device/standardEquipment/components/listApply/approvalPending.vue index 5300c19..2b12e75 100644 --- a/src/views/device/standardEquipment/components/listApply/approvalPending.vue +++ b/src/views/device/standardEquipment/components/listApply/approvalPending.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/canceled.vue b/src/views/device/standardEquipment/components/listApply/canceled.vue index a7ffa3f..0ccc701 100644 --- a/src/views/device/standardEquipment/components/listApply/canceled.vue +++ b/src/views/device/standardEquipment/components/listApply/canceled.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/draftBox.vue b/src/views/device/standardEquipment/components/listApply/draftBox.vue index 8c1ee5d..0bb8988 100644 --- a/src/views/device/standardEquipment/components/listApply/draftBox.vue +++ b/src/views/device/standardEquipment/components/listApply/draftBox.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue index f86c881..2e80544 100644 --- a/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue +++ b/src/views/device/standardEquipment/components/listApply/examineAndApprove.vue @@ -2,7 +2,7 @@ diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index b28f5d6..cf3712f 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -2,26 +2,27 @@ import { reactive, ref } from 'vue' import type { PropType, Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IOptions, Ibuttoms, IlistQuery, IlistTypes } from '../../standard_interface' +import type { IOptions, Ibuttons, IlistQuery, IlistTypes } from '../../standard_interface' import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' import { submitApproval } from '@/api/approval' const props = defineProps({ name: { type: String, default: '', }, + // 表单id schedule: { type: String, default: '', }, - buttoms: { - type: Array as PropType, + buttons: { + type: Array as PropType, default: () => [], }, applyType: { @@ -331,22 +332,10 @@ text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0) { - exportExcel({ - json: list.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } - else { - exportExcel({ - json: checkoutList.value.map((item: IlistTypes, index: number) => ({ index: index + 1, applyNo: item.applyNo, applyTypeName: item.applyTypeName, standardNo: item.standardNo, standardName: item.standardName, constructionStandardUnitName: item.constructionStandardUnitName, standardOwner: item.standardOwner, applyDept: item.applyDept, createUser: item.createUser, createTime: item.createTime, approvalStatusName: item.approvalStatusName })), - name: '标准装置申请', - titleArr: ['序号', '申请编号', '申请类型', '标准代码', '标准名称', '标准所在部门', '负责人', '申请部门', '申请人', '申请时间', '审批状态'], - sheetName: 'sheet1', - }) - } + getExportList(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置申请列表.xlsx') + }) loading.close() } // 审批结束回调 @@ -516,7 +505,7 @@ - - + - - - + + + + - + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 5e7a7ca..9eefd7a 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -5,8 +5,8 @@ import type { IOptions, IexpiraListQuery, IlistType } from './standard_interface' import { getTypeSelect } from '@/api/system/price' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard' -import { exportExcel } from '@/utils/exportXlsx' +import { getExportExcel, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard' +import { exportFile } from '@/utils/exportUtils' import { printJSON } from '@/utils/printUtils' // 逻辑代码 const listQuery: Ref = ref({ @@ -216,19 +216,9 @@ background: 'rgba(255, 255, 255, 0.8)', }) if (checkoutList.value.length <= 0 && list.value.length > 0) { - exportExcel({ - json: list.value.map((item: IlistType, index: number) => ({ index: index + 1, standardNo: item.standardNo, standardName: item.standardName, managerStateName: item.managerStateName, standardLaboratoryName: item.standardLaboratoryName, standardOwnerName: item.standardOwnerName, preparationDate: item.preparationDate, remark: item.remark })), - name: '到期提醒列表', - titleArr: ['序号', '标准代码', '标准名称', '管理状态', '标准所在部门', '负责人', '筹建日期', '备注'], - sheetName: 'sheet1', - }) - } - else if (checkoutList.value.length > 0) { - exportExcel({ - json: checkoutList.value.map((item: IlistType, index: number) => ({ index: index + 1, standardNo: item.standardNo, standardName: item.standardName, managerStateName: item.managerStateName, standardLaboratoryName: item.standardLaboratoryName, standardOwnerName: item.standardOwnerName, preparationDate: item.preparationDate, remark: item.remark })), - name: '到期提醒列表', - titleArr: ['序号', '标准代码', '标准名称', '管理状态', '标准所在部门', '负责人', '筹建日期', '备注'], - sheetName: 'sheet1', + getExportExcel(listQuery.value).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '到期提醒列表.xlsx') }) } else { diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 216f572..9ea0948 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -5,22 +5,27 @@ import type { IOptions, IlistQuerys, IlistType } from './standard_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getTypeSelect } from '@/api/system/price' -import { getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard' -import { exportExcel } from '@/utils/exportXlsx' +import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard' import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' // 逻辑代码 // 列表查询条件 const listQuery: Ref = ref({ - standardNo: '', // 标准代码 - standardName: '', // 标准名称 category: '', // 类别 + id: '', managerState: '', // 管理状态 - standardLaboratory: '', // 标准所在部门 - preparationDate: '', // 筹建日期 - id: null, - offset: 1, // 当前页 - limit: 20, // 多少条 + preparationEndDate: '', // 筹建日期结束 + preparationStartDate: '', // 筹建日期开始 + standardLaboratory: '', // 标准所在实验室 + standardName: '', // 标准名称 + standardNo: '', // 标准代码 + validEndTime: '', // 到期结束时间 + validStartTime: '', // 到期开始时间 + offset: 1, // 多少页 + limit: 20, // 一页多少条 }) +// 筹建日期 +const preparationDate = ref('') const list = ref([]) // 存放数据 // 获得权限 const { proxy } = getCurrentInstance() as any @@ -99,6 +104,9 @@ // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } + // 筹建日期 + listQuery.value.preparationStartDate = preparationDate.value[0] || '' + listQuery.value.preparationEndDate = preparationDate.value[1] || '' getStandardList(listQuery.value).then((response) => { list.value = response.data.rows total.value = parseInt(response.data.total) @@ -136,7 +144,7 @@ meterMajor: '', organizeName: '', organizeNo: '', - organizeType: '2', + organizeType: '3', pdeptId: null, offset: 1, limit: 999999, @@ -149,15 +157,18 @@ // 点击重置 const clearList = () => { listQuery.value = { - standardNo: '', // 标准代码 - standardName: '', // 标准名称 category: '', // 类别 - managerState: '', - standardLaboratory: '', - preparationDate: '', - id: null, - offset: 1, - limit: 10, + id: '', + managerState: '', // 管理状态 + preparationEndDate: '', // 筹建日期结束 + preparationStartDate: '', // 筹建日期开始 + standardLaboratory: '', // 标准所在实验室 + standardName: '', // 标准名称 + standardNo: '', // 标准代码 + validEndTime: '', // 到期结束时间 + validStartTime: '', // 到期开始时间 + offset: 1, // 多少页 + limit: 20, // 一页多少条 } } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 @@ -168,6 +179,7 @@ if (val && val.page) { listQuery.value.offset = val.page } + // 发送请求 fetchData(true) } // 多选发生改变时 @@ -198,27 +210,30 @@ const exportExcelBtn = () => { const loading = ElLoading.service({ lock: true, - text: 'Loading', + text: '下载中请稍后', background: 'rgba(255, 255, 255, 0.8)', }) - if (checkoutList.value.length <= 0 && list.value.length > 0) { - exportExcel({ - json: list.value.map((item: IlistType, index: number) => ({ index: index + 1, standardNo: item.standardNo, standardName: item.standardName, categoryName: item.categoryName, standardLevel: item.standardLevel, transmitRange: item.transmitRange, managerStateName: item.managerStateName, standardLaboratoryName: item.standardLaboratoryName, standardOwnerName: item.standardOwnerName, preparationDate: item.preparationDate, remark: item.remark })), - name: '标准装置列表', - titleArr: ['序号', '标准代码', '标准名称', '类别', '标准等级', '传递范围', '管理状态', '标准所在部门', '负责人', '筹建日期', '备注'], - sheetName: 'sheet1', - }) - } - else if (checkoutList.value.length > 0) { - exportExcel({ - json: checkoutList.value.map((item: IlistType, index: number) => ({ index: index + 1, standardNo: item.standardNo, standardName: item.standardName, categoryName: item.categoryName, standardLevel: item.standardLevel, transmitRange: item.transmitRange, managerStateName: item.managerStateName, standardLaboratoryName: item.standardLaboratoryName, standardOwnerName: item.standardOwnerName, preparationDate: item.preparationDate, remark: item.remark })), - name: '标准装置列表', - titleArr: ['序号', '标准代码', '标准名称', '类别', '标准等级', '传递范围', '管理状态', '标准所在部门', '负责人', '筹建日期', '备注'], - sheetName: 'sheet1', + if (list.value.length > 0) { + const params = { + category: listQuery.value.category, // 类别 + id: listQuery.value.id, // 主键 + managerState: listQuery.value.managerState, // 管理状态 + preparationEndDate: listQuery.value.preparationEndDate, // 筹建结束日期 + preparationStartDate: listQuery.value.preparationStartDate, // 筹建结束日期 + standardLaboratory: listQuery.value.standardLaboratory, // 标准所在实验室 + standardName: listQuery.value.standardName, // 标准名称 + standardNo: listQuery.value.standardNo, // 标准代码 + validEndTime: listQuery.value.validEndTime, // 到期结束日期 + validStartTime: listQuery.value.validStartTime, // 到期开始日期 + ids: checkoutList.value, + } + getExportExcel(params).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '标准装置列表.xlsx') }) } else { - ElMessage.warning('暂无数据') + ElMessage.warning('无数据可导出数据') } loading.close() } @@ -274,21 +289,21 @@ :need-clear="true" @search="searchList" @clear="clearList" > - + - + - + - + - + - + diff --git a/src/views/device/standardEquipment/standard_interface.ts b/src/views/device/standardEquipment/standard_interface.ts index 8917584..97c4b60 100644 --- a/src/views/device/standardEquipment/standard_interface.ts +++ b/src/views/device/standardEquipment/standard_interface.ts @@ -30,13 +30,16 @@ // 标准装置列表查询条件类型 export interface IlistQuerys { - standardNo: string - standardName: string category: string + id: string managerState: string + preparationEndDate: string + preparationStartDate: string standardLaboratory: string - preparationDate: string - id: null | string + standardName: string + standardNo: string + validEndTime: string + validStartTime: string offset: number limit: number } @@ -80,7 +83,7 @@ } // 按钮类型 -export interface Ibuttoms { +export interface Ibuttons { type: 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' name: string } diff --git a/src/views/measure/train/plan_interface.ts b/src/views/measure/train/plan_interface.ts index 11d1a7c..71d8932 100644 --- a/src/views/measure/train/plan_interface.ts +++ b/src/views/measure/train/plan_interface.ts @@ -41,6 +41,20 @@ limit: number } +// 培训审批查询条件 +export interface IApprovallistQuery { + approvalStatus: string + formId: string + createTime: string + deptId: string + director: string + effectiveCompany: string + trainTime: string + offset: number + limit: number + ids?: [] +} + export interface ISupplier { deptId: string createTime: string