diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
+defineProps({
+ title: {
+ type: String,
+ required: true,
+ },
+})
+
+const slots = useSlots()
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
+defineProps({
+ title: {
+ type: String,
+ required: true,
+ },
+})
+
+const slots = useSlots()
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
+defineProps({
+ title: {
+ type: String,
+ required: true,
+ },
+})
+
+const slots = useSlots()
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue
index 4dc1b17..4352604 100644
--- a/src/views/measure/person/components/addPerson.vue
+++ b/src/views/measure/person/components/addPerson.vue
@@ -69,7 +69,16 @@
const IdCard = ruleForm.value.idCard
const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}`
ruleForm.value.birthday = birthday
- console.log(ruleForm.value)
+ // 获取性别 第17位 奇数为男 偶数为女
+ // ruleForm.value.sex
+ if (Number(IdCard.substring(16, 17)) % 2) {
+ // 男
+ ruleForm.value.sex = '1'
+ }
+ else {
+ // 女
+ ruleForm.value.sex = '2'
+ }
})
}
const dialogVisible = ref(false) // 弹窗显示
@@ -130,7 +139,6 @@
technologyExam: '', // 技术考核
remark: '', // 备注
certificateList: [], // 证书列表
-
}
}
const technologyJobList = ref([])
@@ -309,7 +317,7 @@
}
(title.value === '新建'
? getStaffAdd
- : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => {
+ : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => {
if (res.code == 200) {
formEl?.resetFields()
ElMessage.success('提交成功')
@@ -332,12 +340,14 @@
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
changeList.value[0].data = []
dialogVisible.value = true
title.value = row.title
resetFormData()
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -370,20 +380,15 @@
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
@@ -394,6 +399,7 @@
:http-request="uploadQuarterlyEvaluateFile"
:before-upload="beforeAvatarUpload"
:disabled="title === '详情'"
+ accept="image/png, image/jpeg,image/jpg"
>
@@ -425,8 +431,8 @@
@@ -489,29 +495,19 @@
-
-
-
-
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
@@ -523,7 +519,7 @@
-
+
@@ -532,77 +528,38 @@
@@ -624,8 +581,8 @@
.el-icon.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
- width: 220px;
- height: 320px;
+ width: 190px;
+ height: 250px;
text-align: center;
}
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue
index 4dc1b17..4352604 100644
--- a/src/views/measure/person/components/addPerson.vue
+++ b/src/views/measure/person/components/addPerson.vue
@@ -69,7 +69,16 @@
const IdCard = ruleForm.value.idCard
const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}`
ruleForm.value.birthday = birthday
- console.log(ruleForm.value)
+ // 获取性别 第17位 奇数为男 偶数为女
+ // ruleForm.value.sex
+ if (Number(IdCard.substring(16, 17)) % 2) {
+ // 男
+ ruleForm.value.sex = '1'
+ }
+ else {
+ // 女
+ ruleForm.value.sex = '2'
+ }
})
}
const dialogVisible = ref(false) // 弹窗显示
@@ -130,7 +139,6 @@
technologyExam: '', // 技术考核
remark: '', // 备注
certificateList: [], // 证书列表
-
}
}
const technologyJobList = ref([])
@@ -309,7 +317,7 @@
}
(title.value === '新建'
? getStaffAdd
- : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => {
+ : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => {
if (res.code == 200) {
formEl?.resetFields()
ElMessage.success('提交成功')
@@ -332,12 +340,14 @@
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
changeList.value[0].data = []
dialogVisible.value = true
title.value = row.title
resetFormData()
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -370,20 +380,15 @@
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
@@ -394,6 +399,7 @@
:http-request="uploadQuarterlyEvaluateFile"
:before-upload="beforeAvatarUpload"
:disabled="title === '详情'"
+ accept="image/png, image/jpeg,image/jpg"
>
@@ -425,8 +431,8 @@
@@ -489,29 +495,19 @@
-
-
-
-
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
@@ -523,7 +519,7 @@
-
+
@@ -532,77 +528,38 @@
@@ -624,8 +581,8 @@
.el-icon.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
- width: 220px;
- height: 320px;
+ width: 190px;
+ height: 250px;
text-align: center;
}
diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue
index ae48f11..042636e 100644
--- a/src/views/measure/person/components/addRecord.vue
+++ b/src/views/measure/person/components/addRecord.vue
@@ -4,7 +4,6 @@
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox, ElTable } from 'element-plus'
import type { technologyJobType } from '../person-interface'
-import certificateAddDialog from './certificateAddDialog.vue'
import personListDialog from './personListDialog.vue'
import { getUserList } from '@/api/system/user'
import { getDeptTreeList } from '@/api/system/dept'
@@ -14,7 +13,8 @@
import comTreeSelect from '@/views/system/user/selecTree.vue'
import { addCertificateList, getCertificateDetail, getCertificateUpdate } from '@/api/measure/person'
const emits = defineEmits(['resetData'])
-const ruleFormRef = ref() // from组件
+const ruleFormRef1 = ref() // from组件
+const ruleFormRef2 = ref() // from组件
const meterStaff = ref({
staffNo: '', // 人员编号
name: '', // 姓名
@@ -28,26 +28,43 @@
workDate: '', // 从事日期
id: '',
})
+const baseInfo = ref({
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+})
const ruleForm = ref({
meterStaff: {}, // 人员信息
staffId: '', // 计量人员id
}) // 表单
-const multipleTableRef = ref>()
const title = ref('')
+const name = ref('')
// 身份证号码验证规则
-const validateIDcard = (rule: any, value: any, callback: any) => {
- const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
- if (rr.test(value)) {
- callback()
- }
- else {
- callback(new Error('验证失败'))
- }
-}
+// const validateIDcard = (rule: any, value: any, callback: any) => {
+// const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
+// if (rr.test(value)) {
+// callback()
+// }
+// else {
+// callback(new Error('验证失败'))
+// }
+// }
const rules = ref({
staffNo: [{ required: true, message: '人员编号不能为空', trigger: 'blur' }],
// idCard: [{ required: false, validator: validateIDcard, message: '身份证号码不符合规范', trigger: 'change' }],
-
+}) // 表单验证规则
+const rules2 = ref({
+ certificateCompany: [{ required: true, message: '发证单位不能为空', trigger: 'blur' }],
+ certificateDate: [{ required: true, message: '发证日期不能为空', trigger: 'blur' }],
+ certificateName: [{ required: true, message: '证书名称不能为空', trigger: 'blur' }],
+ certificateNo: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
+ validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }],
}) // 表单验证规则
const dialogVisible = ref(false) // 弹窗显示
const userList = ref([]) // 可使用人列表
@@ -96,6 +113,17 @@
meterStaff.value.major = ''
meterStaff.value.workDate = ''
meterStaff.value.id = ''
+ baseInfo.value = {
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+ }
}
const technologyJobList = ref([])
// 获取技术职务列表
@@ -120,98 +148,14 @@
const confirmPerson = (row: any) => {
ruleForm.value.staffId = row.staffNo
meterStaff.value = row
- ruleFormRef.value?.clearValidate('staffNo')
+ ruleFormRef1.value?.clearValidate('staffNo')
}
-const changeList = ref([
- {
- name: '证书基本信息',
- data: [] as any[],
- column: [
- {
- label: '证书号',
- data: 'certificateNo',
- id: 'zs02',
- },
- {
- label: '证书名称',
- data: 'certificateName',
- id: 'zs03',
- },
- {
- label: '发证日期',
- data: 'certificateDate',
- id: 'zs04',
- },
- {
- label: '发证单位',
- data: 'certificateCompany',
- id: 'zs01',
- },
- {
- label: '有效日期',
- data: 'validDate',
- id: 'zs05',
- },
- ],
- },
- {
- name: '计量工作培训记录',
- data: [],
- column: [],
- },
- {
- name: '业务记录',
- data: [],
- column: [],
- },
-])
-const current = ref('证书基本信息')
-const currentShow = computed(() => {
- return changeList.value.filter(item => item.name === current.value)[0]
-})
-const certificateRef = ref() // 添加证书信息弹窗
-// 添加行
-const addRow = () => {
- certificateRef.value.initDialog({ title: '添加' })
-}
-// 编辑行
-const editRow = () => {
- certificateRef.value.initDialog({ ...changeList.value[0].data[0], title: '编辑' })
-}
-// 证书信息行内添加数据
-const addRowcertificate = (row: any, flag: string) => {
- const diff = dayjs(row.validDate).diff(row.certificateDate, 'day')
- if (flag === 'update') {
- changeList.value[0].data = [{
- ...changeList.value[0].data[0],
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- }]
- }
- else {
- changeList.value[0].data.push(
- {
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- })
- }
-}
-const currenSelect = ref(-1) // 当前选中行
-// 删除行
-const removeRow = () => {
- console.log(currenSelect.value)
- if (currenSelect.value >= 0) {
+// 提交
+const submitForm = async (formEl1: FormInstance | undefined, formEl2: FormInstance | undefined) => {
+ if (!formEl1 || !formEl2) { return }
+ Promise.all([formEl1.validate(), formEl2.validate()]).then((res) => {
ElMessageBox.confirm(
- '确认删除选中的数据吗?',
+ '确认提交吗?',
'提示',
{
confirmButtonText: '确认',
@@ -219,78 +163,49 @@
type: 'warning',
},
).then(() => {
- changeList.value[0].data = changeList.value[0].data.filter((item, index) => index !== currenSelect.value)
- currenSelect.value = -1
- ElMessage.success('删除成功')
- })
- }
- else {
- ElMessage.warning('请先选择需要删除的数据')
- }
-}
-// 提交
-const submitForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- let params
- if (changeList.value[0].data.length) {
- params = changeList.value[0].data
- }
- else {
- params = [
- {
- certificateCompany: '',
- certificateDate: '',
- certificateName: '',
- certificateNo: '',
- certificateStatus: '',
- createTime: '',
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: '',
- validDate: '',
- },
- ]
- }
- (title.value === '新建'
- ? addCertificateList
- : getCertificateUpdate)(title.value === '新建' ? params : changeList.value[0].data[0]).then((res) => {
- formEl?.resetFields()
- ElMessage.success('提交成功')
- emits('resetData')
- resetFormData()
- })
+ (title.value === '新建'
+ ? addCertificateList
+ : getCertificateUpdate)(title.value === '新建'
+ ? [{
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }]
+ : {
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }).then((res) => {
+ formEl1?.resetFields()
+ formEl2?.resetFields()
+ ElMessage.success('提交成功')
+ emits('resetData')
+ resetFormData()
})
- }
+ })
})
}
// 取消
-const resetForm = (formEl: FormInstance | undefined) => {
+const resetForm = (formEl: FormInstance | undefined, formEl2: FormInstance | undefined) => {
formEl?.resetFields()
- changeList.value[0].data = []
+ formEl2?.resetFields()
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
- changeList.value[0].data = []
resetFormData()
dialogVisible.value = true
title.value = row.title
- resetFormData()
+ name.value = row.name
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -303,8 +218,9 @@
else {
getCertificateDetail({ id: row.id }).then((res) => {
if (res.code === 200) {
+ console.log(res, '证书记录')
meterStaff.value = res.data.meterStaff
- changeList.value[0].data = [{ ...res.data, meterStaff: undefined }]
+ baseInfo.value = res.data
}
})
}
@@ -314,21 +230,16 @@
-
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
@@ -390,7 +301,8 @@
@@ -410,71 +322,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue
index 4dc1b17..4352604 100644
--- a/src/views/measure/person/components/addPerson.vue
+++ b/src/views/measure/person/components/addPerson.vue
@@ -69,7 +69,16 @@
const IdCard = ruleForm.value.idCard
const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}`
ruleForm.value.birthday = birthday
- console.log(ruleForm.value)
+ // 获取性别 第17位 奇数为男 偶数为女
+ // ruleForm.value.sex
+ if (Number(IdCard.substring(16, 17)) % 2) {
+ // 男
+ ruleForm.value.sex = '1'
+ }
+ else {
+ // 女
+ ruleForm.value.sex = '2'
+ }
})
}
const dialogVisible = ref(false) // 弹窗显示
@@ -130,7 +139,6 @@
technologyExam: '', // 技术考核
remark: '', // 备注
certificateList: [], // 证书列表
-
}
}
const technologyJobList = ref([])
@@ -309,7 +317,7 @@
}
(title.value === '新建'
? getStaffAdd
- : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => {
+ : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => {
if (res.code == 200) {
formEl?.resetFields()
ElMessage.success('提交成功')
@@ -332,12 +340,14 @@
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
changeList.value[0].data = []
dialogVisible.value = true
title.value = row.title
resetFormData()
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -370,20 +380,15 @@
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
@@ -394,6 +399,7 @@
:http-request="uploadQuarterlyEvaluateFile"
:before-upload="beforeAvatarUpload"
:disabled="title === '详情'"
+ accept="image/png, image/jpeg,image/jpg"
>
@@ -425,8 +431,8 @@
@@ -489,29 +495,19 @@
-
-
-
-
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
@@ -523,7 +519,7 @@
-
+
@@ -532,77 +528,38 @@
@@ -624,8 +581,8 @@
.el-icon.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
- width: 220px;
- height: 320px;
+ width: 190px;
+ height: 250px;
text-align: center;
}
diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue
index ae48f11..042636e 100644
--- a/src/views/measure/person/components/addRecord.vue
+++ b/src/views/measure/person/components/addRecord.vue
@@ -4,7 +4,6 @@
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox, ElTable } from 'element-plus'
import type { technologyJobType } from '../person-interface'
-import certificateAddDialog from './certificateAddDialog.vue'
import personListDialog from './personListDialog.vue'
import { getUserList } from '@/api/system/user'
import { getDeptTreeList } from '@/api/system/dept'
@@ -14,7 +13,8 @@
import comTreeSelect from '@/views/system/user/selecTree.vue'
import { addCertificateList, getCertificateDetail, getCertificateUpdate } from '@/api/measure/person'
const emits = defineEmits(['resetData'])
-const ruleFormRef = ref() // from组件
+const ruleFormRef1 = ref() // from组件
+const ruleFormRef2 = ref() // from组件
const meterStaff = ref({
staffNo: '', // 人员编号
name: '', // 姓名
@@ -28,26 +28,43 @@
workDate: '', // 从事日期
id: '',
})
+const baseInfo = ref({
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+})
const ruleForm = ref({
meterStaff: {}, // 人员信息
staffId: '', // 计量人员id
}) // 表单
-const multipleTableRef = ref>()
const title = ref('')
+const name = ref('')
// 身份证号码验证规则
-const validateIDcard = (rule: any, value: any, callback: any) => {
- const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
- if (rr.test(value)) {
- callback()
- }
- else {
- callback(new Error('验证失败'))
- }
-}
+// const validateIDcard = (rule: any, value: any, callback: any) => {
+// const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
+// if (rr.test(value)) {
+// callback()
+// }
+// else {
+// callback(new Error('验证失败'))
+// }
+// }
const rules = ref({
staffNo: [{ required: true, message: '人员编号不能为空', trigger: 'blur' }],
// idCard: [{ required: false, validator: validateIDcard, message: '身份证号码不符合规范', trigger: 'change' }],
-
+}) // 表单验证规则
+const rules2 = ref({
+ certificateCompany: [{ required: true, message: '发证单位不能为空', trigger: 'blur' }],
+ certificateDate: [{ required: true, message: '发证日期不能为空', trigger: 'blur' }],
+ certificateName: [{ required: true, message: '证书名称不能为空', trigger: 'blur' }],
+ certificateNo: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
+ validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }],
}) // 表单验证规则
const dialogVisible = ref(false) // 弹窗显示
const userList = ref([]) // 可使用人列表
@@ -96,6 +113,17 @@
meterStaff.value.major = ''
meterStaff.value.workDate = ''
meterStaff.value.id = ''
+ baseInfo.value = {
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+ }
}
const technologyJobList = ref([])
// 获取技术职务列表
@@ -120,98 +148,14 @@
const confirmPerson = (row: any) => {
ruleForm.value.staffId = row.staffNo
meterStaff.value = row
- ruleFormRef.value?.clearValidate('staffNo')
+ ruleFormRef1.value?.clearValidate('staffNo')
}
-const changeList = ref([
- {
- name: '证书基本信息',
- data: [] as any[],
- column: [
- {
- label: '证书号',
- data: 'certificateNo',
- id: 'zs02',
- },
- {
- label: '证书名称',
- data: 'certificateName',
- id: 'zs03',
- },
- {
- label: '发证日期',
- data: 'certificateDate',
- id: 'zs04',
- },
- {
- label: '发证单位',
- data: 'certificateCompany',
- id: 'zs01',
- },
- {
- label: '有效日期',
- data: 'validDate',
- id: 'zs05',
- },
- ],
- },
- {
- name: '计量工作培训记录',
- data: [],
- column: [],
- },
- {
- name: '业务记录',
- data: [],
- column: [],
- },
-])
-const current = ref('证书基本信息')
-const currentShow = computed(() => {
- return changeList.value.filter(item => item.name === current.value)[0]
-})
-const certificateRef = ref() // 添加证书信息弹窗
-// 添加行
-const addRow = () => {
- certificateRef.value.initDialog({ title: '添加' })
-}
-// 编辑行
-const editRow = () => {
- certificateRef.value.initDialog({ ...changeList.value[0].data[0], title: '编辑' })
-}
-// 证书信息行内添加数据
-const addRowcertificate = (row: any, flag: string) => {
- const diff = dayjs(row.validDate).diff(row.certificateDate, 'day')
- if (flag === 'update') {
- changeList.value[0].data = [{
- ...changeList.value[0].data[0],
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- }]
- }
- else {
- changeList.value[0].data.push(
- {
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- })
- }
-}
-const currenSelect = ref(-1) // 当前选中行
-// 删除行
-const removeRow = () => {
- console.log(currenSelect.value)
- if (currenSelect.value >= 0) {
+// 提交
+const submitForm = async (formEl1: FormInstance | undefined, formEl2: FormInstance | undefined) => {
+ if (!formEl1 || !formEl2) { return }
+ Promise.all([formEl1.validate(), formEl2.validate()]).then((res) => {
ElMessageBox.confirm(
- '确认删除选中的数据吗?',
+ '确认提交吗?',
'提示',
{
confirmButtonText: '确认',
@@ -219,78 +163,49 @@
type: 'warning',
},
).then(() => {
- changeList.value[0].data = changeList.value[0].data.filter((item, index) => index !== currenSelect.value)
- currenSelect.value = -1
- ElMessage.success('删除成功')
- })
- }
- else {
- ElMessage.warning('请先选择需要删除的数据')
- }
-}
-// 提交
-const submitForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- let params
- if (changeList.value[0].data.length) {
- params = changeList.value[0].data
- }
- else {
- params = [
- {
- certificateCompany: '',
- certificateDate: '',
- certificateName: '',
- certificateNo: '',
- certificateStatus: '',
- createTime: '',
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: '',
- validDate: '',
- },
- ]
- }
- (title.value === '新建'
- ? addCertificateList
- : getCertificateUpdate)(title.value === '新建' ? params : changeList.value[0].data[0]).then((res) => {
- formEl?.resetFields()
- ElMessage.success('提交成功')
- emits('resetData')
- resetFormData()
- })
+ (title.value === '新建'
+ ? addCertificateList
+ : getCertificateUpdate)(title.value === '新建'
+ ? [{
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }]
+ : {
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }).then((res) => {
+ formEl1?.resetFields()
+ formEl2?.resetFields()
+ ElMessage.success('提交成功')
+ emits('resetData')
+ resetFormData()
})
- }
+ })
})
}
// 取消
-const resetForm = (formEl: FormInstance | undefined) => {
+const resetForm = (formEl: FormInstance | undefined, formEl2: FormInstance | undefined) => {
formEl?.resetFields()
- changeList.value[0].data = []
+ formEl2?.resetFields()
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
- changeList.value[0].data = []
resetFormData()
dialogVisible.value = true
title.value = row.title
- resetFormData()
+ name.value = row.name
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -303,8 +218,9 @@
else {
getCertificateDetail({ id: row.id }).then((res) => {
if (res.code === 200) {
+ console.log(res, '证书记录')
meterStaff.value = res.data.meterStaff
- changeList.value[0].data = [{ ...res.data, meterStaff: undefined }]
+ baseInfo.value = res.data
}
})
}
@@ -314,21 +230,16 @@
-
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
@@ -390,7 +301,8 @@
@@ -410,71 +322,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/src/views/measure/person/components/addRecordCancel.vue b/src/views/measure/person/components/addRecordCancel.vue
new file mode 100644
index 0000000..c32ac43
--- /dev/null
+++ b/src/views/measure/person/components/addRecordCancel.vue
@@ -0,0 +1,459 @@
+
+
+
+
+
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue
index 4dc1b17..4352604 100644
--- a/src/views/measure/person/components/addPerson.vue
+++ b/src/views/measure/person/components/addPerson.vue
@@ -69,7 +69,16 @@
const IdCard = ruleForm.value.idCard
const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}`
ruleForm.value.birthday = birthday
- console.log(ruleForm.value)
+ // 获取性别 第17位 奇数为男 偶数为女
+ // ruleForm.value.sex
+ if (Number(IdCard.substring(16, 17)) % 2) {
+ // 男
+ ruleForm.value.sex = '1'
+ }
+ else {
+ // 女
+ ruleForm.value.sex = '2'
+ }
})
}
const dialogVisible = ref(false) // 弹窗显示
@@ -130,7 +139,6 @@
technologyExam: '', // 技术考核
remark: '', // 备注
certificateList: [], // 证书列表
-
}
}
const technologyJobList = ref([])
@@ -309,7 +317,7 @@
}
(title.value === '新建'
? getStaffAdd
- : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => {
+ : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => {
if (res.code == 200) {
formEl?.resetFields()
ElMessage.success('提交成功')
@@ -332,12 +340,14 @@
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
changeList.value[0].data = []
dialogVisible.value = true
title.value = row.title
resetFormData()
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -370,20 +380,15 @@
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
@@ -394,6 +399,7 @@
:http-request="uploadQuarterlyEvaluateFile"
:before-upload="beforeAvatarUpload"
:disabled="title === '详情'"
+ accept="image/png, image/jpeg,image/jpg"
>
@@ -425,8 +431,8 @@
@@ -489,29 +495,19 @@
-
-
-
-
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
@@ -523,7 +519,7 @@
-
+
@@ -532,77 +528,38 @@
@@ -624,8 +581,8 @@
.el-icon.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
- width: 220px;
- height: 320px;
+ width: 190px;
+ height: 250px;
text-align: center;
}
diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue
index ae48f11..042636e 100644
--- a/src/views/measure/person/components/addRecord.vue
+++ b/src/views/measure/person/components/addRecord.vue
@@ -4,7 +4,6 @@
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox, ElTable } from 'element-plus'
import type { technologyJobType } from '../person-interface'
-import certificateAddDialog from './certificateAddDialog.vue'
import personListDialog from './personListDialog.vue'
import { getUserList } from '@/api/system/user'
import { getDeptTreeList } from '@/api/system/dept'
@@ -14,7 +13,8 @@
import comTreeSelect from '@/views/system/user/selecTree.vue'
import { addCertificateList, getCertificateDetail, getCertificateUpdate } from '@/api/measure/person'
const emits = defineEmits(['resetData'])
-const ruleFormRef = ref() // from组件
+const ruleFormRef1 = ref() // from组件
+const ruleFormRef2 = ref() // from组件
const meterStaff = ref({
staffNo: '', // 人员编号
name: '', // 姓名
@@ -28,26 +28,43 @@
workDate: '', // 从事日期
id: '',
})
+const baseInfo = ref({
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+})
const ruleForm = ref({
meterStaff: {}, // 人员信息
staffId: '', // 计量人员id
}) // 表单
-const multipleTableRef = ref>()
const title = ref('')
+const name = ref('')
// 身份证号码验证规则
-const validateIDcard = (rule: any, value: any, callback: any) => {
- const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
- if (rr.test(value)) {
- callback()
- }
- else {
- callback(new Error('验证失败'))
- }
-}
+// const validateIDcard = (rule: any, value: any, callback: any) => {
+// const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
+// if (rr.test(value)) {
+// callback()
+// }
+// else {
+// callback(new Error('验证失败'))
+// }
+// }
const rules = ref({
staffNo: [{ required: true, message: '人员编号不能为空', trigger: 'blur' }],
// idCard: [{ required: false, validator: validateIDcard, message: '身份证号码不符合规范', trigger: 'change' }],
-
+}) // 表单验证规则
+const rules2 = ref({
+ certificateCompany: [{ required: true, message: '发证单位不能为空', trigger: 'blur' }],
+ certificateDate: [{ required: true, message: '发证日期不能为空', trigger: 'blur' }],
+ certificateName: [{ required: true, message: '证书名称不能为空', trigger: 'blur' }],
+ certificateNo: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
+ validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }],
}) // 表单验证规则
const dialogVisible = ref(false) // 弹窗显示
const userList = ref([]) // 可使用人列表
@@ -96,6 +113,17 @@
meterStaff.value.major = ''
meterStaff.value.workDate = ''
meterStaff.value.id = ''
+ baseInfo.value = {
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+ }
}
const technologyJobList = ref([])
// 获取技术职务列表
@@ -120,98 +148,14 @@
const confirmPerson = (row: any) => {
ruleForm.value.staffId = row.staffNo
meterStaff.value = row
- ruleFormRef.value?.clearValidate('staffNo')
+ ruleFormRef1.value?.clearValidate('staffNo')
}
-const changeList = ref([
- {
- name: '证书基本信息',
- data: [] as any[],
- column: [
- {
- label: '证书号',
- data: 'certificateNo',
- id: 'zs02',
- },
- {
- label: '证书名称',
- data: 'certificateName',
- id: 'zs03',
- },
- {
- label: '发证日期',
- data: 'certificateDate',
- id: 'zs04',
- },
- {
- label: '发证单位',
- data: 'certificateCompany',
- id: 'zs01',
- },
- {
- label: '有效日期',
- data: 'validDate',
- id: 'zs05',
- },
- ],
- },
- {
- name: '计量工作培训记录',
- data: [],
- column: [],
- },
- {
- name: '业务记录',
- data: [],
- column: [],
- },
-])
-const current = ref('证书基本信息')
-const currentShow = computed(() => {
- return changeList.value.filter(item => item.name === current.value)[0]
-})
-const certificateRef = ref() // 添加证书信息弹窗
-// 添加行
-const addRow = () => {
- certificateRef.value.initDialog({ title: '添加' })
-}
-// 编辑行
-const editRow = () => {
- certificateRef.value.initDialog({ ...changeList.value[0].data[0], title: '编辑' })
-}
-// 证书信息行内添加数据
-const addRowcertificate = (row: any, flag: string) => {
- const diff = dayjs(row.validDate).diff(row.certificateDate, 'day')
- if (flag === 'update') {
- changeList.value[0].data = [{
- ...changeList.value[0].data[0],
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- }]
- }
- else {
- changeList.value[0].data.push(
- {
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- })
- }
-}
-const currenSelect = ref(-1) // 当前选中行
-// 删除行
-const removeRow = () => {
- console.log(currenSelect.value)
- if (currenSelect.value >= 0) {
+// 提交
+const submitForm = async (formEl1: FormInstance | undefined, formEl2: FormInstance | undefined) => {
+ if (!formEl1 || !formEl2) { return }
+ Promise.all([formEl1.validate(), formEl2.validate()]).then((res) => {
ElMessageBox.confirm(
- '确认删除选中的数据吗?',
+ '确认提交吗?',
'提示',
{
confirmButtonText: '确认',
@@ -219,78 +163,49 @@
type: 'warning',
},
).then(() => {
- changeList.value[0].data = changeList.value[0].data.filter((item, index) => index !== currenSelect.value)
- currenSelect.value = -1
- ElMessage.success('删除成功')
- })
- }
- else {
- ElMessage.warning('请先选择需要删除的数据')
- }
-}
-// 提交
-const submitForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- let params
- if (changeList.value[0].data.length) {
- params = changeList.value[0].data
- }
- else {
- params = [
- {
- certificateCompany: '',
- certificateDate: '',
- certificateName: '',
- certificateNo: '',
- certificateStatus: '',
- createTime: '',
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: '',
- validDate: '',
- },
- ]
- }
- (title.value === '新建'
- ? addCertificateList
- : getCertificateUpdate)(title.value === '新建' ? params : changeList.value[0].data[0]).then((res) => {
- formEl?.resetFields()
- ElMessage.success('提交成功')
- emits('resetData')
- resetFormData()
- })
+ (title.value === '新建'
+ ? addCertificateList
+ : getCertificateUpdate)(title.value === '新建'
+ ? [{
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }]
+ : {
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }).then((res) => {
+ formEl1?.resetFields()
+ formEl2?.resetFields()
+ ElMessage.success('提交成功')
+ emits('resetData')
+ resetFormData()
})
- }
+ })
})
}
// 取消
-const resetForm = (formEl: FormInstance | undefined) => {
+const resetForm = (formEl: FormInstance | undefined, formEl2: FormInstance | undefined) => {
formEl?.resetFields()
- changeList.value[0].data = []
+ formEl2?.resetFields()
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
- changeList.value[0].data = []
resetFormData()
dialogVisible.value = true
title.value = row.title
- resetFormData()
+ name.value = row.name
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -303,8 +218,9 @@
else {
getCertificateDetail({ id: row.id }).then((res) => {
if (res.code === 200) {
+ console.log(res, '证书记录')
meterStaff.value = res.data.meterStaff
- changeList.value[0].data = [{ ...res.data, meterStaff: undefined }]
+ baseInfo.value = res.data
}
})
}
@@ -314,21 +230,16 @@
-
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
@@ -390,7 +301,8 @@
@@ -410,71 +322,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/src/views/measure/person/components/addRecordCancel.vue b/src/views/measure/person/components/addRecordCancel.vue
new file mode 100644
index 0000000..c32ac43
--- /dev/null
+++ b/src/views/measure/person/components/addRecordCancel.vue
@@ -0,0 +1,459 @@
+
+
+
+
+
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/person/components/certificateAddDialog.vue b/src/views/measure/person/components/certificateAddDialog.vue
index 332c73c..178fc12 100644
--- a/src/views/measure/person/components/certificateAddDialog.vue
+++ b/src/views/measure/person/components/certificateAddDialog.vue
@@ -32,6 +32,7 @@
form.validDate = ''
}
const initDialog = (row: any) => {
+ resetData()
title.value = row.title
if (row.title === '编辑') {
form.certificateNo = row.certificateNo
@@ -50,10 +51,12 @@
await formEl.validate((valid, fields) => {
if (valid) {
if (title.value === '编辑') {
- emits('add', form, 'update')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, 'update')
}
else {
- emits('add', form, '')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, '')
}
dialogFormVisible.value = false
}
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue
index 4dc1b17..4352604 100644
--- a/src/views/measure/person/components/addPerson.vue
+++ b/src/views/measure/person/components/addPerson.vue
@@ -69,7 +69,16 @@
const IdCard = ruleForm.value.idCard
const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}`
ruleForm.value.birthday = birthday
- console.log(ruleForm.value)
+ // 获取性别 第17位 奇数为男 偶数为女
+ // ruleForm.value.sex
+ if (Number(IdCard.substring(16, 17)) % 2) {
+ // 男
+ ruleForm.value.sex = '1'
+ }
+ else {
+ // 女
+ ruleForm.value.sex = '2'
+ }
})
}
const dialogVisible = ref(false) // 弹窗显示
@@ -130,7 +139,6 @@
technologyExam: '', // 技术考核
remark: '', // 备注
certificateList: [], // 证书列表
-
}
}
const technologyJobList = ref([])
@@ -309,7 +317,7 @@
}
(title.value === '新建'
? getStaffAdd
- : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => {
+ : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => {
if (res.code == 200) {
formEl?.resetFields()
ElMessage.success('提交成功')
@@ -332,12 +340,14 @@
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
changeList.value[0].data = []
dialogVisible.value = true
title.value = row.title
resetFormData()
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -370,20 +380,15 @@
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
@@ -394,6 +399,7 @@
:http-request="uploadQuarterlyEvaluateFile"
:before-upload="beforeAvatarUpload"
:disabled="title === '详情'"
+ accept="image/png, image/jpeg,image/jpg"
>
@@ -425,8 +431,8 @@
@@ -489,29 +495,19 @@
-
-
-
-
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
@@ -523,7 +519,7 @@
-
+
@@ -532,77 +528,38 @@
@@ -624,8 +581,8 @@
.el-icon.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
- width: 220px;
- height: 320px;
+ width: 190px;
+ height: 250px;
text-align: center;
}
diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue
index ae48f11..042636e 100644
--- a/src/views/measure/person/components/addRecord.vue
+++ b/src/views/measure/person/components/addRecord.vue
@@ -4,7 +4,6 @@
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox, ElTable } from 'element-plus'
import type { technologyJobType } from '../person-interface'
-import certificateAddDialog from './certificateAddDialog.vue'
import personListDialog from './personListDialog.vue'
import { getUserList } from '@/api/system/user'
import { getDeptTreeList } from '@/api/system/dept'
@@ -14,7 +13,8 @@
import comTreeSelect from '@/views/system/user/selecTree.vue'
import { addCertificateList, getCertificateDetail, getCertificateUpdate } from '@/api/measure/person'
const emits = defineEmits(['resetData'])
-const ruleFormRef = ref() // from组件
+const ruleFormRef1 = ref() // from组件
+const ruleFormRef2 = ref() // from组件
const meterStaff = ref({
staffNo: '', // 人员编号
name: '', // 姓名
@@ -28,26 +28,43 @@
workDate: '', // 从事日期
id: '',
})
+const baseInfo = ref({
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+})
const ruleForm = ref({
meterStaff: {}, // 人员信息
staffId: '', // 计量人员id
}) // 表单
-const multipleTableRef = ref>()
const title = ref('')
+const name = ref('')
// 身份证号码验证规则
-const validateIDcard = (rule: any, value: any, callback: any) => {
- const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
- if (rr.test(value)) {
- callback()
- }
- else {
- callback(new Error('验证失败'))
- }
-}
+// const validateIDcard = (rule: any, value: any, callback: any) => {
+// const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
+// if (rr.test(value)) {
+// callback()
+// }
+// else {
+// callback(new Error('验证失败'))
+// }
+// }
const rules = ref({
staffNo: [{ required: true, message: '人员编号不能为空', trigger: 'blur' }],
// idCard: [{ required: false, validator: validateIDcard, message: '身份证号码不符合规范', trigger: 'change' }],
-
+}) // 表单验证规则
+const rules2 = ref({
+ certificateCompany: [{ required: true, message: '发证单位不能为空', trigger: 'blur' }],
+ certificateDate: [{ required: true, message: '发证日期不能为空', trigger: 'blur' }],
+ certificateName: [{ required: true, message: '证书名称不能为空', trigger: 'blur' }],
+ certificateNo: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
+ validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }],
}) // 表单验证规则
const dialogVisible = ref(false) // 弹窗显示
const userList = ref([]) // 可使用人列表
@@ -96,6 +113,17 @@
meterStaff.value.major = ''
meterStaff.value.workDate = ''
meterStaff.value.id = ''
+ baseInfo.value = {
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+ }
}
const technologyJobList = ref([])
// 获取技术职务列表
@@ -120,98 +148,14 @@
const confirmPerson = (row: any) => {
ruleForm.value.staffId = row.staffNo
meterStaff.value = row
- ruleFormRef.value?.clearValidate('staffNo')
+ ruleFormRef1.value?.clearValidate('staffNo')
}
-const changeList = ref([
- {
- name: '证书基本信息',
- data: [] as any[],
- column: [
- {
- label: '证书号',
- data: 'certificateNo',
- id: 'zs02',
- },
- {
- label: '证书名称',
- data: 'certificateName',
- id: 'zs03',
- },
- {
- label: '发证日期',
- data: 'certificateDate',
- id: 'zs04',
- },
- {
- label: '发证单位',
- data: 'certificateCompany',
- id: 'zs01',
- },
- {
- label: '有效日期',
- data: 'validDate',
- id: 'zs05',
- },
- ],
- },
- {
- name: '计量工作培训记录',
- data: [],
- column: [],
- },
- {
- name: '业务记录',
- data: [],
- column: [],
- },
-])
-const current = ref('证书基本信息')
-const currentShow = computed(() => {
- return changeList.value.filter(item => item.name === current.value)[0]
-})
-const certificateRef = ref() // 添加证书信息弹窗
-// 添加行
-const addRow = () => {
- certificateRef.value.initDialog({ title: '添加' })
-}
-// 编辑行
-const editRow = () => {
- certificateRef.value.initDialog({ ...changeList.value[0].data[0], title: '编辑' })
-}
-// 证书信息行内添加数据
-const addRowcertificate = (row: any, flag: string) => {
- const diff = dayjs(row.validDate).diff(row.certificateDate, 'day')
- if (flag === 'update') {
- changeList.value[0].data = [{
- ...changeList.value[0].data[0],
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- }]
- }
- else {
- changeList.value[0].data.push(
- {
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- })
- }
-}
-const currenSelect = ref(-1) // 当前选中行
-// 删除行
-const removeRow = () => {
- console.log(currenSelect.value)
- if (currenSelect.value >= 0) {
+// 提交
+const submitForm = async (formEl1: FormInstance | undefined, formEl2: FormInstance | undefined) => {
+ if (!formEl1 || !formEl2) { return }
+ Promise.all([formEl1.validate(), formEl2.validate()]).then((res) => {
ElMessageBox.confirm(
- '确认删除选中的数据吗?',
+ '确认提交吗?',
'提示',
{
confirmButtonText: '确认',
@@ -219,78 +163,49 @@
type: 'warning',
},
).then(() => {
- changeList.value[0].data = changeList.value[0].data.filter((item, index) => index !== currenSelect.value)
- currenSelect.value = -1
- ElMessage.success('删除成功')
- })
- }
- else {
- ElMessage.warning('请先选择需要删除的数据')
- }
-}
-// 提交
-const submitForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- let params
- if (changeList.value[0].data.length) {
- params = changeList.value[0].data
- }
- else {
- params = [
- {
- certificateCompany: '',
- certificateDate: '',
- certificateName: '',
- certificateNo: '',
- certificateStatus: '',
- createTime: '',
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: '',
- validDate: '',
- },
- ]
- }
- (title.value === '新建'
- ? addCertificateList
- : getCertificateUpdate)(title.value === '新建' ? params : changeList.value[0].data[0]).then((res) => {
- formEl?.resetFields()
- ElMessage.success('提交成功')
- emits('resetData')
- resetFormData()
- })
+ (title.value === '新建'
+ ? addCertificateList
+ : getCertificateUpdate)(title.value === '新建'
+ ? [{
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }]
+ : {
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }).then((res) => {
+ formEl1?.resetFields()
+ formEl2?.resetFields()
+ ElMessage.success('提交成功')
+ emits('resetData')
+ resetFormData()
})
- }
+ })
})
}
// 取消
-const resetForm = (formEl: FormInstance | undefined) => {
+const resetForm = (formEl: FormInstance | undefined, formEl2: FormInstance | undefined) => {
formEl?.resetFields()
- changeList.value[0].data = []
+ formEl2?.resetFields()
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
- changeList.value[0].data = []
resetFormData()
dialogVisible.value = true
title.value = row.title
- resetFormData()
+ name.value = row.name
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -303,8 +218,9 @@
else {
getCertificateDetail({ id: row.id }).then((res) => {
if (res.code === 200) {
+ console.log(res, '证书记录')
meterStaff.value = res.data.meterStaff
- changeList.value[0].data = [{ ...res.data, meterStaff: undefined }]
+ baseInfo.value = res.data
}
})
}
@@ -314,21 +230,16 @@
-
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
@@ -390,7 +301,8 @@
@@ -410,71 +322,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/src/views/measure/person/components/addRecordCancel.vue b/src/views/measure/person/components/addRecordCancel.vue
new file mode 100644
index 0000000..c32ac43
--- /dev/null
+++ b/src/views/measure/person/components/addRecordCancel.vue
@@ -0,0 +1,459 @@
+
+
+
+
+
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/person/components/certificateAddDialog.vue b/src/views/measure/person/components/certificateAddDialog.vue
index 332c73c..178fc12 100644
--- a/src/views/measure/person/components/certificateAddDialog.vue
+++ b/src/views/measure/person/components/certificateAddDialog.vue
@@ -32,6 +32,7 @@
form.validDate = ''
}
const initDialog = (row: any) => {
+ resetData()
title.value = row.title
if (row.title === '编辑') {
form.certificateNo = row.certificateNo
@@ -50,10 +51,12 @@
await formEl.validate((valid, fields) => {
if (valid) {
if (title.value === '编辑') {
- emits('add', form, 'update')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, 'update')
}
else {
- emits('add', form, '')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, '')
}
dialogFormVisible.value = false
}
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 592d810..9c6f65d 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -30,7 +30,7 @@
{ text: '技术职务', value: 'technologyJob', align: 'center', width: '140' },
{ text: '行政职务', value: 'administrationJob', align: 'center', width: '100' },
{ text: '计量专业', value: 'major', align: 'center', width: '100' },
- { text: '证书号', value: 'verifierCertificateNo', align: 'center' },
+ { text: '证书号', value: 'verifierCertificateNo', align: 'center', width: '180' },
{ text: '证书有效日期', value: 'certificateDate', align: 'center', width: '200' },
{ text: '技术考核', value: 'technologyExam', align: 'center', width: '85' },
]) // 表格
@@ -63,7 +63,7 @@
loadingTable.value = true
getStaffList(searchQuery).then((res) => {
if (res.code === 200) {
- res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核' }))
+ res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核', certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -236,21 +236,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
+defineProps({
+ title: {
+ type: String,
+ required: true,
+ },
+})
+
+const slots = useSlots()
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue
index 4dc1b17..4352604 100644
--- a/src/views/measure/person/components/addPerson.vue
+++ b/src/views/measure/person/components/addPerson.vue
@@ -69,7 +69,16 @@
const IdCard = ruleForm.value.idCard
const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}`
ruleForm.value.birthday = birthday
- console.log(ruleForm.value)
+ // 获取性别 第17位 奇数为男 偶数为女
+ // ruleForm.value.sex
+ if (Number(IdCard.substring(16, 17)) % 2) {
+ // 男
+ ruleForm.value.sex = '1'
+ }
+ else {
+ // 女
+ ruleForm.value.sex = '2'
+ }
})
}
const dialogVisible = ref(false) // 弹窗显示
@@ -130,7 +139,6 @@
technologyExam: '', // 技术考核
remark: '', // 备注
certificateList: [], // 证书列表
-
}
}
const technologyJobList = ref([])
@@ -309,7 +317,7 @@
}
(title.value === '新建'
? getStaffAdd
- : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => {
+ : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => {
if (res.code == 200) {
formEl?.resetFields()
ElMessage.success('提交成功')
@@ -332,12 +340,14 @@
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
changeList.value[0].data = []
dialogVisible.value = true
title.value = row.title
resetFormData()
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -370,20 +380,15 @@
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
@@ -394,6 +399,7 @@
:http-request="uploadQuarterlyEvaluateFile"
:before-upload="beforeAvatarUpload"
:disabled="title === '详情'"
+ accept="image/png, image/jpeg,image/jpg"
>
@@ -425,8 +431,8 @@
@@ -489,29 +495,19 @@
-
-
-
-
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
@@ -523,7 +519,7 @@
-
+
@@ -532,77 +528,38 @@
@@ -624,8 +581,8 @@
.el-icon.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
- width: 220px;
- height: 320px;
+ width: 190px;
+ height: 250px;
text-align: center;
}
diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue
index ae48f11..042636e 100644
--- a/src/views/measure/person/components/addRecord.vue
+++ b/src/views/measure/person/components/addRecord.vue
@@ -4,7 +4,6 @@
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox, ElTable } from 'element-plus'
import type { technologyJobType } from '../person-interface'
-import certificateAddDialog from './certificateAddDialog.vue'
import personListDialog from './personListDialog.vue'
import { getUserList } from '@/api/system/user'
import { getDeptTreeList } from '@/api/system/dept'
@@ -14,7 +13,8 @@
import comTreeSelect from '@/views/system/user/selecTree.vue'
import { addCertificateList, getCertificateDetail, getCertificateUpdate } from '@/api/measure/person'
const emits = defineEmits(['resetData'])
-const ruleFormRef = ref() // from组件
+const ruleFormRef1 = ref() // from组件
+const ruleFormRef2 = ref() // from组件
const meterStaff = ref({
staffNo: '', // 人员编号
name: '', // 姓名
@@ -28,26 +28,43 @@
workDate: '', // 从事日期
id: '',
})
+const baseInfo = ref({
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+})
const ruleForm = ref({
meterStaff: {}, // 人员信息
staffId: '', // 计量人员id
}) // 表单
-const multipleTableRef = ref>()
const title = ref('')
+const name = ref('')
// 身份证号码验证规则
-const validateIDcard = (rule: any, value: any, callback: any) => {
- const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
- if (rr.test(value)) {
- callback()
- }
- else {
- callback(new Error('验证失败'))
- }
-}
+// const validateIDcard = (rule: any, value: any, callback: any) => {
+// const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
+// if (rr.test(value)) {
+// callback()
+// }
+// else {
+// callback(new Error('验证失败'))
+// }
+// }
const rules = ref({
staffNo: [{ required: true, message: '人员编号不能为空', trigger: 'blur' }],
// idCard: [{ required: false, validator: validateIDcard, message: '身份证号码不符合规范', trigger: 'change' }],
-
+}) // 表单验证规则
+const rules2 = ref({
+ certificateCompany: [{ required: true, message: '发证单位不能为空', trigger: 'blur' }],
+ certificateDate: [{ required: true, message: '发证日期不能为空', trigger: 'blur' }],
+ certificateName: [{ required: true, message: '证书名称不能为空', trigger: 'blur' }],
+ certificateNo: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
+ validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }],
}) // 表单验证规则
const dialogVisible = ref(false) // 弹窗显示
const userList = ref([]) // 可使用人列表
@@ -96,6 +113,17 @@
meterStaff.value.major = ''
meterStaff.value.workDate = ''
meterStaff.value.id = ''
+ baseInfo.value = {
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+ }
}
const technologyJobList = ref([])
// 获取技术职务列表
@@ -120,98 +148,14 @@
const confirmPerson = (row: any) => {
ruleForm.value.staffId = row.staffNo
meterStaff.value = row
- ruleFormRef.value?.clearValidate('staffNo')
+ ruleFormRef1.value?.clearValidate('staffNo')
}
-const changeList = ref([
- {
- name: '证书基本信息',
- data: [] as any[],
- column: [
- {
- label: '证书号',
- data: 'certificateNo',
- id: 'zs02',
- },
- {
- label: '证书名称',
- data: 'certificateName',
- id: 'zs03',
- },
- {
- label: '发证日期',
- data: 'certificateDate',
- id: 'zs04',
- },
- {
- label: '发证单位',
- data: 'certificateCompany',
- id: 'zs01',
- },
- {
- label: '有效日期',
- data: 'validDate',
- id: 'zs05',
- },
- ],
- },
- {
- name: '计量工作培训记录',
- data: [],
- column: [],
- },
- {
- name: '业务记录',
- data: [],
- column: [],
- },
-])
-const current = ref('证书基本信息')
-const currentShow = computed(() => {
- return changeList.value.filter(item => item.name === current.value)[0]
-})
-const certificateRef = ref() // 添加证书信息弹窗
-// 添加行
-const addRow = () => {
- certificateRef.value.initDialog({ title: '添加' })
-}
-// 编辑行
-const editRow = () => {
- certificateRef.value.initDialog({ ...changeList.value[0].data[0], title: '编辑' })
-}
-// 证书信息行内添加数据
-const addRowcertificate = (row: any, flag: string) => {
- const diff = dayjs(row.validDate).diff(row.certificateDate, 'day')
- if (flag === 'update') {
- changeList.value[0].data = [{
- ...changeList.value[0].data[0],
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- }]
- }
- else {
- changeList.value[0].data.push(
- {
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- })
- }
-}
-const currenSelect = ref(-1) // 当前选中行
-// 删除行
-const removeRow = () => {
- console.log(currenSelect.value)
- if (currenSelect.value >= 0) {
+// 提交
+const submitForm = async (formEl1: FormInstance | undefined, formEl2: FormInstance | undefined) => {
+ if (!formEl1 || !formEl2) { return }
+ Promise.all([formEl1.validate(), formEl2.validate()]).then((res) => {
ElMessageBox.confirm(
- '确认删除选中的数据吗?',
+ '确认提交吗?',
'提示',
{
confirmButtonText: '确认',
@@ -219,78 +163,49 @@
type: 'warning',
},
).then(() => {
- changeList.value[0].data = changeList.value[0].data.filter((item, index) => index !== currenSelect.value)
- currenSelect.value = -1
- ElMessage.success('删除成功')
- })
- }
- else {
- ElMessage.warning('请先选择需要删除的数据')
- }
-}
-// 提交
-const submitForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- let params
- if (changeList.value[0].data.length) {
- params = changeList.value[0].data
- }
- else {
- params = [
- {
- certificateCompany: '',
- certificateDate: '',
- certificateName: '',
- certificateNo: '',
- certificateStatus: '',
- createTime: '',
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: '',
- validDate: '',
- },
- ]
- }
- (title.value === '新建'
- ? addCertificateList
- : getCertificateUpdate)(title.value === '新建' ? params : changeList.value[0].data[0]).then((res) => {
- formEl?.resetFields()
- ElMessage.success('提交成功')
- emits('resetData')
- resetFormData()
- })
+ (title.value === '新建'
+ ? addCertificateList
+ : getCertificateUpdate)(title.value === '新建'
+ ? [{
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }]
+ : {
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }).then((res) => {
+ formEl1?.resetFields()
+ formEl2?.resetFields()
+ ElMessage.success('提交成功')
+ emits('resetData')
+ resetFormData()
})
- }
+ })
})
}
// 取消
-const resetForm = (formEl: FormInstance | undefined) => {
+const resetForm = (formEl: FormInstance | undefined, formEl2: FormInstance | undefined) => {
formEl?.resetFields()
- changeList.value[0].data = []
+ formEl2?.resetFields()
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
- changeList.value[0].data = []
resetFormData()
dialogVisible.value = true
title.value = row.title
- resetFormData()
+ name.value = row.name
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -303,8 +218,9 @@
else {
getCertificateDetail({ id: row.id }).then((res) => {
if (res.code === 200) {
+ console.log(res, '证书记录')
meterStaff.value = res.data.meterStaff
- changeList.value[0].data = [{ ...res.data, meterStaff: undefined }]
+ baseInfo.value = res.data
}
})
}
@@ -314,21 +230,16 @@
-
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
@@ -390,7 +301,8 @@
@@ -410,71 +322,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/src/views/measure/person/components/addRecordCancel.vue b/src/views/measure/person/components/addRecordCancel.vue
new file mode 100644
index 0000000..c32ac43
--- /dev/null
+++ b/src/views/measure/person/components/addRecordCancel.vue
@@ -0,0 +1,459 @@
+
+
+
+
+
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/person/components/certificateAddDialog.vue b/src/views/measure/person/components/certificateAddDialog.vue
index 332c73c..178fc12 100644
--- a/src/views/measure/person/components/certificateAddDialog.vue
+++ b/src/views/measure/person/components/certificateAddDialog.vue
@@ -32,6 +32,7 @@
form.validDate = ''
}
const initDialog = (row: any) => {
+ resetData()
title.value = row.title
if (row.title === '编辑') {
form.certificateNo = row.certificateNo
@@ -50,10 +51,12 @@
await formEl.validate((valid, fields) => {
if (valid) {
if (title.value === '编辑') {
- emits('add', form, 'update')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, 'update')
}
else {
- emits('add', form, '')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, '')
}
dialogFormVisible.value = false
}
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 592d810..9c6f65d 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -30,7 +30,7 @@
{ text: '技术职务', value: 'technologyJob', align: 'center', width: '140' },
{ text: '行政职务', value: 'administrationJob', align: 'center', width: '100' },
{ text: '计量专业', value: 'major', align: 'center', width: '100' },
- { text: '证书号', value: 'verifierCertificateNo', align: 'center' },
+ { text: '证书号', value: 'verifierCertificateNo', align: 'center', width: '180' },
{ text: '证书有效日期', value: 'certificateDate', align: 'center', width: '200' },
{ text: '技术考核', value: 'technologyExam', align: 'center', width: '85' },
]) // 表格
@@ -63,7 +63,7 @@
loadingTable.value = true
getStaffList(searchQuery).then((res) => {
if (res.code === 200) {
- res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核' }))
+ res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核', certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -236,21 +236,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
+
+
+
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue
index 4dc1b17..4352604 100644
--- a/src/views/measure/person/components/addPerson.vue
+++ b/src/views/measure/person/components/addPerson.vue
@@ -69,7 +69,16 @@
const IdCard = ruleForm.value.idCard
const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}`
ruleForm.value.birthday = birthday
- console.log(ruleForm.value)
+ // 获取性别 第17位 奇数为男 偶数为女
+ // ruleForm.value.sex
+ if (Number(IdCard.substring(16, 17)) % 2) {
+ // 男
+ ruleForm.value.sex = '1'
+ }
+ else {
+ // 女
+ ruleForm.value.sex = '2'
+ }
})
}
const dialogVisible = ref(false) // 弹窗显示
@@ -130,7 +139,6 @@
technologyExam: '', // 技术考核
remark: '', // 备注
certificateList: [], // 证书列表
-
}
}
const technologyJobList = ref([])
@@ -309,7 +317,7 @@
}
(title.value === '新建'
? getStaffAdd
- : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => {
+ : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => {
if (res.code == 200) {
formEl?.resetFields()
ElMessage.success('提交成功')
@@ -332,12 +340,14 @@
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
changeList.value[0].data = []
dialogVisible.value = true
title.value = row.title
resetFormData()
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -370,20 +380,15 @@
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
@@ -394,6 +399,7 @@
:http-request="uploadQuarterlyEvaluateFile"
:before-upload="beforeAvatarUpload"
:disabled="title === '详情'"
+ accept="image/png, image/jpeg,image/jpg"
>
@@ -425,8 +431,8 @@
@@ -489,29 +495,19 @@
-
-
-
-
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
@@ -523,7 +519,7 @@
-
+
@@ -532,77 +528,38 @@
@@ -624,8 +581,8 @@
.el-icon.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
- width: 220px;
- height: 320px;
+ width: 190px;
+ height: 250px;
text-align: center;
}
diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue
index ae48f11..042636e 100644
--- a/src/views/measure/person/components/addRecord.vue
+++ b/src/views/measure/person/components/addRecord.vue
@@ -4,7 +4,6 @@
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox, ElTable } from 'element-plus'
import type { technologyJobType } from '../person-interface'
-import certificateAddDialog from './certificateAddDialog.vue'
import personListDialog from './personListDialog.vue'
import { getUserList } from '@/api/system/user'
import { getDeptTreeList } from '@/api/system/dept'
@@ -14,7 +13,8 @@
import comTreeSelect from '@/views/system/user/selecTree.vue'
import { addCertificateList, getCertificateDetail, getCertificateUpdate } from '@/api/measure/person'
const emits = defineEmits(['resetData'])
-const ruleFormRef = ref() // from组件
+const ruleFormRef1 = ref() // from组件
+const ruleFormRef2 = ref() // from组件
const meterStaff = ref({
staffNo: '', // 人员编号
name: '', // 姓名
@@ -28,26 +28,43 @@
workDate: '', // 从事日期
id: '',
})
+const baseInfo = ref({
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+})
const ruleForm = ref({
meterStaff: {}, // 人员信息
staffId: '', // 计量人员id
}) // 表单
-const multipleTableRef = ref>()
const title = ref('')
+const name = ref('')
// 身份证号码验证规则
-const validateIDcard = (rule: any, value: any, callback: any) => {
- const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
- if (rr.test(value)) {
- callback()
- }
- else {
- callback(new Error('验证失败'))
- }
-}
+// const validateIDcard = (rule: any, value: any, callback: any) => {
+// const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
+// if (rr.test(value)) {
+// callback()
+// }
+// else {
+// callback(new Error('验证失败'))
+// }
+// }
const rules = ref({
staffNo: [{ required: true, message: '人员编号不能为空', trigger: 'blur' }],
// idCard: [{ required: false, validator: validateIDcard, message: '身份证号码不符合规范', trigger: 'change' }],
-
+}) // 表单验证规则
+const rules2 = ref({
+ certificateCompany: [{ required: true, message: '发证单位不能为空', trigger: 'blur' }],
+ certificateDate: [{ required: true, message: '发证日期不能为空', trigger: 'blur' }],
+ certificateName: [{ required: true, message: '证书名称不能为空', trigger: 'blur' }],
+ certificateNo: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
+ validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }],
}) // 表单验证规则
const dialogVisible = ref(false) // 弹窗显示
const userList = ref([]) // 可使用人列表
@@ -96,6 +113,17 @@
meterStaff.value.major = ''
meterStaff.value.workDate = ''
meterStaff.value.id = ''
+ baseInfo.value = {
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+ }
}
const technologyJobList = ref([])
// 获取技术职务列表
@@ -120,98 +148,14 @@
const confirmPerson = (row: any) => {
ruleForm.value.staffId = row.staffNo
meterStaff.value = row
- ruleFormRef.value?.clearValidate('staffNo')
+ ruleFormRef1.value?.clearValidate('staffNo')
}
-const changeList = ref([
- {
- name: '证书基本信息',
- data: [] as any[],
- column: [
- {
- label: '证书号',
- data: 'certificateNo',
- id: 'zs02',
- },
- {
- label: '证书名称',
- data: 'certificateName',
- id: 'zs03',
- },
- {
- label: '发证日期',
- data: 'certificateDate',
- id: 'zs04',
- },
- {
- label: '发证单位',
- data: 'certificateCompany',
- id: 'zs01',
- },
- {
- label: '有效日期',
- data: 'validDate',
- id: 'zs05',
- },
- ],
- },
- {
- name: '计量工作培训记录',
- data: [],
- column: [],
- },
- {
- name: '业务记录',
- data: [],
- column: [],
- },
-])
-const current = ref('证书基本信息')
-const currentShow = computed(() => {
- return changeList.value.filter(item => item.name === current.value)[0]
-})
-const certificateRef = ref() // 添加证书信息弹窗
-// 添加行
-const addRow = () => {
- certificateRef.value.initDialog({ title: '添加' })
-}
-// 编辑行
-const editRow = () => {
- certificateRef.value.initDialog({ ...changeList.value[0].data[0], title: '编辑' })
-}
-// 证书信息行内添加数据
-const addRowcertificate = (row: any, flag: string) => {
- const diff = dayjs(row.validDate).diff(row.certificateDate, 'day')
- if (flag === 'update') {
- changeList.value[0].data = [{
- ...changeList.value[0].data[0],
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- }]
- }
- else {
- changeList.value[0].data.push(
- {
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- })
- }
-}
-const currenSelect = ref(-1) // 当前选中行
-// 删除行
-const removeRow = () => {
- console.log(currenSelect.value)
- if (currenSelect.value >= 0) {
+// 提交
+const submitForm = async (formEl1: FormInstance | undefined, formEl2: FormInstance | undefined) => {
+ if (!formEl1 || !formEl2) { return }
+ Promise.all([formEl1.validate(), formEl2.validate()]).then((res) => {
ElMessageBox.confirm(
- '确认删除选中的数据吗?',
+ '确认提交吗?',
'提示',
{
confirmButtonText: '确认',
@@ -219,78 +163,49 @@
type: 'warning',
},
).then(() => {
- changeList.value[0].data = changeList.value[0].data.filter((item, index) => index !== currenSelect.value)
- currenSelect.value = -1
- ElMessage.success('删除成功')
- })
- }
- else {
- ElMessage.warning('请先选择需要删除的数据')
- }
-}
-// 提交
-const submitForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- let params
- if (changeList.value[0].data.length) {
- params = changeList.value[0].data
- }
- else {
- params = [
- {
- certificateCompany: '',
- certificateDate: '',
- certificateName: '',
- certificateNo: '',
- certificateStatus: '',
- createTime: '',
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: '',
- validDate: '',
- },
- ]
- }
- (title.value === '新建'
- ? addCertificateList
- : getCertificateUpdate)(title.value === '新建' ? params : changeList.value[0].data[0]).then((res) => {
- formEl?.resetFields()
- ElMessage.success('提交成功')
- emits('resetData')
- resetFormData()
- })
+ (title.value === '新建'
+ ? addCertificateList
+ : getCertificateUpdate)(title.value === '新建'
+ ? [{
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }]
+ : {
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }).then((res) => {
+ formEl1?.resetFields()
+ formEl2?.resetFields()
+ ElMessage.success('提交成功')
+ emits('resetData')
+ resetFormData()
})
- }
+ })
})
}
// 取消
-const resetForm = (formEl: FormInstance | undefined) => {
+const resetForm = (formEl: FormInstance | undefined, formEl2: FormInstance | undefined) => {
formEl?.resetFields()
- changeList.value[0].data = []
+ formEl2?.resetFields()
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
- changeList.value[0].data = []
resetFormData()
dialogVisible.value = true
title.value = row.title
- resetFormData()
+ name.value = row.name
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -303,8 +218,9 @@
else {
getCertificateDetail({ id: row.id }).then((res) => {
if (res.code === 200) {
+ console.log(res, '证书记录')
meterStaff.value = res.data.meterStaff
- changeList.value[0].data = [{ ...res.data, meterStaff: undefined }]
+ baseInfo.value = res.data
}
})
}
@@ -314,21 +230,16 @@
-
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
@@ -390,7 +301,8 @@
@@ -410,71 +322,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/src/views/measure/person/components/addRecordCancel.vue b/src/views/measure/person/components/addRecordCancel.vue
new file mode 100644
index 0000000..c32ac43
--- /dev/null
+++ b/src/views/measure/person/components/addRecordCancel.vue
@@ -0,0 +1,459 @@
+
+
+
+
+
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/person/components/certificateAddDialog.vue b/src/views/measure/person/components/certificateAddDialog.vue
index 332c73c..178fc12 100644
--- a/src/views/measure/person/components/certificateAddDialog.vue
+++ b/src/views/measure/person/components/certificateAddDialog.vue
@@ -32,6 +32,7 @@
form.validDate = ''
}
const initDialog = (row: any) => {
+ resetData()
title.value = row.title
if (row.title === '编辑') {
form.certificateNo = row.certificateNo
@@ -50,10 +51,12 @@
await formEl.validate((valid, fields) => {
if (valid) {
if (title.value === '编辑') {
- emits('add', form, 'update')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, 'update')
}
else {
- emits('add', form, '')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, '')
}
dialogFormVisible.value = false
}
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 592d810..9c6f65d 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -30,7 +30,7 @@
{ text: '技术职务', value: 'technologyJob', align: 'center', width: '140' },
{ text: '行政职务', value: 'administrationJob', align: 'center', width: '100' },
{ text: '计量专业', value: 'major', align: 'center', width: '100' },
- { text: '证书号', value: 'verifierCertificateNo', align: 'center' },
+ { text: '证书号', value: 'verifierCertificateNo', align: 'center', width: '180' },
{ text: '证书有效日期', value: 'certificateDate', align: 'center', width: '200' },
{ text: '技术考核', value: 'technologyExam', align: 'center', width: '85' },
]) // 表格
@@ -63,7 +63,7 @@
loadingTable.value = true
getStaffList(searchQuery).then((res) => {
if (res.code === 200) {
- res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核' }))
+ res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核', certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -236,21 +236,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
+
+
+
diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue
index 3d5c2e3..0926957 100644
--- a/src/views/system/notice/noteList.vue
+++ b/src/views/system/notice/noteList.vue
@@ -172,15 +172,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+defineProps({
+ title: {
+ type: String,
+ required: true,
+ },
+})
+
+const slots = useSlots()
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue
index 4dc1b17..4352604 100644
--- a/src/views/measure/person/components/addPerson.vue
+++ b/src/views/measure/person/components/addPerson.vue
@@ -69,7 +69,16 @@
const IdCard = ruleForm.value.idCard
const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}`
ruleForm.value.birthday = birthday
- console.log(ruleForm.value)
+ // 获取性别 第17位 奇数为男 偶数为女
+ // ruleForm.value.sex
+ if (Number(IdCard.substring(16, 17)) % 2) {
+ // 男
+ ruleForm.value.sex = '1'
+ }
+ else {
+ // 女
+ ruleForm.value.sex = '2'
+ }
})
}
const dialogVisible = ref(false) // 弹窗显示
@@ -130,7 +139,6 @@
technologyExam: '', // 技术考核
remark: '', // 备注
certificateList: [], // 证书列表
-
}
}
const technologyJobList = ref([])
@@ -309,7 +317,7 @@
}
(title.value === '新建'
? getStaffAdd
- : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => {
+ : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => {
if (res.code == 200) {
formEl?.resetFields()
ElMessage.success('提交成功')
@@ -332,12 +340,14 @@
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
changeList.value[0].data = []
dialogVisible.value = true
title.value = row.title
resetFormData()
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -370,20 +380,15 @@
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
@@ -394,6 +399,7 @@
:http-request="uploadQuarterlyEvaluateFile"
:before-upload="beforeAvatarUpload"
:disabled="title === '详情'"
+ accept="image/png, image/jpeg,image/jpg"
>
@@ -425,8 +431,8 @@
@@ -489,29 +495,19 @@
-
-
-
-
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
@@ -523,7 +519,7 @@
-
+
@@ -532,77 +528,38 @@
@@ -624,8 +581,8 @@
.el-icon.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
- width: 220px;
- height: 320px;
+ width: 190px;
+ height: 250px;
text-align: center;
}
diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue
index ae48f11..042636e 100644
--- a/src/views/measure/person/components/addRecord.vue
+++ b/src/views/measure/person/components/addRecord.vue
@@ -4,7 +4,6 @@
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox, ElTable } from 'element-plus'
import type { technologyJobType } from '../person-interface'
-import certificateAddDialog from './certificateAddDialog.vue'
import personListDialog from './personListDialog.vue'
import { getUserList } from '@/api/system/user'
import { getDeptTreeList } from '@/api/system/dept'
@@ -14,7 +13,8 @@
import comTreeSelect from '@/views/system/user/selecTree.vue'
import { addCertificateList, getCertificateDetail, getCertificateUpdate } from '@/api/measure/person'
const emits = defineEmits(['resetData'])
-const ruleFormRef = ref() // from组件
+const ruleFormRef1 = ref() // from组件
+const ruleFormRef2 = ref() // from组件
const meterStaff = ref({
staffNo: '', // 人员编号
name: '', // 姓名
@@ -28,26 +28,43 @@
workDate: '', // 从事日期
id: '',
})
+const baseInfo = ref({
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+})
const ruleForm = ref({
meterStaff: {}, // 人员信息
staffId: '', // 计量人员id
}) // 表单
-const multipleTableRef = ref>()
const title = ref('')
+const name = ref('')
// 身份证号码验证规则
-const validateIDcard = (rule: any, value: any, callback: any) => {
- const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
- if (rr.test(value)) {
- callback()
- }
- else {
- callback(new Error('验证失败'))
- }
-}
+// const validateIDcard = (rule: any, value: any, callback: any) => {
+// const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
+// if (rr.test(value)) {
+// callback()
+// }
+// else {
+// callback(new Error('验证失败'))
+// }
+// }
const rules = ref({
staffNo: [{ required: true, message: '人员编号不能为空', trigger: 'blur' }],
// idCard: [{ required: false, validator: validateIDcard, message: '身份证号码不符合规范', trigger: 'change' }],
-
+}) // 表单验证规则
+const rules2 = ref({
+ certificateCompany: [{ required: true, message: '发证单位不能为空', trigger: 'blur' }],
+ certificateDate: [{ required: true, message: '发证日期不能为空', trigger: 'blur' }],
+ certificateName: [{ required: true, message: '证书名称不能为空', trigger: 'blur' }],
+ certificateNo: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
+ validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }],
}) // 表单验证规则
const dialogVisible = ref(false) // 弹窗显示
const userList = ref([]) // 可使用人列表
@@ -96,6 +113,17 @@
meterStaff.value.major = ''
meterStaff.value.workDate = ''
meterStaff.value.id = ''
+ baseInfo.value = {
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+ }
}
const technologyJobList = ref([])
// 获取技术职务列表
@@ -120,98 +148,14 @@
const confirmPerson = (row: any) => {
ruleForm.value.staffId = row.staffNo
meterStaff.value = row
- ruleFormRef.value?.clearValidate('staffNo')
+ ruleFormRef1.value?.clearValidate('staffNo')
}
-const changeList = ref([
- {
- name: '证书基本信息',
- data: [] as any[],
- column: [
- {
- label: '证书号',
- data: 'certificateNo',
- id: 'zs02',
- },
- {
- label: '证书名称',
- data: 'certificateName',
- id: 'zs03',
- },
- {
- label: '发证日期',
- data: 'certificateDate',
- id: 'zs04',
- },
- {
- label: '发证单位',
- data: 'certificateCompany',
- id: 'zs01',
- },
- {
- label: '有效日期',
- data: 'validDate',
- id: 'zs05',
- },
- ],
- },
- {
- name: '计量工作培训记录',
- data: [],
- column: [],
- },
- {
- name: '业务记录',
- data: [],
- column: [],
- },
-])
-const current = ref('证书基本信息')
-const currentShow = computed(() => {
- return changeList.value.filter(item => item.name === current.value)[0]
-})
-const certificateRef = ref() // 添加证书信息弹窗
-// 添加行
-const addRow = () => {
- certificateRef.value.initDialog({ title: '添加' })
-}
-// 编辑行
-const editRow = () => {
- certificateRef.value.initDialog({ ...changeList.value[0].data[0], title: '编辑' })
-}
-// 证书信息行内添加数据
-const addRowcertificate = (row: any, flag: string) => {
- const diff = dayjs(row.validDate).diff(row.certificateDate, 'day')
- if (flag === 'update') {
- changeList.value[0].data = [{
- ...changeList.value[0].data[0],
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- }]
- }
- else {
- changeList.value[0].data.push(
- {
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- })
- }
-}
-const currenSelect = ref(-1) // 当前选中行
-// 删除行
-const removeRow = () => {
- console.log(currenSelect.value)
- if (currenSelect.value >= 0) {
+// 提交
+const submitForm = async (formEl1: FormInstance | undefined, formEl2: FormInstance | undefined) => {
+ if (!formEl1 || !formEl2) { return }
+ Promise.all([formEl1.validate(), formEl2.validate()]).then((res) => {
ElMessageBox.confirm(
- '确认删除选中的数据吗?',
+ '确认提交吗?',
'提示',
{
confirmButtonText: '确认',
@@ -219,78 +163,49 @@
type: 'warning',
},
).then(() => {
- changeList.value[0].data = changeList.value[0].data.filter((item, index) => index !== currenSelect.value)
- currenSelect.value = -1
- ElMessage.success('删除成功')
- })
- }
- else {
- ElMessage.warning('请先选择需要删除的数据')
- }
-}
-// 提交
-const submitForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- let params
- if (changeList.value[0].data.length) {
- params = changeList.value[0].data
- }
- else {
- params = [
- {
- certificateCompany: '',
- certificateDate: '',
- certificateName: '',
- certificateNo: '',
- certificateStatus: '',
- createTime: '',
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: '',
- validDate: '',
- },
- ]
- }
- (title.value === '新建'
- ? addCertificateList
- : getCertificateUpdate)(title.value === '新建' ? params : changeList.value[0].data[0]).then((res) => {
- formEl?.resetFields()
- ElMessage.success('提交成功')
- emits('resetData')
- resetFormData()
- })
+ (title.value === '新建'
+ ? addCertificateList
+ : getCertificateUpdate)(title.value === '新建'
+ ? [{
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }]
+ : {
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }).then((res) => {
+ formEl1?.resetFields()
+ formEl2?.resetFields()
+ ElMessage.success('提交成功')
+ emits('resetData')
+ resetFormData()
})
- }
+ })
})
}
// 取消
-const resetForm = (formEl: FormInstance | undefined) => {
+const resetForm = (formEl: FormInstance | undefined, formEl2: FormInstance | undefined) => {
formEl?.resetFields()
- changeList.value[0].data = []
+ formEl2?.resetFields()
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
- changeList.value[0].data = []
resetFormData()
dialogVisible.value = true
title.value = row.title
- resetFormData()
+ name.value = row.name
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -303,8 +218,9 @@
else {
getCertificateDetail({ id: row.id }).then((res) => {
if (res.code === 200) {
+ console.log(res, '证书记录')
meterStaff.value = res.data.meterStaff
- changeList.value[0].data = [{ ...res.data, meterStaff: undefined }]
+ baseInfo.value = res.data
}
})
}
@@ -314,21 +230,16 @@
-
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
@@ -390,7 +301,8 @@
@@ -410,71 +322,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/src/views/measure/person/components/addRecordCancel.vue b/src/views/measure/person/components/addRecordCancel.vue
new file mode 100644
index 0000000..c32ac43
--- /dev/null
+++ b/src/views/measure/person/components/addRecordCancel.vue
@@ -0,0 +1,459 @@
+
+
+
+
+
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/person/components/certificateAddDialog.vue b/src/views/measure/person/components/certificateAddDialog.vue
index 332c73c..178fc12 100644
--- a/src/views/measure/person/components/certificateAddDialog.vue
+++ b/src/views/measure/person/components/certificateAddDialog.vue
@@ -32,6 +32,7 @@
form.validDate = ''
}
const initDialog = (row: any) => {
+ resetData()
title.value = row.title
if (row.title === '编辑') {
form.certificateNo = row.certificateNo
@@ -50,10 +51,12 @@
await formEl.validate((valid, fields) => {
if (valid) {
if (title.value === '编辑') {
- emits('add', form, 'update')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, 'update')
}
else {
- emits('add', form, '')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, '')
}
dialogFormVisible.value = false
}
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 592d810..9c6f65d 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -30,7 +30,7 @@
{ text: '技术职务', value: 'technologyJob', align: 'center', width: '140' },
{ text: '行政职务', value: 'administrationJob', align: 'center', width: '100' },
{ text: '计量专业', value: 'major', align: 'center', width: '100' },
- { text: '证书号', value: 'verifierCertificateNo', align: 'center' },
+ { text: '证书号', value: 'verifierCertificateNo', align: 'center', width: '180' },
{ text: '证书有效日期', value: 'certificateDate', align: 'center', width: '200' },
{ text: '技术考核', value: 'technologyExam', align: 'center', width: '85' },
]) // 表格
@@ -63,7 +63,7 @@
loadingTable.value = true
getStaffList(searchQuery).then((res) => {
if (res.code === 200) {
- res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核' }))
+ res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核', certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -236,21 +236,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
+
+
+
diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue
index 3d5c2e3..0926957 100644
--- a/src/views/system/notice/noteList.vue
+++ b/src/views/system/notice/noteList.vue
@@ -172,15 +172,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
暂无附件
-
+
+
+
+
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue
index 4dc1b17..4352604 100644
--- a/src/views/measure/person/components/addPerson.vue
+++ b/src/views/measure/person/components/addPerson.vue
@@ -69,7 +69,16 @@
const IdCard = ruleForm.value.idCard
const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}`
ruleForm.value.birthday = birthday
- console.log(ruleForm.value)
+ // 获取性别 第17位 奇数为男 偶数为女
+ // ruleForm.value.sex
+ if (Number(IdCard.substring(16, 17)) % 2) {
+ // 男
+ ruleForm.value.sex = '1'
+ }
+ else {
+ // 女
+ ruleForm.value.sex = '2'
+ }
})
}
const dialogVisible = ref(false) // 弹窗显示
@@ -130,7 +139,6 @@
technologyExam: '', // 技术考核
remark: '', // 备注
certificateList: [], // 证书列表
-
}
}
const technologyJobList = ref([])
@@ -309,7 +317,7 @@
}
(title.value === '新建'
? getStaffAdd
- : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => {
+ : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => {
if (res.code == 200) {
formEl?.resetFields()
ElMessage.success('提交成功')
@@ -332,12 +340,14 @@
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
changeList.value[0].data = []
dialogVisible.value = true
title.value = row.title
resetFormData()
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -370,20 +380,15 @@
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
@@ -394,6 +399,7 @@
:http-request="uploadQuarterlyEvaluateFile"
:before-upload="beforeAvatarUpload"
:disabled="title === '详情'"
+ accept="image/png, image/jpeg,image/jpg"
>
@@ -425,8 +431,8 @@
@@ -489,29 +495,19 @@
-
-
-
-
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
@@ -523,7 +519,7 @@
-
+
@@ -532,77 +528,38 @@
@@ -624,8 +581,8 @@
.el-icon.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
- width: 220px;
- height: 320px;
+ width: 190px;
+ height: 250px;
text-align: center;
}
diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue
index ae48f11..042636e 100644
--- a/src/views/measure/person/components/addRecord.vue
+++ b/src/views/measure/person/components/addRecord.vue
@@ -4,7 +4,6 @@
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox, ElTable } from 'element-plus'
import type { technologyJobType } from '../person-interface'
-import certificateAddDialog from './certificateAddDialog.vue'
import personListDialog from './personListDialog.vue'
import { getUserList } from '@/api/system/user'
import { getDeptTreeList } from '@/api/system/dept'
@@ -14,7 +13,8 @@
import comTreeSelect from '@/views/system/user/selecTree.vue'
import { addCertificateList, getCertificateDetail, getCertificateUpdate } from '@/api/measure/person'
const emits = defineEmits(['resetData'])
-const ruleFormRef = ref() // from组件
+const ruleFormRef1 = ref() // from组件
+const ruleFormRef2 = ref() // from组件
const meterStaff = ref({
staffNo: '', // 人员编号
name: '', // 姓名
@@ -28,26 +28,43 @@
workDate: '', // 从事日期
id: '',
})
+const baseInfo = ref({
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+})
const ruleForm = ref({
meterStaff: {}, // 人员信息
staffId: '', // 计量人员id
}) // 表单
-const multipleTableRef = ref>()
const title = ref('')
+const name = ref('')
// 身份证号码验证规则
-const validateIDcard = (rule: any, value: any, callback: any) => {
- const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
- if (rr.test(value)) {
- callback()
- }
- else {
- callback(new Error('验证失败'))
- }
-}
+// const validateIDcard = (rule: any, value: any, callback: any) => {
+// const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
+// if (rr.test(value)) {
+// callback()
+// }
+// else {
+// callback(new Error('验证失败'))
+// }
+// }
const rules = ref({
staffNo: [{ required: true, message: '人员编号不能为空', trigger: 'blur' }],
// idCard: [{ required: false, validator: validateIDcard, message: '身份证号码不符合规范', trigger: 'change' }],
-
+}) // 表单验证规则
+const rules2 = ref({
+ certificateCompany: [{ required: true, message: '发证单位不能为空', trigger: 'blur' }],
+ certificateDate: [{ required: true, message: '发证日期不能为空', trigger: 'blur' }],
+ certificateName: [{ required: true, message: '证书名称不能为空', trigger: 'blur' }],
+ certificateNo: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
+ validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }],
}) // 表单验证规则
const dialogVisible = ref(false) // 弹窗显示
const userList = ref([]) // 可使用人列表
@@ -96,6 +113,17 @@
meterStaff.value.major = ''
meterStaff.value.workDate = ''
meterStaff.value.id = ''
+ baseInfo.value = {
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+ }
}
const technologyJobList = ref([])
// 获取技术职务列表
@@ -120,98 +148,14 @@
const confirmPerson = (row: any) => {
ruleForm.value.staffId = row.staffNo
meterStaff.value = row
- ruleFormRef.value?.clearValidate('staffNo')
+ ruleFormRef1.value?.clearValidate('staffNo')
}
-const changeList = ref([
- {
- name: '证书基本信息',
- data: [] as any[],
- column: [
- {
- label: '证书号',
- data: 'certificateNo',
- id: 'zs02',
- },
- {
- label: '证书名称',
- data: 'certificateName',
- id: 'zs03',
- },
- {
- label: '发证日期',
- data: 'certificateDate',
- id: 'zs04',
- },
- {
- label: '发证单位',
- data: 'certificateCompany',
- id: 'zs01',
- },
- {
- label: '有效日期',
- data: 'validDate',
- id: 'zs05',
- },
- ],
- },
- {
- name: '计量工作培训记录',
- data: [],
- column: [],
- },
- {
- name: '业务记录',
- data: [],
- column: [],
- },
-])
-const current = ref('证书基本信息')
-const currentShow = computed(() => {
- return changeList.value.filter(item => item.name === current.value)[0]
-})
-const certificateRef = ref() // 添加证书信息弹窗
-// 添加行
-const addRow = () => {
- certificateRef.value.initDialog({ title: '添加' })
-}
-// 编辑行
-const editRow = () => {
- certificateRef.value.initDialog({ ...changeList.value[0].data[0], title: '编辑' })
-}
-// 证书信息行内添加数据
-const addRowcertificate = (row: any, flag: string) => {
- const diff = dayjs(row.validDate).diff(row.certificateDate, 'day')
- if (flag === 'update') {
- changeList.value[0].data = [{
- ...changeList.value[0].data[0],
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- }]
- }
- else {
- changeList.value[0].data.push(
- {
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- })
- }
-}
-const currenSelect = ref(-1) // 当前选中行
-// 删除行
-const removeRow = () => {
- console.log(currenSelect.value)
- if (currenSelect.value >= 0) {
+// 提交
+const submitForm = async (formEl1: FormInstance | undefined, formEl2: FormInstance | undefined) => {
+ if (!formEl1 || !formEl2) { return }
+ Promise.all([formEl1.validate(), formEl2.validate()]).then((res) => {
ElMessageBox.confirm(
- '确认删除选中的数据吗?',
+ '确认提交吗?',
'提示',
{
confirmButtonText: '确认',
@@ -219,78 +163,49 @@
type: 'warning',
},
).then(() => {
- changeList.value[0].data = changeList.value[0].data.filter((item, index) => index !== currenSelect.value)
- currenSelect.value = -1
- ElMessage.success('删除成功')
- })
- }
- else {
- ElMessage.warning('请先选择需要删除的数据')
- }
-}
-// 提交
-const submitForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- let params
- if (changeList.value[0].data.length) {
- params = changeList.value[0].data
- }
- else {
- params = [
- {
- certificateCompany: '',
- certificateDate: '',
- certificateName: '',
- certificateNo: '',
- certificateStatus: '',
- createTime: '',
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: '',
- validDate: '',
- },
- ]
- }
- (title.value === '新建'
- ? addCertificateList
- : getCertificateUpdate)(title.value === '新建' ? params : changeList.value[0].data[0]).then((res) => {
- formEl?.resetFields()
- ElMessage.success('提交成功')
- emits('resetData')
- resetFormData()
- })
+ (title.value === '新建'
+ ? addCertificateList
+ : getCertificateUpdate)(title.value === '新建'
+ ? [{
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }]
+ : {
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }).then((res) => {
+ formEl1?.resetFields()
+ formEl2?.resetFields()
+ ElMessage.success('提交成功')
+ emits('resetData')
+ resetFormData()
})
- }
+ })
})
}
// 取消
-const resetForm = (formEl: FormInstance | undefined) => {
+const resetForm = (formEl: FormInstance | undefined, formEl2: FormInstance | undefined) => {
formEl?.resetFields()
- changeList.value[0].data = []
+ formEl2?.resetFields()
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
- changeList.value[0].data = []
resetFormData()
dialogVisible.value = true
title.value = row.title
- resetFormData()
+ name.value = row.name
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -303,8 +218,9 @@
else {
getCertificateDetail({ id: row.id }).then((res) => {
if (res.code === 200) {
+ console.log(res, '证书记录')
meterStaff.value = res.data.meterStaff
- changeList.value[0].data = [{ ...res.data, meterStaff: undefined }]
+ baseInfo.value = res.data
}
})
}
@@ -314,21 +230,16 @@
-
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
@@ -390,7 +301,8 @@
@@ -410,71 +322,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/src/views/measure/person/components/addRecordCancel.vue b/src/views/measure/person/components/addRecordCancel.vue
new file mode 100644
index 0000000..c32ac43
--- /dev/null
+++ b/src/views/measure/person/components/addRecordCancel.vue
@@ -0,0 +1,459 @@
+
+
+
+
+
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/person/components/certificateAddDialog.vue b/src/views/measure/person/components/certificateAddDialog.vue
index 332c73c..178fc12 100644
--- a/src/views/measure/person/components/certificateAddDialog.vue
+++ b/src/views/measure/person/components/certificateAddDialog.vue
@@ -32,6 +32,7 @@
form.validDate = ''
}
const initDialog = (row: any) => {
+ resetData()
title.value = row.title
if (row.title === '编辑') {
form.certificateNo = row.certificateNo
@@ -50,10 +51,12 @@
await formEl.validate((valid, fields) => {
if (valid) {
if (title.value === '编辑') {
- emits('add', form, 'update')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, 'update')
}
else {
- emits('add', form, '')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, '')
}
dialogFormVisible.value = false
}
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 592d810..9c6f65d 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -30,7 +30,7 @@
{ text: '技术职务', value: 'technologyJob', align: 'center', width: '140' },
{ text: '行政职务', value: 'administrationJob', align: 'center', width: '100' },
{ text: '计量专业', value: 'major', align: 'center', width: '100' },
- { text: '证书号', value: 'verifierCertificateNo', align: 'center' },
+ { text: '证书号', value: 'verifierCertificateNo', align: 'center', width: '180' },
{ text: '证书有效日期', value: 'certificateDate', align: 'center', width: '200' },
{ text: '技术考核', value: 'technologyExam', align: 'center', width: '85' },
]) // 表格
@@ -63,7 +63,7 @@
loadingTable.value = true
getStaffList(searchQuery).then((res) => {
if (res.code === 200) {
- res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核' }))
+ res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核', certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -236,21 +236,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
+
+
+
diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue
index 3d5c2e3..0926957 100644
--- a/src/views/system/notice/noteList.vue
+++ b/src/views/system/notice/noteList.vue
@@ -172,15 +172,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
暂无附件
-
+
+
+
+
diff --git a/src/views/system/tool/autograph/addDDialog.vue b/src/views/system/tool/autograph/addDDialog.vue
index d34e8ef..e39b706 100644
--- a/src/views/system/tool/autograph/addDDialog.vue
+++ b/src/views/system/tool/autograph/addDDialog.vue
@@ -200,15 +200,17 @@
-
+
+
+
+
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue
index 4dc1b17..4352604 100644
--- a/src/views/measure/person/components/addPerson.vue
+++ b/src/views/measure/person/components/addPerson.vue
@@ -69,7 +69,16 @@
const IdCard = ruleForm.value.idCard
const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}`
ruleForm.value.birthday = birthday
- console.log(ruleForm.value)
+ // 获取性别 第17位 奇数为男 偶数为女
+ // ruleForm.value.sex
+ if (Number(IdCard.substring(16, 17)) % 2) {
+ // 男
+ ruleForm.value.sex = '1'
+ }
+ else {
+ // 女
+ ruleForm.value.sex = '2'
+ }
})
}
const dialogVisible = ref(false) // 弹窗显示
@@ -130,7 +139,6 @@
technologyExam: '', // 技术考核
remark: '', // 备注
certificateList: [], // 证书列表
-
}
}
const technologyJobList = ref([])
@@ -309,7 +317,7 @@
}
(title.value === '新建'
? getStaffAdd
- : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => {
+ : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => {
if (res.code == 200) {
formEl?.resetFields()
ElMessage.success('提交成功')
@@ -332,12 +340,14 @@
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
changeList.value[0].data = []
dialogVisible.value = true
title.value = row.title
resetFormData()
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -370,20 +380,15 @@
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
@@ -394,6 +399,7 @@
:http-request="uploadQuarterlyEvaluateFile"
:before-upload="beforeAvatarUpload"
:disabled="title === '详情'"
+ accept="image/png, image/jpeg,image/jpg"
>
@@ -425,8 +431,8 @@
@@ -489,29 +495,19 @@
-
-
-
-
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
@@ -523,7 +519,7 @@
-
+
@@ -532,77 +528,38 @@
@@ -624,8 +581,8 @@
.el-icon.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
- width: 220px;
- height: 320px;
+ width: 190px;
+ height: 250px;
text-align: center;
}
diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue
index ae48f11..042636e 100644
--- a/src/views/measure/person/components/addRecord.vue
+++ b/src/views/measure/person/components/addRecord.vue
@@ -4,7 +4,6 @@
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox, ElTable } from 'element-plus'
import type { technologyJobType } from '../person-interface'
-import certificateAddDialog from './certificateAddDialog.vue'
import personListDialog from './personListDialog.vue'
import { getUserList } from '@/api/system/user'
import { getDeptTreeList } from '@/api/system/dept'
@@ -14,7 +13,8 @@
import comTreeSelect from '@/views/system/user/selecTree.vue'
import { addCertificateList, getCertificateDetail, getCertificateUpdate } from '@/api/measure/person'
const emits = defineEmits(['resetData'])
-const ruleFormRef = ref() // from组件
+const ruleFormRef1 = ref() // from组件
+const ruleFormRef2 = ref() // from组件
const meterStaff = ref({
staffNo: '', // 人员编号
name: '', // 姓名
@@ -28,26 +28,43 @@
workDate: '', // 从事日期
id: '',
})
+const baseInfo = ref({
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+})
const ruleForm = ref({
meterStaff: {}, // 人员信息
staffId: '', // 计量人员id
}) // 表单
-const multipleTableRef = ref>()
const title = ref('')
+const name = ref('')
// 身份证号码验证规则
-const validateIDcard = (rule: any, value: any, callback: any) => {
- const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
- if (rr.test(value)) {
- callback()
- }
- else {
- callback(new Error('验证失败'))
- }
-}
+// const validateIDcard = (rule: any, value: any, callback: any) => {
+// const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
+// if (rr.test(value)) {
+// callback()
+// }
+// else {
+// callback(new Error('验证失败'))
+// }
+// }
const rules = ref({
staffNo: [{ required: true, message: '人员编号不能为空', trigger: 'blur' }],
// idCard: [{ required: false, validator: validateIDcard, message: '身份证号码不符合规范', trigger: 'change' }],
-
+}) // 表单验证规则
+const rules2 = ref({
+ certificateCompany: [{ required: true, message: '发证单位不能为空', trigger: 'blur' }],
+ certificateDate: [{ required: true, message: '发证日期不能为空', trigger: 'blur' }],
+ certificateName: [{ required: true, message: '证书名称不能为空', trigger: 'blur' }],
+ certificateNo: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
+ validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }],
}) // 表单验证规则
const dialogVisible = ref(false) // 弹窗显示
const userList = ref([]) // 可使用人列表
@@ -96,6 +113,17 @@
meterStaff.value.major = ''
meterStaff.value.workDate = ''
meterStaff.value.id = ''
+ baseInfo.value = {
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+ }
}
const technologyJobList = ref([])
// 获取技术职务列表
@@ -120,98 +148,14 @@
const confirmPerson = (row: any) => {
ruleForm.value.staffId = row.staffNo
meterStaff.value = row
- ruleFormRef.value?.clearValidate('staffNo')
+ ruleFormRef1.value?.clearValidate('staffNo')
}
-const changeList = ref([
- {
- name: '证书基本信息',
- data: [] as any[],
- column: [
- {
- label: '证书号',
- data: 'certificateNo',
- id: 'zs02',
- },
- {
- label: '证书名称',
- data: 'certificateName',
- id: 'zs03',
- },
- {
- label: '发证日期',
- data: 'certificateDate',
- id: 'zs04',
- },
- {
- label: '发证单位',
- data: 'certificateCompany',
- id: 'zs01',
- },
- {
- label: '有效日期',
- data: 'validDate',
- id: 'zs05',
- },
- ],
- },
- {
- name: '计量工作培训记录',
- data: [],
- column: [],
- },
- {
- name: '业务记录',
- data: [],
- column: [],
- },
-])
-const current = ref('证书基本信息')
-const currentShow = computed(() => {
- return changeList.value.filter(item => item.name === current.value)[0]
-})
-const certificateRef = ref() // 添加证书信息弹窗
-// 添加行
-const addRow = () => {
- certificateRef.value.initDialog({ title: '添加' })
-}
-// 编辑行
-const editRow = () => {
- certificateRef.value.initDialog({ ...changeList.value[0].data[0], title: '编辑' })
-}
-// 证书信息行内添加数据
-const addRowcertificate = (row: any, flag: string) => {
- const diff = dayjs(row.validDate).diff(row.certificateDate, 'day')
- if (flag === 'update') {
- changeList.value[0].data = [{
- ...changeList.value[0].data[0],
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- }]
- }
- else {
- changeList.value[0].data.push(
- {
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- })
- }
-}
-const currenSelect = ref(-1) // 当前选中行
-// 删除行
-const removeRow = () => {
- console.log(currenSelect.value)
- if (currenSelect.value >= 0) {
+// 提交
+const submitForm = async (formEl1: FormInstance | undefined, formEl2: FormInstance | undefined) => {
+ if (!formEl1 || !formEl2) { return }
+ Promise.all([formEl1.validate(), formEl2.validate()]).then((res) => {
ElMessageBox.confirm(
- '确认删除选中的数据吗?',
+ '确认提交吗?',
'提示',
{
confirmButtonText: '确认',
@@ -219,78 +163,49 @@
type: 'warning',
},
).then(() => {
- changeList.value[0].data = changeList.value[0].data.filter((item, index) => index !== currenSelect.value)
- currenSelect.value = -1
- ElMessage.success('删除成功')
- })
- }
- else {
- ElMessage.warning('请先选择需要删除的数据')
- }
-}
-// 提交
-const submitForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- let params
- if (changeList.value[0].data.length) {
- params = changeList.value[0].data
- }
- else {
- params = [
- {
- certificateCompany: '',
- certificateDate: '',
- certificateName: '',
- certificateNo: '',
- certificateStatus: '',
- createTime: '',
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: '',
- validDate: '',
- },
- ]
- }
- (title.value === '新建'
- ? addCertificateList
- : getCertificateUpdate)(title.value === '新建' ? params : changeList.value[0].data[0]).then((res) => {
- formEl?.resetFields()
- ElMessage.success('提交成功')
- emits('resetData')
- resetFormData()
- })
+ (title.value === '新建'
+ ? addCertificateList
+ : getCertificateUpdate)(title.value === '新建'
+ ? [{
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }]
+ : {
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }).then((res) => {
+ formEl1?.resetFields()
+ formEl2?.resetFields()
+ ElMessage.success('提交成功')
+ emits('resetData')
+ resetFormData()
})
- }
+ })
})
}
// 取消
-const resetForm = (formEl: FormInstance | undefined) => {
+const resetForm = (formEl: FormInstance | undefined, formEl2: FormInstance | undefined) => {
formEl?.resetFields()
- changeList.value[0].data = []
+ formEl2?.resetFields()
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
- changeList.value[0].data = []
resetFormData()
dialogVisible.value = true
title.value = row.title
- resetFormData()
+ name.value = row.name
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -303,8 +218,9 @@
else {
getCertificateDetail({ id: row.id }).then((res) => {
if (res.code === 200) {
+ console.log(res, '证书记录')
meterStaff.value = res.data.meterStaff
- changeList.value[0].data = [{ ...res.data, meterStaff: undefined }]
+ baseInfo.value = res.data
}
})
}
@@ -314,21 +230,16 @@
-
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
@@ -390,7 +301,8 @@
@@ -410,71 +322,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/src/views/measure/person/components/addRecordCancel.vue b/src/views/measure/person/components/addRecordCancel.vue
new file mode 100644
index 0000000..c32ac43
--- /dev/null
+++ b/src/views/measure/person/components/addRecordCancel.vue
@@ -0,0 +1,459 @@
+
+
+
+
+
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/person/components/certificateAddDialog.vue b/src/views/measure/person/components/certificateAddDialog.vue
index 332c73c..178fc12 100644
--- a/src/views/measure/person/components/certificateAddDialog.vue
+++ b/src/views/measure/person/components/certificateAddDialog.vue
@@ -32,6 +32,7 @@
form.validDate = ''
}
const initDialog = (row: any) => {
+ resetData()
title.value = row.title
if (row.title === '编辑') {
form.certificateNo = row.certificateNo
@@ -50,10 +51,12 @@
await formEl.validate((valid, fields) => {
if (valid) {
if (title.value === '编辑') {
- emits('add', form, 'update')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, 'update')
}
else {
- emits('add', form, '')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, '')
}
dialogFormVisible.value = false
}
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 592d810..9c6f65d 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -30,7 +30,7 @@
{ text: '技术职务', value: 'technologyJob', align: 'center', width: '140' },
{ text: '行政职务', value: 'administrationJob', align: 'center', width: '100' },
{ text: '计量专业', value: 'major', align: 'center', width: '100' },
- { text: '证书号', value: 'verifierCertificateNo', align: 'center' },
+ { text: '证书号', value: 'verifierCertificateNo', align: 'center', width: '180' },
{ text: '证书有效日期', value: 'certificateDate', align: 'center', width: '200' },
{ text: '技术考核', value: 'technologyExam', align: 'center', width: '85' },
]) // 表格
@@ -63,7 +63,7 @@
loadingTable.value = true
getStaffList(searchQuery).then((res) => {
if (res.code === 200) {
- res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核' }))
+ res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核', certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -236,21 +236,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
+
+
+
diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue
index 3d5c2e3..0926957 100644
--- a/src/views/system/notice/noteList.vue
+++ b/src/views/system/notice/noteList.vue
@@ -172,15 +172,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
暂无附件
-
+
+
+
+
diff --git a/src/views/system/tool/autograph/addDDialog.vue b/src/views/system/tool/autograph/addDDialog.vue
index d34e8ef..e39b706 100644
--- a/src/views/system/tool/autograph/addDDialog.vue
+++ b/src/views/system/tool/autograph/addDDialog.vue
@@ -200,15 +200,17 @@
-
+
+
+
+
diff --git a/src/views/system/tool/autograph/autograph.vue b/src/views/system/tool/autograph/autograph.vue
index 8fffe07..ac9f000 100644
--- a/src/views/system/tool/autograph/autograph.vue
+++ b/src/views/system/tool/autograph/autograph.vue
@@ -191,15 +191,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+defineProps({
+ title: {
+ type: String,
+ required: true,
+ },
+})
+
+const slots = useSlots()
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue
index 4dc1b17..4352604 100644
--- a/src/views/measure/person/components/addPerson.vue
+++ b/src/views/measure/person/components/addPerson.vue
@@ -69,7 +69,16 @@
const IdCard = ruleForm.value.idCard
const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}`
ruleForm.value.birthday = birthday
- console.log(ruleForm.value)
+ // 获取性别 第17位 奇数为男 偶数为女
+ // ruleForm.value.sex
+ if (Number(IdCard.substring(16, 17)) % 2) {
+ // 男
+ ruleForm.value.sex = '1'
+ }
+ else {
+ // 女
+ ruleForm.value.sex = '2'
+ }
})
}
const dialogVisible = ref(false) // 弹窗显示
@@ -130,7 +139,6 @@
technologyExam: '', // 技术考核
remark: '', // 备注
certificateList: [], // 证书列表
-
}
}
const technologyJobList = ref([])
@@ -309,7 +317,7 @@
}
(title.value === '新建'
? getStaffAdd
- : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => {
+ : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => {
if (res.code == 200) {
formEl?.resetFields()
ElMessage.success('提交成功')
@@ -332,12 +340,14 @@
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
changeList.value[0].data = []
dialogVisible.value = true
title.value = row.title
resetFormData()
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -370,20 +380,15 @@
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
@@ -394,6 +399,7 @@
:http-request="uploadQuarterlyEvaluateFile"
:before-upload="beforeAvatarUpload"
:disabled="title === '详情'"
+ accept="image/png, image/jpeg,image/jpg"
>
@@ -425,8 +431,8 @@
@@ -489,29 +495,19 @@
-
-
-
-
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
@@ -523,7 +519,7 @@
-
+
@@ -532,77 +528,38 @@
@@ -624,8 +581,8 @@
.el-icon.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
- width: 220px;
- height: 320px;
+ width: 190px;
+ height: 250px;
text-align: center;
}
diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue
index ae48f11..042636e 100644
--- a/src/views/measure/person/components/addRecord.vue
+++ b/src/views/measure/person/components/addRecord.vue
@@ -4,7 +4,6 @@
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox, ElTable } from 'element-plus'
import type { technologyJobType } from '../person-interface'
-import certificateAddDialog from './certificateAddDialog.vue'
import personListDialog from './personListDialog.vue'
import { getUserList } from '@/api/system/user'
import { getDeptTreeList } from '@/api/system/dept'
@@ -14,7 +13,8 @@
import comTreeSelect from '@/views/system/user/selecTree.vue'
import { addCertificateList, getCertificateDetail, getCertificateUpdate } from '@/api/measure/person'
const emits = defineEmits(['resetData'])
-const ruleFormRef = ref() // from组件
+const ruleFormRef1 = ref() // from组件
+const ruleFormRef2 = ref() // from组件
const meterStaff = ref({
staffNo: '', // 人员编号
name: '', // 姓名
@@ -28,26 +28,43 @@
workDate: '', // 从事日期
id: '',
})
+const baseInfo = ref({
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+})
const ruleForm = ref({
meterStaff: {}, // 人员信息
staffId: '', // 计量人员id
}) // 表单
-const multipleTableRef = ref>()
const title = ref('')
+const name = ref('')
// 身份证号码验证规则
-const validateIDcard = (rule: any, value: any, callback: any) => {
- const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
- if (rr.test(value)) {
- callback()
- }
- else {
- callback(new Error('验证失败'))
- }
-}
+// const validateIDcard = (rule: any, value: any, callback: any) => {
+// const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
+// if (rr.test(value)) {
+// callback()
+// }
+// else {
+// callback(new Error('验证失败'))
+// }
+// }
const rules = ref({
staffNo: [{ required: true, message: '人员编号不能为空', trigger: 'blur' }],
// idCard: [{ required: false, validator: validateIDcard, message: '身份证号码不符合规范', trigger: 'change' }],
-
+}) // 表单验证规则
+const rules2 = ref({
+ certificateCompany: [{ required: true, message: '发证单位不能为空', trigger: 'blur' }],
+ certificateDate: [{ required: true, message: '发证日期不能为空', trigger: 'blur' }],
+ certificateName: [{ required: true, message: '证书名称不能为空', trigger: 'blur' }],
+ certificateNo: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
+ validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }],
}) // 表单验证规则
const dialogVisible = ref(false) // 弹窗显示
const userList = ref([]) // 可使用人列表
@@ -96,6 +113,17 @@
meterStaff.value.major = ''
meterStaff.value.workDate = ''
meterStaff.value.id = ''
+ baseInfo.value = {
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+ }
}
const technologyJobList = ref([])
// 获取技术职务列表
@@ -120,98 +148,14 @@
const confirmPerson = (row: any) => {
ruleForm.value.staffId = row.staffNo
meterStaff.value = row
- ruleFormRef.value?.clearValidate('staffNo')
+ ruleFormRef1.value?.clearValidate('staffNo')
}
-const changeList = ref([
- {
- name: '证书基本信息',
- data: [] as any[],
- column: [
- {
- label: '证书号',
- data: 'certificateNo',
- id: 'zs02',
- },
- {
- label: '证书名称',
- data: 'certificateName',
- id: 'zs03',
- },
- {
- label: '发证日期',
- data: 'certificateDate',
- id: 'zs04',
- },
- {
- label: '发证单位',
- data: 'certificateCompany',
- id: 'zs01',
- },
- {
- label: '有效日期',
- data: 'validDate',
- id: 'zs05',
- },
- ],
- },
- {
- name: '计量工作培训记录',
- data: [],
- column: [],
- },
- {
- name: '业务记录',
- data: [],
- column: [],
- },
-])
-const current = ref('证书基本信息')
-const currentShow = computed(() => {
- return changeList.value.filter(item => item.name === current.value)[0]
-})
-const certificateRef = ref() // 添加证书信息弹窗
-// 添加行
-const addRow = () => {
- certificateRef.value.initDialog({ title: '添加' })
-}
-// 编辑行
-const editRow = () => {
- certificateRef.value.initDialog({ ...changeList.value[0].data[0], title: '编辑' })
-}
-// 证书信息行内添加数据
-const addRowcertificate = (row: any, flag: string) => {
- const diff = dayjs(row.validDate).diff(row.certificateDate, 'day')
- if (flag === 'update') {
- changeList.value[0].data = [{
- ...changeList.value[0].data[0],
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- }]
- }
- else {
- changeList.value[0].data.push(
- {
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- })
- }
-}
-const currenSelect = ref(-1) // 当前选中行
-// 删除行
-const removeRow = () => {
- console.log(currenSelect.value)
- if (currenSelect.value >= 0) {
+// 提交
+const submitForm = async (formEl1: FormInstance | undefined, formEl2: FormInstance | undefined) => {
+ if (!formEl1 || !formEl2) { return }
+ Promise.all([formEl1.validate(), formEl2.validate()]).then((res) => {
ElMessageBox.confirm(
- '确认删除选中的数据吗?',
+ '确认提交吗?',
'提示',
{
confirmButtonText: '确认',
@@ -219,78 +163,49 @@
type: 'warning',
},
).then(() => {
- changeList.value[0].data = changeList.value[0].data.filter((item, index) => index !== currenSelect.value)
- currenSelect.value = -1
- ElMessage.success('删除成功')
- })
- }
- else {
- ElMessage.warning('请先选择需要删除的数据')
- }
-}
-// 提交
-const submitForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- let params
- if (changeList.value[0].data.length) {
- params = changeList.value[0].data
- }
- else {
- params = [
- {
- certificateCompany: '',
- certificateDate: '',
- certificateName: '',
- certificateNo: '',
- certificateStatus: '',
- createTime: '',
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: '',
- validDate: '',
- },
- ]
- }
- (title.value === '新建'
- ? addCertificateList
- : getCertificateUpdate)(title.value === '新建' ? params : changeList.value[0].data[0]).then((res) => {
- formEl?.resetFields()
- ElMessage.success('提交成功')
- emits('resetData')
- resetFormData()
- })
+ (title.value === '新建'
+ ? addCertificateList
+ : getCertificateUpdate)(title.value === '新建'
+ ? [{
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }]
+ : {
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }).then((res) => {
+ formEl1?.resetFields()
+ formEl2?.resetFields()
+ ElMessage.success('提交成功')
+ emits('resetData')
+ resetFormData()
})
- }
+ })
})
}
// 取消
-const resetForm = (formEl: FormInstance | undefined) => {
+const resetForm = (formEl: FormInstance | undefined, formEl2: FormInstance | undefined) => {
formEl?.resetFields()
- changeList.value[0].data = []
+ formEl2?.resetFields()
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
- changeList.value[0].data = []
resetFormData()
dialogVisible.value = true
title.value = row.title
- resetFormData()
+ name.value = row.name
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -303,8 +218,9 @@
else {
getCertificateDetail({ id: row.id }).then((res) => {
if (res.code === 200) {
+ console.log(res, '证书记录')
meterStaff.value = res.data.meterStaff
- changeList.value[0].data = [{ ...res.data, meterStaff: undefined }]
+ baseInfo.value = res.data
}
})
}
@@ -314,21 +230,16 @@
-
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
@@ -390,7 +301,8 @@
@@ -410,71 +322,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/src/views/measure/person/components/addRecordCancel.vue b/src/views/measure/person/components/addRecordCancel.vue
new file mode 100644
index 0000000..c32ac43
--- /dev/null
+++ b/src/views/measure/person/components/addRecordCancel.vue
@@ -0,0 +1,459 @@
+
+
+
+
+
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/person/components/certificateAddDialog.vue b/src/views/measure/person/components/certificateAddDialog.vue
index 332c73c..178fc12 100644
--- a/src/views/measure/person/components/certificateAddDialog.vue
+++ b/src/views/measure/person/components/certificateAddDialog.vue
@@ -32,6 +32,7 @@
form.validDate = ''
}
const initDialog = (row: any) => {
+ resetData()
title.value = row.title
if (row.title === '编辑') {
form.certificateNo = row.certificateNo
@@ -50,10 +51,12 @@
await formEl.validate((valid, fields) => {
if (valid) {
if (title.value === '编辑') {
- emits('add', form, 'update')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, 'update')
}
else {
- emits('add', form, '')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, '')
}
dialogFormVisible.value = false
}
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 592d810..9c6f65d 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -30,7 +30,7 @@
{ text: '技术职务', value: 'technologyJob', align: 'center', width: '140' },
{ text: '行政职务', value: 'administrationJob', align: 'center', width: '100' },
{ text: '计量专业', value: 'major', align: 'center', width: '100' },
- { text: '证书号', value: 'verifierCertificateNo', align: 'center' },
+ { text: '证书号', value: 'verifierCertificateNo', align: 'center', width: '180' },
{ text: '证书有效日期', value: 'certificateDate', align: 'center', width: '200' },
{ text: '技术考核', value: 'technologyExam', align: 'center', width: '85' },
]) // 表格
@@ -63,7 +63,7 @@
loadingTable.value = true
getStaffList(searchQuery).then((res) => {
if (res.code === 200) {
- res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核' }))
+ res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核', certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -236,21 +236,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
+
+
+
diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue
index 3d5c2e3..0926957 100644
--- a/src/views/system/notice/noteList.vue
+++ b/src/views/system/notice/noteList.vue
@@ -172,15 +172,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
暂无附件
-
+
+
+
+
diff --git a/src/views/system/tool/autograph/addDDialog.vue b/src/views/system/tool/autograph/addDDialog.vue
index d34e8ef..e39b706 100644
--- a/src/views/system/tool/autograph/addDDialog.vue
+++ b/src/views/system/tool/autograph/addDDialog.vue
@@ -200,15 +200,17 @@
-
+
+
+
+
diff --git a/src/views/system/tool/autograph/autograph.vue b/src/views/system/tool/autograph/autograph.vue
index 8fffe07..ac9f000 100644
--- a/src/views/system/tool/autograph/autograph.vue
+++ b/src/views/system/tool/autograph/autograph.vue
@@ -191,15 +191,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
-
+
+
+
+
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue
index 4dc1b17..4352604 100644
--- a/src/views/measure/person/components/addPerson.vue
+++ b/src/views/measure/person/components/addPerson.vue
@@ -69,7 +69,16 @@
const IdCard = ruleForm.value.idCard
const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}`
ruleForm.value.birthday = birthday
- console.log(ruleForm.value)
+ // 获取性别 第17位 奇数为男 偶数为女
+ // ruleForm.value.sex
+ if (Number(IdCard.substring(16, 17)) % 2) {
+ // 男
+ ruleForm.value.sex = '1'
+ }
+ else {
+ // 女
+ ruleForm.value.sex = '2'
+ }
})
}
const dialogVisible = ref(false) // 弹窗显示
@@ -130,7 +139,6 @@
technologyExam: '', // 技术考核
remark: '', // 备注
certificateList: [], // 证书列表
-
}
}
const technologyJobList = ref([])
@@ -309,7 +317,7 @@
}
(title.value === '新建'
? getStaffAdd
- : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => {
+ : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => {
if (res.code == 200) {
formEl?.resetFields()
ElMessage.success('提交成功')
@@ -332,12 +340,14 @@
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
changeList.value[0].data = []
dialogVisible.value = true
title.value = row.title
resetFormData()
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -370,20 +380,15 @@
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
@@ -394,6 +399,7 @@
:http-request="uploadQuarterlyEvaluateFile"
:before-upload="beforeAvatarUpload"
:disabled="title === '详情'"
+ accept="image/png, image/jpeg,image/jpg"
>
@@ -425,8 +431,8 @@
@@ -489,29 +495,19 @@
-
-
-
-
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
@@ -523,7 +519,7 @@
-
+
@@ -532,77 +528,38 @@
@@ -624,8 +581,8 @@
.el-icon.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
- width: 220px;
- height: 320px;
+ width: 190px;
+ height: 250px;
text-align: center;
}
diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue
index ae48f11..042636e 100644
--- a/src/views/measure/person/components/addRecord.vue
+++ b/src/views/measure/person/components/addRecord.vue
@@ -4,7 +4,6 @@
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox, ElTable } from 'element-plus'
import type { technologyJobType } from '../person-interface'
-import certificateAddDialog from './certificateAddDialog.vue'
import personListDialog from './personListDialog.vue'
import { getUserList } from '@/api/system/user'
import { getDeptTreeList } from '@/api/system/dept'
@@ -14,7 +13,8 @@
import comTreeSelect from '@/views/system/user/selecTree.vue'
import { addCertificateList, getCertificateDetail, getCertificateUpdate } from '@/api/measure/person'
const emits = defineEmits(['resetData'])
-const ruleFormRef = ref() // from组件
+const ruleFormRef1 = ref() // from组件
+const ruleFormRef2 = ref() // from组件
const meterStaff = ref({
staffNo: '', // 人员编号
name: '', // 姓名
@@ -28,26 +28,43 @@
workDate: '', // 从事日期
id: '',
})
+const baseInfo = ref({
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+})
const ruleForm = ref({
meterStaff: {}, // 人员信息
staffId: '', // 计量人员id
}) // 表单
-const multipleTableRef = ref>()
const title = ref('')
+const name = ref('')
// 身份证号码验证规则
-const validateIDcard = (rule: any, value: any, callback: any) => {
- const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
- if (rr.test(value)) {
- callback()
- }
- else {
- callback(new Error('验证失败'))
- }
-}
+// const validateIDcard = (rule: any, value: any, callback: any) => {
+// const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
+// if (rr.test(value)) {
+// callback()
+// }
+// else {
+// callback(new Error('验证失败'))
+// }
+// }
const rules = ref({
staffNo: [{ required: true, message: '人员编号不能为空', trigger: 'blur' }],
// idCard: [{ required: false, validator: validateIDcard, message: '身份证号码不符合规范', trigger: 'change' }],
-
+}) // 表单验证规则
+const rules2 = ref({
+ certificateCompany: [{ required: true, message: '发证单位不能为空', trigger: 'blur' }],
+ certificateDate: [{ required: true, message: '发证日期不能为空', trigger: 'blur' }],
+ certificateName: [{ required: true, message: '证书名称不能为空', trigger: 'blur' }],
+ certificateNo: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
+ validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }],
}) // 表单验证规则
const dialogVisible = ref(false) // 弹窗显示
const userList = ref([]) // 可使用人列表
@@ -96,6 +113,17 @@
meterStaff.value.major = ''
meterStaff.value.workDate = ''
meterStaff.value.id = ''
+ baseInfo.value = {
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+ }
}
const technologyJobList = ref([])
// 获取技术职务列表
@@ -120,98 +148,14 @@
const confirmPerson = (row: any) => {
ruleForm.value.staffId = row.staffNo
meterStaff.value = row
- ruleFormRef.value?.clearValidate('staffNo')
+ ruleFormRef1.value?.clearValidate('staffNo')
}
-const changeList = ref([
- {
- name: '证书基本信息',
- data: [] as any[],
- column: [
- {
- label: '证书号',
- data: 'certificateNo',
- id: 'zs02',
- },
- {
- label: '证书名称',
- data: 'certificateName',
- id: 'zs03',
- },
- {
- label: '发证日期',
- data: 'certificateDate',
- id: 'zs04',
- },
- {
- label: '发证单位',
- data: 'certificateCompany',
- id: 'zs01',
- },
- {
- label: '有效日期',
- data: 'validDate',
- id: 'zs05',
- },
- ],
- },
- {
- name: '计量工作培训记录',
- data: [],
- column: [],
- },
- {
- name: '业务记录',
- data: [],
- column: [],
- },
-])
-const current = ref('证书基本信息')
-const currentShow = computed(() => {
- return changeList.value.filter(item => item.name === current.value)[0]
-})
-const certificateRef = ref() // 添加证书信息弹窗
-// 添加行
-const addRow = () => {
- certificateRef.value.initDialog({ title: '添加' })
-}
-// 编辑行
-const editRow = () => {
- certificateRef.value.initDialog({ ...changeList.value[0].data[0], title: '编辑' })
-}
-// 证书信息行内添加数据
-const addRowcertificate = (row: any, flag: string) => {
- const diff = dayjs(row.validDate).diff(row.certificateDate, 'day')
- if (flag === 'update') {
- changeList.value[0].data = [{
- ...changeList.value[0].data[0],
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- }]
- }
- else {
- changeList.value[0].data.push(
- {
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- })
- }
-}
-const currenSelect = ref(-1) // 当前选中行
-// 删除行
-const removeRow = () => {
- console.log(currenSelect.value)
- if (currenSelect.value >= 0) {
+// 提交
+const submitForm = async (formEl1: FormInstance | undefined, formEl2: FormInstance | undefined) => {
+ if (!formEl1 || !formEl2) { return }
+ Promise.all([formEl1.validate(), formEl2.validate()]).then((res) => {
ElMessageBox.confirm(
- '确认删除选中的数据吗?',
+ '确认提交吗?',
'提示',
{
confirmButtonText: '确认',
@@ -219,78 +163,49 @@
type: 'warning',
},
).then(() => {
- changeList.value[0].data = changeList.value[0].data.filter((item, index) => index !== currenSelect.value)
- currenSelect.value = -1
- ElMessage.success('删除成功')
- })
- }
- else {
- ElMessage.warning('请先选择需要删除的数据')
- }
-}
-// 提交
-const submitForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- let params
- if (changeList.value[0].data.length) {
- params = changeList.value[0].data
- }
- else {
- params = [
- {
- certificateCompany: '',
- certificateDate: '',
- certificateName: '',
- certificateNo: '',
- certificateStatus: '',
- createTime: '',
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: '',
- validDate: '',
- },
- ]
- }
- (title.value === '新建'
- ? addCertificateList
- : getCertificateUpdate)(title.value === '新建' ? params : changeList.value[0].data[0]).then((res) => {
- formEl?.resetFields()
- ElMessage.success('提交成功')
- emits('resetData')
- resetFormData()
- })
+ (title.value === '新建'
+ ? addCertificateList
+ : getCertificateUpdate)(title.value === '新建'
+ ? [{
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }]
+ : {
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }).then((res) => {
+ formEl1?.resetFields()
+ formEl2?.resetFields()
+ ElMessage.success('提交成功')
+ emits('resetData')
+ resetFormData()
})
- }
+ })
})
}
// 取消
-const resetForm = (formEl: FormInstance | undefined) => {
+const resetForm = (formEl: FormInstance | undefined, formEl2: FormInstance | undefined) => {
formEl?.resetFields()
- changeList.value[0].data = []
+ formEl2?.resetFields()
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
- changeList.value[0].data = []
resetFormData()
dialogVisible.value = true
title.value = row.title
- resetFormData()
+ name.value = row.name
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -303,8 +218,9 @@
else {
getCertificateDetail({ id: row.id }).then((res) => {
if (res.code === 200) {
+ console.log(res, '证书记录')
meterStaff.value = res.data.meterStaff
- changeList.value[0].data = [{ ...res.data, meterStaff: undefined }]
+ baseInfo.value = res.data
}
})
}
@@ -314,21 +230,16 @@
-
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
@@ -390,7 +301,8 @@
@@ -410,71 +322,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/src/views/measure/person/components/addRecordCancel.vue b/src/views/measure/person/components/addRecordCancel.vue
new file mode 100644
index 0000000..c32ac43
--- /dev/null
+++ b/src/views/measure/person/components/addRecordCancel.vue
@@ -0,0 +1,459 @@
+
+
+
+
+
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/person/components/certificateAddDialog.vue b/src/views/measure/person/components/certificateAddDialog.vue
index 332c73c..178fc12 100644
--- a/src/views/measure/person/components/certificateAddDialog.vue
+++ b/src/views/measure/person/components/certificateAddDialog.vue
@@ -32,6 +32,7 @@
form.validDate = ''
}
const initDialog = (row: any) => {
+ resetData()
title.value = row.title
if (row.title === '编辑') {
form.certificateNo = row.certificateNo
@@ -50,10 +51,12 @@
await formEl.validate((valid, fields) => {
if (valid) {
if (title.value === '编辑') {
- emits('add', form, 'update')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, 'update')
}
else {
- emits('add', form, '')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, '')
}
dialogFormVisible.value = false
}
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 592d810..9c6f65d 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -30,7 +30,7 @@
{ text: '技术职务', value: 'technologyJob', align: 'center', width: '140' },
{ text: '行政职务', value: 'administrationJob', align: 'center', width: '100' },
{ text: '计量专业', value: 'major', align: 'center', width: '100' },
- { text: '证书号', value: 'verifierCertificateNo', align: 'center' },
+ { text: '证书号', value: 'verifierCertificateNo', align: 'center', width: '180' },
{ text: '证书有效日期', value: 'certificateDate', align: 'center', width: '200' },
{ text: '技术考核', value: 'technologyExam', align: 'center', width: '85' },
]) // 表格
@@ -63,7 +63,7 @@
loadingTable.value = true
getStaffList(searchQuery).then((res) => {
if (res.code === 200) {
- res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核' }))
+ res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核', certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -236,21 +236,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
+
+
+
diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue
index 3d5c2e3..0926957 100644
--- a/src/views/system/notice/noteList.vue
+++ b/src/views/system/notice/noteList.vue
@@ -172,15 +172,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
暂无附件
-
+
+
+
+
diff --git a/src/views/system/tool/autograph/addDDialog.vue b/src/views/system/tool/autograph/addDDialog.vue
index d34e8ef..e39b706 100644
--- a/src/views/system/tool/autograph/addDDialog.vue
+++ b/src/views/system/tool/autograph/addDDialog.vue
@@ -200,15 +200,17 @@
-
+
+
+
+
diff --git a/src/views/system/tool/autograph/autograph.vue b/src/views/system/tool/autograph/autograph.vue
index 8fffe07..ac9f000 100644
--- a/src/views/system/tool/autograph/autograph.vue
+++ b/src/views/system/tool/autograph/autograph.vue
@@ -191,15 +191,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
-
+
+
+
+
diff --git a/src/views/system/tool/certificate/certificate.vue b/src/views/system/tool/certificate/certificate.vue
index 5ac1900..9787116 100644
--- a/src/views/system/tool/certificate/certificate.vue
+++ b/src/views/system/tool/certificate/certificate.vue
@@ -192,15 +192,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+defineProps({
+ title: {
+ type: String,
+ required: true,
+ },
+})
+
+const slots = useSlots()
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue
index 4dc1b17..4352604 100644
--- a/src/views/measure/person/components/addPerson.vue
+++ b/src/views/measure/person/components/addPerson.vue
@@ -69,7 +69,16 @@
const IdCard = ruleForm.value.idCard
const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}`
ruleForm.value.birthday = birthday
- console.log(ruleForm.value)
+ // 获取性别 第17位 奇数为男 偶数为女
+ // ruleForm.value.sex
+ if (Number(IdCard.substring(16, 17)) % 2) {
+ // 男
+ ruleForm.value.sex = '1'
+ }
+ else {
+ // 女
+ ruleForm.value.sex = '2'
+ }
})
}
const dialogVisible = ref(false) // 弹窗显示
@@ -130,7 +139,6 @@
technologyExam: '', // 技术考核
remark: '', // 备注
certificateList: [], // 证书列表
-
}
}
const technologyJobList = ref([])
@@ -309,7 +317,7 @@
}
(title.value === '新建'
? getStaffAdd
- : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => {
+ : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => {
if (res.code == 200) {
formEl?.resetFields()
ElMessage.success('提交成功')
@@ -332,12 +340,14 @@
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
changeList.value[0].data = []
dialogVisible.value = true
title.value = row.title
resetFormData()
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -370,20 +380,15 @@
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
@@ -394,6 +399,7 @@
:http-request="uploadQuarterlyEvaluateFile"
:before-upload="beforeAvatarUpload"
:disabled="title === '详情'"
+ accept="image/png, image/jpeg,image/jpg"
>
@@ -425,8 +431,8 @@
@@ -489,29 +495,19 @@
-
-
-
-
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
@@ -523,7 +519,7 @@
-
+
@@ -532,77 +528,38 @@
@@ -624,8 +581,8 @@
.el-icon.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
- width: 220px;
- height: 320px;
+ width: 190px;
+ height: 250px;
text-align: center;
}
diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue
index ae48f11..042636e 100644
--- a/src/views/measure/person/components/addRecord.vue
+++ b/src/views/measure/person/components/addRecord.vue
@@ -4,7 +4,6 @@
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox, ElTable } from 'element-plus'
import type { technologyJobType } from '../person-interface'
-import certificateAddDialog from './certificateAddDialog.vue'
import personListDialog from './personListDialog.vue'
import { getUserList } from '@/api/system/user'
import { getDeptTreeList } from '@/api/system/dept'
@@ -14,7 +13,8 @@
import comTreeSelect from '@/views/system/user/selecTree.vue'
import { addCertificateList, getCertificateDetail, getCertificateUpdate } from '@/api/measure/person'
const emits = defineEmits(['resetData'])
-const ruleFormRef = ref() // from组件
+const ruleFormRef1 = ref() // from组件
+const ruleFormRef2 = ref() // from组件
const meterStaff = ref({
staffNo: '', // 人员编号
name: '', // 姓名
@@ -28,26 +28,43 @@
workDate: '', // 从事日期
id: '',
})
+const baseInfo = ref({
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+})
const ruleForm = ref({
meterStaff: {}, // 人员信息
staffId: '', // 计量人员id
}) // 表单
-const multipleTableRef = ref>()
const title = ref('')
+const name = ref('')
// 身份证号码验证规则
-const validateIDcard = (rule: any, value: any, callback: any) => {
- const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
- if (rr.test(value)) {
- callback()
- }
- else {
- callback(new Error('验证失败'))
- }
-}
+// const validateIDcard = (rule: any, value: any, callback: any) => {
+// const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
+// if (rr.test(value)) {
+// callback()
+// }
+// else {
+// callback(new Error('验证失败'))
+// }
+// }
const rules = ref({
staffNo: [{ required: true, message: '人员编号不能为空', trigger: 'blur' }],
// idCard: [{ required: false, validator: validateIDcard, message: '身份证号码不符合规范', trigger: 'change' }],
-
+}) // 表单验证规则
+const rules2 = ref({
+ certificateCompany: [{ required: true, message: '发证单位不能为空', trigger: 'blur' }],
+ certificateDate: [{ required: true, message: '发证日期不能为空', trigger: 'blur' }],
+ certificateName: [{ required: true, message: '证书名称不能为空', trigger: 'blur' }],
+ certificateNo: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
+ validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }],
}) // 表单验证规则
const dialogVisible = ref(false) // 弹窗显示
const userList = ref([]) // 可使用人列表
@@ -96,6 +113,17 @@
meterStaff.value.major = ''
meterStaff.value.workDate = ''
meterStaff.value.id = ''
+ baseInfo.value = {
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+ }
}
const technologyJobList = ref([])
// 获取技术职务列表
@@ -120,98 +148,14 @@
const confirmPerson = (row: any) => {
ruleForm.value.staffId = row.staffNo
meterStaff.value = row
- ruleFormRef.value?.clearValidate('staffNo')
+ ruleFormRef1.value?.clearValidate('staffNo')
}
-const changeList = ref([
- {
- name: '证书基本信息',
- data: [] as any[],
- column: [
- {
- label: '证书号',
- data: 'certificateNo',
- id: 'zs02',
- },
- {
- label: '证书名称',
- data: 'certificateName',
- id: 'zs03',
- },
- {
- label: '发证日期',
- data: 'certificateDate',
- id: 'zs04',
- },
- {
- label: '发证单位',
- data: 'certificateCompany',
- id: 'zs01',
- },
- {
- label: '有效日期',
- data: 'validDate',
- id: 'zs05',
- },
- ],
- },
- {
- name: '计量工作培训记录',
- data: [],
- column: [],
- },
- {
- name: '业务记录',
- data: [],
- column: [],
- },
-])
-const current = ref('证书基本信息')
-const currentShow = computed(() => {
- return changeList.value.filter(item => item.name === current.value)[0]
-})
-const certificateRef = ref() // 添加证书信息弹窗
-// 添加行
-const addRow = () => {
- certificateRef.value.initDialog({ title: '添加' })
-}
-// 编辑行
-const editRow = () => {
- certificateRef.value.initDialog({ ...changeList.value[0].data[0], title: '编辑' })
-}
-// 证书信息行内添加数据
-const addRowcertificate = (row: any, flag: string) => {
- const diff = dayjs(row.validDate).diff(row.certificateDate, 'day')
- if (flag === 'update') {
- changeList.value[0].data = [{
- ...changeList.value[0].data[0],
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- }]
- }
- else {
- changeList.value[0].data.push(
- {
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- })
- }
-}
-const currenSelect = ref(-1) // 当前选中行
-// 删除行
-const removeRow = () => {
- console.log(currenSelect.value)
- if (currenSelect.value >= 0) {
+// 提交
+const submitForm = async (formEl1: FormInstance | undefined, formEl2: FormInstance | undefined) => {
+ if (!formEl1 || !formEl2) { return }
+ Promise.all([formEl1.validate(), formEl2.validate()]).then((res) => {
ElMessageBox.confirm(
- '确认删除选中的数据吗?',
+ '确认提交吗?',
'提示',
{
confirmButtonText: '确认',
@@ -219,78 +163,49 @@
type: 'warning',
},
).then(() => {
- changeList.value[0].data = changeList.value[0].data.filter((item, index) => index !== currenSelect.value)
- currenSelect.value = -1
- ElMessage.success('删除成功')
- })
- }
- else {
- ElMessage.warning('请先选择需要删除的数据')
- }
-}
-// 提交
-const submitForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- let params
- if (changeList.value[0].data.length) {
- params = changeList.value[0].data
- }
- else {
- params = [
- {
- certificateCompany: '',
- certificateDate: '',
- certificateName: '',
- certificateNo: '',
- certificateStatus: '',
- createTime: '',
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: '',
- validDate: '',
- },
- ]
- }
- (title.value === '新建'
- ? addCertificateList
- : getCertificateUpdate)(title.value === '新建' ? params : changeList.value[0].data[0]).then((res) => {
- formEl?.resetFields()
- ElMessage.success('提交成功')
- emits('resetData')
- resetFormData()
- })
+ (title.value === '新建'
+ ? addCertificateList
+ : getCertificateUpdate)(title.value === '新建'
+ ? [{
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }]
+ : {
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }).then((res) => {
+ formEl1?.resetFields()
+ formEl2?.resetFields()
+ ElMessage.success('提交成功')
+ emits('resetData')
+ resetFormData()
})
- }
+ })
})
}
// 取消
-const resetForm = (formEl: FormInstance | undefined) => {
+const resetForm = (formEl: FormInstance | undefined, formEl2: FormInstance | undefined) => {
formEl?.resetFields()
- changeList.value[0].data = []
+ formEl2?.resetFields()
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
- changeList.value[0].data = []
resetFormData()
dialogVisible.value = true
title.value = row.title
- resetFormData()
+ name.value = row.name
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -303,8 +218,9 @@
else {
getCertificateDetail({ id: row.id }).then((res) => {
if (res.code === 200) {
+ console.log(res, '证书记录')
meterStaff.value = res.data.meterStaff
- changeList.value[0].data = [{ ...res.data, meterStaff: undefined }]
+ baseInfo.value = res.data
}
})
}
@@ -314,21 +230,16 @@
-
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
@@ -390,7 +301,8 @@
@@ -410,71 +322,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/src/views/measure/person/components/addRecordCancel.vue b/src/views/measure/person/components/addRecordCancel.vue
new file mode 100644
index 0000000..c32ac43
--- /dev/null
+++ b/src/views/measure/person/components/addRecordCancel.vue
@@ -0,0 +1,459 @@
+
+
+
+
+
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/person/components/certificateAddDialog.vue b/src/views/measure/person/components/certificateAddDialog.vue
index 332c73c..178fc12 100644
--- a/src/views/measure/person/components/certificateAddDialog.vue
+++ b/src/views/measure/person/components/certificateAddDialog.vue
@@ -32,6 +32,7 @@
form.validDate = ''
}
const initDialog = (row: any) => {
+ resetData()
title.value = row.title
if (row.title === '编辑') {
form.certificateNo = row.certificateNo
@@ -50,10 +51,12 @@
await formEl.validate((valid, fields) => {
if (valid) {
if (title.value === '编辑') {
- emits('add', form, 'update')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, 'update')
}
else {
- emits('add', form, '')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, '')
}
dialogFormVisible.value = false
}
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 592d810..9c6f65d 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -30,7 +30,7 @@
{ text: '技术职务', value: 'technologyJob', align: 'center', width: '140' },
{ text: '行政职务', value: 'administrationJob', align: 'center', width: '100' },
{ text: '计量专业', value: 'major', align: 'center', width: '100' },
- { text: '证书号', value: 'verifierCertificateNo', align: 'center' },
+ { text: '证书号', value: 'verifierCertificateNo', align: 'center', width: '180' },
{ text: '证书有效日期', value: 'certificateDate', align: 'center', width: '200' },
{ text: '技术考核', value: 'technologyExam', align: 'center', width: '85' },
]) // 表格
@@ -63,7 +63,7 @@
loadingTable.value = true
getStaffList(searchQuery).then((res) => {
if (res.code === 200) {
- res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核' }))
+ res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核', certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -236,21 +236,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
+
+
+
diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue
index 3d5c2e3..0926957 100644
--- a/src/views/system/notice/noteList.vue
+++ b/src/views/system/notice/noteList.vue
@@ -172,15 +172,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
暂无附件
-
+
+
+
+
diff --git a/src/views/system/tool/autograph/addDDialog.vue b/src/views/system/tool/autograph/addDDialog.vue
index d34e8ef..e39b706 100644
--- a/src/views/system/tool/autograph/addDDialog.vue
+++ b/src/views/system/tool/autograph/addDDialog.vue
@@ -200,15 +200,17 @@
-
+
+
+
+
diff --git a/src/views/system/tool/autograph/autograph.vue b/src/views/system/tool/autograph/autograph.vue
index 8fffe07..ac9f000 100644
--- a/src/views/system/tool/autograph/autograph.vue
+++ b/src/views/system/tool/autograph/autograph.vue
@@ -191,15 +191,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
-
+
+
+
+
diff --git a/src/views/system/tool/certificate/certificate.vue b/src/views/system/tool/certificate/certificate.vue
index 5ac1900..9787116 100644
--- a/src/views/system/tool/certificate/certificate.vue
+++ b/src/views/system/tool/certificate/certificate.vue
@@ -192,15 +192,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
-
+
+
+
+
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue
index 4dc1b17..4352604 100644
--- a/src/views/measure/person/components/addPerson.vue
+++ b/src/views/measure/person/components/addPerson.vue
@@ -69,7 +69,16 @@
const IdCard = ruleForm.value.idCard
const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}`
ruleForm.value.birthday = birthday
- console.log(ruleForm.value)
+ // 获取性别 第17位 奇数为男 偶数为女
+ // ruleForm.value.sex
+ if (Number(IdCard.substring(16, 17)) % 2) {
+ // 男
+ ruleForm.value.sex = '1'
+ }
+ else {
+ // 女
+ ruleForm.value.sex = '2'
+ }
})
}
const dialogVisible = ref(false) // 弹窗显示
@@ -130,7 +139,6 @@
technologyExam: '', // 技术考核
remark: '', // 备注
certificateList: [], // 证书列表
-
}
}
const technologyJobList = ref([])
@@ -309,7 +317,7 @@
}
(title.value === '新建'
? getStaffAdd
- : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => {
+ : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => {
if (res.code == 200) {
formEl?.resetFields()
ElMessage.success('提交成功')
@@ -332,12 +340,14 @@
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
changeList.value[0].data = []
dialogVisible.value = true
title.value = row.title
resetFormData()
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -370,20 +380,15 @@
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
@@ -394,6 +399,7 @@
:http-request="uploadQuarterlyEvaluateFile"
:before-upload="beforeAvatarUpload"
:disabled="title === '详情'"
+ accept="image/png, image/jpeg,image/jpg"
>
@@ -425,8 +431,8 @@
@@ -489,29 +495,19 @@
-
-
-
-
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
@@ -523,7 +519,7 @@
-
+
@@ -532,77 +528,38 @@
@@ -624,8 +581,8 @@
.el-icon.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
- width: 220px;
- height: 320px;
+ width: 190px;
+ height: 250px;
text-align: center;
}
diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue
index ae48f11..042636e 100644
--- a/src/views/measure/person/components/addRecord.vue
+++ b/src/views/measure/person/components/addRecord.vue
@@ -4,7 +4,6 @@
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox, ElTable } from 'element-plus'
import type { technologyJobType } from '../person-interface'
-import certificateAddDialog from './certificateAddDialog.vue'
import personListDialog from './personListDialog.vue'
import { getUserList } from '@/api/system/user'
import { getDeptTreeList } from '@/api/system/dept'
@@ -14,7 +13,8 @@
import comTreeSelect from '@/views/system/user/selecTree.vue'
import { addCertificateList, getCertificateDetail, getCertificateUpdate } from '@/api/measure/person'
const emits = defineEmits(['resetData'])
-const ruleFormRef = ref() // from组件
+const ruleFormRef1 = ref() // from组件
+const ruleFormRef2 = ref() // from组件
const meterStaff = ref({
staffNo: '', // 人员编号
name: '', // 姓名
@@ -28,26 +28,43 @@
workDate: '', // 从事日期
id: '',
})
+const baseInfo = ref({
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+})
const ruleForm = ref({
meterStaff: {}, // 人员信息
staffId: '', // 计量人员id
}) // 表单
-const multipleTableRef = ref>()
const title = ref('')
+const name = ref('')
// 身份证号码验证规则
-const validateIDcard = (rule: any, value: any, callback: any) => {
- const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
- if (rr.test(value)) {
- callback()
- }
- else {
- callback(new Error('验证失败'))
- }
-}
+// const validateIDcard = (rule: any, value: any, callback: any) => {
+// const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
+// if (rr.test(value)) {
+// callback()
+// }
+// else {
+// callback(new Error('验证失败'))
+// }
+// }
const rules = ref({
staffNo: [{ required: true, message: '人员编号不能为空', trigger: 'blur' }],
// idCard: [{ required: false, validator: validateIDcard, message: '身份证号码不符合规范', trigger: 'change' }],
-
+}) // 表单验证规则
+const rules2 = ref({
+ certificateCompany: [{ required: true, message: '发证单位不能为空', trigger: 'blur' }],
+ certificateDate: [{ required: true, message: '发证日期不能为空', trigger: 'blur' }],
+ certificateName: [{ required: true, message: '证书名称不能为空', trigger: 'blur' }],
+ certificateNo: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
+ validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }],
}) // 表单验证规则
const dialogVisible = ref(false) // 弹窗显示
const userList = ref([]) // 可使用人列表
@@ -96,6 +113,17 @@
meterStaff.value.major = ''
meterStaff.value.workDate = ''
meterStaff.value.id = ''
+ baseInfo.value = {
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+ }
}
const technologyJobList = ref([])
// 获取技术职务列表
@@ -120,98 +148,14 @@
const confirmPerson = (row: any) => {
ruleForm.value.staffId = row.staffNo
meterStaff.value = row
- ruleFormRef.value?.clearValidate('staffNo')
+ ruleFormRef1.value?.clearValidate('staffNo')
}
-const changeList = ref([
- {
- name: '证书基本信息',
- data: [] as any[],
- column: [
- {
- label: '证书号',
- data: 'certificateNo',
- id: 'zs02',
- },
- {
- label: '证书名称',
- data: 'certificateName',
- id: 'zs03',
- },
- {
- label: '发证日期',
- data: 'certificateDate',
- id: 'zs04',
- },
- {
- label: '发证单位',
- data: 'certificateCompany',
- id: 'zs01',
- },
- {
- label: '有效日期',
- data: 'validDate',
- id: 'zs05',
- },
- ],
- },
- {
- name: '计量工作培训记录',
- data: [],
- column: [],
- },
- {
- name: '业务记录',
- data: [],
- column: [],
- },
-])
-const current = ref('证书基本信息')
-const currentShow = computed(() => {
- return changeList.value.filter(item => item.name === current.value)[0]
-})
-const certificateRef = ref() // 添加证书信息弹窗
-// 添加行
-const addRow = () => {
- certificateRef.value.initDialog({ title: '添加' })
-}
-// 编辑行
-const editRow = () => {
- certificateRef.value.initDialog({ ...changeList.value[0].data[0], title: '编辑' })
-}
-// 证书信息行内添加数据
-const addRowcertificate = (row: any, flag: string) => {
- const diff = dayjs(row.validDate).diff(row.certificateDate, 'day')
- if (flag === 'update') {
- changeList.value[0].data = [{
- ...changeList.value[0].data[0],
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- }]
- }
- else {
- changeList.value[0].data.push(
- {
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- })
- }
-}
-const currenSelect = ref(-1) // 当前选中行
-// 删除行
-const removeRow = () => {
- console.log(currenSelect.value)
- if (currenSelect.value >= 0) {
+// 提交
+const submitForm = async (formEl1: FormInstance | undefined, formEl2: FormInstance | undefined) => {
+ if (!formEl1 || !formEl2) { return }
+ Promise.all([formEl1.validate(), formEl2.validate()]).then((res) => {
ElMessageBox.confirm(
- '确认删除选中的数据吗?',
+ '确认提交吗?',
'提示',
{
confirmButtonText: '确认',
@@ -219,78 +163,49 @@
type: 'warning',
},
).then(() => {
- changeList.value[0].data = changeList.value[0].data.filter((item, index) => index !== currenSelect.value)
- currenSelect.value = -1
- ElMessage.success('删除成功')
- })
- }
- else {
- ElMessage.warning('请先选择需要删除的数据')
- }
-}
-// 提交
-const submitForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- let params
- if (changeList.value[0].data.length) {
- params = changeList.value[0].data
- }
- else {
- params = [
- {
- certificateCompany: '',
- certificateDate: '',
- certificateName: '',
- certificateNo: '',
- certificateStatus: '',
- createTime: '',
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: '',
- validDate: '',
- },
- ]
- }
- (title.value === '新建'
- ? addCertificateList
- : getCertificateUpdate)(title.value === '新建' ? params : changeList.value[0].data[0]).then((res) => {
- formEl?.resetFields()
- ElMessage.success('提交成功')
- emits('resetData')
- resetFormData()
- })
+ (title.value === '新建'
+ ? addCertificateList
+ : getCertificateUpdate)(title.value === '新建'
+ ? [{
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }]
+ : {
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }).then((res) => {
+ formEl1?.resetFields()
+ formEl2?.resetFields()
+ ElMessage.success('提交成功')
+ emits('resetData')
+ resetFormData()
})
- }
+ })
})
}
// 取消
-const resetForm = (formEl: FormInstance | undefined) => {
+const resetForm = (formEl: FormInstance | undefined, formEl2: FormInstance | undefined) => {
formEl?.resetFields()
- changeList.value[0].data = []
+ formEl2?.resetFields()
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
- changeList.value[0].data = []
resetFormData()
dialogVisible.value = true
title.value = row.title
- resetFormData()
+ name.value = row.name
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -303,8 +218,9 @@
else {
getCertificateDetail({ id: row.id }).then((res) => {
if (res.code === 200) {
+ console.log(res, '证书记录')
meterStaff.value = res.data.meterStaff
- changeList.value[0].data = [{ ...res.data, meterStaff: undefined }]
+ baseInfo.value = res.data
}
})
}
@@ -314,21 +230,16 @@
-
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
@@ -390,7 +301,8 @@
@@ -410,71 +322,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/src/views/measure/person/components/addRecordCancel.vue b/src/views/measure/person/components/addRecordCancel.vue
new file mode 100644
index 0000000..c32ac43
--- /dev/null
+++ b/src/views/measure/person/components/addRecordCancel.vue
@@ -0,0 +1,459 @@
+
+
+
+
+
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/person/components/certificateAddDialog.vue b/src/views/measure/person/components/certificateAddDialog.vue
index 332c73c..178fc12 100644
--- a/src/views/measure/person/components/certificateAddDialog.vue
+++ b/src/views/measure/person/components/certificateAddDialog.vue
@@ -32,6 +32,7 @@
form.validDate = ''
}
const initDialog = (row: any) => {
+ resetData()
title.value = row.title
if (row.title === '编辑') {
form.certificateNo = row.certificateNo
@@ -50,10 +51,12 @@
await formEl.validate((valid, fields) => {
if (valid) {
if (title.value === '编辑') {
- emits('add', form, 'update')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, 'update')
}
else {
- emits('add', form, '')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, '')
}
dialogFormVisible.value = false
}
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 592d810..9c6f65d 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -30,7 +30,7 @@
{ text: '技术职务', value: 'technologyJob', align: 'center', width: '140' },
{ text: '行政职务', value: 'administrationJob', align: 'center', width: '100' },
{ text: '计量专业', value: 'major', align: 'center', width: '100' },
- { text: '证书号', value: 'verifierCertificateNo', align: 'center' },
+ { text: '证书号', value: 'verifierCertificateNo', align: 'center', width: '180' },
{ text: '证书有效日期', value: 'certificateDate', align: 'center', width: '200' },
{ text: '技术考核', value: 'technologyExam', align: 'center', width: '85' },
]) // 表格
@@ -63,7 +63,7 @@
loadingTable.value = true
getStaffList(searchQuery).then((res) => {
if (res.code === 200) {
- res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核' }))
+ res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核', certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -236,21 +236,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
+
+
+
diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue
index 3d5c2e3..0926957 100644
--- a/src/views/system/notice/noteList.vue
+++ b/src/views/system/notice/noteList.vue
@@ -172,15 +172,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
暂无附件
-
+
+
+
+
diff --git a/src/views/system/tool/autograph/addDDialog.vue b/src/views/system/tool/autograph/addDDialog.vue
index d34e8ef..e39b706 100644
--- a/src/views/system/tool/autograph/addDDialog.vue
+++ b/src/views/system/tool/autograph/addDDialog.vue
@@ -200,15 +200,17 @@
-
+
+
+
+
diff --git a/src/views/system/tool/autograph/autograph.vue b/src/views/system/tool/autograph/autograph.vue
index 8fffe07..ac9f000 100644
--- a/src/views/system/tool/autograph/autograph.vue
+++ b/src/views/system/tool/autograph/autograph.vue
@@ -191,15 +191,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
-
+
+
+
+
diff --git a/src/views/system/tool/certificate/certificate.vue b/src/views/system/tool/certificate/certificate.vue
index 5ac1900..9787116 100644
--- a/src/views/system/tool/certificate/certificate.vue
+++ b/src/views/system/tool/certificate/certificate.vue
@@ -192,15 +192,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
-
+
+
+
+
diff --git a/src/views/system/tool/document/document.vue b/src/views/system/tool/document/document.vue
index 58d12f9..774e498 100644
--- a/src/views/system/tool/document/document.vue
+++ b/src/views/system/tool/document/document.vue
@@ -191,15 +191,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+defineProps({
+ title: {
+ type: String,
+ required: true,
+ },
+})
+
+const slots = useSlots()
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue
index 4dc1b17..4352604 100644
--- a/src/views/measure/person/components/addPerson.vue
+++ b/src/views/measure/person/components/addPerson.vue
@@ -69,7 +69,16 @@
const IdCard = ruleForm.value.idCard
const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}`
ruleForm.value.birthday = birthday
- console.log(ruleForm.value)
+ // 获取性别 第17位 奇数为男 偶数为女
+ // ruleForm.value.sex
+ if (Number(IdCard.substring(16, 17)) % 2) {
+ // 男
+ ruleForm.value.sex = '1'
+ }
+ else {
+ // 女
+ ruleForm.value.sex = '2'
+ }
})
}
const dialogVisible = ref(false) // 弹窗显示
@@ -130,7 +139,6 @@
technologyExam: '', // 技术考核
remark: '', // 备注
certificateList: [], // 证书列表
-
}
}
const technologyJobList = ref([])
@@ -309,7 +317,7 @@
}
(title.value === '新建'
? getStaffAdd
- : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => {
+ : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => {
if (res.code == 200) {
formEl?.resetFields()
ElMessage.success('提交成功')
@@ -332,12 +340,14 @@
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
changeList.value[0].data = []
dialogVisible.value = true
title.value = row.title
resetFormData()
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -370,20 +380,15 @@
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
@@ -394,6 +399,7 @@
:http-request="uploadQuarterlyEvaluateFile"
:before-upload="beforeAvatarUpload"
:disabled="title === '详情'"
+ accept="image/png, image/jpeg,image/jpg"
>
@@ -425,8 +431,8 @@
@@ -489,29 +495,19 @@
-
-
-
-
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
@@ -523,7 +519,7 @@
-
+
@@ -532,77 +528,38 @@
@@ -624,8 +581,8 @@
.el-icon.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
- width: 220px;
- height: 320px;
+ width: 190px;
+ height: 250px;
text-align: center;
}
diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue
index ae48f11..042636e 100644
--- a/src/views/measure/person/components/addRecord.vue
+++ b/src/views/measure/person/components/addRecord.vue
@@ -4,7 +4,6 @@
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox, ElTable } from 'element-plus'
import type { technologyJobType } from '../person-interface'
-import certificateAddDialog from './certificateAddDialog.vue'
import personListDialog from './personListDialog.vue'
import { getUserList } from '@/api/system/user'
import { getDeptTreeList } from '@/api/system/dept'
@@ -14,7 +13,8 @@
import comTreeSelect from '@/views/system/user/selecTree.vue'
import { addCertificateList, getCertificateDetail, getCertificateUpdate } from '@/api/measure/person'
const emits = defineEmits(['resetData'])
-const ruleFormRef = ref() // from组件
+const ruleFormRef1 = ref() // from组件
+const ruleFormRef2 = ref() // from组件
const meterStaff = ref({
staffNo: '', // 人员编号
name: '', // 姓名
@@ -28,26 +28,43 @@
workDate: '', // 从事日期
id: '',
})
+const baseInfo = ref({
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+})
const ruleForm = ref({
meterStaff: {}, // 人员信息
staffId: '', // 计量人员id
}) // 表单
-const multipleTableRef = ref>()
const title = ref('')
+const name = ref('')
// 身份证号码验证规则
-const validateIDcard = (rule: any, value: any, callback: any) => {
- const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
- if (rr.test(value)) {
- callback()
- }
- else {
- callback(new Error('验证失败'))
- }
-}
+// const validateIDcard = (rule: any, value: any, callback: any) => {
+// const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
+// if (rr.test(value)) {
+// callback()
+// }
+// else {
+// callback(new Error('验证失败'))
+// }
+// }
const rules = ref({
staffNo: [{ required: true, message: '人员编号不能为空', trigger: 'blur' }],
// idCard: [{ required: false, validator: validateIDcard, message: '身份证号码不符合规范', trigger: 'change' }],
-
+}) // 表单验证规则
+const rules2 = ref({
+ certificateCompany: [{ required: true, message: '发证单位不能为空', trigger: 'blur' }],
+ certificateDate: [{ required: true, message: '发证日期不能为空', trigger: 'blur' }],
+ certificateName: [{ required: true, message: '证书名称不能为空', trigger: 'blur' }],
+ certificateNo: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
+ validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }],
}) // 表单验证规则
const dialogVisible = ref(false) // 弹窗显示
const userList = ref([]) // 可使用人列表
@@ -96,6 +113,17 @@
meterStaff.value.major = ''
meterStaff.value.workDate = ''
meterStaff.value.id = ''
+ baseInfo.value = {
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+ }
}
const technologyJobList = ref([])
// 获取技术职务列表
@@ -120,98 +148,14 @@
const confirmPerson = (row: any) => {
ruleForm.value.staffId = row.staffNo
meterStaff.value = row
- ruleFormRef.value?.clearValidate('staffNo')
+ ruleFormRef1.value?.clearValidate('staffNo')
}
-const changeList = ref([
- {
- name: '证书基本信息',
- data: [] as any[],
- column: [
- {
- label: '证书号',
- data: 'certificateNo',
- id: 'zs02',
- },
- {
- label: '证书名称',
- data: 'certificateName',
- id: 'zs03',
- },
- {
- label: '发证日期',
- data: 'certificateDate',
- id: 'zs04',
- },
- {
- label: '发证单位',
- data: 'certificateCompany',
- id: 'zs01',
- },
- {
- label: '有效日期',
- data: 'validDate',
- id: 'zs05',
- },
- ],
- },
- {
- name: '计量工作培训记录',
- data: [],
- column: [],
- },
- {
- name: '业务记录',
- data: [],
- column: [],
- },
-])
-const current = ref('证书基本信息')
-const currentShow = computed(() => {
- return changeList.value.filter(item => item.name === current.value)[0]
-})
-const certificateRef = ref() // 添加证书信息弹窗
-// 添加行
-const addRow = () => {
- certificateRef.value.initDialog({ title: '添加' })
-}
-// 编辑行
-const editRow = () => {
- certificateRef.value.initDialog({ ...changeList.value[0].data[0], title: '编辑' })
-}
-// 证书信息行内添加数据
-const addRowcertificate = (row: any, flag: string) => {
- const diff = dayjs(row.validDate).diff(row.certificateDate, 'day')
- if (flag === 'update') {
- changeList.value[0].data = [{
- ...changeList.value[0].data[0],
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- }]
- }
- else {
- changeList.value[0].data.push(
- {
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- })
- }
-}
-const currenSelect = ref(-1) // 当前选中行
-// 删除行
-const removeRow = () => {
- console.log(currenSelect.value)
- if (currenSelect.value >= 0) {
+// 提交
+const submitForm = async (formEl1: FormInstance | undefined, formEl2: FormInstance | undefined) => {
+ if (!formEl1 || !formEl2) { return }
+ Promise.all([formEl1.validate(), formEl2.validate()]).then((res) => {
ElMessageBox.confirm(
- '确认删除选中的数据吗?',
+ '确认提交吗?',
'提示',
{
confirmButtonText: '确认',
@@ -219,78 +163,49 @@
type: 'warning',
},
).then(() => {
- changeList.value[0].data = changeList.value[0].data.filter((item, index) => index !== currenSelect.value)
- currenSelect.value = -1
- ElMessage.success('删除成功')
- })
- }
- else {
- ElMessage.warning('请先选择需要删除的数据')
- }
-}
-// 提交
-const submitForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- let params
- if (changeList.value[0].data.length) {
- params = changeList.value[0].data
- }
- else {
- params = [
- {
- certificateCompany: '',
- certificateDate: '',
- certificateName: '',
- certificateNo: '',
- certificateStatus: '',
- createTime: '',
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: '',
- validDate: '',
- },
- ]
- }
- (title.value === '新建'
- ? addCertificateList
- : getCertificateUpdate)(title.value === '新建' ? params : changeList.value[0].data[0]).then((res) => {
- formEl?.resetFields()
- ElMessage.success('提交成功')
- emits('resetData')
- resetFormData()
- })
+ (title.value === '新建'
+ ? addCertificateList
+ : getCertificateUpdate)(title.value === '新建'
+ ? [{
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }]
+ : {
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }).then((res) => {
+ formEl1?.resetFields()
+ formEl2?.resetFields()
+ ElMessage.success('提交成功')
+ emits('resetData')
+ resetFormData()
})
- }
+ })
})
}
// 取消
-const resetForm = (formEl: FormInstance | undefined) => {
+const resetForm = (formEl: FormInstance | undefined, formEl2: FormInstance | undefined) => {
formEl?.resetFields()
- changeList.value[0].data = []
+ formEl2?.resetFields()
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
- changeList.value[0].data = []
resetFormData()
dialogVisible.value = true
title.value = row.title
- resetFormData()
+ name.value = row.name
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -303,8 +218,9 @@
else {
getCertificateDetail({ id: row.id }).then((res) => {
if (res.code === 200) {
+ console.log(res, '证书记录')
meterStaff.value = res.data.meterStaff
- changeList.value[0].data = [{ ...res.data, meterStaff: undefined }]
+ baseInfo.value = res.data
}
})
}
@@ -314,21 +230,16 @@
-
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
@@ -390,7 +301,8 @@
@@ -410,71 +322,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/src/views/measure/person/components/addRecordCancel.vue b/src/views/measure/person/components/addRecordCancel.vue
new file mode 100644
index 0000000..c32ac43
--- /dev/null
+++ b/src/views/measure/person/components/addRecordCancel.vue
@@ -0,0 +1,459 @@
+
+
+
+
+
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/person/components/certificateAddDialog.vue b/src/views/measure/person/components/certificateAddDialog.vue
index 332c73c..178fc12 100644
--- a/src/views/measure/person/components/certificateAddDialog.vue
+++ b/src/views/measure/person/components/certificateAddDialog.vue
@@ -32,6 +32,7 @@
form.validDate = ''
}
const initDialog = (row: any) => {
+ resetData()
title.value = row.title
if (row.title === '编辑') {
form.certificateNo = row.certificateNo
@@ -50,10 +51,12 @@
await formEl.validate((valid, fields) => {
if (valid) {
if (title.value === '编辑') {
- emits('add', form, 'update')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, 'update')
}
else {
- emits('add', form, '')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, '')
}
dialogFormVisible.value = false
}
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 592d810..9c6f65d 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -30,7 +30,7 @@
{ text: '技术职务', value: 'technologyJob', align: 'center', width: '140' },
{ text: '行政职务', value: 'administrationJob', align: 'center', width: '100' },
{ text: '计量专业', value: 'major', align: 'center', width: '100' },
- { text: '证书号', value: 'verifierCertificateNo', align: 'center' },
+ { text: '证书号', value: 'verifierCertificateNo', align: 'center', width: '180' },
{ text: '证书有效日期', value: 'certificateDate', align: 'center', width: '200' },
{ text: '技术考核', value: 'technologyExam', align: 'center', width: '85' },
]) // 表格
@@ -63,7 +63,7 @@
loadingTable.value = true
getStaffList(searchQuery).then((res) => {
if (res.code === 200) {
- res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核' }))
+ res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核', certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -236,21 +236,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
+
+
+
diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue
index 3d5c2e3..0926957 100644
--- a/src/views/system/notice/noteList.vue
+++ b/src/views/system/notice/noteList.vue
@@ -172,15 +172,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
暂无附件
-
+
+
+
+
diff --git a/src/views/system/tool/autograph/addDDialog.vue b/src/views/system/tool/autograph/addDDialog.vue
index d34e8ef..e39b706 100644
--- a/src/views/system/tool/autograph/addDDialog.vue
+++ b/src/views/system/tool/autograph/addDDialog.vue
@@ -200,15 +200,17 @@
-
+
+
+
+
diff --git a/src/views/system/tool/autograph/autograph.vue b/src/views/system/tool/autograph/autograph.vue
index 8fffe07..ac9f000 100644
--- a/src/views/system/tool/autograph/autograph.vue
+++ b/src/views/system/tool/autograph/autograph.vue
@@ -191,15 +191,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
-
+
+
+
+
diff --git a/src/views/system/tool/certificate/certificate.vue b/src/views/system/tool/certificate/certificate.vue
index 5ac1900..9787116 100644
--- a/src/views/system/tool/certificate/certificate.vue
+++ b/src/views/system/tool/certificate/certificate.vue
@@ -192,15 +192,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
-
+
+
+
+
diff --git a/src/views/system/tool/document/document.vue b/src/views/system/tool/document/document.vue
index 58d12f9..774e498 100644
--- a/src/views/system/tool/document/document.vue
+++ b/src/views/system/tool/document/document.vue
@@ -191,15 +191,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
-
+
+
+
+
diff --git a/src/components.d.ts b/src/components.d.ts
index 6e85584..815d62f 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,14 +16,13 @@
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']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/DetailPage/index copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default']
+ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default']
DetailPage: typeof import('./components/DetailPage/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default']
diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue
new file mode 100644
index 0000000..4d92074
--- /dev/null
+++ b/src/components/DetailPage/DetailBlockSwitch.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index d6c1c91..1644a80 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -314,6 +314,39 @@
},
],
},
+ {
+ path: '/borrow',
+ component: Layout,
+ redirect: '/device/borrow/borrowapply',
+ name: 'Borrow',
+ meta: {
+ title: '设备领用',
+ icon: 'ep:key',
+ auth: '/device/borrow',
+ },
+ children: [
+ {
+ path: 'borrowapply',
+ name: 'borroWapply',
+ component: () => import('@/views/device/borrow/borrwoApply.vue'),
+ meta: {
+ title: '设备借用申请',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowapply',
+ },
+ },
+ {
+ path: 'borrowhandle',
+ name: 'borrowHandle',
+ component: () => import('@/views/device/borrow/borrowHandle.vue'),
+ meta: {
+ title: '设备借用处理',
+ icon: 'ep:key',
+ auth: '/device/borrow/borrowhandle',
+ },
+ },
+ ],
+ },
]
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
new file mode 100644
index 0000000..1c2405e
--- /dev/null
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用处理
+
+
+
+
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
new file mode 100644
index 0000000..03d414b
--- /dev/null
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -0,0 +1,13 @@
+
+
+
+
+ 设备借用申请
+
+
+
+
diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue
index c2682fc..5f7b347 100644
--- a/src/views/device/standingBook/components/baseInfo.vue
+++ b/src/views/device/standingBook/components/baseInfo.vue
@@ -339,381 +339,374 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 扫描
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
-
- 暂无
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue
index 0763c5a..9ef0b93 100644
--- a/src/views/measure/file/components/addDialog.vue
+++ b/src/views/measure/file/components/addDialog.vue
@@ -19,7 +19,6 @@
const effectiveStatusName = ref('')
const title = ref('')
const fileList = ref([])
-console.log(sessionStorage.getItem(fileTypeName.value))
const ruleForm = reactive({
fileType: '', // 类型
fileTypeName: '', // 类型名称 不传
@@ -80,10 +79,9 @@
if (row.title === '新建') {
// 默认发布人和发布单位
ruleForm.createUserId = userInfo.$state.id
- ruleForm.publisher = ''
+ ruleForm.publisher = userInfo.$state.deptName
ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// 判断有无存储
- console.log(sessionStorage.getItem(fileTypeName.value), 'sess')
if (sessionStorage.getItem(fileTypeName.value)) {
const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string)
ruleForm.fileType = session.fileType
@@ -117,6 +115,8 @@
ruleForm.remark = row.remark
ruleForm.publishTime = row.publishTime
ruleForm.minioFileName = row.minioFileName
+ // ruleForm.publisher = '0'
+ // ruleForm.createUserId = '1'
}
}
defineExpose({ initDialog })
@@ -148,6 +148,9 @@
type: 'warning',
},
).then((res) => {
+ if (ruleForm.publisher === userInfo.$state.deptName) {
+ ruleForm.publisher === userInfo.$state.deptId
+ }
if (flag == '提交') {
addApi(ruleForm).then((res) => {
if (res.code == 200) {
@@ -193,7 +196,6 @@
fd.append('multipartFile', event.target.files[0])
UploadFile(fd).then((res) => {
if (res.code === 200) {
- console.log(res.data[0])
ruleForm.minioFileName = res.data[0]
// 重置当前验证
ruleFormRef.value?.clearValidate('minioFileName')
@@ -216,7 +218,6 @@
// ])
watch(() => ruleForm.effectiveTime, (newVal) => {
const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour')
- console.log(diffDat)
if (diffDat < 0) {
// ruleForm.effectiveStatusName = '已废止'
effectiveStatusName.value = '在使用'
@@ -237,7 +238,7 @@
-
+
提交
@@ -278,12 +279,12 @@
-
+
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 44e3e4d..b45fbc3 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -324,22 +324,9 @@
-
-
-
-
-
- 导出
-
-
- 打印
-
+
+
+
{
-
-}
const fileRef = ref() // 文件上传input
const onFileChange = (event: any) => {
- // 原生上传图片
+ // 原生上传
// console.log(event.target.files)
// if (event.target.files[0].type === 'application/pdf') {
if (event.target.files?.length !== 0) {
@@ -264,7 +260,7 @@
-
+
@@ -287,19 +283,19 @@
v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="实施时间"
class="normal-date"
- style="width: 155px;"
+ style="width: 185px;"
/>
-
-
+
+
@@ -310,7 +306,7 @@
-
+
() // from组件
@@ -31,11 +31,20 @@
technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }],
}) // 表单验证规则
const userList = ref([]) // 用户列表
+// 获取计量人员列表
const getuser = () => {
- getUserList({ offset: 1, limit: 99999 }).then((res) => {
- userList.value = res.data.rows
+ getStaffList({
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: ruleForm.value.deptId, // 所在部门
+ limit: 999999,
+ offset: 1,
+ }).then((res) => {
+ if (res.code === 200) {
+ userList.value = res.data.records
+ }
})
-} // 获取用户列表
+}
const technologyJobList = ref<{ id: string;name: string;value: string }[]>([])
// 获取技术职务列表
const getTechnologyJobList = () => {
@@ -50,7 +59,16 @@
administrationJobList.value = response.data
})
}
-
+// 选择负责人自动填充职务信息
+const directorChange = (val: string) => {
+ const selectUser = userList.value.filter(item => item.name === val)[0]
+ getStaffDetail(selectUser).then((res) => {
+ if (res.code === 200) {
+ ruleForm.value.administrationJob = res.data.administrationJob
+ ruleForm.value.technologyJob = res.data.technologyJob
+ }
+ })
+}
// 提交
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) { return }
@@ -95,12 +113,6 @@
const multipleTableRef = ref()
const current = ref('')
const changeList = ref()
-// const searchQuery = ref({
-// limit: 10,
-// offset: 1,
-// total: 0,
-// pageSizes: [10, 20, 30],
-// })
// 部门列表数据
const changeList_bm = ref([
{
@@ -410,20 +422,6 @@
}
})
}
-// const handleSizeChange = (val: number) => {
-// searchQuery.value.limit = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
-// const handleCurrentChange = (val: number) => {
-// searchQuery.value.offset = val
-// getDepartmentList()
-// getuserInfoList()
-// getInstrumentInfo()
-// getDeviceInfo()
-// }
// 弹窗初始化
const initDialog = (row: any) => {
reset()
@@ -460,22 +458,17 @@
-
-
+
+
+
+ 提交
+
+
+ 关闭
+
+
-
+
@@ -487,7 +480,7 @@
-
+
@@ -509,10 +502,10 @@
-
+
-
+
@@ -532,7 +525,7 @@
-
+
@@ -540,85 +533,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 9ad87af..aac1ef2 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -231,12 +231,14 @@
-
+
+
+
{
if (res.code === 200) {
- res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' }))
+ res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -115,6 +115,7 @@
addRef.value.initDialog({
...row,
title: '详情',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 编辑
@@ -123,6 +124,7 @@
addRef.value.initDialog({
...row,
title: '编辑',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
@@ -193,6 +195,7 @@
dialogVisible.value = true
addRef.value.initDialog({
title: '新建',
+ name: props.isRemind ? '证书状况' : '证书记录',
})
}
// 导出
@@ -292,21 +295,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
提醒
@@ -336,7 +329,7 @@
详情
-
+
删除
diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue
index 4dc1b17..4352604 100644
--- a/src/views/measure/person/components/addPerson.vue
+++ b/src/views/measure/person/components/addPerson.vue
@@ -69,7 +69,16 @@
const IdCard = ruleForm.value.idCard
const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}`
ruleForm.value.birthday = birthday
- console.log(ruleForm.value)
+ // 获取性别 第17位 奇数为男 偶数为女
+ // ruleForm.value.sex
+ if (Number(IdCard.substring(16, 17)) % 2) {
+ // 男
+ ruleForm.value.sex = '1'
+ }
+ else {
+ // 女
+ ruleForm.value.sex = '2'
+ }
})
}
const dialogVisible = ref(false) // 弹窗显示
@@ -130,7 +139,6 @@
technologyExam: '', // 技术考核
remark: '', // 备注
certificateList: [], // 证书列表
-
}
}
const technologyJobList = ref([])
@@ -309,7 +317,7 @@
}
(title.value === '新建'
? getStaffAdd
- : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => {
+ : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => {
if (res.code == 200) {
formEl?.resetFields()
ElMessage.success('提交成功')
@@ -332,12 +340,14 @@
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
changeList.value[0].data = []
dialogVisible.value = true
title.value = row.title
resetFormData()
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -370,20 +380,15 @@
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
@@ -394,6 +399,7 @@
:http-request="uploadQuarterlyEvaluateFile"
:before-upload="beforeAvatarUpload"
:disabled="title === '详情'"
+ accept="image/png, image/jpeg,image/jpg"
>
@@ -425,8 +431,8 @@
@@ -489,29 +495,19 @@
-
-
-
-
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
@@ -523,7 +519,7 @@
-
+
@@ -532,77 +528,38 @@
@@ -624,8 +581,8 @@
.el-icon.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
- width: 220px;
- height: 320px;
+ width: 190px;
+ height: 250px;
text-align: center;
}
diff --git a/src/views/measure/person/components/addRecord.vue b/src/views/measure/person/components/addRecord.vue
index ae48f11..042636e 100644
--- a/src/views/measure/person/components/addRecord.vue
+++ b/src/views/measure/person/components/addRecord.vue
@@ -4,7 +4,6 @@
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox, ElTable } from 'element-plus'
import type { technologyJobType } from '../person-interface'
-import certificateAddDialog from './certificateAddDialog.vue'
import personListDialog from './personListDialog.vue'
import { getUserList } from '@/api/system/user'
import { getDeptTreeList } from '@/api/system/dept'
@@ -14,7 +13,8 @@
import comTreeSelect from '@/views/system/user/selecTree.vue'
import { addCertificateList, getCertificateDetail, getCertificateUpdate } from '@/api/measure/person'
const emits = defineEmits(['resetData'])
-const ruleFormRef = ref() // from组件
+const ruleFormRef1 = ref() // from组件
+const ruleFormRef2 = ref() // from组件
const meterStaff = ref({
staffNo: '', // 人员编号
name: '', // 姓名
@@ -28,26 +28,43 @@
workDate: '', // 从事日期
id: '',
})
+const baseInfo = ref({
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+})
const ruleForm = ref({
meterStaff: {}, // 人员信息
staffId: '', // 计量人员id
}) // 表单
-const multipleTableRef = ref>()
const title = ref('')
+const name = ref('')
// 身份证号码验证规则
-const validateIDcard = (rule: any, value: any, callback: any) => {
- const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
- if (rr.test(value)) {
- callback()
- }
- else {
- callback(new Error('验证失败'))
- }
-}
+// const validateIDcard = (rule: any, value: any, callback: any) => {
+// const rr = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/
+// if (rr.test(value)) {
+// callback()
+// }
+// else {
+// callback(new Error('验证失败'))
+// }
+// }
const rules = ref({
staffNo: [{ required: true, message: '人员编号不能为空', trigger: 'blur' }],
// idCard: [{ required: false, validator: validateIDcard, message: '身份证号码不符合规范', trigger: 'change' }],
-
+}) // 表单验证规则
+const rules2 = ref({
+ certificateCompany: [{ required: true, message: '发证单位不能为空', trigger: 'blur' }],
+ certificateDate: [{ required: true, message: '发证日期不能为空', trigger: 'blur' }],
+ certificateName: [{ required: true, message: '证书名称不能为空', trigger: 'blur' }],
+ certificateNo: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
+ validDate: [{ required: true, message: '有效日期不能为空', trigger: 'blur' }],
}) // 表单验证规则
const dialogVisible = ref(false) // 弹窗显示
const userList = ref([]) // 可使用人列表
@@ -96,6 +113,17 @@
meterStaff.value.major = ''
meterStaff.value.workDate = ''
meterStaff.value.id = ''
+ baseInfo.value = {
+ certificateCompany: '',
+ certificateDate: '',
+ certificateName: '',
+ certificateNo: '',
+ validDate: '',
+ id: '',
+ isDel: 0,
+ minioFileName: '',
+ remark: '',
+ }
}
const technologyJobList = ref([])
// 获取技术职务列表
@@ -120,98 +148,14 @@
const confirmPerson = (row: any) => {
ruleForm.value.staffId = row.staffNo
meterStaff.value = row
- ruleFormRef.value?.clearValidate('staffNo')
+ ruleFormRef1.value?.clearValidate('staffNo')
}
-const changeList = ref([
- {
- name: '证书基本信息',
- data: [] as any[],
- column: [
- {
- label: '证书号',
- data: 'certificateNo',
- id: 'zs02',
- },
- {
- label: '证书名称',
- data: 'certificateName',
- id: 'zs03',
- },
- {
- label: '发证日期',
- data: 'certificateDate',
- id: 'zs04',
- },
- {
- label: '发证单位',
- data: 'certificateCompany',
- id: 'zs01',
- },
- {
- label: '有效日期',
- data: 'validDate',
- id: 'zs05',
- },
- ],
- },
- {
- name: '计量工作培训记录',
- data: [],
- column: [],
- },
- {
- name: '业务记录',
- data: [],
- column: [],
- },
-])
-const current = ref('证书基本信息')
-const currentShow = computed(() => {
- return changeList.value.filter(item => item.name === current.value)[0]
-})
-const certificateRef = ref() // 添加证书信息弹窗
-// 添加行
-const addRow = () => {
- certificateRef.value.initDialog({ title: '添加' })
-}
-// 编辑行
-const editRow = () => {
- certificateRef.value.initDialog({ ...changeList.value[0].data[0], title: '编辑' })
-}
-// 证书信息行内添加数据
-const addRowcertificate = (row: any, flag: string) => {
- const diff = dayjs(row.validDate).diff(row.certificateDate, 'day')
- if (flag === 'update') {
- changeList.value[0].data = [{
- ...changeList.value[0].data[0],
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- }]
- }
- else {
- changeList.value[0].data.push(
- {
- ...row,
- certificateStatus: diff < 0 ? '1' : '0',
- createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
- })
- }
-}
-const currenSelect = ref(-1) // 当前选中行
-// 删除行
-const removeRow = () => {
- console.log(currenSelect.value)
- if (currenSelect.value >= 0) {
+// 提交
+const submitForm = async (formEl1: FormInstance | undefined, formEl2: FormInstance | undefined) => {
+ if (!formEl1 || !formEl2) { return }
+ Promise.all([formEl1.validate(), formEl2.validate()]).then((res) => {
ElMessageBox.confirm(
- '确认删除选中的数据吗?',
+ '确认提交吗?',
'提示',
{
confirmButtonText: '确认',
@@ -219,78 +163,49 @@
type: 'warning',
},
).then(() => {
- changeList.value[0].data = changeList.value[0].data.filter((item, index) => index !== currenSelect.value)
- currenSelect.value = -1
- ElMessage.success('删除成功')
- })
- }
- else {
- ElMessage.warning('请先选择需要删除的数据')
- }
-}
-// 提交
-const submitForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then(() => {
- let params
- if (changeList.value[0].data.length) {
- params = changeList.value[0].data
- }
- else {
- params = [
- {
- certificateCompany: '',
- certificateDate: '',
- certificateName: '',
- certificateNo: '',
- certificateStatus: '',
- createTime: '',
- id: null,
- isDel: 0,
- minioFileName: '',
- remark: '',
- staffId: meterStaff.value.id,
- updateTime: '',
- validDate: '',
- },
- ]
- }
- (title.value === '新建'
- ? addCertificateList
- : getCertificateUpdate)(title.value === '新建' ? params : changeList.value[0].data[0]).then((res) => {
- formEl?.resetFields()
- ElMessage.success('提交成功')
- emits('resetData')
- resetFormData()
- })
+ (title.value === '新建'
+ ? addCertificateList
+ : getCertificateUpdate)(title.value === '新建'
+ ? [{
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }]
+ : {
+ ...baseInfo.value,
+ staffId: meterStaff.value.id,
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ certificateStatus: dayjs(baseInfo.value.validDate).diff(baseInfo.value.certificateDate, 'day') < 0 ? '1' : '0',
+ meterStaff: undefined,
+ }).then((res) => {
+ formEl1?.resetFields()
+ formEl2?.resetFields()
+ ElMessage.success('提交成功')
+ emits('resetData')
+ resetFormData()
})
- }
+ })
})
}
// 取消
-const resetForm = (formEl: FormInstance | undefined) => {
+const resetForm = (formEl: FormInstance | undefined, formEl2: FormInstance | undefined) => {
formEl?.resetFields()
- changeList.value[0].data = []
+ formEl2?.resetFields()
emits('resetData')
resetFormData()
}
+const selectTreeRef = ref()
// 弹窗初始化
const initDialog = (row: any) => {
- changeList.value[0].data = []
resetFormData()
dialogVisible.value = true
title.value = row.title
- resetFormData()
+ name.value = row.name
+ selectTreeRef.value?.clearSelected()
getuser()
getPubList()
getSexList()
@@ -303,8 +218,9 @@
else {
getCertificateDetail({ id: row.id }).then((res) => {
if (res.code === 200) {
+ console.log(res, '证书记录')
meterStaff.value = res.data.meterStaff
- changeList.value[0].data = [{ ...res.data, meterStaff: undefined }]
+ baseInfo.value = res.data
}
})
}
@@ -314,21 +230,16 @@
-
-
-
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
@@ -390,7 +301,8 @@
@@ -410,71 +322,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/src/views/measure/person/components/addRecordCancel.vue b/src/views/measure/person/components/addRecordCancel.vue
new file mode 100644
index 0000000..c32ac43
--- /dev/null
+++ b/src/views/measure/person/components/addRecordCancel.vue
@@ -0,0 +1,459 @@
+
+
+
+
+
+
+
+
+ 完成
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除行
+
+
+ 添加行
+
+
+ 编辑行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/measure/person/components/certificateAddDialog.vue b/src/views/measure/person/components/certificateAddDialog.vue
index 332c73c..178fc12 100644
--- a/src/views/measure/person/components/certificateAddDialog.vue
+++ b/src/views/measure/person/components/certificateAddDialog.vue
@@ -32,6 +32,7 @@
form.validDate = ''
}
const initDialog = (row: any) => {
+ resetData()
title.value = row.title
if (row.title === '编辑') {
form.certificateNo = row.certificateNo
@@ -50,10 +51,12 @@
await formEl.validate((valid, fields) => {
if (valid) {
if (title.value === '编辑') {
- emits('add', form, 'update')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, 'update')
}
else {
- emits('add', form, '')
+ const deptRow = JSON.parse(JSON.stringify(form))
+ emits('add', deptRow, '')
}
dialogFormVisible.value = false
}
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 592d810..9c6f65d 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -30,7 +30,7 @@
{ text: '技术职务', value: 'technologyJob', align: 'center', width: '140' },
{ text: '行政职务', value: 'administrationJob', align: 'center', width: '100' },
{ text: '计量专业', value: 'major', align: 'center', width: '100' },
- { text: '证书号', value: 'verifierCertificateNo', align: 'center' },
+ { text: '证书号', value: 'verifierCertificateNo', align: 'center', width: '180' },
{ text: '证书有效日期', value: 'certificateDate', align: 'center', width: '200' },
{ text: '技术考核', value: 'technologyExam', align: 'center', width: '85' },
]) // 表格
@@ -63,7 +63,7 @@
loadingTable.value = true
getStaffList(searchQuery).then((res) => {
if (res.code === 200) {
- res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核' }))
+ res.data.records = res.data.records.map((item: StaffType) => ({ ...item, sex: item.sex == '1' ? '男' : '女', technologyExam: item.technologyExam == '0' ? '已考核' : '未考核', certificateDate: item.certificateDate.split(' ')[0] }))
list.value = res.data.records
total.value = Number(res.data.total)
}
@@ -236,21 +236,11 @@
-
- 批量导入
-
-
- 模板下载
-
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
+
+
-
+
+
+
+
diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue
index 3d5c2e3..0926957 100644
--- a/src/views/system/notice/noteList.vue
+++ b/src/views/system/notice/noteList.vue
@@ -172,15 +172,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
暂无附件
-
+
+
+
+
diff --git a/src/views/system/tool/autograph/addDDialog.vue b/src/views/system/tool/autograph/addDDialog.vue
index d34e8ef..e39b706 100644
--- a/src/views/system/tool/autograph/addDDialog.vue
+++ b/src/views/system/tool/autograph/addDDialog.vue
@@ -200,15 +200,17 @@
-
+
+
+
+
diff --git a/src/views/system/tool/autograph/autograph.vue b/src/views/system/tool/autograph/autograph.vue
index 8fffe07..ac9f000 100644
--- a/src/views/system/tool/autograph/autograph.vue
+++ b/src/views/system/tool/autograph/autograph.vue
@@ -191,15 +191,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
-
+
+
+
+
diff --git a/src/views/system/tool/certificate/certificate.vue b/src/views/system/tool/certificate/certificate.vue
index 5ac1900..9787116 100644
--- a/src/views/system/tool/certificate/certificate.vue
+++ b/src/views/system/tool/certificate/certificate.vue
@@ -192,15 +192,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
-
+
+
+
+
diff --git a/src/views/system/tool/document/document.vue b/src/views/system/tool/document/document.vue
index 58d12f9..774e498 100644
--- a/src/views/system/tool/document/document.vue
+++ b/src/views/system/tool/document/document.vue
@@ -191,15 +191,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+
-
+
+
+
+
diff --git a/src/views/system/tool/signature/signature.vue b/src/views/system/tool/signature/signature.vue
index 94d216e..4eb6d70 100644
--- a/src/views/system/tool/signature/signature.vue
+++ b/src/views/system/tool/signature/signature.vue
@@ -189,15 +189,9 @@
-
- 新建
-
-
- 导出
-
-
- 打印
-
+
+
+