@@ -289,7 +107,7 @@
{{ buttonType === '详情' ? '打印' : '提交' }}
@@ -298,405 +116,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 上传
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
@@ -719,14 +149,8 @@
}
}
-.info-content {
- margin-top: 10px;
- padding: 30px;
- border-radius: 10px;
+.body {
background-color: #fff;
-}
-
-:deep .el-input .el-input--default .el-input--suffix {
- width: 200px !important;
+ margin-top: 10px;
}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5a09663..2e27c4d 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -13,6 +13,8 @@
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
+ BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default']
+ BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default']
BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default']
Benchcol: typeof import('./components/benchcol/index.vue')['default']
BenchCol: typeof import('./components/benchCol/index.vue')['default']
@@ -20,7 +22,6 @@
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
- Echarts: typeof import('./components/echarts/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default']
@@ -30,13 +31,14 @@
ImagePreview: typeof import('./components/ImagePreview/index.vue')['default']
ImagesUpload: typeof import('./components/ImagesUpload/index.vue')['default']
ImageUpload: typeof import('./components/ImageUpload/index.vue')['default']
+ LineChart: typeof import('./components/Echart/LineChart.vue')['default']
NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default']
NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default']
NormalTable: typeof import('./components/NormalTable/index.vue')['default']
PageHeader: typeof import('./components/PageHeader/index.vue')['default']
PageMain: typeof import('./components/PageMain/index.vue')['default']
PcasCascader: typeof import('./components/PcasCascader/index.vue')['default']
- Pie: typeof import('./components/echarts/pie.vue')['default']
+ PieChart: typeof import('./components/Echart/PieChart.vue')['default']
PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default']
RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
diff --git a/src/views/device/standardEquipment/changeApply.vue b/src/views/device/standardEquipment/changeApply.vue
index 0762330..6be4200 100644
--- a/src/views/device/standardEquipment/changeApply.vue
+++ b/src/views/device/standardEquipment/changeApply.vue
@@ -1,13 +1,65 @@
-
-
- 更换申请
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/all.vue b/src/views/device/standardEquipment/components/changeApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/approvalPending.vue b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/canceled.vue b/src/views/device/standardEquipment/components/changeApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/draftBox.vue b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPage.vue b/src/views/device/standardEquipment/components/changeApply/listPage.vue
new file mode 100644
index 0000000..bcf35ee
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPage.vue
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
new file mode 100644
index 0000000..71e68f7
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
@@ -0,0 +1,693 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/notPass.vue b/src/views/device/standardEquipment/components/changeApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/passed.vue b/src/views/device/standardEquipment/components/changeApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/addRow.vue b/src/views/device/standardEquipment/components/standardList/addRow.vue
new file mode 100644
index 0000000..9f2bf81
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/addRow.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
new file mode 100644
index 0000000..c47ad1d
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -0,0 +1,675 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/temptable.vue b/src/views/device/standardEquipment/components/standardList/temptable.vue
new file mode 100644
index 0000000..59120b8
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/temptable.vue
@@ -0,0 +1,388 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (searchQuery.offset - 1) * searchQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index ea13629..348bb41 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -3,6 +3,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus'
import type { IOptions } from '../standard_interface'
+import baseInfo from './standardList/baseInfo.vue'
+import table from './standardList/temptable.vue'
import { getStaffList } from '@/api/measure/person'
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
@@ -17,188 +19,35 @@
default: '',
},
})
-const emit = defineEmits(['close']) // 关闭
-const ruleFormRef = ref
()
-// 逻辑代码
-const formInline = ref({
- assessDate: '',
- assessmentUnit: '',
- category: null,
- categoryName: '',
- constructionStandardProject: '',
- constructionStandardUnitName: '',
- contactInfo: '',
- createTime: null,
- createUser: null,
- id: '',
- isDel: null,
- laboratoryOwner: null,
- laboratoryOwnerContact: null,
- laboratoryOwnerName: null,
- managerState: null,
- managerStateName: '',
- measureMajor: null,
- fileList: [],
- measureMajorName: '',
- mesureRange: '',
- organizeNo: '',
- preparationDate: '',
- projectNo: '',
- remark: '',
- standardHumidity: null,
- standardLaboratory: null,
- standardLaboratoryName: '',
- standardLevel: null,
- standardLevelName: '',
- standardName: '',
- standardNo: '',
- standardOwner: null,
- standardOwnerName: '',
- standardTemperature: null,
- totalInvestment: null,
- transmitRange: null,
- 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
- }
- })
+const emit = defineEmits(['close'])
+// 定义数据
+const formInline = ref({})
+// 关闭
+interface menuType {
+ name: string
+ comp: any
}
-getSelectList('measureMajor') // 获取计量专业下拉框
-getSelectList('standardManagerState') // 获取管理状态下拉框
-getSelectList('standardLevel') // 获取标准等级下拉框
-getSelectList('transmitRange') // 获取传递范围下拉框
-getSelectList('standardCategory') // 获取类别下拉框
-// 获取部门信息
-getUsersDept({
- createTime: '',
- director: '',
- meterMajor: '',
- organizeName: '',
- organizeNo: '',
- organizeType: '2',
- pdeptId: null,
- offset: 1,
- limit: 999999,
-}).then((res) => {
- standardUsersDeptList.value = res.data.rows
+const menu = shallowRef([
+ { name: '基本信息', comp: baseInfo },
+ { name: '计量人员', comp: table },
+ { name: '标准配套设备', comp: table },
+ { name: '检定规程', comp: table },
+ { name: '重复性考核记录', comp: table },
+ { name: '稳定性考核记录', comp: table },
+ { name: '证书管理', comp: table },
+])
+const currentCompRef = ref()
+const current = ref('基本信息')
+const currentComp = shallowRef(baseInfo)
+watch(current, (newValue) => {
+ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 获取到标准负责人数组
-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 uploadQuarterlyEvaluateFile = (file: File) => {
- const fd = new FormData()
- fd.append('multipartFile', file.file)
- UploadFile(fd).then((res) => {
- if (res.code === 200) {
- formInline.value.fileList = res.data
- // 重置当前验证
- ElMessage.success('文件上传成功')
- }
- })
-}
-const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
- ElMessage.warning('只能上传一个文件')
-}
-// 移除时触发
-const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
- return ElMessageBox.confirm(
- `确认移除${uploadFile.name}文件吗 ?`,
- ).then(
- () => true,
- () => false,
-
- )
-}
-// 点击文件预览
-const uploadShow = (e: any) => {
- const URL = window.URL || window.webkitURL
- window.open(URL.createObjectURL(e.raw))
-}
-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,
- // '
',
- // )
- // }
+const setData = (newValue: object) => {
+ formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
@@ -223,60 +72,29 @@
}
}
// 提交
-const submitForm = (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
+const submitForm = () => {
if (props.buttonType === '详情') { return submitFormDetail() }
- formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- props.buttonType === ''
- ? getStandardListAdd(formInline.value).then((res) => {
- if (res.code === 200) {
- close()
- }
- })
- : submitFormDetail()
- })
- }
- })
-}
-// 标准实验室发生改变row类型
-interface rowReturn {
- phone: string
- director: string
-}
-// 标准实验室发生改变
-const changeDeptList = (row: object) => {
- formInline.value.laboratoryOwnerContact = row.phone
- formInline.value.laboratoryOwner = row.director
-}
-// 标准实验室清空时
-const clearDeptList = () => {
- formInline.value.laboratoryOwnerContact = null
- formInline.value.laboratoryOwner = null
-}
-// 获取详情信息
-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()
- }
+ ElMessageBox.confirm(
+ '确认提交吗?',
+ '提示',
+ {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning',
+ },
+ ).then(() => {
+ current.value = '基本信息'
+ currentCompRef.value.submitForm().validate().then(() => {
+ props.buttonType === ''
+ ? getStandardListAdd(formInline.value).then((res) => {
+ if (res.code === 200) {
+ close()
+ }
+ })
+ : submitFormDetail()
})
- formInline.value = res.data
})
}
-if (props.buttonType !== '') {
- getInfo()
-}
@@ -289,7 +107,7 @@
{{ buttonType === '详情' ? '打印' : '提交' }}
@@ -298,405 +116,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 上传
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
@@ -719,14 +149,8 @@
}
}
-.info-content {
- margin-top: 10px;
- padding: 30px;
- border-radius: 10px;
+.body {
background-color: #fff;
-}
-
-:deep .el-input .el-input--default .el-input--suffix {
- width: 200px !important;
+ margin-top: 10px;
}
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 35786b2..f4ce07a 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -26,39 +26,47 @@
text: '标准代码',
value: 'standardNo',
width: '160',
+ align: 'center',
},
{
text: '标准名称',
value: 'standardName',
width: '90',
+ align: 'center',
},
{
text: '管理状态',
value: 'managerStateName',
width: '100',
+ align: 'center',
},
{
text: '标准所在部门',
value: 'standardLaboratoryName',
width: '120',
+ align: 'center',
},
{
text: '负责人',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '建标项目',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '筹建日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
{
text: '有效日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
])
const total = ref(0)
@@ -344,17 +352,17 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '编辑')"
+ @click="handleClick(row.$index, row, '详情')"
>
- 编辑
+ 详情
- 详情
+ 提醒
-// 逻辑代码
+
-
- 更换申请
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/all.vue b/src/views/device/standardEquipment/components/changeApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/approvalPending.vue b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/canceled.vue b/src/views/device/standardEquipment/components/changeApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/draftBox.vue b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPage.vue b/src/views/device/standardEquipment/components/changeApply/listPage.vue
new file mode 100644
index 0000000..bcf35ee
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPage.vue
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
new file mode 100644
index 0000000..71e68f7
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
@@ -0,0 +1,693 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/notPass.vue b/src/views/device/standardEquipment/components/changeApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/passed.vue b/src/views/device/standardEquipment/components/changeApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/addRow.vue b/src/views/device/standardEquipment/components/standardList/addRow.vue
new file mode 100644
index 0000000..9f2bf81
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/addRow.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
new file mode 100644
index 0000000..c47ad1d
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -0,0 +1,675 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/temptable.vue b/src/views/device/standardEquipment/components/standardList/temptable.vue
new file mode 100644
index 0000000..59120b8
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/temptable.vue
@@ -0,0 +1,388 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (searchQuery.offset - 1) * searchQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index ea13629..348bb41 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -3,6 +3,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus'
import type { IOptions } from '../standard_interface'
+import baseInfo from './standardList/baseInfo.vue'
+import table from './standardList/temptable.vue'
import { getStaffList } from '@/api/measure/person'
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
@@ -17,188 +19,35 @@
default: '',
},
})
-const emit = defineEmits(['close']) // 关闭
-const ruleFormRef = ref()
-// 逻辑代码
-const formInline = ref({
- assessDate: '',
- assessmentUnit: '',
- category: null,
- categoryName: '',
- constructionStandardProject: '',
- constructionStandardUnitName: '',
- contactInfo: '',
- createTime: null,
- createUser: null,
- id: '',
- isDel: null,
- laboratoryOwner: null,
- laboratoryOwnerContact: null,
- laboratoryOwnerName: null,
- managerState: null,
- managerStateName: '',
- measureMajor: null,
- fileList: [],
- measureMajorName: '',
- mesureRange: '',
- organizeNo: '',
- preparationDate: '',
- projectNo: '',
- remark: '',
- standardHumidity: null,
- standardLaboratory: null,
- standardLaboratoryName: '',
- standardLevel: null,
- standardLevelName: '',
- standardName: '',
- standardNo: '',
- standardOwner: null,
- standardOwnerName: '',
- standardTemperature: null,
- totalInvestment: null,
- transmitRange: null,
- 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
- }
- })
+const emit = defineEmits(['close'])
+// 定义数据
+const formInline = ref({})
+// 关闭
+interface menuType {
+ name: string
+ comp: any
}
-getSelectList('measureMajor') // 获取计量专业下拉框
-getSelectList('standardManagerState') // 获取管理状态下拉框
-getSelectList('standardLevel') // 获取标准等级下拉框
-getSelectList('transmitRange') // 获取传递范围下拉框
-getSelectList('standardCategory') // 获取类别下拉框
-// 获取部门信息
-getUsersDept({
- createTime: '',
- director: '',
- meterMajor: '',
- organizeName: '',
- organizeNo: '',
- organizeType: '2',
- pdeptId: null,
- offset: 1,
- limit: 999999,
-}).then((res) => {
- standardUsersDeptList.value = res.data.rows
+const menu = shallowRef([
+ { name: '基本信息', comp: baseInfo },
+ { name: '计量人员', comp: table },
+ { name: '标准配套设备', comp: table },
+ { name: '检定规程', comp: table },
+ { name: '重复性考核记录', comp: table },
+ { name: '稳定性考核记录', comp: table },
+ { name: '证书管理', comp: table },
+])
+const currentCompRef = ref()
+const current = ref('基本信息')
+const currentComp = shallowRef(baseInfo)
+watch(current, (newValue) => {
+ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 获取到标准负责人数组
-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 uploadQuarterlyEvaluateFile = (file: File) => {
- const fd = new FormData()
- fd.append('multipartFile', file.file)
- UploadFile(fd).then((res) => {
- if (res.code === 200) {
- formInline.value.fileList = res.data
- // 重置当前验证
- ElMessage.success('文件上传成功')
- }
- })
-}
-const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
- ElMessage.warning('只能上传一个文件')
-}
-// 移除时触发
-const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
- return ElMessageBox.confirm(
- `确认移除${uploadFile.name}文件吗 ?`,
- ).then(
- () => true,
- () => false,
-
- )
-}
-// 点击文件预览
-const uploadShow = (e: any) => {
- const URL = window.URL || window.webkitURL
- window.open(URL.createObjectURL(e.raw))
-}
-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,
- // '
',
- // )
- // }
+const setData = (newValue: object) => {
+ formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
@@ -223,60 +72,29 @@
}
}
// 提交
-const submitForm = (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
+const submitForm = () => {
if (props.buttonType === '详情') { return submitFormDetail() }
- formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- props.buttonType === ''
- ? getStandardListAdd(formInline.value).then((res) => {
- if (res.code === 200) {
- close()
- }
- })
- : submitFormDetail()
- })
- }
- })
-}
-// 标准实验室发生改变row类型
-interface rowReturn {
- phone: string
- director: string
-}
-// 标准实验室发生改变
-const changeDeptList = (row: object) => {
- formInline.value.laboratoryOwnerContact = row.phone
- formInline.value.laboratoryOwner = row.director
-}
-// 标准实验室清空时
-const clearDeptList = () => {
- formInline.value.laboratoryOwnerContact = null
- formInline.value.laboratoryOwner = null
-}
-// 获取详情信息
-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()
- }
+ ElMessageBox.confirm(
+ '确认提交吗?',
+ '提示',
+ {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning',
+ },
+ ).then(() => {
+ current.value = '基本信息'
+ currentCompRef.value.submitForm().validate().then(() => {
+ props.buttonType === ''
+ ? getStandardListAdd(formInline.value).then((res) => {
+ if (res.code === 200) {
+ close()
+ }
+ })
+ : submitFormDetail()
})
- formInline.value = res.data
})
}
-if (props.buttonType !== '') {
- getInfo()
-}
@@ -289,7 +107,7 @@
{{ buttonType === '详情' ? '打印' : '提交' }}
@@ -298,405 +116,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 上传
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
@@ -719,14 +149,8 @@
}
}
-.info-content {
- margin-top: 10px;
- padding: 30px;
- border-radius: 10px;
+.body {
background-color: #fff;
-}
-
-:deep .el-input .el-input--default .el-input--suffix {
- width: 200px !important;
+ margin-top: 10px;
}
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 35786b2..f4ce07a 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -26,39 +26,47 @@
text: '标准代码',
value: 'standardNo',
width: '160',
+ align: 'center',
},
{
text: '标准名称',
value: 'standardName',
width: '90',
+ align: 'center',
},
{
text: '管理状态',
value: 'managerStateName',
width: '100',
+ align: 'center',
},
{
text: '标准所在部门',
value: 'standardLaboratoryName',
width: '120',
+ align: 'center',
},
{
text: '负责人',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '建标项目',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '筹建日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
{
text: '有效日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
])
const total = ref(0)
@@ -344,17 +352,17 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '编辑')"
+ @click="handleClick(row.$index, row, '详情')"
>
- 编辑
+ 详情
- 详情
+ 提醒
{
+ console.log(e)
+}
@@ -342,7 +355,7 @@
diff --git a/src/components.d.ts b/src/components.d.ts
index 5a09663..2e27c4d 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -13,6 +13,8 @@
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
+ BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default']
+ BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default']
BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default']
Benchcol: typeof import('./components/benchcol/index.vue')['default']
BenchCol: typeof import('./components/benchCol/index.vue')['default']
@@ -20,7 +22,6 @@
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
- Echarts: typeof import('./components/echarts/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default']
@@ -30,13 +31,14 @@
ImagePreview: typeof import('./components/ImagePreview/index.vue')['default']
ImagesUpload: typeof import('./components/ImagesUpload/index.vue')['default']
ImageUpload: typeof import('./components/ImageUpload/index.vue')['default']
+ LineChart: typeof import('./components/Echart/LineChart.vue')['default']
NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default']
NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default']
NormalTable: typeof import('./components/NormalTable/index.vue')['default']
PageHeader: typeof import('./components/PageHeader/index.vue')['default']
PageMain: typeof import('./components/PageMain/index.vue')['default']
PcasCascader: typeof import('./components/PcasCascader/index.vue')['default']
- Pie: typeof import('./components/echarts/pie.vue')['default']
+ PieChart: typeof import('./components/Echart/PieChart.vue')['default']
PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default']
RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
diff --git a/src/views/device/standardEquipment/changeApply.vue b/src/views/device/standardEquipment/changeApply.vue
index 0762330..6be4200 100644
--- a/src/views/device/standardEquipment/changeApply.vue
+++ b/src/views/device/standardEquipment/changeApply.vue
@@ -1,13 +1,65 @@
-
-
- 更换申请
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/all.vue b/src/views/device/standardEquipment/components/changeApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/approvalPending.vue b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/canceled.vue b/src/views/device/standardEquipment/components/changeApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/draftBox.vue b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPage.vue b/src/views/device/standardEquipment/components/changeApply/listPage.vue
new file mode 100644
index 0000000..bcf35ee
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPage.vue
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
new file mode 100644
index 0000000..71e68f7
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
@@ -0,0 +1,693 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/notPass.vue b/src/views/device/standardEquipment/components/changeApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/passed.vue b/src/views/device/standardEquipment/components/changeApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/addRow.vue b/src/views/device/standardEquipment/components/standardList/addRow.vue
new file mode 100644
index 0000000..9f2bf81
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/addRow.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
new file mode 100644
index 0000000..c47ad1d
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -0,0 +1,675 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/temptable.vue b/src/views/device/standardEquipment/components/standardList/temptable.vue
new file mode 100644
index 0000000..59120b8
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/temptable.vue
@@ -0,0 +1,388 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (searchQuery.offset - 1) * searchQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index ea13629..348bb41 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -3,6 +3,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus'
import type { IOptions } from '../standard_interface'
+import baseInfo from './standardList/baseInfo.vue'
+import table from './standardList/temptable.vue'
import { getStaffList } from '@/api/measure/person'
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
@@ -17,188 +19,35 @@
default: '',
},
})
-const emit = defineEmits(['close']) // 关闭
-const ruleFormRef = ref()
-// 逻辑代码
-const formInline = ref({
- assessDate: '',
- assessmentUnit: '',
- category: null,
- categoryName: '',
- constructionStandardProject: '',
- constructionStandardUnitName: '',
- contactInfo: '',
- createTime: null,
- createUser: null,
- id: '',
- isDel: null,
- laboratoryOwner: null,
- laboratoryOwnerContact: null,
- laboratoryOwnerName: null,
- managerState: null,
- managerStateName: '',
- measureMajor: null,
- fileList: [],
- measureMajorName: '',
- mesureRange: '',
- organizeNo: '',
- preparationDate: '',
- projectNo: '',
- remark: '',
- standardHumidity: null,
- standardLaboratory: null,
- standardLaboratoryName: '',
- standardLevel: null,
- standardLevelName: '',
- standardName: '',
- standardNo: '',
- standardOwner: null,
- standardOwnerName: '',
- standardTemperature: null,
- totalInvestment: null,
- transmitRange: null,
- 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
- }
- })
+const emit = defineEmits(['close'])
+// 定义数据
+const formInline = ref({})
+// 关闭
+interface menuType {
+ name: string
+ comp: any
}
-getSelectList('measureMajor') // 获取计量专业下拉框
-getSelectList('standardManagerState') // 获取管理状态下拉框
-getSelectList('standardLevel') // 获取标准等级下拉框
-getSelectList('transmitRange') // 获取传递范围下拉框
-getSelectList('standardCategory') // 获取类别下拉框
-// 获取部门信息
-getUsersDept({
- createTime: '',
- director: '',
- meterMajor: '',
- organizeName: '',
- organizeNo: '',
- organizeType: '2',
- pdeptId: null,
- offset: 1,
- limit: 999999,
-}).then((res) => {
- standardUsersDeptList.value = res.data.rows
+const menu = shallowRef([
+ { name: '基本信息', comp: baseInfo },
+ { name: '计量人员', comp: table },
+ { name: '标准配套设备', comp: table },
+ { name: '检定规程', comp: table },
+ { name: '重复性考核记录', comp: table },
+ { name: '稳定性考核记录', comp: table },
+ { name: '证书管理', comp: table },
+])
+const currentCompRef = ref()
+const current = ref('基本信息')
+const currentComp = shallowRef(baseInfo)
+watch(current, (newValue) => {
+ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 获取到标准负责人数组
-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 uploadQuarterlyEvaluateFile = (file: File) => {
- const fd = new FormData()
- fd.append('multipartFile', file.file)
- UploadFile(fd).then((res) => {
- if (res.code === 200) {
- formInline.value.fileList = res.data
- // 重置当前验证
- ElMessage.success('文件上传成功')
- }
- })
-}
-const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
- ElMessage.warning('只能上传一个文件')
-}
-// 移除时触发
-const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
- return ElMessageBox.confirm(
- `确认移除${uploadFile.name}文件吗 ?`,
- ).then(
- () => true,
- () => false,
-
- )
-}
-// 点击文件预览
-const uploadShow = (e: any) => {
- const URL = window.URL || window.webkitURL
- window.open(URL.createObjectURL(e.raw))
-}
-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,
- // '
',
- // )
- // }
+const setData = (newValue: object) => {
+ formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
@@ -223,60 +72,29 @@
}
}
// 提交
-const submitForm = (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
+const submitForm = () => {
if (props.buttonType === '详情') { return submitFormDetail() }
- formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- props.buttonType === ''
- ? getStandardListAdd(formInline.value).then((res) => {
- if (res.code === 200) {
- close()
- }
- })
- : submitFormDetail()
- })
- }
- })
-}
-// 标准实验室发生改变row类型
-interface rowReturn {
- phone: string
- director: string
-}
-// 标准实验室发生改变
-const changeDeptList = (row: object) => {
- formInline.value.laboratoryOwnerContact = row.phone
- formInline.value.laboratoryOwner = row.director
-}
-// 标准实验室清空时
-const clearDeptList = () => {
- formInline.value.laboratoryOwnerContact = null
- formInline.value.laboratoryOwner = null
-}
-// 获取详情信息
-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()
- }
+ ElMessageBox.confirm(
+ '确认提交吗?',
+ '提示',
+ {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning',
+ },
+ ).then(() => {
+ current.value = '基本信息'
+ currentCompRef.value.submitForm().validate().then(() => {
+ props.buttonType === ''
+ ? getStandardListAdd(formInline.value).then((res) => {
+ if (res.code === 200) {
+ close()
+ }
+ })
+ : submitFormDetail()
})
- formInline.value = res.data
})
}
-if (props.buttonType !== '') {
- getInfo()
-}
@@ -289,7 +107,7 @@
{{ buttonType === '详情' ? '打印' : '提交' }}
@@ -298,405 +116,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 上传
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
@@ -719,14 +149,8 @@
}
}
-.info-content {
- margin-top: 10px;
- padding: 30px;
- border-radius: 10px;
+.body {
background-color: #fff;
-}
-
-:deep .el-input .el-input--default .el-input--suffix {
- width: 200px !important;
+ margin-top: 10px;
}
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 35786b2..f4ce07a 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -26,39 +26,47 @@
text: '标准代码',
value: 'standardNo',
width: '160',
+ align: 'center',
},
{
text: '标准名称',
value: 'standardName',
width: '90',
+ align: 'center',
},
{
text: '管理状态',
value: 'managerStateName',
width: '100',
+ align: 'center',
},
{
text: '标准所在部门',
value: 'standardLaboratoryName',
width: '120',
+ align: 'center',
},
{
text: '负责人',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '建标项目',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '筹建日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
{
text: '有效日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
])
const total = ref(0)
@@ -344,17 +352,17 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '编辑')"
+ @click="handleClick(row.$index, row, '详情')"
>
- 编辑
+ 详情
- 详情
+ 提醒
{
+ console.log(e)
+}
@@ -342,7 +355,7 @@
diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue
index cb2ebe6..380779a 100644
--- a/src/views/measure/bench/bench.vue
+++ b/src/views/measure/bench/bench.vue
@@ -175,7 +175,7 @@
v-if="proxy.hasPerm('/workbench/meterTrain/line')"
title="培训计划"
width="27.8vw"
- height="40vh"
+ height="40.7vh"
>
-// 逻辑代码
+
-
- 更换申请
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/all.vue b/src/views/device/standardEquipment/components/changeApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/approvalPending.vue b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/canceled.vue b/src/views/device/standardEquipment/components/changeApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/draftBox.vue b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPage.vue b/src/views/device/standardEquipment/components/changeApply/listPage.vue
new file mode 100644
index 0000000..bcf35ee
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPage.vue
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
new file mode 100644
index 0000000..71e68f7
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
@@ -0,0 +1,693 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/notPass.vue b/src/views/device/standardEquipment/components/changeApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/passed.vue b/src/views/device/standardEquipment/components/changeApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/addRow.vue b/src/views/device/standardEquipment/components/standardList/addRow.vue
new file mode 100644
index 0000000..9f2bf81
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/addRow.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
new file mode 100644
index 0000000..c47ad1d
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -0,0 +1,675 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/temptable.vue b/src/views/device/standardEquipment/components/standardList/temptable.vue
new file mode 100644
index 0000000..59120b8
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/temptable.vue
@@ -0,0 +1,388 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (searchQuery.offset - 1) * searchQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index ea13629..348bb41 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -3,6 +3,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus'
import type { IOptions } from '../standard_interface'
+import baseInfo from './standardList/baseInfo.vue'
+import table from './standardList/temptable.vue'
import { getStaffList } from '@/api/measure/person'
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
@@ -17,188 +19,35 @@
default: '',
},
})
-const emit = defineEmits(['close']) // 关闭
-const ruleFormRef = ref()
-// 逻辑代码
-const formInline = ref({
- assessDate: '',
- assessmentUnit: '',
- category: null,
- categoryName: '',
- constructionStandardProject: '',
- constructionStandardUnitName: '',
- contactInfo: '',
- createTime: null,
- createUser: null,
- id: '',
- isDel: null,
- laboratoryOwner: null,
- laboratoryOwnerContact: null,
- laboratoryOwnerName: null,
- managerState: null,
- managerStateName: '',
- measureMajor: null,
- fileList: [],
- measureMajorName: '',
- mesureRange: '',
- organizeNo: '',
- preparationDate: '',
- projectNo: '',
- remark: '',
- standardHumidity: null,
- standardLaboratory: null,
- standardLaboratoryName: '',
- standardLevel: null,
- standardLevelName: '',
- standardName: '',
- standardNo: '',
- standardOwner: null,
- standardOwnerName: '',
- standardTemperature: null,
- totalInvestment: null,
- transmitRange: null,
- 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
- }
- })
+const emit = defineEmits(['close'])
+// 定义数据
+const formInline = ref({})
+// 关闭
+interface menuType {
+ name: string
+ comp: any
}
-getSelectList('measureMajor') // 获取计量专业下拉框
-getSelectList('standardManagerState') // 获取管理状态下拉框
-getSelectList('standardLevel') // 获取标准等级下拉框
-getSelectList('transmitRange') // 获取传递范围下拉框
-getSelectList('standardCategory') // 获取类别下拉框
-// 获取部门信息
-getUsersDept({
- createTime: '',
- director: '',
- meterMajor: '',
- organizeName: '',
- organizeNo: '',
- organizeType: '2',
- pdeptId: null,
- offset: 1,
- limit: 999999,
-}).then((res) => {
- standardUsersDeptList.value = res.data.rows
+const menu = shallowRef([
+ { name: '基本信息', comp: baseInfo },
+ { name: '计量人员', comp: table },
+ { name: '标准配套设备', comp: table },
+ { name: '检定规程', comp: table },
+ { name: '重复性考核记录', comp: table },
+ { name: '稳定性考核记录', comp: table },
+ { name: '证书管理', comp: table },
+])
+const currentCompRef = ref()
+const current = ref('基本信息')
+const currentComp = shallowRef(baseInfo)
+watch(current, (newValue) => {
+ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 获取到标准负责人数组
-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 uploadQuarterlyEvaluateFile = (file: File) => {
- const fd = new FormData()
- fd.append('multipartFile', file.file)
- UploadFile(fd).then((res) => {
- if (res.code === 200) {
- formInline.value.fileList = res.data
- // 重置当前验证
- ElMessage.success('文件上传成功')
- }
- })
-}
-const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
- ElMessage.warning('只能上传一个文件')
-}
-// 移除时触发
-const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
- return ElMessageBox.confirm(
- `确认移除${uploadFile.name}文件吗 ?`,
- ).then(
- () => true,
- () => false,
-
- )
-}
-// 点击文件预览
-const uploadShow = (e: any) => {
- const URL = window.URL || window.webkitURL
- window.open(URL.createObjectURL(e.raw))
-}
-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,
- // '
',
- // )
- // }
+const setData = (newValue: object) => {
+ formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
@@ -223,60 +72,29 @@
}
}
// 提交
-const submitForm = (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
+const submitForm = () => {
if (props.buttonType === '详情') { return submitFormDetail() }
- formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- props.buttonType === ''
- ? getStandardListAdd(formInline.value).then((res) => {
- if (res.code === 200) {
- close()
- }
- })
- : submitFormDetail()
- })
- }
- })
-}
-// 标准实验室发生改变row类型
-interface rowReturn {
- phone: string
- director: string
-}
-// 标准实验室发生改变
-const changeDeptList = (row: object) => {
- formInline.value.laboratoryOwnerContact = row.phone
- formInline.value.laboratoryOwner = row.director
-}
-// 标准实验室清空时
-const clearDeptList = () => {
- formInline.value.laboratoryOwnerContact = null
- formInline.value.laboratoryOwner = null
-}
-// 获取详情信息
-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()
- }
+ ElMessageBox.confirm(
+ '确认提交吗?',
+ '提示',
+ {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning',
+ },
+ ).then(() => {
+ current.value = '基本信息'
+ currentCompRef.value.submitForm().validate().then(() => {
+ props.buttonType === ''
+ ? getStandardListAdd(formInline.value).then((res) => {
+ if (res.code === 200) {
+ close()
+ }
+ })
+ : submitFormDetail()
})
- formInline.value = res.data
})
}
-if (props.buttonType !== '') {
- getInfo()
-}
@@ -289,7 +107,7 @@
{{ buttonType === '详情' ? '打印' : '提交' }}
@@ -298,405 +116,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 上传
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
@@ -719,14 +149,8 @@
}
}
-.info-content {
- margin-top: 10px;
- padding: 30px;
- border-radius: 10px;
+.body {
background-color: #fff;
-}
-
-:deep .el-input .el-input--default .el-input--suffix {
- width: 200px !important;
+ margin-top: 10px;
}
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 35786b2..f4ce07a 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -26,39 +26,47 @@
text: '标准代码',
value: 'standardNo',
width: '160',
+ align: 'center',
},
{
text: '标准名称',
value: 'standardName',
width: '90',
+ align: 'center',
},
{
text: '管理状态',
value: 'managerStateName',
width: '100',
+ align: 'center',
},
{
text: '标准所在部门',
value: 'standardLaboratoryName',
width: '120',
+ align: 'center',
},
{
text: '负责人',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '建标项目',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '筹建日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
{
text: '有效日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
])
const total = ref(0)
@@ -344,17 +352,17 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '编辑')"
+ @click="handleClick(row.$index, row, '详情')"
>
- 编辑
+ 详情
- 详情
+ 提醒
{
+ console.log(e)
+}
@@ -342,7 +355,7 @@
diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue
index cb2ebe6..380779a 100644
--- a/src/views/measure/bench/bench.vue
+++ b/src/views/measure/bench/bench.vue
@@ -175,7 +175,7 @@
v-if="proxy.hasPerm('/workbench/meterTrain/line')"
title="培训计划"
width="27.8vw"
- height="40vh"
+ height="40.7vh"
>
-// 逻辑代码
+
-
- 更换申请
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/all.vue b/src/views/device/standardEquipment/components/changeApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/approvalPending.vue b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/canceled.vue b/src/views/device/standardEquipment/components/changeApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/draftBox.vue b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPage.vue b/src/views/device/standardEquipment/components/changeApply/listPage.vue
new file mode 100644
index 0000000..bcf35ee
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPage.vue
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
new file mode 100644
index 0000000..71e68f7
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
@@ -0,0 +1,693 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/notPass.vue b/src/views/device/standardEquipment/components/changeApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/passed.vue b/src/views/device/standardEquipment/components/changeApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/addRow.vue b/src/views/device/standardEquipment/components/standardList/addRow.vue
new file mode 100644
index 0000000..9f2bf81
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/addRow.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
new file mode 100644
index 0000000..c47ad1d
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -0,0 +1,675 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/temptable.vue b/src/views/device/standardEquipment/components/standardList/temptable.vue
new file mode 100644
index 0000000..59120b8
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/temptable.vue
@@ -0,0 +1,388 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (searchQuery.offset - 1) * searchQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index ea13629..348bb41 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -3,6 +3,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus'
import type { IOptions } from '../standard_interface'
+import baseInfo from './standardList/baseInfo.vue'
+import table from './standardList/temptable.vue'
import { getStaffList } from '@/api/measure/person'
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
@@ -17,188 +19,35 @@
default: '',
},
})
-const emit = defineEmits(['close']) // 关闭
-const ruleFormRef = ref()
-// 逻辑代码
-const formInline = ref({
- assessDate: '',
- assessmentUnit: '',
- category: null,
- categoryName: '',
- constructionStandardProject: '',
- constructionStandardUnitName: '',
- contactInfo: '',
- createTime: null,
- createUser: null,
- id: '',
- isDel: null,
- laboratoryOwner: null,
- laboratoryOwnerContact: null,
- laboratoryOwnerName: null,
- managerState: null,
- managerStateName: '',
- measureMajor: null,
- fileList: [],
- measureMajorName: '',
- mesureRange: '',
- organizeNo: '',
- preparationDate: '',
- projectNo: '',
- remark: '',
- standardHumidity: null,
- standardLaboratory: null,
- standardLaboratoryName: '',
- standardLevel: null,
- standardLevelName: '',
- standardName: '',
- standardNo: '',
- standardOwner: null,
- standardOwnerName: '',
- standardTemperature: null,
- totalInvestment: null,
- transmitRange: null,
- 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
- }
- })
+const emit = defineEmits(['close'])
+// 定义数据
+const formInline = ref({})
+// 关闭
+interface menuType {
+ name: string
+ comp: any
}
-getSelectList('measureMajor') // 获取计量专业下拉框
-getSelectList('standardManagerState') // 获取管理状态下拉框
-getSelectList('standardLevel') // 获取标准等级下拉框
-getSelectList('transmitRange') // 获取传递范围下拉框
-getSelectList('standardCategory') // 获取类别下拉框
-// 获取部门信息
-getUsersDept({
- createTime: '',
- director: '',
- meterMajor: '',
- organizeName: '',
- organizeNo: '',
- organizeType: '2',
- pdeptId: null,
- offset: 1,
- limit: 999999,
-}).then((res) => {
- standardUsersDeptList.value = res.data.rows
+const menu = shallowRef([
+ { name: '基本信息', comp: baseInfo },
+ { name: '计量人员', comp: table },
+ { name: '标准配套设备', comp: table },
+ { name: '检定规程', comp: table },
+ { name: '重复性考核记录', comp: table },
+ { name: '稳定性考核记录', comp: table },
+ { name: '证书管理', comp: table },
+])
+const currentCompRef = ref()
+const current = ref('基本信息')
+const currentComp = shallowRef(baseInfo)
+watch(current, (newValue) => {
+ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 获取到标准负责人数组
-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 uploadQuarterlyEvaluateFile = (file: File) => {
- const fd = new FormData()
- fd.append('multipartFile', file.file)
- UploadFile(fd).then((res) => {
- if (res.code === 200) {
- formInline.value.fileList = res.data
- // 重置当前验证
- ElMessage.success('文件上传成功')
- }
- })
-}
-const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
- ElMessage.warning('只能上传一个文件')
-}
-// 移除时触发
-const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
- return ElMessageBox.confirm(
- `确认移除${uploadFile.name}文件吗 ?`,
- ).then(
- () => true,
- () => false,
-
- )
-}
-// 点击文件预览
-const uploadShow = (e: any) => {
- const URL = window.URL || window.webkitURL
- window.open(URL.createObjectURL(e.raw))
-}
-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,
- // '
',
- // )
- // }
+const setData = (newValue: object) => {
+ formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
@@ -223,60 +72,29 @@
}
}
// 提交
-const submitForm = (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
+const submitForm = () => {
if (props.buttonType === '详情') { return submitFormDetail() }
- formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- props.buttonType === ''
- ? getStandardListAdd(formInline.value).then((res) => {
- if (res.code === 200) {
- close()
- }
- })
- : submitFormDetail()
- })
- }
- })
-}
-// 标准实验室发生改变row类型
-interface rowReturn {
- phone: string
- director: string
-}
-// 标准实验室发生改变
-const changeDeptList = (row: object) => {
- formInline.value.laboratoryOwnerContact = row.phone
- formInline.value.laboratoryOwner = row.director
-}
-// 标准实验室清空时
-const clearDeptList = () => {
- formInline.value.laboratoryOwnerContact = null
- formInline.value.laboratoryOwner = null
-}
-// 获取详情信息
-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()
- }
+ ElMessageBox.confirm(
+ '确认提交吗?',
+ '提示',
+ {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning',
+ },
+ ).then(() => {
+ current.value = '基本信息'
+ currentCompRef.value.submitForm().validate().then(() => {
+ props.buttonType === ''
+ ? getStandardListAdd(formInline.value).then((res) => {
+ if (res.code === 200) {
+ close()
+ }
+ })
+ : submitFormDetail()
})
- formInline.value = res.data
})
}
-if (props.buttonType !== '') {
- getInfo()
-}
@@ -289,7 +107,7 @@
{{ buttonType === '详情' ? '打印' : '提交' }}
@@ -298,405 +116,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 上传
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
@@ -719,14 +149,8 @@
}
}
-.info-content {
- margin-top: 10px;
- padding: 30px;
- border-radius: 10px;
+.body {
background-color: #fff;
-}
-
-:deep .el-input .el-input--default .el-input--suffix {
- width: 200px !important;
+ margin-top: 10px;
}
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 35786b2..f4ce07a 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -26,39 +26,47 @@
text: '标准代码',
value: 'standardNo',
width: '160',
+ align: 'center',
},
{
text: '标准名称',
value: 'standardName',
width: '90',
+ align: 'center',
},
{
text: '管理状态',
value: 'managerStateName',
width: '100',
+ align: 'center',
},
{
text: '标准所在部门',
value: 'standardLaboratoryName',
width: '120',
+ align: 'center',
},
{
text: '负责人',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '建标项目',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '筹建日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
{
text: '有效日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
])
const total = ref(0)
@@ -344,17 +352,17 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '编辑')"
+ @click="handleClick(row.$index, row, '详情')"
>
- 编辑
+ 详情
- 详情
+ 提醒
{
+ console.log(e)
+}
@@ -342,7 +355,7 @@
diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue
index cb2ebe6..380779a 100644
--- a/src/views/measure/bench/bench.vue
+++ b/src/views/measure/bench/bench.vue
@@ -175,7 +175,7 @@
v-if="proxy.hasPerm('/workbench/meterTrain/line')"
title="培训计划"
width="27.8vw"
- height="40vh"
+ height="40.7vh"
>
{
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
+const disabled = ref(false)
+const setData = (newIsShow) => {
+ if (newIsShow === false) {
+ disabled.value = true
+ }
+ else {
+ disabled.value = false
+ }
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5a09663..2e27c4d 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -13,6 +13,8 @@
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
+ BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default']
+ BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default']
BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default']
Benchcol: typeof import('./components/benchcol/index.vue')['default']
BenchCol: typeof import('./components/benchCol/index.vue')['default']
@@ -20,7 +22,6 @@
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
- Echarts: typeof import('./components/echarts/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default']
@@ -30,13 +31,14 @@
ImagePreview: typeof import('./components/ImagePreview/index.vue')['default']
ImagesUpload: typeof import('./components/ImagesUpload/index.vue')['default']
ImageUpload: typeof import('./components/ImageUpload/index.vue')['default']
+ LineChart: typeof import('./components/Echart/LineChart.vue')['default']
NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default']
NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default']
NormalTable: typeof import('./components/NormalTable/index.vue')['default']
PageHeader: typeof import('./components/PageHeader/index.vue')['default']
PageMain: typeof import('./components/PageMain/index.vue')['default']
PcasCascader: typeof import('./components/PcasCascader/index.vue')['default']
- Pie: typeof import('./components/echarts/pie.vue')['default']
+ PieChart: typeof import('./components/Echart/PieChart.vue')['default']
PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default']
RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
diff --git a/src/views/device/standardEquipment/changeApply.vue b/src/views/device/standardEquipment/changeApply.vue
index 0762330..6be4200 100644
--- a/src/views/device/standardEquipment/changeApply.vue
+++ b/src/views/device/standardEquipment/changeApply.vue
@@ -1,13 +1,65 @@
-
-
- 更换申请
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/all.vue b/src/views/device/standardEquipment/components/changeApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/approvalPending.vue b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/canceled.vue b/src/views/device/standardEquipment/components/changeApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/draftBox.vue b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPage.vue b/src/views/device/standardEquipment/components/changeApply/listPage.vue
new file mode 100644
index 0000000..bcf35ee
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPage.vue
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
new file mode 100644
index 0000000..71e68f7
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
@@ -0,0 +1,693 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/notPass.vue b/src/views/device/standardEquipment/components/changeApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/passed.vue b/src/views/device/standardEquipment/components/changeApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/addRow.vue b/src/views/device/standardEquipment/components/standardList/addRow.vue
new file mode 100644
index 0000000..9f2bf81
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/addRow.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
new file mode 100644
index 0000000..c47ad1d
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -0,0 +1,675 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/temptable.vue b/src/views/device/standardEquipment/components/standardList/temptable.vue
new file mode 100644
index 0000000..59120b8
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/temptable.vue
@@ -0,0 +1,388 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (searchQuery.offset - 1) * searchQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index ea13629..348bb41 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -3,6 +3,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus'
import type { IOptions } from '../standard_interface'
+import baseInfo from './standardList/baseInfo.vue'
+import table from './standardList/temptable.vue'
import { getStaffList } from '@/api/measure/person'
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
@@ -17,188 +19,35 @@
default: '',
},
})
-const emit = defineEmits(['close']) // 关闭
-const ruleFormRef = ref()
-// 逻辑代码
-const formInline = ref({
- assessDate: '',
- assessmentUnit: '',
- category: null,
- categoryName: '',
- constructionStandardProject: '',
- constructionStandardUnitName: '',
- contactInfo: '',
- createTime: null,
- createUser: null,
- id: '',
- isDel: null,
- laboratoryOwner: null,
- laboratoryOwnerContact: null,
- laboratoryOwnerName: null,
- managerState: null,
- managerStateName: '',
- measureMajor: null,
- fileList: [],
- measureMajorName: '',
- mesureRange: '',
- organizeNo: '',
- preparationDate: '',
- projectNo: '',
- remark: '',
- standardHumidity: null,
- standardLaboratory: null,
- standardLaboratoryName: '',
- standardLevel: null,
- standardLevelName: '',
- standardName: '',
- standardNo: '',
- standardOwner: null,
- standardOwnerName: '',
- standardTemperature: null,
- totalInvestment: null,
- transmitRange: null,
- 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
- }
- })
+const emit = defineEmits(['close'])
+// 定义数据
+const formInline = ref({})
+// 关闭
+interface menuType {
+ name: string
+ comp: any
}
-getSelectList('measureMajor') // 获取计量专业下拉框
-getSelectList('standardManagerState') // 获取管理状态下拉框
-getSelectList('standardLevel') // 获取标准等级下拉框
-getSelectList('transmitRange') // 获取传递范围下拉框
-getSelectList('standardCategory') // 获取类别下拉框
-// 获取部门信息
-getUsersDept({
- createTime: '',
- director: '',
- meterMajor: '',
- organizeName: '',
- organizeNo: '',
- organizeType: '2',
- pdeptId: null,
- offset: 1,
- limit: 999999,
-}).then((res) => {
- standardUsersDeptList.value = res.data.rows
+const menu = shallowRef([
+ { name: '基本信息', comp: baseInfo },
+ { name: '计量人员', comp: table },
+ { name: '标准配套设备', comp: table },
+ { name: '检定规程', comp: table },
+ { name: '重复性考核记录', comp: table },
+ { name: '稳定性考核记录', comp: table },
+ { name: '证书管理', comp: table },
+])
+const currentCompRef = ref()
+const current = ref('基本信息')
+const currentComp = shallowRef(baseInfo)
+watch(current, (newValue) => {
+ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 获取到标准负责人数组
-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 uploadQuarterlyEvaluateFile = (file: File) => {
- const fd = new FormData()
- fd.append('multipartFile', file.file)
- UploadFile(fd).then((res) => {
- if (res.code === 200) {
- formInline.value.fileList = res.data
- // 重置当前验证
- ElMessage.success('文件上传成功')
- }
- })
-}
-const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
- ElMessage.warning('只能上传一个文件')
-}
-// 移除时触发
-const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
- return ElMessageBox.confirm(
- `确认移除${uploadFile.name}文件吗 ?`,
- ).then(
- () => true,
- () => false,
-
- )
-}
-// 点击文件预览
-const uploadShow = (e: any) => {
- const URL = window.URL || window.webkitURL
- window.open(URL.createObjectURL(e.raw))
-}
-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,
- // '
',
- // )
- // }
+const setData = (newValue: object) => {
+ formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
@@ -223,60 +72,29 @@
}
}
// 提交
-const submitForm = (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
+const submitForm = () => {
if (props.buttonType === '详情') { return submitFormDetail() }
- formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- props.buttonType === ''
- ? getStandardListAdd(formInline.value).then((res) => {
- if (res.code === 200) {
- close()
- }
- })
- : submitFormDetail()
- })
- }
- })
-}
-// 标准实验室发生改变row类型
-interface rowReturn {
- phone: string
- director: string
-}
-// 标准实验室发生改变
-const changeDeptList = (row: object) => {
- formInline.value.laboratoryOwnerContact = row.phone
- formInline.value.laboratoryOwner = row.director
-}
-// 标准实验室清空时
-const clearDeptList = () => {
- formInline.value.laboratoryOwnerContact = null
- formInline.value.laboratoryOwner = null
-}
-// 获取详情信息
-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()
- }
+ ElMessageBox.confirm(
+ '确认提交吗?',
+ '提示',
+ {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning',
+ },
+ ).then(() => {
+ current.value = '基本信息'
+ currentCompRef.value.submitForm().validate().then(() => {
+ props.buttonType === ''
+ ? getStandardListAdd(formInline.value).then((res) => {
+ if (res.code === 200) {
+ close()
+ }
+ })
+ : submitFormDetail()
})
- formInline.value = res.data
})
}
-if (props.buttonType !== '') {
- getInfo()
-}
@@ -289,7 +107,7 @@
{{ buttonType === '详情' ? '打印' : '提交' }}
@@ -298,405 +116,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 上传
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
@@ -719,14 +149,8 @@
}
}
-.info-content {
- margin-top: 10px;
- padding: 30px;
- border-radius: 10px;
+.body {
background-color: #fff;
-}
-
-:deep .el-input .el-input--default .el-input--suffix {
- width: 200px !important;
+ margin-top: 10px;
}
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 35786b2..f4ce07a 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -26,39 +26,47 @@
text: '标准代码',
value: 'standardNo',
width: '160',
+ align: 'center',
},
{
text: '标准名称',
value: 'standardName',
width: '90',
+ align: 'center',
},
{
text: '管理状态',
value: 'managerStateName',
width: '100',
+ align: 'center',
},
{
text: '标准所在部门',
value: 'standardLaboratoryName',
width: '120',
+ align: 'center',
},
{
text: '负责人',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '建标项目',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '筹建日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
{
text: '有效日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
])
const total = ref(0)
@@ -344,17 +352,17 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '编辑')"
+ @click="handleClick(row.$index, row, '详情')"
>
- 编辑
+ 详情
- 详情
+ 提醒
{
+ console.log(e)
+}
@@ -342,7 +355,7 @@
diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue
index cb2ebe6..380779a 100644
--- a/src/views/measure/bench/bench.vue
+++ b/src/views/measure/bench/bench.vue
@@ -175,7 +175,7 @@
v-if="proxy.hasPerm('/workbench/meterTrain/line')"
title="培训计划"
width="27.8vw"
- height="40vh"
+ height="40.7vh"
>
{
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
+const disabled = ref(false)
+const setData = (newIsShow) => {
+ if (newIsShow === false) {
+ disabled.value = true
+ }
+ else {
+ disabled.value = false
+ }
+}
diff --git a/src/views/measure/source/components/listPage.vue b/src/views/measure/source/components/listPage.vue
index a9c9509..414fc47 100644
--- a/src/views/measure/source/components/listPage.vue
+++ b/src/views/measure/source/components/listPage.vue
@@ -17,6 +17,7 @@
default: () => [],
},
})
+const emit = defineEmits(['setData']) // 关闭
// 查询条件
const listQuery: Ref = ref({
supplierNo: '', // 业务内容
@@ -28,53 +29,63 @@
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
-const list = ref([])
+const list = ref([
+ { name: '张三' },
+])
// 总数
-const total = ref(20)
+const total = ref(0)
// 表头
const columns = ref([
{
text: '溯源供方编号',
- value: 'supplierNo',
- width: '160',
+ value: 'name',
+ width: '120',
+ align: 'center',
},
{
text: '溯源供方名称',
- value: 'supplierName',
+ value: 'name',
width: '120',
+ align: 'center',
},
{
text: '业务内容',
- value: 'businessContent',
+ value: 'name',
+ align: 'center',
},
{
text: '业务资质',
- value: 'briefName',
+ value: 'name',
+ align: 'center',
},
{
text: '负责人',
- value: 'director',
+ value: 'name',
+ align: 'center',
},
{
text: '联系方式',
- value: 'mobile',
+ value: 'name',
+ align: 'center',
},
{
text: '地址',
- value: 'companyCity',
+ value: 'name',
+ align: 'center',
},
{
text: '创建时间',
- value: 'createTime',
- width: '200',
+ value: 'name',
+ align: 'center',
},
{
text: '备注',
- value: 'remark',
+ value: 'name',
+ align: 'center',
},
])
-const buttonArray = ref([])
+const buttonArray = ref([])
// 选中的内容
const checkoutList = ref([])
// 文件上传input
@@ -98,20 +109,24 @@
loadingTable.value = false
})
}
-fetchData(true)
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
}
+// 点击删除和编辑的参数类型
+interface rowReturn {
+ id: string
+ supplierName: string
+}
// 点击编辑/详情
-const handleEdit = (index: string, row: object, value: string) => {
+const handleEdit = (index: string, row: rowReturn, value: string) => {
buttonArray.value = ['同意', '驳回', '拒绝']
buttonType.value = value
infoId.value = row.id
show.value = false
}
// 点击删除
-const handleDelete = (index: string, row: object) => {
+const handleDelete = (index: string, row: rowReturn) => {
ElMessageBox.confirm(
`确认删除${row.supplierName}吗?`,
'提示',
@@ -153,7 +168,7 @@
// 关闭编辑
const close = () => {
show.value = true
- fetchData(true)
+ // fetchData(true)
}
// 导出
const exportExcelBtn = () => {
@@ -218,30 +233,24 @@
upload()
}
const add = () => {
+ buttonArray.value = ['提交', '保存']
buttonType.value = ''
show.value = false
}
const exportAll = () => {
exportExcelBtn()
}
+watch(() => show.value, (newVal) => {
+// 变化后存储
+ emit('setData', newVal)
+},
+{ deep: true, immediate: true })
// 打印
const printObj = ref({
id: 'print', // 需要打印元素的id
popTitle: '溯源供方编号模板', // 打印配置页上方的标题
extraHead: '', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割
preview: false, // 是否启动预览模式,默认是false
- previewBeforeOpenCallback() { console.log('正在加载预览窗口!') }, // 预览窗口打开之前的callback
- previewOpenCallback() { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback
- beforeOpenCallback() { console.log('开始打印之前!') }, // 开始打印之前的callback
- openCallback() { console.log('执行打印了!') }, // 调用打印时的callback
- closeCallback() { console.log('关闭了打印工具!') }, // 关闭打印的callback(无法区分确认or取消)
- clickMounted() { console.log('点击v-print绑定的按钮了!') },
- // url: 'http://localhost:8080/', // 打印指定的URL,确保同源策略相同
- // asyncUrl (reslove) {
- // setTimeout(() => {
- // reslove('http://localhost:8080/')
- // }, 2000)
- // },
standard: '',
extarCss: '',
})
@@ -304,8 +313,8 @@
-// 逻辑代码
+
-
- 更换申请
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/all.vue b/src/views/device/standardEquipment/components/changeApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/approvalPending.vue b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/canceled.vue b/src/views/device/standardEquipment/components/changeApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/draftBox.vue b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPage.vue b/src/views/device/standardEquipment/components/changeApply/listPage.vue
new file mode 100644
index 0000000..bcf35ee
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPage.vue
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
new file mode 100644
index 0000000..71e68f7
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
@@ -0,0 +1,693 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/notPass.vue b/src/views/device/standardEquipment/components/changeApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/passed.vue b/src/views/device/standardEquipment/components/changeApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/addRow.vue b/src/views/device/standardEquipment/components/standardList/addRow.vue
new file mode 100644
index 0000000..9f2bf81
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/addRow.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
new file mode 100644
index 0000000..c47ad1d
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -0,0 +1,675 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/temptable.vue b/src/views/device/standardEquipment/components/standardList/temptable.vue
new file mode 100644
index 0000000..59120b8
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/temptable.vue
@@ -0,0 +1,388 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (searchQuery.offset - 1) * searchQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index ea13629..348bb41 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -3,6 +3,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus'
import type { IOptions } from '../standard_interface'
+import baseInfo from './standardList/baseInfo.vue'
+import table from './standardList/temptable.vue'
import { getStaffList } from '@/api/measure/person'
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
@@ -17,188 +19,35 @@
default: '',
},
})
-const emit = defineEmits(['close']) // 关闭
-const ruleFormRef = ref()
-// 逻辑代码
-const formInline = ref({
- assessDate: '',
- assessmentUnit: '',
- category: null,
- categoryName: '',
- constructionStandardProject: '',
- constructionStandardUnitName: '',
- contactInfo: '',
- createTime: null,
- createUser: null,
- id: '',
- isDel: null,
- laboratoryOwner: null,
- laboratoryOwnerContact: null,
- laboratoryOwnerName: null,
- managerState: null,
- managerStateName: '',
- measureMajor: null,
- fileList: [],
- measureMajorName: '',
- mesureRange: '',
- organizeNo: '',
- preparationDate: '',
- projectNo: '',
- remark: '',
- standardHumidity: null,
- standardLaboratory: null,
- standardLaboratoryName: '',
- standardLevel: null,
- standardLevelName: '',
- standardName: '',
- standardNo: '',
- standardOwner: null,
- standardOwnerName: '',
- standardTemperature: null,
- totalInvestment: null,
- transmitRange: null,
- 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
- }
- })
+const emit = defineEmits(['close'])
+// 定义数据
+const formInline = ref({})
+// 关闭
+interface menuType {
+ name: string
+ comp: any
}
-getSelectList('measureMajor') // 获取计量专业下拉框
-getSelectList('standardManagerState') // 获取管理状态下拉框
-getSelectList('standardLevel') // 获取标准等级下拉框
-getSelectList('transmitRange') // 获取传递范围下拉框
-getSelectList('standardCategory') // 获取类别下拉框
-// 获取部门信息
-getUsersDept({
- createTime: '',
- director: '',
- meterMajor: '',
- organizeName: '',
- organizeNo: '',
- organizeType: '2',
- pdeptId: null,
- offset: 1,
- limit: 999999,
-}).then((res) => {
- standardUsersDeptList.value = res.data.rows
+const menu = shallowRef([
+ { name: '基本信息', comp: baseInfo },
+ { name: '计量人员', comp: table },
+ { name: '标准配套设备', comp: table },
+ { name: '检定规程', comp: table },
+ { name: '重复性考核记录', comp: table },
+ { name: '稳定性考核记录', comp: table },
+ { name: '证书管理', comp: table },
+])
+const currentCompRef = ref()
+const current = ref('基本信息')
+const currentComp = shallowRef(baseInfo)
+watch(current, (newValue) => {
+ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 获取到标准负责人数组
-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 uploadQuarterlyEvaluateFile = (file: File) => {
- const fd = new FormData()
- fd.append('multipartFile', file.file)
- UploadFile(fd).then((res) => {
- if (res.code === 200) {
- formInline.value.fileList = res.data
- // 重置当前验证
- ElMessage.success('文件上传成功')
- }
- })
-}
-const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
- ElMessage.warning('只能上传一个文件')
-}
-// 移除时触发
-const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
- return ElMessageBox.confirm(
- `确认移除${uploadFile.name}文件吗 ?`,
- ).then(
- () => true,
- () => false,
-
- )
-}
-// 点击文件预览
-const uploadShow = (e: any) => {
- const URL = window.URL || window.webkitURL
- window.open(URL.createObjectURL(e.raw))
-}
-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,
- // '
',
- // )
- // }
+const setData = (newValue: object) => {
+ formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
@@ -223,60 +72,29 @@
}
}
// 提交
-const submitForm = (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
+const submitForm = () => {
if (props.buttonType === '详情') { return submitFormDetail() }
- formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- props.buttonType === ''
- ? getStandardListAdd(formInline.value).then((res) => {
- if (res.code === 200) {
- close()
- }
- })
- : submitFormDetail()
- })
- }
- })
-}
-// 标准实验室发生改变row类型
-interface rowReturn {
- phone: string
- director: string
-}
-// 标准实验室发生改变
-const changeDeptList = (row: object) => {
- formInline.value.laboratoryOwnerContact = row.phone
- formInline.value.laboratoryOwner = row.director
-}
-// 标准实验室清空时
-const clearDeptList = () => {
- formInline.value.laboratoryOwnerContact = null
- formInline.value.laboratoryOwner = null
-}
-// 获取详情信息
-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()
- }
+ ElMessageBox.confirm(
+ '确认提交吗?',
+ '提示',
+ {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning',
+ },
+ ).then(() => {
+ current.value = '基本信息'
+ currentCompRef.value.submitForm().validate().then(() => {
+ props.buttonType === ''
+ ? getStandardListAdd(formInline.value).then((res) => {
+ if (res.code === 200) {
+ close()
+ }
+ })
+ : submitFormDetail()
})
- formInline.value = res.data
})
}
-if (props.buttonType !== '') {
- getInfo()
-}
@@ -289,7 +107,7 @@
{{ buttonType === '详情' ? '打印' : '提交' }}
@@ -298,405 +116,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 上传
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
@@ -719,14 +149,8 @@
}
}
-.info-content {
- margin-top: 10px;
- padding: 30px;
- border-radius: 10px;
+.body {
background-color: #fff;
-}
-
-:deep .el-input .el-input--default .el-input--suffix {
- width: 200px !important;
+ margin-top: 10px;
}
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 35786b2..f4ce07a 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -26,39 +26,47 @@
text: '标准代码',
value: 'standardNo',
width: '160',
+ align: 'center',
},
{
text: '标准名称',
value: 'standardName',
width: '90',
+ align: 'center',
},
{
text: '管理状态',
value: 'managerStateName',
width: '100',
+ align: 'center',
},
{
text: '标准所在部门',
value: 'standardLaboratoryName',
width: '120',
+ align: 'center',
},
{
text: '负责人',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '建标项目',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '筹建日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
{
text: '有效日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
])
const total = ref(0)
@@ -344,17 +352,17 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '编辑')"
+ @click="handleClick(row.$index, row, '详情')"
>
- 编辑
+ 详情
- 详情
+ 提醒
{
+ console.log(e)
+}
@@ -342,7 +355,7 @@
diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue
index cb2ebe6..380779a 100644
--- a/src/views/measure/bench/bench.vue
+++ b/src/views/measure/bench/bench.vue
@@ -175,7 +175,7 @@
v-if="proxy.hasPerm('/workbench/meterTrain/line')"
title="培训计划"
width="27.8vw"
- height="40vh"
+ height="40.7vh"
>
{
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
+const disabled = ref(false)
+const setData = (newIsShow) => {
+ if (newIsShow === false) {
+ disabled.value = true
+ }
+ else {
+ disabled.value = false
+ }
+}
diff --git a/src/views/measure/source/components/listPage.vue b/src/views/measure/source/components/listPage.vue
index a9c9509..414fc47 100644
--- a/src/views/measure/source/components/listPage.vue
+++ b/src/views/measure/source/components/listPage.vue
@@ -17,6 +17,7 @@
default: () => [],
},
})
+const emit = defineEmits(['setData']) // 关闭
// 查询条件
const listQuery: Ref = ref({
supplierNo: '', // 业务内容
@@ -28,53 +29,63 @@
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
-const list = ref([])
+const list = ref([
+ { name: '张三' },
+])
// 总数
-const total = ref(20)
+const total = ref(0)
// 表头
const columns = ref([
{
text: '溯源供方编号',
- value: 'supplierNo',
- width: '160',
+ value: 'name',
+ width: '120',
+ align: 'center',
},
{
text: '溯源供方名称',
- value: 'supplierName',
+ value: 'name',
width: '120',
+ align: 'center',
},
{
text: '业务内容',
- value: 'businessContent',
+ value: 'name',
+ align: 'center',
},
{
text: '业务资质',
- value: 'briefName',
+ value: 'name',
+ align: 'center',
},
{
text: '负责人',
- value: 'director',
+ value: 'name',
+ align: 'center',
},
{
text: '联系方式',
- value: 'mobile',
+ value: 'name',
+ align: 'center',
},
{
text: '地址',
- value: 'companyCity',
+ value: 'name',
+ align: 'center',
},
{
text: '创建时间',
- value: 'createTime',
- width: '200',
+ value: 'name',
+ align: 'center',
},
{
text: '备注',
- value: 'remark',
+ value: 'name',
+ align: 'center',
},
])
-const buttonArray = ref([])
+const buttonArray = ref([])
// 选中的内容
const checkoutList = ref([])
// 文件上传input
@@ -98,20 +109,24 @@
loadingTable.value = false
})
}
-fetchData(true)
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
}
+// 点击删除和编辑的参数类型
+interface rowReturn {
+ id: string
+ supplierName: string
+}
// 点击编辑/详情
-const handleEdit = (index: string, row: object, value: string) => {
+const handleEdit = (index: string, row: rowReturn, value: string) => {
buttonArray.value = ['同意', '驳回', '拒绝']
buttonType.value = value
infoId.value = row.id
show.value = false
}
// 点击删除
-const handleDelete = (index: string, row: object) => {
+const handleDelete = (index: string, row: rowReturn) => {
ElMessageBox.confirm(
`确认删除${row.supplierName}吗?`,
'提示',
@@ -153,7 +168,7 @@
// 关闭编辑
const close = () => {
show.value = true
- fetchData(true)
+ // fetchData(true)
}
// 导出
const exportExcelBtn = () => {
@@ -218,30 +233,24 @@
upload()
}
const add = () => {
+ buttonArray.value = ['提交', '保存']
buttonType.value = ''
show.value = false
}
const exportAll = () => {
exportExcelBtn()
}
+watch(() => show.value, (newVal) => {
+// 变化后存储
+ emit('setData', newVal)
+},
+{ deep: true, immediate: true })
// 打印
const printObj = ref({
id: 'print', // 需要打印元素的id
popTitle: '溯源供方编号模板', // 打印配置页上方的标题
extraHead: '', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割
preview: false, // 是否启动预览模式,默认是false
- previewBeforeOpenCallback() { console.log('正在加载预览窗口!') }, // 预览窗口打开之前的callback
- previewOpenCallback() { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback
- beforeOpenCallback() { console.log('开始打印之前!') }, // 开始打印之前的callback
- openCallback() { console.log('执行打印了!') }, // 调用打印时的callback
- closeCallback() { console.log('关闭了打印工具!') }, // 关闭打印的callback(无法区分确认or取消)
- clickMounted() { console.log('点击v-print绑定的按钮了!') },
- // url: 'http://localhost:8080/', // 打印指定的URL,确保同源策略相同
- // asyncUrl (reslove) {
- // setTimeout(() => {
- // reslove('http://localhost:8080/')
- // }, 2000)
- // },
standard: '',
extarCss: '',
})
@@ -304,8 +313,8 @@
-// 逻辑代码
+
-
- 更换申请
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/all.vue b/src/views/device/standardEquipment/components/changeApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/approvalPending.vue b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/canceled.vue b/src/views/device/standardEquipment/components/changeApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/draftBox.vue b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPage.vue b/src/views/device/standardEquipment/components/changeApply/listPage.vue
new file mode 100644
index 0000000..bcf35ee
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPage.vue
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
new file mode 100644
index 0000000..71e68f7
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
@@ -0,0 +1,693 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/notPass.vue b/src/views/device/standardEquipment/components/changeApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/passed.vue b/src/views/device/standardEquipment/components/changeApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/addRow.vue b/src/views/device/standardEquipment/components/standardList/addRow.vue
new file mode 100644
index 0000000..9f2bf81
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/addRow.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
new file mode 100644
index 0000000..c47ad1d
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -0,0 +1,675 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/temptable.vue b/src/views/device/standardEquipment/components/standardList/temptable.vue
new file mode 100644
index 0000000..59120b8
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/temptable.vue
@@ -0,0 +1,388 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (searchQuery.offset - 1) * searchQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index ea13629..348bb41 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -3,6 +3,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus'
import type { IOptions } from '../standard_interface'
+import baseInfo from './standardList/baseInfo.vue'
+import table from './standardList/temptable.vue'
import { getStaffList } from '@/api/measure/person'
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
@@ -17,188 +19,35 @@
default: '',
},
})
-const emit = defineEmits(['close']) // 关闭
-const ruleFormRef = ref()
-// 逻辑代码
-const formInline = ref({
- assessDate: '',
- assessmentUnit: '',
- category: null,
- categoryName: '',
- constructionStandardProject: '',
- constructionStandardUnitName: '',
- contactInfo: '',
- createTime: null,
- createUser: null,
- id: '',
- isDel: null,
- laboratoryOwner: null,
- laboratoryOwnerContact: null,
- laboratoryOwnerName: null,
- managerState: null,
- managerStateName: '',
- measureMajor: null,
- fileList: [],
- measureMajorName: '',
- mesureRange: '',
- organizeNo: '',
- preparationDate: '',
- projectNo: '',
- remark: '',
- standardHumidity: null,
- standardLaboratory: null,
- standardLaboratoryName: '',
- standardLevel: null,
- standardLevelName: '',
- standardName: '',
- standardNo: '',
- standardOwner: null,
- standardOwnerName: '',
- standardTemperature: null,
- totalInvestment: null,
- transmitRange: null,
- 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
- }
- })
+const emit = defineEmits(['close'])
+// 定义数据
+const formInline = ref({})
+// 关闭
+interface menuType {
+ name: string
+ comp: any
}
-getSelectList('measureMajor') // 获取计量专业下拉框
-getSelectList('standardManagerState') // 获取管理状态下拉框
-getSelectList('standardLevel') // 获取标准等级下拉框
-getSelectList('transmitRange') // 获取传递范围下拉框
-getSelectList('standardCategory') // 获取类别下拉框
-// 获取部门信息
-getUsersDept({
- createTime: '',
- director: '',
- meterMajor: '',
- organizeName: '',
- organizeNo: '',
- organizeType: '2',
- pdeptId: null,
- offset: 1,
- limit: 999999,
-}).then((res) => {
- standardUsersDeptList.value = res.data.rows
+const menu = shallowRef([
+ { name: '基本信息', comp: baseInfo },
+ { name: '计量人员', comp: table },
+ { name: '标准配套设备', comp: table },
+ { name: '检定规程', comp: table },
+ { name: '重复性考核记录', comp: table },
+ { name: '稳定性考核记录', comp: table },
+ { name: '证书管理', comp: table },
+])
+const currentCompRef = ref()
+const current = ref('基本信息')
+const currentComp = shallowRef(baseInfo)
+watch(current, (newValue) => {
+ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 获取到标准负责人数组
-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 uploadQuarterlyEvaluateFile = (file: File) => {
- const fd = new FormData()
- fd.append('multipartFile', file.file)
- UploadFile(fd).then((res) => {
- if (res.code === 200) {
- formInline.value.fileList = res.data
- // 重置当前验证
- ElMessage.success('文件上传成功')
- }
- })
-}
-const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
- ElMessage.warning('只能上传一个文件')
-}
-// 移除时触发
-const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
- return ElMessageBox.confirm(
- `确认移除${uploadFile.name}文件吗 ?`,
- ).then(
- () => true,
- () => false,
-
- )
-}
-// 点击文件预览
-const uploadShow = (e: any) => {
- const URL = window.URL || window.webkitURL
- window.open(URL.createObjectURL(e.raw))
-}
-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,
- // '
',
- // )
- // }
+const setData = (newValue: object) => {
+ formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
@@ -223,60 +72,29 @@
}
}
// 提交
-const submitForm = (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
+const submitForm = () => {
if (props.buttonType === '详情') { return submitFormDetail() }
- formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- props.buttonType === ''
- ? getStandardListAdd(formInline.value).then((res) => {
- if (res.code === 200) {
- close()
- }
- })
- : submitFormDetail()
- })
- }
- })
-}
-// 标准实验室发生改变row类型
-interface rowReturn {
- phone: string
- director: string
-}
-// 标准实验室发生改变
-const changeDeptList = (row: object) => {
- formInline.value.laboratoryOwnerContact = row.phone
- formInline.value.laboratoryOwner = row.director
-}
-// 标准实验室清空时
-const clearDeptList = () => {
- formInline.value.laboratoryOwnerContact = null
- formInline.value.laboratoryOwner = null
-}
-// 获取详情信息
-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()
- }
+ ElMessageBox.confirm(
+ '确认提交吗?',
+ '提示',
+ {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning',
+ },
+ ).then(() => {
+ current.value = '基本信息'
+ currentCompRef.value.submitForm().validate().then(() => {
+ props.buttonType === ''
+ ? getStandardListAdd(formInline.value).then((res) => {
+ if (res.code === 200) {
+ close()
+ }
+ })
+ : submitFormDetail()
})
- formInline.value = res.data
})
}
-if (props.buttonType !== '') {
- getInfo()
-}
@@ -289,7 +107,7 @@
{{ buttonType === '详情' ? '打印' : '提交' }}
@@ -298,405 +116,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 上传
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
@@ -719,14 +149,8 @@
}
}
-.info-content {
- margin-top: 10px;
- padding: 30px;
- border-radius: 10px;
+.body {
background-color: #fff;
-}
-
-:deep .el-input .el-input--default .el-input--suffix {
- width: 200px !important;
+ margin-top: 10px;
}
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 35786b2..f4ce07a 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -26,39 +26,47 @@
text: '标准代码',
value: 'standardNo',
width: '160',
+ align: 'center',
},
{
text: '标准名称',
value: 'standardName',
width: '90',
+ align: 'center',
},
{
text: '管理状态',
value: 'managerStateName',
width: '100',
+ align: 'center',
},
{
text: '标准所在部门',
value: 'standardLaboratoryName',
width: '120',
+ align: 'center',
},
{
text: '负责人',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '建标项目',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '筹建日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
{
text: '有效日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
])
const total = ref(0)
@@ -344,17 +352,17 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '编辑')"
+ @click="handleClick(row.$index, row, '详情')"
>
- 编辑
+ 详情
- 详情
+ 提醒
{
+ console.log(e)
+}
@@ -342,7 +355,7 @@
diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue
index cb2ebe6..380779a 100644
--- a/src/views/measure/bench/bench.vue
+++ b/src/views/measure/bench/bench.vue
@@ -175,7 +175,7 @@
v-if="proxy.hasPerm('/workbench/meterTrain/line')"
title="培训计划"
width="27.8vw"
- height="40vh"
+ height="40.7vh"
>
{
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
+const disabled = ref(false)
+const setData = (newIsShow) => {
+ if (newIsShow === false) {
+ disabled.value = true
+ }
+ else {
+ disabled.value = false
+ }
+}
diff --git a/src/views/measure/source/components/listPage.vue b/src/views/measure/source/components/listPage.vue
index a9c9509..414fc47 100644
--- a/src/views/measure/source/components/listPage.vue
+++ b/src/views/measure/source/components/listPage.vue
@@ -17,6 +17,7 @@
default: () => [],
},
})
+const emit = defineEmits(['setData']) // 关闭
// 查询条件
const listQuery: Ref = ref({
supplierNo: '', // 业务内容
@@ -28,53 +29,63 @@
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
-const list = ref([])
+const list = ref([
+ { name: '张三' },
+])
// 总数
-const total = ref(20)
+const total = ref(0)
// 表头
const columns = ref([
{
text: '溯源供方编号',
- value: 'supplierNo',
- width: '160',
+ value: 'name',
+ width: '120',
+ align: 'center',
},
{
text: '溯源供方名称',
- value: 'supplierName',
+ value: 'name',
width: '120',
+ align: 'center',
},
{
text: '业务内容',
- value: 'businessContent',
+ value: 'name',
+ align: 'center',
},
{
text: '业务资质',
- value: 'briefName',
+ value: 'name',
+ align: 'center',
},
{
text: '负责人',
- value: 'director',
+ value: 'name',
+ align: 'center',
},
{
text: '联系方式',
- value: 'mobile',
+ value: 'name',
+ align: 'center',
},
{
text: '地址',
- value: 'companyCity',
+ value: 'name',
+ align: 'center',
},
{
text: '创建时间',
- value: 'createTime',
- width: '200',
+ value: 'name',
+ align: 'center',
},
{
text: '备注',
- value: 'remark',
+ value: 'name',
+ align: 'center',
},
])
-const buttonArray = ref([])
+const buttonArray = ref([])
// 选中的内容
const checkoutList = ref([])
// 文件上传input
@@ -98,20 +109,24 @@
loadingTable.value = false
})
}
-fetchData(true)
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
}
+// 点击删除和编辑的参数类型
+interface rowReturn {
+ id: string
+ supplierName: string
+}
// 点击编辑/详情
-const handleEdit = (index: string, row: object, value: string) => {
+const handleEdit = (index: string, row: rowReturn, value: string) => {
buttonArray.value = ['同意', '驳回', '拒绝']
buttonType.value = value
infoId.value = row.id
show.value = false
}
// 点击删除
-const handleDelete = (index: string, row: object) => {
+const handleDelete = (index: string, row: rowReturn) => {
ElMessageBox.confirm(
`确认删除${row.supplierName}吗?`,
'提示',
@@ -153,7 +168,7 @@
// 关闭编辑
const close = () => {
show.value = true
- fetchData(true)
+ // fetchData(true)
}
// 导出
const exportExcelBtn = () => {
@@ -218,30 +233,24 @@
upload()
}
const add = () => {
+ buttonArray.value = ['提交', '保存']
buttonType.value = ''
show.value = false
}
const exportAll = () => {
exportExcelBtn()
}
+watch(() => show.value, (newVal) => {
+// 变化后存储
+ emit('setData', newVal)
+},
+{ deep: true, immediate: true })
// 打印
const printObj = ref({
id: 'print', // 需要打印元素的id
popTitle: '溯源供方编号模板', // 打印配置页上方的标题
extraHead: '', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割
preview: false, // 是否启动预览模式,默认是false
- previewBeforeOpenCallback() { console.log('正在加载预览窗口!') }, // 预览窗口打开之前的callback
- previewOpenCallback() { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback
- beforeOpenCallback() { console.log('开始打印之前!') }, // 开始打印之前的callback
- openCallback() { console.log('执行打印了!') }, // 调用打印时的callback
- closeCallback() { console.log('关闭了打印工具!') }, // 关闭打印的callback(无法区分确认or取消)
- clickMounted() { console.log('点击v-print绑定的按钮了!') },
- // url: 'http://localhost:8080/', // 打印指定的URL,确保同源策略相同
- // asyncUrl (reslove) {
- // setTimeout(() => {
- // reslove('http://localhost:8080/')
- // }, 2000)
- // },
standard: '',
extarCss: '',
})
@@ -304,8 +313,8 @@
[],
},
})
+const emit = defineEmits(['setData']) // 禁用
// 查询条件
const listQuery: Ref = ref({
supplierNo: '', // 业务内容
@@ -29,64 +30,86 @@
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
-const list = ref([])
+const list = ref([
+ { name: '张三' },
+])
// 总数
-const total = ref(20)
+const total = ref(0)
// 表头
const columns = ref([
{
text: '计划编号',
- value: 'supplierNo',
- width: '160',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训名称',
- value: 'supplierName',
- width: '120',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训对象',
- value: 'businessContent',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训人数',
- value: 'briefName',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训学时',
- value: 'director',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训时间',
- value: 'mobile',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '主管部门',
- value: 'companyCity',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '实施单位',
- value: 'createTime',
- width: '120',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '负责人',
- value: 'remark',
+ value: 'name',
+ align: 'center',
},
{
text: '培训内容',
- value: 'remark',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '创建时间',
- value: 'remark',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '审批状态',
- value: 'remark',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
])
-
+const buttonArray = ref([])
// 选中的内容
const checkoutList = ref([])
// 文件上传input
@@ -112,7 +135,7 @@
loadingTable.value = false
})
}
-fetchData(true)
+// fetchData(true)
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
@@ -124,6 +147,7 @@
}
// 点击编辑/详情
const handleEdit = (index: string, row: rowReturn, value: string) => {
+ buttonArray.value = ['同意', '驳回', '拒绝']
buttonType.value = value
infoId.value = row.id
show.value = false
@@ -165,7 +189,7 @@
}
// 点击搜索
const searchList = () => {
- fetchData(true)
+ // fetchData(true)
}
const cancelEvent = () => {
console.log('cancel!')
@@ -183,7 +207,7 @@
// 关闭编辑
const close = () => {
show.value = true
- fetchData(true)
+ // fetchData(true)
}
// 导出
const exportExcelBtn = () => {
@@ -250,6 +274,12 @@
const exportAll = () => {
exportExcelBtn()
}
+// 新增页面显示就调用父组件方法禁用tap栏
+watch(() => show.value, (newVal) => {
+// 变化后存储
+ emit('setData', newVal)
+},
+{ deep: true, immediate: true })
// 打印
const printObj = ref({
id: 'print', // 需要打印元素的id
@@ -336,8 +366,8 @@
diff --git a/src/components.d.ts b/src/components.d.ts
index 5a09663..2e27c4d 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -13,6 +13,8 @@
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
+ BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default']
+ BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default']
BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default']
Benchcol: typeof import('./components/benchcol/index.vue')['default']
BenchCol: typeof import('./components/benchCol/index.vue')['default']
@@ -20,7 +22,6 @@
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
- Echarts: typeof import('./components/echarts/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default']
@@ -30,13 +31,14 @@
ImagePreview: typeof import('./components/ImagePreview/index.vue')['default']
ImagesUpload: typeof import('./components/ImagesUpload/index.vue')['default']
ImageUpload: typeof import('./components/ImageUpload/index.vue')['default']
+ LineChart: typeof import('./components/Echart/LineChart.vue')['default']
NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default']
NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default']
NormalTable: typeof import('./components/NormalTable/index.vue')['default']
PageHeader: typeof import('./components/PageHeader/index.vue')['default']
PageMain: typeof import('./components/PageMain/index.vue')['default']
PcasCascader: typeof import('./components/PcasCascader/index.vue')['default']
- Pie: typeof import('./components/echarts/pie.vue')['default']
+ PieChart: typeof import('./components/Echart/PieChart.vue')['default']
PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default']
RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
diff --git a/src/views/device/standardEquipment/changeApply.vue b/src/views/device/standardEquipment/changeApply.vue
index 0762330..6be4200 100644
--- a/src/views/device/standardEquipment/changeApply.vue
+++ b/src/views/device/standardEquipment/changeApply.vue
@@ -1,13 +1,65 @@
-
-
- 更换申请
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/all.vue b/src/views/device/standardEquipment/components/changeApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/approvalPending.vue b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/canceled.vue b/src/views/device/standardEquipment/components/changeApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/draftBox.vue b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPage.vue b/src/views/device/standardEquipment/components/changeApply/listPage.vue
new file mode 100644
index 0000000..bcf35ee
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPage.vue
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
new file mode 100644
index 0000000..71e68f7
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
@@ -0,0 +1,693 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/notPass.vue b/src/views/device/standardEquipment/components/changeApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/passed.vue b/src/views/device/standardEquipment/components/changeApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/addRow.vue b/src/views/device/standardEquipment/components/standardList/addRow.vue
new file mode 100644
index 0000000..9f2bf81
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/addRow.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
new file mode 100644
index 0000000..c47ad1d
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -0,0 +1,675 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/temptable.vue b/src/views/device/standardEquipment/components/standardList/temptable.vue
new file mode 100644
index 0000000..59120b8
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/temptable.vue
@@ -0,0 +1,388 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (searchQuery.offset - 1) * searchQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index ea13629..348bb41 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -3,6 +3,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus'
import type { IOptions } from '../standard_interface'
+import baseInfo from './standardList/baseInfo.vue'
+import table from './standardList/temptable.vue'
import { getStaffList } from '@/api/measure/person'
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
@@ -17,188 +19,35 @@
default: '',
},
})
-const emit = defineEmits(['close']) // 关闭
-const ruleFormRef = ref()
-// 逻辑代码
-const formInline = ref({
- assessDate: '',
- assessmentUnit: '',
- category: null,
- categoryName: '',
- constructionStandardProject: '',
- constructionStandardUnitName: '',
- contactInfo: '',
- createTime: null,
- createUser: null,
- id: '',
- isDel: null,
- laboratoryOwner: null,
- laboratoryOwnerContact: null,
- laboratoryOwnerName: null,
- managerState: null,
- managerStateName: '',
- measureMajor: null,
- fileList: [],
- measureMajorName: '',
- mesureRange: '',
- organizeNo: '',
- preparationDate: '',
- projectNo: '',
- remark: '',
- standardHumidity: null,
- standardLaboratory: null,
- standardLaboratoryName: '',
- standardLevel: null,
- standardLevelName: '',
- standardName: '',
- standardNo: '',
- standardOwner: null,
- standardOwnerName: '',
- standardTemperature: null,
- totalInvestment: null,
- transmitRange: null,
- 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
- }
- })
+const emit = defineEmits(['close'])
+// 定义数据
+const formInline = ref({})
+// 关闭
+interface menuType {
+ name: string
+ comp: any
}
-getSelectList('measureMajor') // 获取计量专业下拉框
-getSelectList('standardManagerState') // 获取管理状态下拉框
-getSelectList('standardLevel') // 获取标准等级下拉框
-getSelectList('transmitRange') // 获取传递范围下拉框
-getSelectList('standardCategory') // 获取类别下拉框
-// 获取部门信息
-getUsersDept({
- createTime: '',
- director: '',
- meterMajor: '',
- organizeName: '',
- organizeNo: '',
- organizeType: '2',
- pdeptId: null,
- offset: 1,
- limit: 999999,
-}).then((res) => {
- standardUsersDeptList.value = res.data.rows
+const menu = shallowRef([
+ { name: '基本信息', comp: baseInfo },
+ { name: '计量人员', comp: table },
+ { name: '标准配套设备', comp: table },
+ { name: '检定规程', comp: table },
+ { name: '重复性考核记录', comp: table },
+ { name: '稳定性考核记录', comp: table },
+ { name: '证书管理', comp: table },
+])
+const currentCompRef = ref()
+const current = ref('基本信息')
+const currentComp = shallowRef(baseInfo)
+watch(current, (newValue) => {
+ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 获取到标准负责人数组
-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 uploadQuarterlyEvaluateFile = (file: File) => {
- const fd = new FormData()
- fd.append('multipartFile', file.file)
- UploadFile(fd).then((res) => {
- if (res.code === 200) {
- formInline.value.fileList = res.data
- // 重置当前验证
- ElMessage.success('文件上传成功')
- }
- })
-}
-const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
- ElMessage.warning('只能上传一个文件')
-}
-// 移除时触发
-const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
- return ElMessageBox.confirm(
- `确认移除${uploadFile.name}文件吗 ?`,
- ).then(
- () => true,
- () => false,
-
- )
-}
-// 点击文件预览
-const uploadShow = (e: any) => {
- const URL = window.URL || window.webkitURL
- window.open(URL.createObjectURL(e.raw))
-}
-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,
- // '
',
- // )
- // }
+const setData = (newValue: object) => {
+ formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
@@ -223,60 +72,29 @@
}
}
// 提交
-const submitForm = (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
+const submitForm = () => {
if (props.buttonType === '详情') { return submitFormDetail() }
- formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- props.buttonType === ''
- ? getStandardListAdd(formInline.value).then((res) => {
- if (res.code === 200) {
- close()
- }
- })
- : submitFormDetail()
- })
- }
- })
-}
-// 标准实验室发生改变row类型
-interface rowReturn {
- phone: string
- director: string
-}
-// 标准实验室发生改变
-const changeDeptList = (row: object) => {
- formInline.value.laboratoryOwnerContact = row.phone
- formInline.value.laboratoryOwner = row.director
-}
-// 标准实验室清空时
-const clearDeptList = () => {
- formInline.value.laboratoryOwnerContact = null
- formInline.value.laboratoryOwner = null
-}
-// 获取详情信息
-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()
- }
+ ElMessageBox.confirm(
+ '确认提交吗?',
+ '提示',
+ {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning',
+ },
+ ).then(() => {
+ current.value = '基本信息'
+ currentCompRef.value.submitForm().validate().then(() => {
+ props.buttonType === ''
+ ? getStandardListAdd(formInline.value).then((res) => {
+ if (res.code === 200) {
+ close()
+ }
+ })
+ : submitFormDetail()
})
- formInline.value = res.data
})
}
-if (props.buttonType !== '') {
- getInfo()
-}
@@ -289,7 +107,7 @@
{{ buttonType === '详情' ? '打印' : '提交' }}
@@ -298,405 +116,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 上传
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
@@ -719,14 +149,8 @@
}
}
-.info-content {
- margin-top: 10px;
- padding: 30px;
- border-radius: 10px;
+.body {
background-color: #fff;
-}
-
-:deep .el-input .el-input--default .el-input--suffix {
- width: 200px !important;
+ margin-top: 10px;
}
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 35786b2..f4ce07a 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -26,39 +26,47 @@
text: '标准代码',
value: 'standardNo',
width: '160',
+ align: 'center',
},
{
text: '标准名称',
value: 'standardName',
width: '90',
+ align: 'center',
},
{
text: '管理状态',
value: 'managerStateName',
width: '100',
+ align: 'center',
},
{
text: '标准所在部门',
value: 'standardLaboratoryName',
width: '120',
+ align: 'center',
},
{
text: '负责人',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '建标项目',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '筹建日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
{
text: '有效日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
])
const total = ref(0)
@@ -344,17 +352,17 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '编辑')"
+ @click="handleClick(row.$index, row, '详情')"
>
- 编辑
+ 详情
- 详情
+ 提醒
{
+ console.log(e)
+}
@@ -342,7 +355,7 @@
diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue
index cb2ebe6..380779a 100644
--- a/src/views/measure/bench/bench.vue
+++ b/src/views/measure/bench/bench.vue
@@ -175,7 +175,7 @@
v-if="proxy.hasPerm('/workbench/meterTrain/line')"
title="培训计划"
width="27.8vw"
- height="40vh"
+ height="40.7vh"
>
{
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
+const disabled = ref(false)
+const setData = (newIsShow) => {
+ if (newIsShow === false) {
+ disabled.value = true
+ }
+ else {
+ disabled.value = false
+ }
+}
diff --git a/src/views/measure/source/components/listPage.vue b/src/views/measure/source/components/listPage.vue
index a9c9509..414fc47 100644
--- a/src/views/measure/source/components/listPage.vue
+++ b/src/views/measure/source/components/listPage.vue
@@ -17,6 +17,7 @@
default: () => [],
},
})
+const emit = defineEmits(['setData']) // 关闭
// 查询条件
const listQuery: Ref = ref({
supplierNo: '', // 业务内容
@@ -28,53 +29,63 @@
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
-const list = ref([])
+const list = ref([
+ { name: '张三' },
+])
// 总数
-const total = ref(20)
+const total = ref(0)
// 表头
const columns = ref([
{
text: '溯源供方编号',
- value: 'supplierNo',
- width: '160',
+ value: 'name',
+ width: '120',
+ align: 'center',
},
{
text: '溯源供方名称',
- value: 'supplierName',
+ value: 'name',
width: '120',
+ align: 'center',
},
{
text: '业务内容',
- value: 'businessContent',
+ value: 'name',
+ align: 'center',
},
{
text: '业务资质',
- value: 'briefName',
+ value: 'name',
+ align: 'center',
},
{
text: '负责人',
- value: 'director',
+ value: 'name',
+ align: 'center',
},
{
text: '联系方式',
- value: 'mobile',
+ value: 'name',
+ align: 'center',
},
{
text: '地址',
- value: 'companyCity',
+ value: 'name',
+ align: 'center',
},
{
text: '创建时间',
- value: 'createTime',
- width: '200',
+ value: 'name',
+ align: 'center',
},
{
text: '备注',
- value: 'remark',
+ value: 'name',
+ align: 'center',
},
])
-const buttonArray = ref([])
+const buttonArray = ref([])
// 选中的内容
const checkoutList = ref([])
// 文件上传input
@@ -98,20 +109,24 @@
loadingTable.value = false
})
}
-fetchData(true)
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
}
+// 点击删除和编辑的参数类型
+interface rowReturn {
+ id: string
+ supplierName: string
+}
// 点击编辑/详情
-const handleEdit = (index: string, row: object, value: string) => {
+const handleEdit = (index: string, row: rowReturn, value: string) => {
buttonArray.value = ['同意', '驳回', '拒绝']
buttonType.value = value
infoId.value = row.id
show.value = false
}
// 点击删除
-const handleDelete = (index: string, row: object) => {
+const handleDelete = (index: string, row: rowReturn) => {
ElMessageBox.confirm(
`确认删除${row.supplierName}吗?`,
'提示',
@@ -153,7 +168,7 @@
// 关闭编辑
const close = () => {
show.value = true
- fetchData(true)
+ // fetchData(true)
}
// 导出
const exportExcelBtn = () => {
@@ -218,30 +233,24 @@
upload()
}
const add = () => {
+ buttonArray.value = ['提交', '保存']
buttonType.value = ''
show.value = false
}
const exportAll = () => {
exportExcelBtn()
}
+watch(() => show.value, (newVal) => {
+// 变化后存储
+ emit('setData', newVal)
+},
+{ deep: true, immediate: true })
// 打印
const printObj = ref({
id: 'print', // 需要打印元素的id
popTitle: '溯源供方编号模板', // 打印配置页上方的标题
extraHead: '', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割
preview: false, // 是否启动预览模式,默认是false
- previewBeforeOpenCallback() { console.log('正在加载预览窗口!') }, // 预览窗口打开之前的callback
- previewOpenCallback() { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback
- beforeOpenCallback() { console.log('开始打印之前!') }, // 开始打印之前的callback
- openCallback() { console.log('执行打印了!') }, // 调用打印时的callback
- closeCallback() { console.log('关闭了打印工具!') }, // 关闭打印的callback(无法区分确认or取消)
- clickMounted() { console.log('点击v-print绑定的按钮了!') },
- // url: 'http://localhost:8080/', // 打印指定的URL,确保同源策略相同
- // asyncUrl (reslove) {
- // setTimeout(() => {
- // reslove('http://localhost:8080/')
- // }, 2000)
- // },
standard: '',
extarCss: '',
})
@@ -304,8 +313,8 @@
[],
},
})
+const emit = defineEmits(['setData']) // 禁用
// 查询条件
const listQuery: Ref = ref({
supplierNo: '', // 业务内容
@@ -29,64 +30,86 @@
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
-const list = ref([])
+const list = ref([
+ { name: '张三' },
+])
// 总数
-const total = ref(20)
+const total = ref(0)
// 表头
const columns = ref([
{
text: '计划编号',
- value: 'supplierNo',
- width: '160',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训名称',
- value: 'supplierName',
- width: '120',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训对象',
- value: 'businessContent',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训人数',
- value: 'briefName',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训学时',
- value: 'director',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训时间',
- value: 'mobile',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '主管部门',
- value: 'companyCity',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '实施单位',
- value: 'createTime',
- width: '120',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '负责人',
- value: 'remark',
+ value: 'name',
+ align: 'center',
},
{
text: '培训内容',
- value: 'remark',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '创建时间',
- value: 'remark',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '审批状态',
- value: 'remark',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
])
-
+const buttonArray = ref([])
// 选中的内容
const checkoutList = ref([])
// 文件上传input
@@ -112,7 +135,7 @@
loadingTable.value = false
})
}
-fetchData(true)
+// fetchData(true)
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
@@ -124,6 +147,7 @@
}
// 点击编辑/详情
const handleEdit = (index: string, row: rowReturn, value: string) => {
+ buttonArray.value = ['同意', '驳回', '拒绝']
buttonType.value = value
infoId.value = row.id
show.value = false
@@ -165,7 +189,7 @@
}
// 点击搜索
const searchList = () => {
- fetchData(true)
+ // fetchData(true)
}
const cancelEvent = () => {
console.log('cancel!')
@@ -183,7 +207,7 @@
// 关闭编辑
const close = () => {
show.value = true
- fetchData(true)
+ // fetchData(true)
}
// 导出
const exportExcelBtn = () => {
@@ -250,6 +274,12 @@
const exportAll = () => {
exportExcelBtn()
}
+// 新增页面显示就调用父组件方法禁用tap栏
+watch(() => show.value, (newVal) => {
+// 变化后存储
+ emit('setData', newVal)
+},
+{ deep: true, immediate: true })
// 打印
const printObj = ref({
id: 'print', // 需要打印元素的id
@@ -336,8 +366,8 @@
diff --git a/src/views/measure/train/components/listPageAdd.vue b/src/views/measure/train/components/listPageAdd.vue
index a9769ad..ebbc451 100644
--- a/src/views/measure/train/components/listPageAdd.vue
+++ b/src/views/measure/train/components/listPageAdd.vue
@@ -15,6 +15,10 @@
type: String,
default: '',
},
+ buttonArray: {
+ type: Array,
+ default: () => [],
+ },
})
const emit = defineEmits(['close'])
const formInline = ref({
@@ -144,13 +148,8 @@
培训计划
-
- {{ buttonType === '详情' ? '打印' : '提交' }}
+
+ {{ item }}
关闭
diff --git a/src/components.d.ts b/src/components.d.ts
index 5a09663..2e27c4d 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -13,6 +13,8 @@
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
+ BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default']
+ BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default']
BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default']
Benchcol: typeof import('./components/benchcol/index.vue')['default']
BenchCol: typeof import('./components/benchCol/index.vue')['default']
@@ -20,7 +22,6 @@
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
- Echarts: typeof import('./components/echarts/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default']
@@ -30,13 +31,14 @@
ImagePreview: typeof import('./components/ImagePreview/index.vue')['default']
ImagesUpload: typeof import('./components/ImagesUpload/index.vue')['default']
ImageUpload: typeof import('./components/ImageUpload/index.vue')['default']
+ LineChart: typeof import('./components/Echart/LineChart.vue')['default']
NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default']
NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default']
NormalTable: typeof import('./components/NormalTable/index.vue')['default']
PageHeader: typeof import('./components/PageHeader/index.vue')['default']
PageMain: typeof import('./components/PageMain/index.vue')['default']
PcasCascader: typeof import('./components/PcasCascader/index.vue')['default']
- Pie: typeof import('./components/echarts/pie.vue')['default']
+ PieChart: typeof import('./components/Echart/PieChart.vue')['default']
PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default']
RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
diff --git a/src/views/device/standardEquipment/changeApply.vue b/src/views/device/standardEquipment/changeApply.vue
index 0762330..6be4200 100644
--- a/src/views/device/standardEquipment/changeApply.vue
+++ b/src/views/device/standardEquipment/changeApply.vue
@@ -1,13 +1,65 @@
-
-
- 更换申请
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/all.vue b/src/views/device/standardEquipment/components/changeApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/approvalPending.vue b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/canceled.vue b/src/views/device/standardEquipment/components/changeApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/draftBox.vue b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPage.vue b/src/views/device/standardEquipment/components/changeApply/listPage.vue
new file mode 100644
index 0000000..bcf35ee
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPage.vue
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
new file mode 100644
index 0000000..71e68f7
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
@@ -0,0 +1,693 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/notPass.vue b/src/views/device/standardEquipment/components/changeApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/passed.vue b/src/views/device/standardEquipment/components/changeApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/addRow.vue b/src/views/device/standardEquipment/components/standardList/addRow.vue
new file mode 100644
index 0000000..9f2bf81
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/addRow.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
new file mode 100644
index 0000000..c47ad1d
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -0,0 +1,675 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/temptable.vue b/src/views/device/standardEquipment/components/standardList/temptable.vue
new file mode 100644
index 0000000..59120b8
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/temptable.vue
@@ -0,0 +1,388 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (searchQuery.offset - 1) * searchQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index ea13629..348bb41 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -3,6 +3,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus'
import type { IOptions } from '../standard_interface'
+import baseInfo from './standardList/baseInfo.vue'
+import table from './standardList/temptable.vue'
import { getStaffList } from '@/api/measure/person'
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
@@ -17,188 +19,35 @@
default: '',
},
})
-const emit = defineEmits(['close']) // 关闭
-const ruleFormRef = ref()
-// 逻辑代码
-const formInline = ref({
- assessDate: '',
- assessmentUnit: '',
- category: null,
- categoryName: '',
- constructionStandardProject: '',
- constructionStandardUnitName: '',
- contactInfo: '',
- createTime: null,
- createUser: null,
- id: '',
- isDel: null,
- laboratoryOwner: null,
- laboratoryOwnerContact: null,
- laboratoryOwnerName: null,
- managerState: null,
- managerStateName: '',
- measureMajor: null,
- fileList: [],
- measureMajorName: '',
- mesureRange: '',
- organizeNo: '',
- preparationDate: '',
- projectNo: '',
- remark: '',
- standardHumidity: null,
- standardLaboratory: null,
- standardLaboratoryName: '',
- standardLevel: null,
- standardLevelName: '',
- standardName: '',
- standardNo: '',
- standardOwner: null,
- standardOwnerName: '',
- standardTemperature: null,
- totalInvestment: null,
- transmitRange: null,
- 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
- }
- })
+const emit = defineEmits(['close'])
+// 定义数据
+const formInline = ref({})
+// 关闭
+interface menuType {
+ name: string
+ comp: any
}
-getSelectList('measureMajor') // 获取计量专业下拉框
-getSelectList('standardManagerState') // 获取管理状态下拉框
-getSelectList('standardLevel') // 获取标准等级下拉框
-getSelectList('transmitRange') // 获取传递范围下拉框
-getSelectList('standardCategory') // 获取类别下拉框
-// 获取部门信息
-getUsersDept({
- createTime: '',
- director: '',
- meterMajor: '',
- organizeName: '',
- organizeNo: '',
- organizeType: '2',
- pdeptId: null,
- offset: 1,
- limit: 999999,
-}).then((res) => {
- standardUsersDeptList.value = res.data.rows
+const menu = shallowRef([
+ { name: '基本信息', comp: baseInfo },
+ { name: '计量人员', comp: table },
+ { name: '标准配套设备', comp: table },
+ { name: '检定规程', comp: table },
+ { name: '重复性考核记录', comp: table },
+ { name: '稳定性考核记录', comp: table },
+ { name: '证书管理', comp: table },
+])
+const currentCompRef = ref()
+const current = ref('基本信息')
+const currentComp = shallowRef(baseInfo)
+watch(current, (newValue) => {
+ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 获取到标准负责人数组
-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 uploadQuarterlyEvaluateFile = (file: File) => {
- const fd = new FormData()
- fd.append('multipartFile', file.file)
- UploadFile(fd).then((res) => {
- if (res.code === 200) {
- formInline.value.fileList = res.data
- // 重置当前验证
- ElMessage.success('文件上传成功')
- }
- })
-}
-const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
- ElMessage.warning('只能上传一个文件')
-}
-// 移除时触发
-const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
- return ElMessageBox.confirm(
- `确认移除${uploadFile.name}文件吗 ?`,
- ).then(
- () => true,
- () => false,
-
- )
-}
-// 点击文件预览
-const uploadShow = (e: any) => {
- const URL = window.URL || window.webkitURL
- window.open(URL.createObjectURL(e.raw))
-}
-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,
- // '
',
- // )
- // }
+const setData = (newValue: object) => {
+ formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
@@ -223,60 +72,29 @@
}
}
// 提交
-const submitForm = (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
+const submitForm = () => {
if (props.buttonType === '详情') { return submitFormDetail() }
- formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- props.buttonType === ''
- ? getStandardListAdd(formInline.value).then((res) => {
- if (res.code === 200) {
- close()
- }
- })
- : submitFormDetail()
- })
- }
- })
-}
-// 标准实验室发生改变row类型
-interface rowReturn {
- phone: string
- director: string
-}
-// 标准实验室发生改变
-const changeDeptList = (row: object) => {
- formInline.value.laboratoryOwnerContact = row.phone
- formInline.value.laboratoryOwner = row.director
-}
-// 标准实验室清空时
-const clearDeptList = () => {
- formInline.value.laboratoryOwnerContact = null
- formInline.value.laboratoryOwner = null
-}
-// 获取详情信息
-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()
- }
+ ElMessageBox.confirm(
+ '确认提交吗?',
+ '提示',
+ {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning',
+ },
+ ).then(() => {
+ current.value = '基本信息'
+ currentCompRef.value.submitForm().validate().then(() => {
+ props.buttonType === ''
+ ? getStandardListAdd(formInline.value).then((res) => {
+ if (res.code === 200) {
+ close()
+ }
+ })
+ : submitFormDetail()
})
- formInline.value = res.data
})
}
-if (props.buttonType !== '') {
- getInfo()
-}
@@ -289,7 +107,7 @@
{{ buttonType === '详情' ? '打印' : '提交' }}
@@ -298,405 +116,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 上传
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
@@ -719,14 +149,8 @@
}
}
-.info-content {
- margin-top: 10px;
- padding: 30px;
- border-radius: 10px;
+.body {
background-color: #fff;
-}
-
-:deep .el-input .el-input--default .el-input--suffix {
- width: 200px !important;
+ margin-top: 10px;
}
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 35786b2..f4ce07a 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -26,39 +26,47 @@
text: '标准代码',
value: 'standardNo',
width: '160',
+ align: 'center',
},
{
text: '标准名称',
value: 'standardName',
width: '90',
+ align: 'center',
},
{
text: '管理状态',
value: 'managerStateName',
width: '100',
+ align: 'center',
},
{
text: '标准所在部门',
value: 'standardLaboratoryName',
width: '120',
+ align: 'center',
},
{
text: '负责人',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '建标项目',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '筹建日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
{
text: '有效日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
])
const total = ref(0)
@@ -344,17 +352,17 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '编辑')"
+ @click="handleClick(row.$index, row, '详情')"
>
- 编辑
+ 详情
- 详情
+ 提醒
{
+ console.log(e)
+}
@@ -342,7 +355,7 @@
diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue
index cb2ebe6..380779a 100644
--- a/src/views/measure/bench/bench.vue
+++ b/src/views/measure/bench/bench.vue
@@ -175,7 +175,7 @@
v-if="proxy.hasPerm('/workbench/meterTrain/line')"
title="培训计划"
width="27.8vw"
- height="40vh"
+ height="40.7vh"
>
{
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
+const disabled = ref(false)
+const setData = (newIsShow) => {
+ if (newIsShow === false) {
+ disabled.value = true
+ }
+ else {
+ disabled.value = false
+ }
+}
diff --git a/src/views/measure/source/components/listPage.vue b/src/views/measure/source/components/listPage.vue
index a9c9509..414fc47 100644
--- a/src/views/measure/source/components/listPage.vue
+++ b/src/views/measure/source/components/listPage.vue
@@ -17,6 +17,7 @@
default: () => [],
},
})
+const emit = defineEmits(['setData']) // 关闭
// 查询条件
const listQuery: Ref = ref({
supplierNo: '', // 业务内容
@@ -28,53 +29,63 @@
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
-const list = ref([])
+const list = ref([
+ { name: '张三' },
+])
// 总数
-const total = ref(20)
+const total = ref(0)
// 表头
const columns = ref([
{
text: '溯源供方编号',
- value: 'supplierNo',
- width: '160',
+ value: 'name',
+ width: '120',
+ align: 'center',
},
{
text: '溯源供方名称',
- value: 'supplierName',
+ value: 'name',
width: '120',
+ align: 'center',
},
{
text: '业务内容',
- value: 'businessContent',
+ value: 'name',
+ align: 'center',
},
{
text: '业务资质',
- value: 'briefName',
+ value: 'name',
+ align: 'center',
},
{
text: '负责人',
- value: 'director',
+ value: 'name',
+ align: 'center',
},
{
text: '联系方式',
- value: 'mobile',
+ value: 'name',
+ align: 'center',
},
{
text: '地址',
- value: 'companyCity',
+ value: 'name',
+ align: 'center',
},
{
text: '创建时间',
- value: 'createTime',
- width: '200',
+ value: 'name',
+ align: 'center',
},
{
text: '备注',
- value: 'remark',
+ value: 'name',
+ align: 'center',
},
])
-const buttonArray = ref([])
+const buttonArray = ref([])
// 选中的内容
const checkoutList = ref([])
// 文件上传input
@@ -98,20 +109,24 @@
loadingTable.value = false
})
}
-fetchData(true)
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
}
+// 点击删除和编辑的参数类型
+interface rowReturn {
+ id: string
+ supplierName: string
+}
// 点击编辑/详情
-const handleEdit = (index: string, row: object, value: string) => {
+const handleEdit = (index: string, row: rowReturn, value: string) => {
buttonArray.value = ['同意', '驳回', '拒绝']
buttonType.value = value
infoId.value = row.id
show.value = false
}
// 点击删除
-const handleDelete = (index: string, row: object) => {
+const handleDelete = (index: string, row: rowReturn) => {
ElMessageBox.confirm(
`确认删除${row.supplierName}吗?`,
'提示',
@@ -153,7 +168,7 @@
// 关闭编辑
const close = () => {
show.value = true
- fetchData(true)
+ // fetchData(true)
}
// 导出
const exportExcelBtn = () => {
@@ -218,30 +233,24 @@
upload()
}
const add = () => {
+ buttonArray.value = ['提交', '保存']
buttonType.value = ''
show.value = false
}
const exportAll = () => {
exportExcelBtn()
}
+watch(() => show.value, (newVal) => {
+// 变化后存储
+ emit('setData', newVal)
+},
+{ deep: true, immediate: true })
// 打印
const printObj = ref({
id: 'print', // 需要打印元素的id
popTitle: '溯源供方编号模板', // 打印配置页上方的标题
extraHead: '', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割
preview: false, // 是否启动预览模式,默认是false
- previewBeforeOpenCallback() { console.log('正在加载预览窗口!') }, // 预览窗口打开之前的callback
- previewOpenCallback() { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback
- beforeOpenCallback() { console.log('开始打印之前!') }, // 开始打印之前的callback
- openCallback() { console.log('执行打印了!') }, // 调用打印时的callback
- closeCallback() { console.log('关闭了打印工具!') }, // 关闭打印的callback(无法区分确认or取消)
- clickMounted() { console.log('点击v-print绑定的按钮了!') },
- // url: 'http://localhost:8080/', // 打印指定的URL,确保同源策略相同
- // asyncUrl (reslove) {
- // setTimeout(() => {
- // reslove('http://localhost:8080/')
- // }, 2000)
- // },
standard: '',
extarCss: '',
})
@@ -304,8 +313,8 @@
[],
},
})
+const emit = defineEmits(['setData']) // 禁用
// 查询条件
const listQuery: Ref = ref({
supplierNo: '', // 业务内容
@@ -29,64 +30,86 @@
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
-const list = ref([])
+const list = ref([
+ { name: '张三' },
+])
// 总数
-const total = ref(20)
+const total = ref(0)
// 表头
const columns = ref([
{
text: '计划编号',
- value: 'supplierNo',
- width: '160',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训名称',
- value: 'supplierName',
- width: '120',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训对象',
- value: 'businessContent',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训人数',
- value: 'briefName',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训学时',
- value: 'director',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训时间',
- value: 'mobile',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '主管部门',
- value: 'companyCity',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '实施单位',
- value: 'createTime',
- width: '120',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '负责人',
- value: 'remark',
+ value: 'name',
+ align: 'center',
},
{
text: '培训内容',
- value: 'remark',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '创建时间',
- value: 'remark',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '审批状态',
- value: 'remark',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
])
-
+const buttonArray = ref([])
// 选中的内容
const checkoutList = ref([])
// 文件上传input
@@ -112,7 +135,7 @@
loadingTable.value = false
})
}
-fetchData(true)
+// fetchData(true)
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
@@ -124,6 +147,7 @@
}
// 点击编辑/详情
const handleEdit = (index: string, row: rowReturn, value: string) => {
+ buttonArray.value = ['同意', '驳回', '拒绝']
buttonType.value = value
infoId.value = row.id
show.value = false
@@ -165,7 +189,7 @@
}
// 点击搜索
const searchList = () => {
- fetchData(true)
+ // fetchData(true)
}
const cancelEvent = () => {
console.log('cancel!')
@@ -183,7 +207,7 @@
// 关闭编辑
const close = () => {
show.value = true
- fetchData(true)
+ // fetchData(true)
}
// 导出
const exportExcelBtn = () => {
@@ -250,6 +274,12 @@
const exportAll = () => {
exportExcelBtn()
}
+// 新增页面显示就调用父组件方法禁用tap栏
+watch(() => show.value, (newVal) => {
+// 变化后存储
+ emit('setData', newVal)
+},
+{ deep: true, immediate: true })
// 打印
const printObj = ref({
id: 'print', // 需要打印元素的id
@@ -336,8 +366,8 @@
diff --git a/src/views/measure/train/components/listPageAdd.vue b/src/views/measure/train/components/listPageAdd.vue
index a9769ad..ebbc451 100644
--- a/src/views/measure/train/components/listPageAdd.vue
+++ b/src/views/measure/train/components/listPageAdd.vue
@@ -15,6 +15,10 @@
type: String,
default: '',
},
+ buttonArray: {
+ type: Array,
+ default: () => [],
+ },
})
const emit = defineEmits(['close'])
const formInline = ref({
@@ -144,13 +148,8 @@
培训计划
-
- {{ buttonType === '详情' ? '打印' : '提交' }}
+
+ {{ item }}
关闭
diff --git a/src/views/measure/train/plan.vue b/src/views/measure/train/plan.vue
index d8df331..c565376 100644
--- a/src/views/measure/train/plan.vue
+++ b/src/views/measure/train/plan.vue
@@ -46,55 +46,66 @@
text: '计划编号',
value: 'planNo',
width: '90',
+ align: 'center',
},
{
text: '培训名称',
value: 'planName',
width: '90',
+ align: 'center',
},
{
text: '培训对象',
value: 'trainPerson',
width: '90',
+ align: 'center',
},
{
text: '培训人数',
value: 'trainNumber',
width: '90',
+ align: 'center',
},
{
text: '培训学时',
value: 'trainHour',
width: '90',
+ align: 'center',
},
{
text: '培训时间',
value: 'trainTime',
width: '90',
+ align: 'center',
},
{
text: '主管部门',
value: 'deptName',
+ align: 'center',
},
{
text: '实施单位',
value: 'effectiveCompany',
width: '90',
+ align: 'center',
},
{
text: '培训内容',
value: 'trainContent',
width: '90',
+ align: 'center',
},
{
text: '创建时间',
value: 'createTime',
width: '90',
+ align: 'center',
},
{
text: '备注',
value: 'remark',
width: '100',
+ align: 'center',
},
])
// 搜索
diff --git a/src/components.d.ts b/src/components.d.ts
index 5a09663..2e27c4d 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -13,6 +13,8 @@
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
+ BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default']
+ BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default']
BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default']
Benchcol: typeof import('./components/benchcol/index.vue')['default']
BenchCol: typeof import('./components/benchCol/index.vue')['default']
@@ -20,7 +22,6 @@
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
- Echarts: typeof import('./components/echarts/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default']
@@ -30,13 +31,14 @@
ImagePreview: typeof import('./components/ImagePreview/index.vue')['default']
ImagesUpload: typeof import('./components/ImagesUpload/index.vue')['default']
ImageUpload: typeof import('./components/ImageUpload/index.vue')['default']
+ LineChart: typeof import('./components/Echart/LineChart.vue')['default']
NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default']
NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default']
NormalTable: typeof import('./components/NormalTable/index.vue')['default']
PageHeader: typeof import('./components/PageHeader/index.vue')['default']
PageMain: typeof import('./components/PageMain/index.vue')['default']
PcasCascader: typeof import('./components/PcasCascader/index.vue')['default']
- Pie: typeof import('./components/echarts/pie.vue')['default']
+ PieChart: typeof import('./components/Echart/PieChart.vue')['default']
PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default']
RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
diff --git a/src/views/device/standardEquipment/changeApply.vue b/src/views/device/standardEquipment/changeApply.vue
index 0762330..6be4200 100644
--- a/src/views/device/standardEquipment/changeApply.vue
+++ b/src/views/device/standardEquipment/changeApply.vue
@@ -1,13 +1,65 @@
-
-
- 更换申请
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/all.vue b/src/views/device/standardEquipment/components/changeApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/approvalPending.vue b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/canceled.vue b/src/views/device/standardEquipment/components/changeApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/draftBox.vue b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPage.vue b/src/views/device/standardEquipment/components/changeApply/listPage.vue
new file mode 100644
index 0000000..bcf35ee
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPage.vue
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
new file mode 100644
index 0000000..71e68f7
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
@@ -0,0 +1,693 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/notPass.vue b/src/views/device/standardEquipment/components/changeApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/passed.vue b/src/views/device/standardEquipment/components/changeApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/addRow.vue b/src/views/device/standardEquipment/components/standardList/addRow.vue
new file mode 100644
index 0000000..9f2bf81
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/addRow.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
new file mode 100644
index 0000000..c47ad1d
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -0,0 +1,675 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/temptable.vue b/src/views/device/standardEquipment/components/standardList/temptable.vue
new file mode 100644
index 0000000..59120b8
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/temptable.vue
@@ -0,0 +1,388 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (searchQuery.offset - 1) * searchQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index ea13629..348bb41 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -3,6 +3,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus'
import type { IOptions } from '../standard_interface'
+import baseInfo from './standardList/baseInfo.vue'
+import table from './standardList/temptable.vue'
import { getStaffList } from '@/api/measure/person'
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
@@ -17,188 +19,35 @@
default: '',
},
})
-const emit = defineEmits(['close']) // 关闭
-const ruleFormRef = ref()
-// 逻辑代码
-const formInline = ref({
- assessDate: '',
- assessmentUnit: '',
- category: null,
- categoryName: '',
- constructionStandardProject: '',
- constructionStandardUnitName: '',
- contactInfo: '',
- createTime: null,
- createUser: null,
- id: '',
- isDel: null,
- laboratoryOwner: null,
- laboratoryOwnerContact: null,
- laboratoryOwnerName: null,
- managerState: null,
- managerStateName: '',
- measureMajor: null,
- fileList: [],
- measureMajorName: '',
- mesureRange: '',
- organizeNo: '',
- preparationDate: '',
- projectNo: '',
- remark: '',
- standardHumidity: null,
- standardLaboratory: null,
- standardLaboratoryName: '',
- standardLevel: null,
- standardLevelName: '',
- standardName: '',
- standardNo: '',
- standardOwner: null,
- standardOwnerName: '',
- standardTemperature: null,
- totalInvestment: null,
- transmitRange: null,
- 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
- }
- })
+const emit = defineEmits(['close'])
+// 定义数据
+const formInline = ref({})
+// 关闭
+interface menuType {
+ name: string
+ comp: any
}
-getSelectList('measureMajor') // 获取计量专业下拉框
-getSelectList('standardManagerState') // 获取管理状态下拉框
-getSelectList('standardLevel') // 获取标准等级下拉框
-getSelectList('transmitRange') // 获取传递范围下拉框
-getSelectList('standardCategory') // 获取类别下拉框
-// 获取部门信息
-getUsersDept({
- createTime: '',
- director: '',
- meterMajor: '',
- organizeName: '',
- organizeNo: '',
- organizeType: '2',
- pdeptId: null,
- offset: 1,
- limit: 999999,
-}).then((res) => {
- standardUsersDeptList.value = res.data.rows
+const menu = shallowRef([
+ { name: '基本信息', comp: baseInfo },
+ { name: '计量人员', comp: table },
+ { name: '标准配套设备', comp: table },
+ { name: '检定规程', comp: table },
+ { name: '重复性考核记录', comp: table },
+ { name: '稳定性考核记录', comp: table },
+ { name: '证书管理', comp: table },
+])
+const currentCompRef = ref()
+const current = ref('基本信息')
+const currentComp = shallowRef(baseInfo)
+watch(current, (newValue) => {
+ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 获取到标准负责人数组
-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 uploadQuarterlyEvaluateFile = (file: File) => {
- const fd = new FormData()
- fd.append('multipartFile', file.file)
- UploadFile(fd).then((res) => {
- if (res.code === 200) {
- formInline.value.fileList = res.data
- // 重置当前验证
- ElMessage.success('文件上传成功')
- }
- })
-}
-const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
- ElMessage.warning('只能上传一个文件')
-}
-// 移除时触发
-const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
- return ElMessageBox.confirm(
- `确认移除${uploadFile.name}文件吗 ?`,
- ).then(
- () => true,
- () => false,
-
- )
-}
-// 点击文件预览
-const uploadShow = (e: any) => {
- const URL = window.URL || window.webkitURL
- window.open(URL.createObjectURL(e.raw))
-}
-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,
- // '
',
- // )
- // }
+const setData = (newValue: object) => {
+ formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
@@ -223,60 +72,29 @@
}
}
// 提交
-const submitForm = (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
+const submitForm = () => {
if (props.buttonType === '详情') { return submitFormDetail() }
- formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- props.buttonType === ''
- ? getStandardListAdd(formInline.value).then((res) => {
- if (res.code === 200) {
- close()
- }
- })
- : submitFormDetail()
- })
- }
- })
-}
-// 标准实验室发生改变row类型
-interface rowReturn {
- phone: string
- director: string
-}
-// 标准实验室发生改变
-const changeDeptList = (row: object) => {
- formInline.value.laboratoryOwnerContact = row.phone
- formInline.value.laboratoryOwner = row.director
-}
-// 标准实验室清空时
-const clearDeptList = () => {
- formInline.value.laboratoryOwnerContact = null
- formInline.value.laboratoryOwner = null
-}
-// 获取详情信息
-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()
- }
+ ElMessageBox.confirm(
+ '确认提交吗?',
+ '提示',
+ {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning',
+ },
+ ).then(() => {
+ current.value = '基本信息'
+ currentCompRef.value.submitForm().validate().then(() => {
+ props.buttonType === ''
+ ? getStandardListAdd(formInline.value).then((res) => {
+ if (res.code === 200) {
+ close()
+ }
+ })
+ : submitFormDetail()
})
- formInline.value = res.data
})
}
-if (props.buttonType !== '') {
- getInfo()
-}
@@ -289,7 +107,7 @@
{{ buttonType === '详情' ? '打印' : '提交' }}
@@ -298,405 +116,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 上传
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
@@ -719,14 +149,8 @@
}
}
-.info-content {
- margin-top: 10px;
- padding: 30px;
- border-radius: 10px;
+.body {
background-color: #fff;
-}
-
-:deep .el-input .el-input--default .el-input--suffix {
- width: 200px !important;
+ margin-top: 10px;
}
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 35786b2..f4ce07a 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -26,39 +26,47 @@
text: '标准代码',
value: 'standardNo',
width: '160',
+ align: 'center',
},
{
text: '标准名称',
value: 'standardName',
width: '90',
+ align: 'center',
},
{
text: '管理状态',
value: 'managerStateName',
width: '100',
+ align: 'center',
},
{
text: '标准所在部门',
value: 'standardLaboratoryName',
width: '120',
+ align: 'center',
},
{
text: '负责人',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '建标项目',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '筹建日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
{
text: '有效日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
])
const total = ref(0)
@@ -344,17 +352,17 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '编辑')"
+ @click="handleClick(row.$index, row, '详情')"
>
- 编辑
+ 详情
- 详情
+ 提醒
{
+ console.log(e)
+}
@@ -342,7 +355,7 @@
diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue
index cb2ebe6..380779a 100644
--- a/src/views/measure/bench/bench.vue
+++ b/src/views/measure/bench/bench.vue
@@ -175,7 +175,7 @@
v-if="proxy.hasPerm('/workbench/meterTrain/line')"
title="培训计划"
width="27.8vw"
- height="40vh"
+ height="40.7vh"
>
{
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
+const disabled = ref(false)
+const setData = (newIsShow) => {
+ if (newIsShow === false) {
+ disabled.value = true
+ }
+ else {
+ disabled.value = false
+ }
+}
diff --git a/src/views/measure/source/components/listPage.vue b/src/views/measure/source/components/listPage.vue
index a9c9509..414fc47 100644
--- a/src/views/measure/source/components/listPage.vue
+++ b/src/views/measure/source/components/listPage.vue
@@ -17,6 +17,7 @@
default: () => [],
},
})
+const emit = defineEmits(['setData']) // 关闭
// 查询条件
const listQuery: Ref = ref({
supplierNo: '', // 业务内容
@@ -28,53 +29,63 @@
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
-const list = ref([])
+const list = ref([
+ { name: '张三' },
+])
// 总数
-const total = ref(20)
+const total = ref(0)
// 表头
const columns = ref([
{
text: '溯源供方编号',
- value: 'supplierNo',
- width: '160',
+ value: 'name',
+ width: '120',
+ align: 'center',
},
{
text: '溯源供方名称',
- value: 'supplierName',
+ value: 'name',
width: '120',
+ align: 'center',
},
{
text: '业务内容',
- value: 'businessContent',
+ value: 'name',
+ align: 'center',
},
{
text: '业务资质',
- value: 'briefName',
+ value: 'name',
+ align: 'center',
},
{
text: '负责人',
- value: 'director',
+ value: 'name',
+ align: 'center',
},
{
text: '联系方式',
- value: 'mobile',
+ value: 'name',
+ align: 'center',
},
{
text: '地址',
- value: 'companyCity',
+ value: 'name',
+ align: 'center',
},
{
text: '创建时间',
- value: 'createTime',
- width: '200',
+ value: 'name',
+ align: 'center',
},
{
text: '备注',
- value: 'remark',
+ value: 'name',
+ align: 'center',
},
])
-const buttonArray = ref([])
+const buttonArray = ref([])
// 选中的内容
const checkoutList = ref([])
// 文件上传input
@@ -98,20 +109,24 @@
loadingTable.value = false
})
}
-fetchData(true)
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
}
+// 点击删除和编辑的参数类型
+interface rowReturn {
+ id: string
+ supplierName: string
+}
// 点击编辑/详情
-const handleEdit = (index: string, row: object, value: string) => {
+const handleEdit = (index: string, row: rowReturn, value: string) => {
buttonArray.value = ['同意', '驳回', '拒绝']
buttonType.value = value
infoId.value = row.id
show.value = false
}
// 点击删除
-const handleDelete = (index: string, row: object) => {
+const handleDelete = (index: string, row: rowReturn) => {
ElMessageBox.confirm(
`确认删除${row.supplierName}吗?`,
'提示',
@@ -153,7 +168,7 @@
// 关闭编辑
const close = () => {
show.value = true
- fetchData(true)
+ // fetchData(true)
}
// 导出
const exportExcelBtn = () => {
@@ -218,30 +233,24 @@
upload()
}
const add = () => {
+ buttonArray.value = ['提交', '保存']
buttonType.value = ''
show.value = false
}
const exportAll = () => {
exportExcelBtn()
}
+watch(() => show.value, (newVal) => {
+// 变化后存储
+ emit('setData', newVal)
+},
+{ deep: true, immediate: true })
// 打印
const printObj = ref({
id: 'print', // 需要打印元素的id
popTitle: '溯源供方编号模板', // 打印配置页上方的标题
extraHead: '', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割
preview: false, // 是否启动预览模式,默认是false
- previewBeforeOpenCallback() { console.log('正在加载预览窗口!') }, // 预览窗口打开之前的callback
- previewOpenCallback() { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback
- beforeOpenCallback() { console.log('开始打印之前!') }, // 开始打印之前的callback
- openCallback() { console.log('执行打印了!') }, // 调用打印时的callback
- closeCallback() { console.log('关闭了打印工具!') }, // 关闭打印的callback(无法区分确认or取消)
- clickMounted() { console.log('点击v-print绑定的按钮了!') },
- // url: 'http://localhost:8080/', // 打印指定的URL,确保同源策略相同
- // asyncUrl (reslove) {
- // setTimeout(() => {
- // reslove('http://localhost:8080/')
- // }, 2000)
- // },
standard: '',
extarCss: '',
})
@@ -304,8 +313,8 @@
[],
},
})
+const emit = defineEmits(['setData']) // 禁用
// 查询条件
const listQuery: Ref = ref({
supplierNo: '', // 业务内容
@@ -29,64 +30,86 @@
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
-const list = ref([])
+const list = ref([
+ { name: '张三' },
+])
// 总数
-const total = ref(20)
+const total = ref(0)
// 表头
const columns = ref([
{
text: '计划编号',
- value: 'supplierNo',
- width: '160',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训名称',
- value: 'supplierName',
- width: '120',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训对象',
- value: 'businessContent',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训人数',
- value: 'briefName',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训学时',
- value: 'director',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训时间',
- value: 'mobile',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '主管部门',
- value: 'companyCity',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '实施单位',
- value: 'createTime',
- width: '120',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '负责人',
- value: 'remark',
+ value: 'name',
+ align: 'center',
},
{
text: '培训内容',
- value: 'remark',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '创建时间',
- value: 'remark',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '审批状态',
- value: 'remark',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
])
-
+const buttonArray = ref([])
// 选中的内容
const checkoutList = ref([])
// 文件上传input
@@ -112,7 +135,7 @@
loadingTable.value = false
})
}
-fetchData(true)
+// fetchData(true)
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
@@ -124,6 +147,7 @@
}
// 点击编辑/详情
const handleEdit = (index: string, row: rowReturn, value: string) => {
+ buttonArray.value = ['同意', '驳回', '拒绝']
buttonType.value = value
infoId.value = row.id
show.value = false
@@ -165,7 +189,7 @@
}
// 点击搜索
const searchList = () => {
- fetchData(true)
+ // fetchData(true)
}
const cancelEvent = () => {
console.log('cancel!')
@@ -183,7 +207,7 @@
// 关闭编辑
const close = () => {
show.value = true
- fetchData(true)
+ // fetchData(true)
}
// 导出
const exportExcelBtn = () => {
@@ -250,6 +274,12 @@
const exportAll = () => {
exportExcelBtn()
}
+// 新增页面显示就调用父组件方法禁用tap栏
+watch(() => show.value, (newVal) => {
+// 变化后存储
+ emit('setData', newVal)
+},
+{ deep: true, immediate: true })
// 打印
const printObj = ref({
id: 'print', // 需要打印元素的id
@@ -336,8 +366,8 @@
diff --git a/src/views/measure/train/components/listPageAdd.vue b/src/views/measure/train/components/listPageAdd.vue
index a9769ad..ebbc451 100644
--- a/src/views/measure/train/components/listPageAdd.vue
+++ b/src/views/measure/train/components/listPageAdd.vue
@@ -15,6 +15,10 @@
type: String,
default: '',
},
+ buttonArray: {
+ type: Array,
+ default: () => [],
+ },
})
const emit = defineEmits(['close'])
const formInline = ref({
@@ -144,13 +148,8 @@
培训计划
-
- {{ buttonType === '详情' ? '打印' : '提交' }}
+
+ {{ item }}
关闭
diff --git a/src/views/measure/train/plan.vue b/src/views/measure/train/plan.vue
index d8df331..c565376 100644
--- a/src/views/measure/train/plan.vue
+++ b/src/views/measure/train/plan.vue
@@ -46,55 +46,66 @@
text: '计划编号',
value: 'planNo',
width: '90',
+ align: 'center',
},
{
text: '培训名称',
value: 'planName',
width: '90',
+ align: 'center',
},
{
text: '培训对象',
value: 'trainPerson',
width: '90',
+ align: 'center',
},
{
text: '培训人数',
value: 'trainNumber',
width: '90',
+ align: 'center',
},
{
text: '培训学时',
value: 'trainHour',
width: '90',
+ align: 'center',
},
{
text: '培训时间',
value: 'trainTime',
width: '90',
+ align: 'center',
},
{
text: '主管部门',
value: 'deptName',
+ align: 'center',
},
{
text: '实施单位',
value: 'effectiveCompany',
width: '90',
+ align: 'center',
},
{
text: '培训内容',
value: 'trainContent',
width: '90',
+ align: 'center',
},
{
text: '创建时间',
value: 'createTime',
width: '90',
+ align: 'center',
},
{
text: '备注',
value: 'remark',
width: '100',
+ align: 'center',
},
])
// 搜索
diff --git a/src/views/measure/train/trainLog.vue b/src/views/measure/train/trainLog.vue
index 62a5183..f3392e4 100644
--- a/src/views/measure/train/trainLog.vue
+++ b/src/views/measure/train/trainLog.vue
@@ -42,46 +42,55 @@
{
text: '记录编号',
value: 'logNo',
+ align: 'center',
},
{
text: '培训名称',
value: 'trainName',
width: '120',
+ align: 'center',
},
{
text: '培训时间',
value: 'trainTime',
width: '160',
+ align: 'center',
},
{
text: '培训地点',
value: 'trainAddress',
width: '100',
+ align: 'center',
},
{
text: '培训学时',
value: 'trainHour',
width: '100',
+ align: 'center',
},
{
text: '培训对象',
value: 'trainPerson',
width: '100',
+ align: 'center',
},
{
text: '培训人数',
value: 'trainNumber',
width: '100',
+ align: 'center',
},
{
text: '创建时间',
value: 'createTime',
width: '160',
+ align: 'center',
},
{
text: '备注',
value: 'remark',
width: '120',
+ align: 'center',
},
])
// 搜索
diff --git a/src/components.d.ts b/src/components.d.ts
index 5a09663..2e27c4d 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -13,6 +13,8 @@
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
+ BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default']
+ BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default']
BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default']
Benchcol: typeof import('./components/benchcol/index.vue')['default']
BenchCol: typeof import('./components/benchCol/index.vue')['default']
@@ -20,7 +22,6 @@
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
- Echarts: typeof import('./components/echarts/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default']
@@ -30,13 +31,14 @@
ImagePreview: typeof import('./components/ImagePreview/index.vue')['default']
ImagesUpload: typeof import('./components/ImagesUpload/index.vue')['default']
ImageUpload: typeof import('./components/ImageUpload/index.vue')['default']
+ LineChart: typeof import('./components/Echart/LineChart.vue')['default']
NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default']
NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default']
NormalTable: typeof import('./components/NormalTable/index.vue')['default']
PageHeader: typeof import('./components/PageHeader/index.vue')['default']
PageMain: typeof import('./components/PageMain/index.vue')['default']
PcasCascader: typeof import('./components/PcasCascader/index.vue')['default']
- Pie: typeof import('./components/echarts/pie.vue')['default']
+ PieChart: typeof import('./components/Echart/PieChart.vue')['default']
PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default']
RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
diff --git a/src/views/device/standardEquipment/changeApply.vue b/src/views/device/standardEquipment/changeApply.vue
index 0762330..6be4200 100644
--- a/src/views/device/standardEquipment/changeApply.vue
+++ b/src/views/device/standardEquipment/changeApply.vue
@@ -1,13 +1,65 @@
-
-
- 更换申请
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/all.vue b/src/views/device/standardEquipment/components/changeApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/approvalPending.vue b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/canceled.vue b/src/views/device/standardEquipment/components/changeApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/draftBox.vue b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPage.vue b/src/views/device/standardEquipment/components/changeApply/listPage.vue
new file mode 100644
index 0000000..bcf35ee
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPage.vue
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
new file mode 100644
index 0000000..71e68f7
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/listPageAdd.vue
@@ -0,0 +1,693 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/notPass.vue b/src/views/device/standardEquipment/components/changeApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/changeApply/passed.vue b/src/views/device/standardEquipment/components/changeApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/standardEquipment/components/changeApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/addRow.vue b/src/views/device/standardEquipment/components/standardList/addRow.vue
new file mode 100644
index 0000000..9f2bf81
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/addRow.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
new file mode 100644
index 0000000..c47ad1d
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -0,0 +1,675 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardList/temptable.vue b/src/views/device/standardEquipment/components/standardList/temptable.vue
new file mode 100644
index 0000000..59120b8
--- /dev/null
+++ b/src/views/device/standardEquipment/components/standardList/temptable.vue
@@ -0,0 +1,388 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (searchQuery.offset - 1) * searchQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index ea13629..348bb41 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -3,6 +3,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus'
import type { IOptions } from '../standard_interface'
+import baseInfo from './standardList/baseInfo.vue'
+import table from './standardList/temptable.vue'
import { getStaffList } from '@/api/measure/person'
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
@@ -17,188 +19,35 @@
default: '',
},
})
-const emit = defineEmits(['close']) // 关闭
-const ruleFormRef = ref()
-// 逻辑代码
-const formInline = ref({
- assessDate: '',
- assessmentUnit: '',
- category: null,
- categoryName: '',
- constructionStandardProject: '',
- constructionStandardUnitName: '',
- contactInfo: '',
- createTime: null,
- createUser: null,
- id: '',
- isDel: null,
- laboratoryOwner: null,
- laboratoryOwnerContact: null,
- laboratoryOwnerName: null,
- managerState: null,
- managerStateName: '',
- measureMajor: null,
- fileList: [],
- measureMajorName: '',
- mesureRange: '',
- organizeNo: '',
- preparationDate: '',
- projectNo: '',
- remark: '',
- standardHumidity: null,
- standardLaboratory: null,
- standardLaboratoryName: '',
- standardLevel: null,
- standardLevelName: '',
- standardName: '',
- standardNo: '',
- standardOwner: null,
- standardOwnerName: '',
- standardTemperature: null,
- totalInvestment: null,
- transmitRange: null,
- 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
- }
- })
+const emit = defineEmits(['close'])
+// 定义数据
+const formInline = ref({})
+// 关闭
+interface menuType {
+ name: string
+ comp: any
}
-getSelectList('measureMajor') // 获取计量专业下拉框
-getSelectList('standardManagerState') // 获取管理状态下拉框
-getSelectList('standardLevel') // 获取标准等级下拉框
-getSelectList('transmitRange') // 获取传递范围下拉框
-getSelectList('standardCategory') // 获取类别下拉框
-// 获取部门信息
-getUsersDept({
- createTime: '',
- director: '',
- meterMajor: '',
- organizeName: '',
- organizeNo: '',
- organizeType: '2',
- pdeptId: null,
- offset: 1,
- limit: 999999,
-}).then((res) => {
- standardUsersDeptList.value = res.data.rows
+const menu = shallowRef([
+ { name: '基本信息', comp: baseInfo },
+ { name: '计量人员', comp: table },
+ { name: '标准配套设备', comp: table },
+ { name: '检定规程', comp: table },
+ { name: '重复性考核记录', comp: table },
+ { name: '稳定性考核记录', comp: table },
+ { name: '证书管理', comp: table },
+])
+const currentCompRef = ref()
+const current = ref('基本信息')
+const currentComp = shallowRef(baseInfo)
+watch(current, (newValue) => {
+ currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 获取到标准负责人数组
-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 uploadQuarterlyEvaluateFile = (file: File) => {
- const fd = new FormData()
- fd.append('multipartFile', file.file)
- UploadFile(fd).then((res) => {
- if (res.code === 200) {
- formInline.value.fileList = res.data
- // 重置当前验证
- ElMessage.success('文件上传成功')
- }
- })
-}
-const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
- ElMessage.warning('只能上传一个文件')
-}
-// 移除时触发
-const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
- return ElMessageBox.confirm(
- `确认移除${uploadFile.name}文件吗 ?`,
- ).then(
- () => true,
- () => false,
-
- )
-}
-// 点击文件预览
-const uploadShow = (e: any) => {
- const URL = window.URL || window.webkitURL
- window.open(URL.createObjectURL(e.raw))
-}
-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,
- // '
',
- // )
- // }
+const setData = (newValue: object) => {
+ formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
@@ -223,60 +72,29 @@
}
}
// 提交
-const submitForm = (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
+const submitForm = () => {
if (props.buttonType === '详情') { return submitFormDetail() }
- formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- props.buttonType === ''
- ? getStandardListAdd(formInline.value).then((res) => {
- if (res.code === 200) {
- close()
- }
- })
- : submitFormDetail()
- })
- }
- })
-}
-// 标准实验室发生改变row类型
-interface rowReturn {
- phone: string
- director: string
-}
-// 标准实验室发生改变
-const changeDeptList = (row: object) => {
- formInline.value.laboratoryOwnerContact = row.phone
- formInline.value.laboratoryOwner = row.director
-}
-// 标准实验室清空时
-const clearDeptList = () => {
- formInline.value.laboratoryOwnerContact = null
- formInline.value.laboratoryOwner = null
-}
-// 获取详情信息
-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()
- }
+ ElMessageBox.confirm(
+ '确认提交吗?',
+ '提示',
+ {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning',
+ },
+ ).then(() => {
+ current.value = '基本信息'
+ currentCompRef.value.submitForm().validate().then(() => {
+ props.buttonType === ''
+ ? getStandardListAdd(formInline.value).then((res) => {
+ if (res.code === 200) {
+ close()
+ }
+ })
+ : submitFormDetail()
})
- formInline.value = res.data
})
}
-if (props.buttonType !== '') {
- getInfo()
-}
@@ -289,7 +107,7 @@
{{ buttonType === '详情' ? '打印' : '提交' }}
@@ -298,405 +116,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 上传
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
@@ -719,14 +149,8 @@
}
}
-.info-content {
- margin-top: 10px;
- padding: 30px;
- border-radius: 10px;
+.body {
background-color: #fff;
-}
-
-:deep .el-input .el-input--default .el-input--suffix {
- width: 200px !important;
+ margin-top: 10px;
}
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 35786b2..f4ce07a 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -26,39 +26,47 @@
text: '标准代码',
value: 'standardNo',
width: '160',
+ align: 'center',
},
{
text: '标准名称',
value: 'standardName',
width: '90',
+ align: 'center',
},
{
text: '管理状态',
value: 'managerStateName',
width: '100',
+ align: 'center',
},
{
text: '标准所在部门',
value: 'standardLaboratoryName',
width: '120',
+ align: 'center',
},
{
text: '负责人',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '建标项目',
value: 'standardOwnerName',
+ align: 'center',
},
{
text: '筹建日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
{
text: '有效日期',
value: 'preparationDate',
width: '160',
+ align: 'center',
},
])
const total = ref(0)
@@ -344,17 +352,17 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '编辑')"
+ @click="handleClick(row.$index, row, '详情')"
>
- 编辑
+ 详情
- 详情
+ 提醒
{
+ console.log(e)
+}
@@ -342,7 +355,7 @@
diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue
index cb2ebe6..380779a 100644
--- a/src/views/measure/bench/bench.vue
+++ b/src/views/measure/bench/bench.vue
@@ -175,7 +175,7 @@
v-if="proxy.hasPerm('/workbench/meterTrain/line')"
title="培训计划"
width="27.8vw"
- height="40vh"
+ height="40.7vh"
>
{
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
+const disabled = ref(false)
+const setData = (newIsShow) => {
+ if (newIsShow === false) {
+ disabled.value = true
+ }
+ else {
+ disabled.value = false
+ }
+}
diff --git a/src/views/measure/source/components/listPage.vue b/src/views/measure/source/components/listPage.vue
index a9c9509..414fc47 100644
--- a/src/views/measure/source/components/listPage.vue
+++ b/src/views/measure/source/components/listPage.vue
@@ -17,6 +17,7 @@
default: () => [],
},
})
+const emit = defineEmits(['setData']) // 关闭
// 查询条件
const listQuery: Ref = ref({
supplierNo: '', // 业务内容
@@ -28,53 +29,63 @@
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
-const list = ref([])
+const list = ref([
+ { name: '张三' },
+])
// 总数
-const total = ref(20)
+const total = ref(0)
// 表头
const columns = ref([
{
text: '溯源供方编号',
- value: 'supplierNo',
- width: '160',
+ value: 'name',
+ width: '120',
+ align: 'center',
},
{
text: '溯源供方名称',
- value: 'supplierName',
+ value: 'name',
width: '120',
+ align: 'center',
},
{
text: '业务内容',
- value: 'businessContent',
+ value: 'name',
+ align: 'center',
},
{
text: '业务资质',
- value: 'briefName',
+ value: 'name',
+ align: 'center',
},
{
text: '负责人',
- value: 'director',
+ value: 'name',
+ align: 'center',
},
{
text: '联系方式',
- value: 'mobile',
+ value: 'name',
+ align: 'center',
},
{
text: '地址',
- value: 'companyCity',
+ value: 'name',
+ align: 'center',
},
{
text: '创建时间',
- value: 'createTime',
- width: '200',
+ value: 'name',
+ align: 'center',
},
{
text: '备注',
- value: 'remark',
+ value: 'name',
+ align: 'center',
},
])
-const buttonArray = ref([])
+const buttonArray = ref([])
// 选中的内容
const checkoutList = ref([])
// 文件上传input
@@ -98,20 +109,24 @@
loadingTable.value = false
})
}
-fetchData(true)
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
}
+// 点击删除和编辑的参数类型
+interface rowReturn {
+ id: string
+ supplierName: string
+}
// 点击编辑/详情
-const handleEdit = (index: string, row: object, value: string) => {
+const handleEdit = (index: string, row: rowReturn, value: string) => {
buttonArray.value = ['同意', '驳回', '拒绝']
buttonType.value = value
infoId.value = row.id
show.value = false
}
// 点击删除
-const handleDelete = (index: string, row: object) => {
+const handleDelete = (index: string, row: rowReturn) => {
ElMessageBox.confirm(
`确认删除${row.supplierName}吗?`,
'提示',
@@ -153,7 +168,7 @@
// 关闭编辑
const close = () => {
show.value = true
- fetchData(true)
+ // fetchData(true)
}
// 导出
const exportExcelBtn = () => {
@@ -218,30 +233,24 @@
upload()
}
const add = () => {
+ buttonArray.value = ['提交', '保存']
buttonType.value = ''
show.value = false
}
const exportAll = () => {
exportExcelBtn()
}
+watch(() => show.value, (newVal) => {
+// 变化后存储
+ emit('setData', newVal)
+},
+{ deep: true, immediate: true })
// 打印
const printObj = ref({
id: 'print', // 需要打印元素的id
popTitle: '溯源供方编号模板', // 打印配置页上方的标题
extraHead: '', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割
preview: false, // 是否启动预览模式,默认是false
- previewBeforeOpenCallback() { console.log('正在加载预览窗口!') }, // 预览窗口打开之前的callback
- previewOpenCallback() { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback
- beforeOpenCallback() { console.log('开始打印之前!') }, // 开始打印之前的callback
- openCallback() { console.log('执行打印了!') }, // 调用打印时的callback
- closeCallback() { console.log('关闭了打印工具!') }, // 关闭打印的callback(无法区分确认or取消)
- clickMounted() { console.log('点击v-print绑定的按钮了!') },
- // url: 'http://localhost:8080/', // 打印指定的URL,确保同源策略相同
- // asyncUrl (reslove) {
- // setTimeout(() => {
- // reslove('http://localhost:8080/')
- // }, 2000)
- // },
standard: '',
extarCss: '',
})
@@ -304,8 +313,8 @@
[],
},
})
+const emit = defineEmits(['setData']) // 禁用
// 查询条件
const listQuery: Ref = ref({
supplierNo: '', // 业务内容
@@ -29,64 +30,86 @@
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
-const list = ref([])
+const list = ref([
+ { name: '张三' },
+])
// 总数
-const total = ref(20)
+const total = ref(0)
// 表头
const columns = ref([
{
text: '计划编号',
- value: 'supplierNo',
- width: '160',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训名称',
- value: 'supplierName',
- width: '120',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训对象',
- value: 'businessContent',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训人数',
- value: 'briefName',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训学时',
- value: 'director',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '培训时间',
- value: 'mobile',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '主管部门',
- value: 'companyCity',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '实施单位',
- value: 'createTime',
- width: '120',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '负责人',
- value: 'remark',
+ value: 'name',
+ align: 'center',
},
{
text: '培训内容',
- value: 'remark',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '创建时间',
- value: 'remark',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
{
text: '审批状态',
- value: 'remark',
+ value: 'name',
+ width: '90',
+ align: 'center',
},
])
-
+const buttonArray = ref([])
// 选中的内容
const checkoutList = ref([])
// 文件上传input
@@ -112,7 +135,7 @@
loadingTable.value = false
})
}
-fetchData(true)
+// fetchData(true)
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
@@ -124,6 +147,7 @@
}
// 点击编辑/详情
const handleEdit = (index: string, row: rowReturn, value: string) => {
+ buttonArray.value = ['同意', '驳回', '拒绝']
buttonType.value = value
infoId.value = row.id
show.value = false
@@ -165,7 +189,7 @@
}
// 点击搜索
const searchList = () => {
- fetchData(true)
+ // fetchData(true)
}
const cancelEvent = () => {
console.log('cancel!')
@@ -183,7 +207,7 @@
// 关闭编辑
const close = () => {
show.value = true
- fetchData(true)
+ // fetchData(true)
}
// 导出
const exportExcelBtn = () => {
@@ -250,6 +274,12 @@
const exportAll = () => {
exportExcelBtn()
}
+// 新增页面显示就调用父组件方法禁用tap栏
+watch(() => show.value, (newVal) => {
+// 变化后存储
+ emit('setData', newVal)
+},
+{ deep: true, immediate: true })
// 打印
const printObj = ref({
id: 'print', // 需要打印元素的id
@@ -336,8 +366,8 @@
diff --git a/src/views/measure/train/components/listPageAdd.vue b/src/views/measure/train/components/listPageAdd.vue
index a9769ad..ebbc451 100644
--- a/src/views/measure/train/components/listPageAdd.vue
+++ b/src/views/measure/train/components/listPageAdd.vue
@@ -15,6 +15,10 @@
type: String,
default: '',
},
+ buttonArray: {
+ type: Array,
+ default: () => [],
+ },
})
const emit = defineEmits(['close'])
const formInline = ref({
@@ -144,13 +148,8 @@
培训计划
-
- {{ buttonType === '详情' ? '打印' : '提交' }}
+
+ {{ item }}
关闭
diff --git a/src/views/measure/train/plan.vue b/src/views/measure/train/plan.vue
index d8df331..c565376 100644
--- a/src/views/measure/train/plan.vue
+++ b/src/views/measure/train/plan.vue
@@ -46,55 +46,66 @@
text: '计划编号',
value: 'planNo',
width: '90',
+ align: 'center',
},
{
text: '培训名称',
value: 'planName',
width: '90',
+ align: 'center',
},
{
text: '培训对象',
value: 'trainPerson',
width: '90',
+ align: 'center',
},
{
text: '培训人数',
value: 'trainNumber',
width: '90',
+ align: 'center',
},
{
text: '培训学时',
value: 'trainHour',
width: '90',
+ align: 'center',
},
{
text: '培训时间',
value: 'trainTime',
width: '90',
+ align: 'center',
},
{
text: '主管部门',
value: 'deptName',
+ align: 'center',
},
{
text: '实施单位',
value: 'effectiveCompany',
width: '90',
+ align: 'center',
},
{
text: '培训内容',
value: 'trainContent',
width: '90',
+ align: 'center',
},
{
text: '创建时间',
value: 'createTime',
width: '90',
+ align: 'center',
},
{
text: '备注',
value: 'remark',
width: '100',
+ align: 'center',
},
])
// 搜索
diff --git a/src/views/measure/train/trainLog.vue b/src/views/measure/train/trainLog.vue
index 62a5183..f3392e4 100644
--- a/src/views/measure/train/trainLog.vue
+++ b/src/views/measure/train/trainLog.vue
@@ -42,46 +42,55 @@
{
text: '记录编号',
value: 'logNo',
+ align: 'center',
},
{
text: '培训名称',
value: 'trainName',
width: '120',
+ align: 'center',
},
{
text: '培训时间',
value: 'trainTime',
width: '160',
+ align: 'center',
},
{
text: '培训地点',
value: 'trainAddress',
width: '100',
+ align: 'center',
},
{
text: '培训学时',
value: 'trainHour',
width: '100',
+ align: 'center',
},
{
text: '培训对象',
value: 'trainPerson',
width: '100',
+ align: 'center',
},
{
text: '培训人数',
value: 'trainNumber',
width: '100',
+ align: 'center',
},
{
text: '创建时间',
value: 'createTime',
width: '160',
+ align: 'center',
},
{
text: '备注',
value: 'remark',
width: '120',
+ align: 'center',
},
])
// 搜索
diff --git a/src/views/measure/train/trainPlanApprove.vue b/src/views/measure/train/trainPlanApprove.vue
index abc147d..a20249f 100644
--- a/src/views/measure/train/trainPlanApprove.vue
+++ b/src/views/measure/train/trainPlanApprove.vue
@@ -24,20 +24,30 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
+// 控制顶部tap栏是否禁用
+const disabled = ref(false)
+const setData = (newIsShow: any) => {
+ if (newIsShow === false) {
+ disabled.value = true
+ }
+ else {
+ disabled.value = false
+ }
+}