{{ scope.row[column.value] }}
{{ column.filter(scope.row) }}
@@ -271,4 +285,8 @@
display: none !important;
}
}
+
+// .danger-class {
+// background-color: #ff00004a !important;
+// }
diff --git a/src/components/NormalTable/table_interface.ts b/src/components/NormalTable/table_interface.ts
index d1f5b24..bda01b3 100644
--- a/src/components/NormalTable/table_interface.ts
+++ b/src/components/NormalTable/table_interface.ts
@@ -8,5 +8,6 @@
filter?: Function // 字段过滤器
styleFilter?: Function // 文字过滤器
fixed?: boolean // 固定列
+ filters?: Array // 筛选行数据
}
diff --git a/src/components/SearchArea/index.vue b/src/components/SearchArea/index.vue
index 475f4ad..55f8cf9 100644
--- a/src/components/SearchArea/index.vue
+++ b/src/components/SearchArea/index.vue
@@ -93,6 +93,7 @@
+
查询
diff --git a/src/assets/icons/icon-zhankai.svg b/src/assets/icons/icon-zhankai.svg
new file mode 100644
index 0000000..bb5a83c
--- /dev/null
+++ b/src/assets/icons/icon-zhankai.svg
@@ -0,0 +1 @@
+
diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue
index aefbd8b..d3cac7c 100644
--- a/src/components/NormalTable/index.vue
+++ b/src/components/NormalTable/index.vue
@@ -51,6 +51,10 @@
return null
},
},
+ tableRowClassName: {
+ type: String,
+ default: '',
+ },
// 数据总数
total: {
type: Number,
@@ -195,6 +199,15 @@
}
}
}
+// 筛选功能
+const filterHandler = (
+ value: string,
+ row: any,
+ column: any,
+) => {
+ const property = column.property
+ return row[property] === value
+}
@@ -210,6 +223,7 @@
:size="size"
:default-sort="props.sort"
:show-header="showHeader"
+ :row-class-name="props.tableRowClassName"
style="width: 100%;"
@selection-change="handleSelectionChange"
@select="selectClick"
@@ -224,7 +238,7 @@
-
+
{{ scope.row[column.value] }}
{{ column.filter(scope.row) }}
@@ -271,4 +285,8 @@
display: none !important;
}
}
+
+// .danger-class {
+// background-color: #ff00004a !important;
+// }
diff --git a/src/components/NormalTable/table_interface.ts b/src/components/NormalTable/table_interface.ts
index d1f5b24..bda01b3 100644
--- a/src/components/NormalTable/table_interface.ts
+++ b/src/components/NormalTable/table_interface.ts
@@ -8,5 +8,6 @@
filter?: Function // 字段过滤器
styleFilter?: Function // 文字过滤器
fixed?: boolean // 固定列
+ filters?: Array // 筛选行数据
}
diff --git a/src/components/SearchArea/index.vue b/src/components/SearchArea/index.vue
index 475f4ad..55f8cf9 100644
--- a/src/components/SearchArea/index.vue
+++ b/src/components/SearchArea/index.vue
@@ -93,6 +93,7 @@
+
查询
diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue
index ed89a1c..aad4174 100644
--- a/src/components/drawer/approverDrawer.vue
+++ b/src/components/drawer/approverDrawer.vue
@@ -66,13 +66,22 @@
checkedRoleList.value = approverConfig.value.nodeUserList
}
// 选择好成员
-const sureApprover = (data: IEmployees) => {
- approverConfig.value.nodeUserList = data
+const sureApprover = (data: IEmployees[]) => {
+ data.forEach((user: IEmployees) => {
+ if (approverConfig.value.nodeUserList.every((ele: IEmployees) => ele.id !== user.id)) {
+ approverConfig.value.nodeUserList.push(user)
+ }
+ })
approverVisible.value = false
}
// 选择好角色
-const sureRoleApprover = (data: IroleInfo) => {
- approverConfig.value.nodeUserList = data
+const sureRoleApprover = (data: IroleInfo[]) => {
+ data.forEach((role: IroleInfo) => {
+ if (approverConfig.value.nodeUserList.every((ele: IroleInfo) => ele.id !== role.id)) {
+ approverConfig.value.nodeUserList.push(role)
+ }
+ })
+ // approverConfig.value.nodeUserList = data
approverRoleVisible.value = false
}
// 点击确定,保存审批设置
diff --git a/src/assets/icons/icon-zhankai.svg b/src/assets/icons/icon-zhankai.svg
new file mode 100644
index 0000000..bb5a83c
--- /dev/null
+++ b/src/assets/icons/icon-zhankai.svg
@@ -0,0 +1 @@
+
diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue
index aefbd8b..d3cac7c 100644
--- a/src/components/NormalTable/index.vue
+++ b/src/components/NormalTable/index.vue
@@ -51,6 +51,10 @@
return null
},
},
+ tableRowClassName: {
+ type: String,
+ default: '',
+ },
// 数据总数
total: {
type: Number,
@@ -195,6 +199,15 @@
}
}
}
+// 筛选功能
+const filterHandler = (
+ value: string,
+ row: any,
+ column: any,
+) => {
+ const property = column.property
+ return row[property] === value
+}
@@ -210,6 +223,7 @@
:size="size"
:default-sort="props.sort"
:show-header="showHeader"
+ :row-class-name="props.tableRowClassName"
style="width: 100%;"
@selection-change="handleSelectionChange"
@select="selectClick"
@@ -224,7 +238,7 @@
-
+
{{ scope.row[column.value] }}
{{ column.filter(scope.row) }}
@@ -271,4 +285,8 @@
display: none !important;
}
}
+
+// .danger-class {
+// background-color: #ff00004a !important;
+// }
diff --git a/src/components/NormalTable/table_interface.ts b/src/components/NormalTable/table_interface.ts
index d1f5b24..bda01b3 100644
--- a/src/components/NormalTable/table_interface.ts
+++ b/src/components/NormalTable/table_interface.ts
@@ -8,5 +8,6 @@
filter?: Function // 字段过滤器
styleFilter?: Function // 文字过滤器
fixed?: boolean // 固定列
+ filters?: Array // 筛选行数据
}
diff --git a/src/components/SearchArea/index.vue b/src/components/SearchArea/index.vue
index 475f4ad..55f8cf9 100644
--- a/src/components/SearchArea/index.vue
+++ b/src/components/SearchArea/index.vue
@@ -93,6 +93,7 @@
+
查询
diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue
index ed89a1c..aad4174 100644
--- a/src/components/drawer/approverDrawer.vue
+++ b/src/components/drawer/approverDrawer.vue
@@ -66,13 +66,22 @@
checkedRoleList.value = approverConfig.value.nodeUserList
}
// 选择好成员
-const sureApprover = (data: IEmployees) => {
- approverConfig.value.nodeUserList = data
+const sureApprover = (data: IEmployees[]) => {
+ data.forEach((user: IEmployees) => {
+ if (approverConfig.value.nodeUserList.every((ele: IEmployees) => ele.id !== user.id)) {
+ approverConfig.value.nodeUserList.push(user)
+ }
+ })
approverVisible.value = false
}
// 选择好角色
-const sureRoleApprover = (data: IroleInfo) => {
- approverConfig.value.nodeUserList = data
+const sureRoleApprover = (data: IroleInfo[]) => {
+ data.forEach((role: IroleInfo) => {
+ if (approverConfig.value.nodeUserList.every((ele: IroleInfo) => ele.id !== role.id)) {
+ approverConfig.value.nodeUserList.push(role)
+ }
+ })
+ // approverConfig.value.nodeUserList = data
approverRoleVisible.value = false
}
// 点击确定,保存审批设置
diff --git a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
index 01bb831..ac3c413 100644
--- a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
@@ -39,11 +39,6 @@
// 表头
const columns = ref
([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -59,8 +54,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -68,6 +68,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -78,6 +79,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -196,13 +202,12 @@
-
+
+ -->
+
diff --git a/src/assets/icons/icon-zhankai.svg b/src/assets/icons/icon-zhankai.svg
new file mode 100644
index 0000000..bb5a83c
--- /dev/null
+++ b/src/assets/icons/icon-zhankai.svg
@@ -0,0 +1 @@
+
diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue
index aefbd8b..d3cac7c 100644
--- a/src/components/NormalTable/index.vue
+++ b/src/components/NormalTable/index.vue
@@ -51,6 +51,10 @@
return null
},
},
+ tableRowClassName: {
+ type: String,
+ default: '',
+ },
// 数据总数
total: {
type: Number,
@@ -195,6 +199,15 @@
}
}
}
+// 筛选功能
+const filterHandler = (
+ value: string,
+ row: any,
+ column: any,
+) => {
+ const property = column.property
+ return row[property] === value
+}
@@ -210,6 +223,7 @@
:size="size"
:default-sort="props.sort"
:show-header="showHeader"
+ :row-class-name="props.tableRowClassName"
style="width: 100%;"
@selection-change="handleSelectionChange"
@select="selectClick"
@@ -224,7 +238,7 @@
-
+
{{ scope.row[column.value] }}
{{ column.filter(scope.row) }}
@@ -271,4 +285,8 @@
display: none !important;
}
}
+
+// .danger-class {
+// background-color: #ff00004a !important;
+// }
diff --git a/src/components/NormalTable/table_interface.ts b/src/components/NormalTable/table_interface.ts
index d1f5b24..bda01b3 100644
--- a/src/components/NormalTable/table_interface.ts
+++ b/src/components/NormalTable/table_interface.ts
@@ -8,5 +8,6 @@
filter?: Function // 字段过滤器
styleFilter?: Function // 文字过滤器
fixed?: boolean // 固定列
+ filters?: Array // 筛选行数据
}
diff --git a/src/components/SearchArea/index.vue b/src/components/SearchArea/index.vue
index 475f4ad..55f8cf9 100644
--- a/src/components/SearchArea/index.vue
+++ b/src/components/SearchArea/index.vue
@@ -93,6 +93,7 @@
+
查询
diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue
index ed89a1c..aad4174 100644
--- a/src/components/drawer/approverDrawer.vue
+++ b/src/components/drawer/approverDrawer.vue
@@ -66,13 +66,22 @@
checkedRoleList.value = approverConfig.value.nodeUserList
}
// 选择好成员
-const sureApprover = (data: IEmployees) => {
- approverConfig.value.nodeUserList = data
+const sureApprover = (data: IEmployees[]) => {
+ data.forEach((user: IEmployees) => {
+ if (approverConfig.value.nodeUserList.every((ele: IEmployees) => ele.id !== user.id)) {
+ approverConfig.value.nodeUserList.push(user)
+ }
+ })
approverVisible.value = false
}
// 选择好角色
-const sureRoleApprover = (data: IroleInfo) => {
- approverConfig.value.nodeUserList = data
+const sureRoleApprover = (data: IroleInfo[]) => {
+ data.forEach((role: IroleInfo) => {
+ if (approverConfig.value.nodeUserList.every((ele: IroleInfo) => ele.id !== role.id)) {
+ approverConfig.value.nodeUserList.push(role)
+ }
+ })
+ // approverConfig.value.nodeUserList = data
approverRoleVisible.value = false
}
// 点击确定,保存审批设置
diff --git a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
index 01bb831..ac3c413 100644
--- a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
@@ -39,11 +39,6 @@
// 表头
const columns = ref
([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -59,8 +54,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -68,6 +68,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -78,6 +79,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -196,13 +202,12 @@
-
+
+ -->
+
diff --git a/src/views/tested/MeasurementPlan/plan/components/table.vue b/src/views/tested/MeasurementPlan/plan/components/table.vue
index b8877a6..52ed729 100644
--- a/src/views/tested/MeasurementPlan/plan/components/table.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/table.vue
@@ -127,25 +127,27 @@
// 判断是单选还是多选
if (Array.isArray(device)) {
- const data = list.value.filter((item) => {
- return device.some((child: any) => child.id === item.equipmentId)
- })
- if (data.length) {
- ElMessage.warning('选择设备重复')
- return
- }
+ // const data = list.value.filter((item) => {
+ // return device.some((child: any) => child.id === item.equipmentId)
+ // })
+ // if (data.length) {
+ // ElMessage.warning('选择设备重复')
+ // return
+ // }
// 多选
device.forEach((item) => {
- list.value.push({
- ...item,
- equipmentId: item.id,
- id: null,
- groupId: null,
- editable: true,
- planId: '',
- planName: '',
- planNo: '',
- })
+ if (list.value.every(citem => citem.equipmentId !== item.id)) {
+ list.value.push({
+ ...item,
+ equipmentId: item.id,
+ id: null,
+ groupId: null,
+ editable: true,
+ planId: '',
+ planName: '',
+ planNo: '',
+ })
+ }
})
}
else {
diff --git a/src/assets/icons/icon-zhankai.svg b/src/assets/icons/icon-zhankai.svg
new file mode 100644
index 0000000..bb5a83c
--- /dev/null
+++ b/src/assets/icons/icon-zhankai.svg
@@ -0,0 +1 @@
+
diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue
index aefbd8b..d3cac7c 100644
--- a/src/components/NormalTable/index.vue
+++ b/src/components/NormalTable/index.vue
@@ -51,6 +51,10 @@
return null
},
},
+ tableRowClassName: {
+ type: String,
+ default: '',
+ },
// 数据总数
total: {
type: Number,
@@ -195,6 +199,15 @@
}
}
}
+// 筛选功能
+const filterHandler = (
+ value: string,
+ row: any,
+ column: any,
+) => {
+ const property = column.property
+ return row[property] === value
+}
@@ -210,6 +223,7 @@
:size="size"
:default-sort="props.sort"
:show-header="showHeader"
+ :row-class-name="props.tableRowClassName"
style="width: 100%;"
@selection-change="handleSelectionChange"
@select="selectClick"
@@ -224,7 +238,7 @@
-
+
{{ scope.row[column.value] }}
{{ column.filter(scope.row) }}
@@ -271,4 +285,8 @@
display: none !important;
}
}
+
+// .danger-class {
+// background-color: #ff00004a !important;
+// }
diff --git a/src/components/NormalTable/table_interface.ts b/src/components/NormalTable/table_interface.ts
index d1f5b24..bda01b3 100644
--- a/src/components/NormalTable/table_interface.ts
+++ b/src/components/NormalTable/table_interface.ts
@@ -8,5 +8,6 @@
filter?: Function // 字段过滤器
styleFilter?: Function // 文字过滤器
fixed?: boolean // 固定列
+ filters?: Array // 筛选行数据
}
diff --git a/src/components/SearchArea/index.vue b/src/components/SearchArea/index.vue
index 475f4ad..55f8cf9 100644
--- a/src/components/SearchArea/index.vue
+++ b/src/components/SearchArea/index.vue
@@ -93,6 +93,7 @@
+
查询
diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue
index ed89a1c..aad4174 100644
--- a/src/components/drawer/approverDrawer.vue
+++ b/src/components/drawer/approverDrawer.vue
@@ -66,13 +66,22 @@
checkedRoleList.value = approverConfig.value.nodeUserList
}
// 选择好成员
-const sureApprover = (data: IEmployees) => {
- approverConfig.value.nodeUserList = data
+const sureApprover = (data: IEmployees[]) => {
+ data.forEach((user: IEmployees) => {
+ if (approverConfig.value.nodeUserList.every((ele: IEmployees) => ele.id !== user.id)) {
+ approverConfig.value.nodeUserList.push(user)
+ }
+ })
approverVisible.value = false
}
// 选择好角色
-const sureRoleApprover = (data: IroleInfo) => {
- approverConfig.value.nodeUserList = data
+const sureRoleApprover = (data: IroleInfo[]) => {
+ data.forEach((role: IroleInfo) => {
+ if (approverConfig.value.nodeUserList.every((ele: IroleInfo) => ele.id !== role.id)) {
+ approverConfig.value.nodeUserList.push(role)
+ }
+ })
+ // approverConfig.value.nodeUserList = data
approverRoleVisible.value = false
}
// 点击确定,保存审批设置
diff --git a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
index 01bb831..ac3c413 100644
--- a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
@@ -39,11 +39,6 @@
// 表头
const columns = ref
([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -59,8 +54,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -68,6 +68,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -78,6 +79,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -196,13 +202,12 @@
-
+
+ -->
+
diff --git a/src/views/tested/MeasurementPlan/plan/components/table.vue b/src/views/tested/MeasurementPlan/plan/components/table.vue
index b8877a6..52ed729 100644
--- a/src/views/tested/MeasurementPlan/plan/components/table.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/table.vue
@@ -127,25 +127,27 @@
// 判断是单选还是多选
if (Array.isArray(device)) {
- const data = list.value.filter((item) => {
- return device.some((child: any) => child.id === item.equipmentId)
- })
- if (data.length) {
- ElMessage.warning('选择设备重复')
- return
- }
+ // const data = list.value.filter((item) => {
+ // return device.some((child: any) => child.id === item.equipmentId)
+ // })
+ // if (data.length) {
+ // ElMessage.warning('选择设备重复')
+ // return
+ // }
// 多选
device.forEach((item) => {
- list.value.push({
- ...item,
- equipmentId: item.id,
- id: null,
- groupId: null,
- editable: true,
- planId: '',
- planName: '',
- planNo: '',
- })
+ if (list.value.every(citem => citem.equipmentId !== item.id)) {
+ list.value.push({
+ ...item,
+ equipmentId: item.id,
+ id: null,
+ groupId: null,
+ editable: true,
+ planId: '',
+ planName: '',
+ planNo: '',
+ })
+ }
})
}
else {
diff --git a/src/views/tested/MeasurementPlan/task/index.vue b/src/views/tested/MeasurementPlan/task/index.vue
index 6685a24..570ae29 100644
--- a/src/views/tested/MeasurementPlan/task/index.vue
+++ b/src/views/tested/MeasurementPlan/task/index.vue
@@ -38,11 +38,26 @@
align: 'center',
},
{
- text: '溯源单位',
- value: 'measureCompany',
+ text: '使用部门',
+ value: 'deptName',
align: 'center',
},
{
+ text: '使用岗位',
+ value: 'usePosition',
+ align: 'center',
+ },
+ {
+ text: '检定单位',
+ value: 'checkOrganization',
+ align: 'center',
+ },
+ // {
+ // text: '溯源单位',
+ // value: 'measureCompany',
+ // align: 'center',
+ // },
+ {
text: '创建人',
value: 'createUserName',
align: 'center',
@@ -143,24 +158,41 @@
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/assets/icons/icon-zhankai.svg b/src/assets/icons/icon-zhankai.svg
new file mode 100644
index 0000000..bb5a83c
--- /dev/null
+++ b/src/assets/icons/icon-zhankai.svg
@@ -0,0 +1 @@
+
diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue
index aefbd8b..d3cac7c 100644
--- a/src/components/NormalTable/index.vue
+++ b/src/components/NormalTable/index.vue
@@ -51,6 +51,10 @@
return null
},
},
+ tableRowClassName: {
+ type: String,
+ default: '',
+ },
// 数据总数
total: {
type: Number,
@@ -195,6 +199,15 @@
}
}
}
+// 筛选功能
+const filterHandler = (
+ value: string,
+ row: any,
+ column: any,
+) => {
+ const property = column.property
+ return row[property] === value
+}
@@ -210,6 +223,7 @@
:size="size"
:default-sort="props.sort"
:show-header="showHeader"
+ :row-class-name="props.tableRowClassName"
style="width: 100%;"
@selection-change="handleSelectionChange"
@select="selectClick"
@@ -224,7 +238,7 @@
-
+
{{ scope.row[column.value] }}
{{ column.filter(scope.row) }}
@@ -271,4 +285,8 @@
display: none !important;
}
}
+
+// .danger-class {
+// background-color: #ff00004a !important;
+// }
diff --git a/src/components/NormalTable/table_interface.ts b/src/components/NormalTable/table_interface.ts
index d1f5b24..bda01b3 100644
--- a/src/components/NormalTable/table_interface.ts
+++ b/src/components/NormalTable/table_interface.ts
@@ -8,5 +8,6 @@
filter?: Function // 字段过滤器
styleFilter?: Function // 文字过滤器
fixed?: boolean // 固定列
+ filters?: Array // 筛选行数据
}
diff --git a/src/components/SearchArea/index.vue b/src/components/SearchArea/index.vue
index 475f4ad..55f8cf9 100644
--- a/src/components/SearchArea/index.vue
+++ b/src/components/SearchArea/index.vue
@@ -93,6 +93,7 @@
+
查询
diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue
index ed89a1c..aad4174 100644
--- a/src/components/drawer/approverDrawer.vue
+++ b/src/components/drawer/approverDrawer.vue
@@ -66,13 +66,22 @@
checkedRoleList.value = approverConfig.value.nodeUserList
}
// 选择好成员
-const sureApprover = (data: IEmployees) => {
- approverConfig.value.nodeUserList = data
+const sureApprover = (data: IEmployees[]) => {
+ data.forEach((user: IEmployees) => {
+ if (approverConfig.value.nodeUserList.every((ele: IEmployees) => ele.id !== user.id)) {
+ approverConfig.value.nodeUserList.push(user)
+ }
+ })
approverVisible.value = false
}
// 选择好角色
-const sureRoleApprover = (data: IroleInfo) => {
- approverConfig.value.nodeUserList = data
+const sureRoleApprover = (data: IroleInfo[]) => {
+ data.forEach((role: IroleInfo) => {
+ if (approverConfig.value.nodeUserList.every((ele: IroleInfo) => ele.id !== role.id)) {
+ approverConfig.value.nodeUserList.push(role)
+ }
+ })
+ // approverConfig.value.nodeUserList = data
approverRoleVisible.value = false
}
// 点击确定,保存审批设置
diff --git a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
index 01bb831..ac3c413 100644
--- a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
@@ -39,11 +39,6 @@
// 表头
const columns = ref
([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -59,8 +54,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -68,6 +68,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -78,6 +79,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -196,13 +202,12 @@
-
+
+ -->
+
diff --git a/src/views/tested/MeasurementPlan/plan/components/table.vue b/src/views/tested/MeasurementPlan/plan/components/table.vue
index b8877a6..52ed729 100644
--- a/src/views/tested/MeasurementPlan/plan/components/table.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/table.vue
@@ -127,25 +127,27 @@
// 判断是单选还是多选
if (Array.isArray(device)) {
- const data = list.value.filter((item) => {
- return device.some((child: any) => child.id === item.equipmentId)
- })
- if (data.length) {
- ElMessage.warning('选择设备重复')
- return
- }
+ // const data = list.value.filter((item) => {
+ // return device.some((child: any) => child.id === item.equipmentId)
+ // })
+ // if (data.length) {
+ // ElMessage.warning('选择设备重复')
+ // return
+ // }
// 多选
device.forEach((item) => {
- list.value.push({
- ...item,
- equipmentId: item.id,
- id: null,
- groupId: null,
- editable: true,
- planId: '',
- planName: '',
- planNo: '',
- })
+ if (list.value.every(citem => citem.equipmentId !== item.id)) {
+ list.value.push({
+ ...item,
+ equipmentId: item.id,
+ id: null,
+ groupId: null,
+ editable: true,
+ planId: '',
+ planName: '',
+ planNo: '',
+ })
+ }
})
}
else {
diff --git a/src/views/tested/MeasurementPlan/task/index.vue b/src/views/tested/MeasurementPlan/task/index.vue
index 6685a24..570ae29 100644
--- a/src/views/tested/MeasurementPlan/task/index.vue
+++ b/src/views/tested/MeasurementPlan/task/index.vue
@@ -38,11 +38,26 @@
align: 'center',
},
{
- text: '溯源单位',
- value: 'measureCompany',
+ text: '使用部门',
+ value: 'deptName',
align: 'center',
},
{
+ text: '使用岗位',
+ value: 'usePosition',
+ align: 'center',
+ },
+ {
+ text: '检定单位',
+ value: 'checkOrganization',
+ align: 'center',
+ },
+ // {
+ // text: '溯源单位',
+ // value: 'measureCompany',
+ // align: 'center',
+ // },
+ {
text: '创建人',
value: 'createUserName',
align: 'center',
@@ -143,24 +158,41 @@
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tested/device/certificate/components/edit.vue b/src/views/tested/device/certificate/components/edit.vue
index ad74c4d..de32a93 100644
--- a/src/views/tested/device/certificate/components/edit.vue
+++ b/src/views/tested/device/certificate/components/edit.vue
@@ -49,52 +49,6 @@
const close = () => {
$router.back()
}
-// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认保存吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then((res) => {
- ruleForm.value.attachments = tableRef.value.list
- ruleForm.value.technicalTargetList = technologyRef.value.list
- editInfo(ruleForm.value).then((res) => {
- console.log(res.data, '123')
- ElMessage.success('保存成功')
- submitId.value = res.data
- })
- })
- }
- })
-}
-// 提交
-const submitForm = () => {
- if (!submitId.value) {
- ElMessage.warning('请先保存')
- return false
- }
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then((res) => {
- submitInfo({ id: submitId.value, formId: SCHEDULE.DEVICE_INFO_APPROVAL }).then((res) => {
- ElMessage.success('已提交')
- close()
- })
- })
-}
// 取消
const resetForm = (formEl: FormInstance | undefined) => {
formEl?.resetFields()
diff --git a/src/assets/icons/icon-zhankai.svg b/src/assets/icons/icon-zhankai.svg
new file mode 100644
index 0000000..bb5a83c
--- /dev/null
+++ b/src/assets/icons/icon-zhankai.svg
@@ -0,0 +1 @@
+
diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue
index aefbd8b..d3cac7c 100644
--- a/src/components/NormalTable/index.vue
+++ b/src/components/NormalTable/index.vue
@@ -51,6 +51,10 @@
return null
},
},
+ tableRowClassName: {
+ type: String,
+ default: '',
+ },
// 数据总数
total: {
type: Number,
@@ -195,6 +199,15 @@
}
}
}
+// 筛选功能
+const filterHandler = (
+ value: string,
+ row: any,
+ column: any,
+) => {
+ const property = column.property
+ return row[property] === value
+}
@@ -210,6 +223,7 @@
:size="size"
:default-sort="props.sort"
:show-header="showHeader"
+ :row-class-name="props.tableRowClassName"
style="width: 100%;"
@selection-change="handleSelectionChange"
@select="selectClick"
@@ -224,7 +238,7 @@
-
+
{{ scope.row[column.value] }}
{{ column.filter(scope.row) }}
@@ -271,4 +285,8 @@
display: none !important;
}
}
+
+// .danger-class {
+// background-color: #ff00004a !important;
+// }
diff --git a/src/components/NormalTable/table_interface.ts b/src/components/NormalTable/table_interface.ts
index d1f5b24..bda01b3 100644
--- a/src/components/NormalTable/table_interface.ts
+++ b/src/components/NormalTable/table_interface.ts
@@ -8,5 +8,6 @@
filter?: Function // 字段过滤器
styleFilter?: Function // 文字过滤器
fixed?: boolean // 固定列
+ filters?: Array // 筛选行数据
}
diff --git a/src/components/SearchArea/index.vue b/src/components/SearchArea/index.vue
index 475f4ad..55f8cf9 100644
--- a/src/components/SearchArea/index.vue
+++ b/src/components/SearchArea/index.vue
@@ -93,6 +93,7 @@
+
查询
diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue
index ed89a1c..aad4174 100644
--- a/src/components/drawer/approverDrawer.vue
+++ b/src/components/drawer/approverDrawer.vue
@@ -66,13 +66,22 @@
checkedRoleList.value = approverConfig.value.nodeUserList
}
// 选择好成员
-const sureApprover = (data: IEmployees) => {
- approverConfig.value.nodeUserList = data
+const sureApprover = (data: IEmployees[]) => {
+ data.forEach((user: IEmployees) => {
+ if (approverConfig.value.nodeUserList.every((ele: IEmployees) => ele.id !== user.id)) {
+ approverConfig.value.nodeUserList.push(user)
+ }
+ })
approverVisible.value = false
}
// 选择好角色
-const sureRoleApprover = (data: IroleInfo) => {
- approverConfig.value.nodeUserList = data
+const sureRoleApprover = (data: IroleInfo[]) => {
+ data.forEach((role: IroleInfo) => {
+ if (approverConfig.value.nodeUserList.every((ele: IroleInfo) => ele.id !== role.id)) {
+ approverConfig.value.nodeUserList.push(role)
+ }
+ })
+ // approverConfig.value.nodeUserList = data
approverRoleVisible.value = false
}
// 点击确定,保存审批设置
diff --git a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
index 01bb831..ac3c413 100644
--- a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
@@ -39,11 +39,6 @@
// 表头
const columns = ref
([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -59,8 +54,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -68,6 +68,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -78,6 +79,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -196,13 +202,12 @@
-
+
+ -->
+
diff --git a/src/views/tested/MeasurementPlan/plan/components/table.vue b/src/views/tested/MeasurementPlan/plan/components/table.vue
index b8877a6..52ed729 100644
--- a/src/views/tested/MeasurementPlan/plan/components/table.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/table.vue
@@ -127,25 +127,27 @@
// 判断是单选还是多选
if (Array.isArray(device)) {
- const data = list.value.filter((item) => {
- return device.some((child: any) => child.id === item.equipmentId)
- })
- if (data.length) {
- ElMessage.warning('选择设备重复')
- return
- }
+ // const data = list.value.filter((item) => {
+ // return device.some((child: any) => child.id === item.equipmentId)
+ // })
+ // if (data.length) {
+ // ElMessage.warning('选择设备重复')
+ // return
+ // }
// 多选
device.forEach((item) => {
- list.value.push({
- ...item,
- equipmentId: item.id,
- id: null,
- groupId: null,
- editable: true,
- planId: '',
- planName: '',
- planNo: '',
- })
+ if (list.value.every(citem => citem.equipmentId !== item.id)) {
+ list.value.push({
+ ...item,
+ equipmentId: item.id,
+ id: null,
+ groupId: null,
+ editable: true,
+ planId: '',
+ planName: '',
+ planNo: '',
+ })
+ }
})
}
else {
diff --git a/src/views/tested/MeasurementPlan/task/index.vue b/src/views/tested/MeasurementPlan/task/index.vue
index 6685a24..570ae29 100644
--- a/src/views/tested/MeasurementPlan/task/index.vue
+++ b/src/views/tested/MeasurementPlan/task/index.vue
@@ -38,11 +38,26 @@
align: 'center',
},
{
- text: '溯源单位',
- value: 'measureCompany',
+ text: '使用部门',
+ value: 'deptName',
align: 'center',
},
{
+ text: '使用岗位',
+ value: 'usePosition',
+ align: 'center',
+ },
+ {
+ text: '检定单位',
+ value: 'checkOrganization',
+ align: 'center',
+ },
+ // {
+ // text: '溯源单位',
+ // value: 'measureCompany',
+ // align: 'center',
+ // },
+ {
text: '创建人',
value: 'createUserName',
align: 'center',
@@ -143,24 +158,41 @@
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tested/device/certificate/components/edit.vue b/src/views/tested/device/certificate/components/edit.vue
index ad74c4d..de32a93 100644
--- a/src/views/tested/device/certificate/components/edit.vue
+++ b/src/views/tested/device/certificate/components/edit.vue
@@ -49,52 +49,6 @@
const close = () => {
$router.back()
}
-// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认保存吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then((res) => {
- ruleForm.value.attachments = tableRef.value.list
- ruleForm.value.technicalTargetList = technologyRef.value.list
- editInfo(ruleForm.value).then((res) => {
- console.log(res.data, '123')
- ElMessage.success('保存成功')
- submitId.value = res.data
- })
- })
- }
- })
-}
-// 提交
-const submitForm = () => {
- if (!submitId.value) {
- ElMessage.warning('请先保存')
- return false
- }
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then((res) => {
- submitInfo({ id: submitId.value, formId: SCHEDULE.DEVICE_INFO_APPROVAL }).then((res) => {
- ElMessage.success('已提交')
- close()
- })
- })
-}
// 取消
const resetForm = (formEl: FormInstance | undefined) => {
formEl?.resetFields()
diff --git a/src/views/tested/device/certificate/index.vue b/src/views/tested/device/certificate/index.vue
index 175d029..c9e74e7 100644
--- a/src/views/tested/device/certificate/index.vue
+++ b/src/views/tested/device/certificate/index.vue
@@ -3,41 +3,50 @@
import { reactive, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { getCertificateList } from '@/api/eqpt/device/certificate'
+import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model'
const { proxy } = getCurrentInstance() as any
const listQuery = reactive({
- approvalStatus: '',
- certificateName: '',
- certificateNo: '',
certificateValidEnd: '',
certificateValidStart: '',
- checkOrganization: '',
equipmentName: '',
- equipmentNo: '',
- offset: 1,
- limit: 20,
+ model: '',
+ manufactureNo: '',
+ companyId: '',
+ deptIds: '',
+ usePosition: '',
+ directorName: '',
+ checkOrganization: '',
+ certificateNo: '',
+ offset: 20,
+ limit: 1,
})
const columns = ref([
{
- text: '证书编号',
- value: 'certificateNo',
- align: 'center',
- },
- {
- text: '证书名称',
- value: 'certificateName',
- align: 'center',
- },
- {
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
},
{
+ text: '规格型号',
+ value: 'model',
+ align: 'center',
+ },
+ {
+ text: '出厂编号',
+ value: 'manufactureNo',
+ align: 'center',
+ },
+ {
+ text: '所在单位',
+ value: 'companyName',
+ align: 'center',
+ },
+ {
+ text: '使用部门',
+ value: 'deptName',
+ align: 'center',
+ },
+ {
text: '校准(检定)单位',
value: 'checkOrganization',
align: 'center',
@@ -48,6 +57,11 @@
align: 'center',
},
{
+ text: '证书编号',
+ value: 'certificateNo',
+ align: 'center',
+ },
+ {
text: '证书有效期',
value: 'certificateValid',
align: 'center',
@@ -112,18 +126,51 @@
})
const reset = () => {
range.value = []
- listQuery.approvalStatus = ''
- listQuery.certificateName = ''
- listQuery.certificateNo = ''
listQuery.certificateValidEnd = ''
listQuery.certificateValidStart = ''
- listQuery.checkOrganization = ''
listQuery.equipmentName = ''
- listQuery.equipmentNo = ''
+ listQuery.model = ''
+ listQuery.manufactureNo = ''
+ listQuery.companyId = ''
+ listQuery.deptIds = ''
+ listQuery.usePosition = ''
+ listQuery.directorName = ''
+ listQuery.checkOrganization = ''
+ listQuery.certificateNo = ''
listQuery.offset = 20
listQuery.limit = 1
search()
}
+// 设备名称
+const deviceNameList = ref([])
+// 规格型号
+const modelList = ref([])
+const allList = ref([])
+const fetchDict = () => {
+ // 设备名称
+ getDeviceNameList().then((res) => {
+ deviceNameList.value = res.data
+ })
+ // 规格型号
+ getModelAllList({}).then((res) => {
+ allList.value = res.data
+ modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
+ })
+}
+fetchDict()
+// 监听设备名称下拉框,修改规格型号和辅助字段
+watch(() => listQuery.equipmentName, (newVal) => {
+ if (newVal) {
+ listQuery.model = ''
+ // 修改规格型号和辅助字段列表
+ const data = allList.value.filter(item => item.equipmentName === newVal)
+ modelList.value = Array.from(new Set(data.filter(item => item.model).map(item => item.model)))
+ }
+ else {
+ listQuery.model = ''
+ modelList.value = Array.from(new Set(allList.value.filter(item => item.model).map(item => item.model)))
+ }
+})
@@ -131,6 +178,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/assets/icons/icon-zhankai.svg b/src/assets/icons/icon-zhankai.svg
new file mode 100644
index 0000000..bb5a83c
--- /dev/null
+++ b/src/assets/icons/icon-zhankai.svg
@@ -0,0 +1 @@
+
diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue
index aefbd8b..d3cac7c 100644
--- a/src/components/NormalTable/index.vue
+++ b/src/components/NormalTable/index.vue
@@ -51,6 +51,10 @@
return null
},
},
+ tableRowClassName: {
+ type: String,
+ default: '',
+ },
// 数据总数
total: {
type: Number,
@@ -195,6 +199,15 @@
}
}
}
+// 筛选功能
+const filterHandler = (
+ value: string,
+ row: any,
+ column: any,
+) => {
+ const property = column.property
+ return row[property] === value
+}
@@ -210,6 +223,7 @@
:size="size"
:default-sort="props.sort"
:show-header="showHeader"
+ :row-class-name="props.tableRowClassName"
style="width: 100%;"
@selection-change="handleSelectionChange"
@select="selectClick"
@@ -224,7 +238,7 @@
-
+
{{ scope.row[column.value] }}
{{ column.filter(scope.row) }}
@@ -271,4 +285,8 @@
display: none !important;
}
}
+
+// .danger-class {
+// background-color: #ff00004a !important;
+// }
diff --git a/src/components/NormalTable/table_interface.ts b/src/components/NormalTable/table_interface.ts
index d1f5b24..bda01b3 100644
--- a/src/components/NormalTable/table_interface.ts
+++ b/src/components/NormalTable/table_interface.ts
@@ -8,5 +8,6 @@
filter?: Function // 字段过滤器
styleFilter?: Function // 文字过滤器
fixed?: boolean // 固定列
+ filters?: Array // 筛选行数据
}
diff --git a/src/components/SearchArea/index.vue b/src/components/SearchArea/index.vue
index 475f4ad..55f8cf9 100644
--- a/src/components/SearchArea/index.vue
+++ b/src/components/SearchArea/index.vue
@@ -93,6 +93,7 @@
+
查询
diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue
index ed89a1c..aad4174 100644
--- a/src/components/drawer/approverDrawer.vue
+++ b/src/components/drawer/approverDrawer.vue
@@ -66,13 +66,22 @@
checkedRoleList.value = approverConfig.value.nodeUserList
}
// 选择好成员
-const sureApprover = (data: IEmployees) => {
- approverConfig.value.nodeUserList = data
+const sureApprover = (data: IEmployees[]) => {
+ data.forEach((user: IEmployees) => {
+ if (approverConfig.value.nodeUserList.every((ele: IEmployees) => ele.id !== user.id)) {
+ approverConfig.value.nodeUserList.push(user)
+ }
+ })
approverVisible.value = false
}
// 选择好角色
-const sureRoleApprover = (data: IroleInfo) => {
- approverConfig.value.nodeUserList = data
+const sureRoleApprover = (data: IroleInfo[]) => {
+ data.forEach((role: IroleInfo) => {
+ if (approverConfig.value.nodeUserList.every((ele: IroleInfo) => ele.id !== role.id)) {
+ approverConfig.value.nodeUserList.push(role)
+ }
+ })
+ // approverConfig.value.nodeUserList = data
approverRoleVisible.value = false
}
// 点击确定,保存审批设置
diff --git a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
index 01bb831..ac3c413 100644
--- a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
@@ -39,11 +39,6 @@
// 表头
const columns = ref
([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -59,8 +54,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -68,6 +68,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -78,6 +79,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -196,13 +202,12 @@
-
+
+ -->
+
diff --git a/src/views/tested/MeasurementPlan/plan/components/table.vue b/src/views/tested/MeasurementPlan/plan/components/table.vue
index b8877a6..52ed729 100644
--- a/src/views/tested/MeasurementPlan/plan/components/table.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/table.vue
@@ -127,25 +127,27 @@
// 判断是单选还是多选
if (Array.isArray(device)) {
- const data = list.value.filter((item) => {
- return device.some((child: any) => child.id === item.equipmentId)
- })
- if (data.length) {
- ElMessage.warning('选择设备重复')
- return
- }
+ // const data = list.value.filter((item) => {
+ // return device.some((child: any) => child.id === item.equipmentId)
+ // })
+ // if (data.length) {
+ // ElMessage.warning('选择设备重复')
+ // return
+ // }
// 多选
device.forEach((item) => {
- list.value.push({
- ...item,
- equipmentId: item.id,
- id: null,
- groupId: null,
- editable: true,
- planId: '',
- planName: '',
- planNo: '',
- })
+ if (list.value.every(citem => citem.equipmentId !== item.id)) {
+ list.value.push({
+ ...item,
+ equipmentId: item.id,
+ id: null,
+ groupId: null,
+ editable: true,
+ planId: '',
+ planName: '',
+ planNo: '',
+ })
+ }
})
}
else {
diff --git a/src/views/tested/MeasurementPlan/task/index.vue b/src/views/tested/MeasurementPlan/task/index.vue
index 6685a24..570ae29 100644
--- a/src/views/tested/MeasurementPlan/task/index.vue
+++ b/src/views/tested/MeasurementPlan/task/index.vue
@@ -38,11 +38,26 @@
align: 'center',
},
{
- text: '溯源单位',
- value: 'measureCompany',
+ text: '使用部门',
+ value: 'deptName',
align: 'center',
},
{
+ text: '使用岗位',
+ value: 'usePosition',
+ align: 'center',
+ },
+ {
+ text: '检定单位',
+ value: 'checkOrganization',
+ align: 'center',
+ },
+ // {
+ // text: '溯源单位',
+ // value: 'measureCompany',
+ // align: 'center',
+ // },
+ {
text: '创建人',
value: 'createUserName',
align: 'center',
@@ -143,24 +158,41 @@
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tested/device/certificate/components/edit.vue b/src/views/tested/device/certificate/components/edit.vue
index ad74c4d..de32a93 100644
--- a/src/views/tested/device/certificate/components/edit.vue
+++ b/src/views/tested/device/certificate/components/edit.vue
@@ -49,52 +49,6 @@
const close = () => {
$router.back()
}
-// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认保存吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then((res) => {
- ruleForm.value.attachments = tableRef.value.list
- ruleForm.value.technicalTargetList = technologyRef.value.list
- editInfo(ruleForm.value).then((res) => {
- console.log(res.data, '123')
- ElMessage.success('保存成功')
- submitId.value = res.data
- })
- })
- }
- })
-}
-// 提交
-const submitForm = () => {
- if (!submitId.value) {
- ElMessage.warning('请先保存')
- return false
- }
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then((res) => {
- submitInfo({ id: submitId.value, formId: SCHEDULE.DEVICE_INFO_APPROVAL }).then((res) => {
- ElMessage.success('已提交')
- close()
- })
- })
-}
// 取消
const resetForm = (formEl: FormInstance | undefined) => {
formEl?.resetFields()
diff --git a/src/views/tested/device/certificate/index.vue b/src/views/tested/device/certificate/index.vue
index 175d029..c9e74e7 100644
--- a/src/views/tested/device/certificate/index.vue
+++ b/src/views/tested/device/certificate/index.vue
@@ -3,41 +3,50 @@
import { reactive, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { getCertificateList } from '@/api/eqpt/device/certificate'
+import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model'
const { proxy } = getCurrentInstance() as any
const listQuery = reactive({
- approvalStatus: '',
- certificateName: '',
- certificateNo: '',
certificateValidEnd: '',
certificateValidStart: '',
- checkOrganization: '',
equipmentName: '',
- equipmentNo: '',
- offset: 1,
- limit: 20,
+ model: '',
+ manufactureNo: '',
+ companyId: '',
+ deptIds: '',
+ usePosition: '',
+ directorName: '',
+ checkOrganization: '',
+ certificateNo: '',
+ offset: 20,
+ limit: 1,
})
const columns = ref([
{
- text: '证书编号',
- value: 'certificateNo',
- align: 'center',
- },
- {
- text: '证书名称',
- value: 'certificateName',
- align: 'center',
- },
- {
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
},
{
+ text: '规格型号',
+ value: 'model',
+ align: 'center',
+ },
+ {
+ text: '出厂编号',
+ value: 'manufactureNo',
+ align: 'center',
+ },
+ {
+ text: '所在单位',
+ value: 'companyName',
+ align: 'center',
+ },
+ {
+ text: '使用部门',
+ value: 'deptName',
+ align: 'center',
+ },
+ {
text: '校准(检定)单位',
value: 'checkOrganization',
align: 'center',
@@ -48,6 +57,11 @@
align: 'center',
},
{
+ text: '证书编号',
+ value: 'certificateNo',
+ align: 'center',
+ },
+ {
text: '证书有效期',
value: 'certificateValid',
align: 'center',
@@ -112,18 +126,51 @@
})
const reset = () => {
range.value = []
- listQuery.approvalStatus = ''
- listQuery.certificateName = ''
- listQuery.certificateNo = ''
listQuery.certificateValidEnd = ''
listQuery.certificateValidStart = ''
- listQuery.checkOrganization = ''
listQuery.equipmentName = ''
- listQuery.equipmentNo = ''
+ listQuery.model = ''
+ listQuery.manufactureNo = ''
+ listQuery.companyId = ''
+ listQuery.deptIds = ''
+ listQuery.usePosition = ''
+ listQuery.directorName = ''
+ listQuery.checkOrganization = ''
+ listQuery.certificateNo = ''
listQuery.offset = 20
listQuery.limit = 1
search()
}
+// 设备名称
+const deviceNameList = ref([])
+// 规格型号
+const modelList = ref([])
+const allList = ref([])
+const fetchDict = () => {
+ // 设备名称
+ getDeviceNameList().then((res) => {
+ deviceNameList.value = res.data
+ })
+ // 规格型号
+ getModelAllList({}).then((res) => {
+ allList.value = res.data
+ modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
+ })
+}
+fetchDict()
+// 监听设备名称下拉框,修改规格型号和辅助字段
+watch(() => listQuery.equipmentName, (newVal) => {
+ if (newVal) {
+ listQuery.model = ''
+ // 修改规格型号和辅助字段列表
+ const data = allList.value.filter(item => item.equipmentName === newVal)
+ modelList.value = Array.from(new Set(data.filter(item => item.model).map(item => item.model)))
+ }
+ else {
+ listQuery.model = ''
+ modelList.value = Array.from(new Set(allList.value.filter(item => item.model).map(item => item.model)))
+ }
+})
@@ -131,6 +178,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tested/device/group/components/selectDevice.vue b/src/views/tested/device/group/components/selectDevice.vue
index ce18fc2..c519728 100644
--- a/src/views/tested/device/group/components/selectDevice.vue
+++ b/src/views/tested/device/group/components/selectDevice.vue
@@ -53,11 +53,6 @@
// 表头
const columns = ref([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -73,8 +68,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -82,6 +82,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -92,6 +93,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -209,13 +215,12 @@
-
+
+ -->
+
diff --git a/src/assets/icons/icon-zhankai.svg b/src/assets/icons/icon-zhankai.svg
new file mode 100644
index 0000000..bb5a83c
--- /dev/null
+++ b/src/assets/icons/icon-zhankai.svg
@@ -0,0 +1 @@
+
diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue
index aefbd8b..d3cac7c 100644
--- a/src/components/NormalTable/index.vue
+++ b/src/components/NormalTable/index.vue
@@ -51,6 +51,10 @@
return null
},
},
+ tableRowClassName: {
+ type: String,
+ default: '',
+ },
// 数据总数
total: {
type: Number,
@@ -195,6 +199,15 @@
}
}
}
+// 筛选功能
+const filterHandler = (
+ value: string,
+ row: any,
+ column: any,
+) => {
+ const property = column.property
+ return row[property] === value
+}
@@ -210,6 +223,7 @@
:size="size"
:default-sort="props.sort"
:show-header="showHeader"
+ :row-class-name="props.tableRowClassName"
style="width: 100%;"
@selection-change="handleSelectionChange"
@select="selectClick"
@@ -224,7 +238,7 @@
-
+
{{ scope.row[column.value] }}
{{ column.filter(scope.row) }}
@@ -271,4 +285,8 @@
display: none !important;
}
}
+
+// .danger-class {
+// background-color: #ff00004a !important;
+// }
diff --git a/src/components/NormalTable/table_interface.ts b/src/components/NormalTable/table_interface.ts
index d1f5b24..bda01b3 100644
--- a/src/components/NormalTable/table_interface.ts
+++ b/src/components/NormalTable/table_interface.ts
@@ -8,5 +8,6 @@
filter?: Function // 字段过滤器
styleFilter?: Function // 文字过滤器
fixed?: boolean // 固定列
+ filters?: Array // 筛选行数据
}
diff --git a/src/components/SearchArea/index.vue b/src/components/SearchArea/index.vue
index 475f4ad..55f8cf9 100644
--- a/src/components/SearchArea/index.vue
+++ b/src/components/SearchArea/index.vue
@@ -93,6 +93,7 @@
+
查询
diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue
index ed89a1c..aad4174 100644
--- a/src/components/drawer/approverDrawer.vue
+++ b/src/components/drawer/approverDrawer.vue
@@ -66,13 +66,22 @@
checkedRoleList.value = approverConfig.value.nodeUserList
}
// 选择好成员
-const sureApprover = (data: IEmployees) => {
- approverConfig.value.nodeUserList = data
+const sureApprover = (data: IEmployees[]) => {
+ data.forEach((user: IEmployees) => {
+ if (approverConfig.value.nodeUserList.every((ele: IEmployees) => ele.id !== user.id)) {
+ approverConfig.value.nodeUserList.push(user)
+ }
+ })
approverVisible.value = false
}
// 选择好角色
-const sureRoleApprover = (data: IroleInfo) => {
- approverConfig.value.nodeUserList = data
+const sureRoleApprover = (data: IroleInfo[]) => {
+ data.forEach((role: IroleInfo) => {
+ if (approverConfig.value.nodeUserList.every((ele: IroleInfo) => ele.id !== role.id)) {
+ approverConfig.value.nodeUserList.push(role)
+ }
+ })
+ // approverConfig.value.nodeUserList = data
approverRoleVisible.value = false
}
// 点击确定,保存审批设置
diff --git a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
index 01bb831..ac3c413 100644
--- a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
@@ -39,11 +39,6 @@
// 表头
const columns = ref
([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -59,8 +54,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -68,6 +68,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -78,6 +79,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -196,13 +202,12 @@
-
+
+ -->
+
diff --git a/src/views/tested/MeasurementPlan/plan/components/table.vue b/src/views/tested/MeasurementPlan/plan/components/table.vue
index b8877a6..52ed729 100644
--- a/src/views/tested/MeasurementPlan/plan/components/table.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/table.vue
@@ -127,25 +127,27 @@
// 判断是单选还是多选
if (Array.isArray(device)) {
- const data = list.value.filter((item) => {
- return device.some((child: any) => child.id === item.equipmentId)
- })
- if (data.length) {
- ElMessage.warning('选择设备重复')
- return
- }
+ // const data = list.value.filter((item) => {
+ // return device.some((child: any) => child.id === item.equipmentId)
+ // })
+ // if (data.length) {
+ // ElMessage.warning('选择设备重复')
+ // return
+ // }
// 多选
device.forEach((item) => {
- list.value.push({
- ...item,
- equipmentId: item.id,
- id: null,
- groupId: null,
- editable: true,
- planId: '',
- planName: '',
- planNo: '',
- })
+ if (list.value.every(citem => citem.equipmentId !== item.id)) {
+ list.value.push({
+ ...item,
+ equipmentId: item.id,
+ id: null,
+ groupId: null,
+ editable: true,
+ planId: '',
+ planName: '',
+ planNo: '',
+ })
+ }
})
}
else {
diff --git a/src/views/tested/MeasurementPlan/task/index.vue b/src/views/tested/MeasurementPlan/task/index.vue
index 6685a24..570ae29 100644
--- a/src/views/tested/MeasurementPlan/task/index.vue
+++ b/src/views/tested/MeasurementPlan/task/index.vue
@@ -38,11 +38,26 @@
align: 'center',
},
{
- text: '溯源单位',
- value: 'measureCompany',
+ text: '使用部门',
+ value: 'deptName',
align: 'center',
},
{
+ text: '使用岗位',
+ value: 'usePosition',
+ align: 'center',
+ },
+ {
+ text: '检定单位',
+ value: 'checkOrganization',
+ align: 'center',
+ },
+ // {
+ // text: '溯源单位',
+ // value: 'measureCompany',
+ // align: 'center',
+ // },
+ {
text: '创建人',
value: 'createUserName',
align: 'center',
@@ -143,24 +158,41 @@
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tested/device/certificate/components/edit.vue b/src/views/tested/device/certificate/components/edit.vue
index ad74c4d..de32a93 100644
--- a/src/views/tested/device/certificate/components/edit.vue
+++ b/src/views/tested/device/certificate/components/edit.vue
@@ -49,52 +49,6 @@
const close = () => {
$router.back()
}
-// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认保存吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then((res) => {
- ruleForm.value.attachments = tableRef.value.list
- ruleForm.value.technicalTargetList = technologyRef.value.list
- editInfo(ruleForm.value).then((res) => {
- console.log(res.data, '123')
- ElMessage.success('保存成功')
- submitId.value = res.data
- })
- })
- }
- })
-}
-// 提交
-const submitForm = () => {
- if (!submitId.value) {
- ElMessage.warning('请先保存')
- return false
- }
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then((res) => {
- submitInfo({ id: submitId.value, formId: SCHEDULE.DEVICE_INFO_APPROVAL }).then((res) => {
- ElMessage.success('已提交')
- close()
- })
- })
-}
// 取消
const resetForm = (formEl: FormInstance | undefined) => {
formEl?.resetFields()
diff --git a/src/views/tested/device/certificate/index.vue b/src/views/tested/device/certificate/index.vue
index 175d029..c9e74e7 100644
--- a/src/views/tested/device/certificate/index.vue
+++ b/src/views/tested/device/certificate/index.vue
@@ -3,41 +3,50 @@
import { reactive, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { getCertificateList } from '@/api/eqpt/device/certificate'
+import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model'
const { proxy } = getCurrentInstance() as any
const listQuery = reactive({
- approvalStatus: '',
- certificateName: '',
- certificateNo: '',
certificateValidEnd: '',
certificateValidStart: '',
- checkOrganization: '',
equipmentName: '',
- equipmentNo: '',
- offset: 1,
- limit: 20,
+ model: '',
+ manufactureNo: '',
+ companyId: '',
+ deptIds: '',
+ usePosition: '',
+ directorName: '',
+ checkOrganization: '',
+ certificateNo: '',
+ offset: 20,
+ limit: 1,
})
const columns = ref([
{
- text: '证书编号',
- value: 'certificateNo',
- align: 'center',
- },
- {
- text: '证书名称',
- value: 'certificateName',
- align: 'center',
- },
- {
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
},
{
+ text: '规格型号',
+ value: 'model',
+ align: 'center',
+ },
+ {
+ text: '出厂编号',
+ value: 'manufactureNo',
+ align: 'center',
+ },
+ {
+ text: '所在单位',
+ value: 'companyName',
+ align: 'center',
+ },
+ {
+ text: '使用部门',
+ value: 'deptName',
+ align: 'center',
+ },
+ {
text: '校准(检定)单位',
value: 'checkOrganization',
align: 'center',
@@ -48,6 +57,11 @@
align: 'center',
},
{
+ text: '证书编号',
+ value: 'certificateNo',
+ align: 'center',
+ },
+ {
text: '证书有效期',
value: 'certificateValid',
align: 'center',
@@ -112,18 +126,51 @@
})
const reset = () => {
range.value = []
- listQuery.approvalStatus = ''
- listQuery.certificateName = ''
- listQuery.certificateNo = ''
listQuery.certificateValidEnd = ''
listQuery.certificateValidStart = ''
- listQuery.checkOrganization = ''
listQuery.equipmentName = ''
- listQuery.equipmentNo = ''
+ listQuery.model = ''
+ listQuery.manufactureNo = ''
+ listQuery.companyId = ''
+ listQuery.deptIds = ''
+ listQuery.usePosition = ''
+ listQuery.directorName = ''
+ listQuery.checkOrganization = ''
+ listQuery.certificateNo = ''
listQuery.offset = 20
listQuery.limit = 1
search()
}
+// 设备名称
+const deviceNameList = ref([])
+// 规格型号
+const modelList = ref([])
+const allList = ref([])
+const fetchDict = () => {
+ // 设备名称
+ getDeviceNameList().then((res) => {
+ deviceNameList.value = res.data
+ })
+ // 规格型号
+ getModelAllList({}).then((res) => {
+ allList.value = res.data
+ modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
+ })
+}
+fetchDict()
+// 监听设备名称下拉框,修改规格型号和辅助字段
+watch(() => listQuery.equipmentName, (newVal) => {
+ if (newVal) {
+ listQuery.model = ''
+ // 修改规格型号和辅助字段列表
+ const data = allList.value.filter(item => item.equipmentName === newVal)
+ modelList.value = Array.from(new Set(data.filter(item => item.model).map(item => item.model)))
+ }
+ else {
+ listQuery.model = ''
+ modelList.value = Array.from(new Set(allList.value.filter(item => item.model).map(item => item.model)))
+ }
+})
@@ -131,6 +178,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tested/device/group/components/selectDevice.vue b/src/views/tested/device/group/components/selectDevice.vue
index ce18fc2..c519728 100644
--- a/src/views/tested/device/group/components/selectDevice.vue
+++ b/src/views/tested/device/group/components/selectDevice.vue
@@ -53,11 +53,6 @@
// 表头
const columns = ref([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -73,8 +68,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -82,6 +82,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -92,6 +93,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -209,13 +215,12 @@
-
+
+ -->
+
diff --git a/src/views/tested/device/group/components/tableList.vue b/src/views/tested/device/group/components/tableList.vue
index 2ede3c1..5db85d5 100644
--- a/src/views/tested/device/group/components/tableList.vue
+++ b/src/views/tested/device/group/components/tableList.vue
@@ -2,6 +2,7 @@
+
扫描增加
+
+ 批量增加
+
增加行
@@ -175,7 +254,7 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
+ {{ scope.row[item.value] }}
-
+ /> -->
+
+ {{ scope.row[item.value] }}
+
diff --git a/src/assets/icons/icon-zhankai.svg b/src/assets/icons/icon-zhankai.svg
new file mode 100644
index 0000000..bb5a83c
--- /dev/null
+++ b/src/assets/icons/icon-zhankai.svg
@@ -0,0 +1 @@
+
diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue
index aefbd8b..d3cac7c 100644
--- a/src/components/NormalTable/index.vue
+++ b/src/components/NormalTable/index.vue
@@ -51,6 +51,10 @@
return null
},
},
+ tableRowClassName: {
+ type: String,
+ default: '',
+ },
// 数据总数
total: {
type: Number,
@@ -195,6 +199,15 @@
}
}
}
+// 筛选功能
+const filterHandler = (
+ value: string,
+ row: any,
+ column: any,
+) => {
+ const property = column.property
+ return row[property] === value
+}
@@ -210,6 +223,7 @@
:size="size"
:default-sort="props.sort"
:show-header="showHeader"
+ :row-class-name="props.tableRowClassName"
style="width: 100%;"
@selection-change="handleSelectionChange"
@select="selectClick"
@@ -224,7 +238,7 @@
-
+
{{ scope.row[column.value] }}
{{ column.filter(scope.row) }}
@@ -271,4 +285,8 @@
display: none !important;
}
}
+
+// .danger-class {
+// background-color: #ff00004a !important;
+// }
diff --git a/src/components/NormalTable/table_interface.ts b/src/components/NormalTable/table_interface.ts
index d1f5b24..bda01b3 100644
--- a/src/components/NormalTable/table_interface.ts
+++ b/src/components/NormalTable/table_interface.ts
@@ -8,5 +8,6 @@
filter?: Function // 字段过滤器
styleFilter?: Function // 文字过滤器
fixed?: boolean // 固定列
+ filters?: Array // 筛选行数据
}
diff --git a/src/components/SearchArea/index.vue b/src/components/SearchArea/index.vue
index 475f4ad..55f8cf9 100644
--- a/src/components/SearchArea/index.vue
+++ b/src/components/SearchArea/index.vue
@@ -93,6 +93,7 @@
+
查询
diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue
index ed89a1c..aad4174 100644
--- a/src/components/drawer/approverDrawer.vue
+++ b/src/components/drawer/approverDrawer.vue
@@ -66,13 +66,22 @@
checkedRoleList.value = approverConfig.value.nodeUserList
}
// 选择好成员
-const sureApprover = (data: IEmployees) => {
- approverConfig.value.nodeUserList = data
+const sureApprover = (data: IEmployees[]) => {
+ data.forEach((user: IEmployees) => {
+ if (approverConfig.value.nodeUserList.every((ele: IEmployees) => ele.id !== user.id)) {
+ approverConfig.value.nodeUserList.push(user)
+ }
+ })
approverVisible.value = false
}
// 选择好角色
-const sureRoleApprover = (data: IroleInfo) => {
- approverConfig.value.nodeUserList = data
+const sureRoleApprover = (data: IroleInfo[]) => {
+ data.forEach((role: IroleInfo) => {
+ if (approverConfig.value.nodeUserList.every((ele: IroleInfo) => ele.id !== role.id)) {
+ approverConfig.value.nodeUserList.push(role)
+ }
+ })
+ // approverConfig.value.nodeUserList = data
approverRoleVisible.value = false
}
// 点击确定,保存审批设置
diff --git a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
index 01bb831..ac3c413 100644
--- a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
@@ -39,11 +39,6 @@
// 表头
const columns = ref
([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -59,8 +54,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -68,6 +68,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -78,6 +79,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -196,13 +202,12 @@
-
+
+ -->
+
diff --git a/src/views/tested/MeasurementPlan/plan/components/table.vue b/src/views/tested/MeasurementPlan/plan/components/table.vue
index b8877a6..52ed729 100644
--- a/src/views/tested/MeasurementPlan/plan/components/table.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/table.vue
@@ -127,25 +127,27 @@
// 判断是单选还是多选
if (Array.isArray(device)) {
- const data = list.value.filter((item) => {
- return device.some((child: any) => child.id === item.equipmentId)
- })
- if (data.length) {
- ElMessage.warning('选择设备重复')
- return
- }
+ // const data = list.value.filter((item) => {
+ // return device.some((child: any) => child.id === item.equipmentId)
+ // })
+ // if (data.length) {
+ // ElMessage.warning('选择设备重复')
+ // return
+ // }
// 多选
device.forEach((item) => {
- list.value.push({
- ...item,
- equipmentId: item.id,
- id: null,
- groupId: null,
- editable: true,
- planId: '',
- planName: '',
- planNo: '',
- })
+ if (list.value.every(citem => citem.equipmentId !== item.id)) {
+ list.value.push({
+ ...item,
+ equipmentId: item.id,
+ id: null,
+ groupId: null,
+ editable: true,
+ planId: '',
+ planName: '',
+ planNo: '',
+ })
+ }
})
}
else {
diff --git a/src/views/tested/MeasurementPlan/task/index.vue b/src/views/tested/MeasurementPlan/task/index.vue
index 6685a24..570ae29 100644
--- a/src/views/tested/MeasurementPlan/task/index.vue
+++ b/src/views/tested/MeasurementPlan/task/index.vue
@@ -38,11 +38,26 @@
align: 'center',
},
{
- text: '溯源单位',
- value: 'measureCompany',
+ text: '使用部门',
+ value: 'deptName',
align: 'center',
},
{
+ text: '使用岗位',
+ value: 'usePosition',
+ align: 'center',
+ },
+ {
+ text: '检定单位',
+ value: 'checkOrganization',
+ align: 'center',
+ },
+ // {
+ // text: '溯源单位',
+ // value: 'measureCompany',
+ // align: 'center',
+ // },
+ {
text: '创建人',
value: 'createUserName',
align: 'center',
@@ -143,24 +158,41 @@
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tested/device/certificate/components/edit.vue b/src/views/tested/device/certificate/components/edit.vue
index ad74c4d..de32a93 100644
--- a/src/views/tested/device/certificate/components/edit.vue
+++ b/src/views/tested/device/certificate/components/edit.vue
@@ -49,52 +49,6 @@
const close = () => {
$router.back()
}
-// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认保存吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then((res) => {
- ruleForm.value.attachments = tableRef.value.list
- ruleForm.value.technicalTargetList = technologyRef.value.list
- editInfo(ruleForm.value).then((res) => {
- console.log(res.data, '123')
- ElMessage.success('保存成功')
- submitId.value = res.data
- })
- })
- }
- })
-}
-// 提交
-const submitForm = () => {
- if (!submitId.value) {
- ElMessage.warning('请先保存')
- return false
- }
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then((res) => {
- submitInfo({ id: submitId.value, formId: SCHEDULE.DEVICE_INFO_APPROVAL }).then((res) => {
- ElMessage.success('已提交')
- close()
- })
- })
-}
// 取消
const resetForm = (formEl: FormInstance | undefined) => {
formEl?.resetFields()
diff --git a/src/views/tested/device/certificate/index.vue b/src/views/tested/device/certificate/index.vue
index 175d029..c9e74e7 100644
--- a/src/views/tested/device/certificate/index.vue
+++ b/src/views/tested/device/certificate/index.vue
@@ -3,41 +3,50 @@
import { reactive, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { getCertificateList } from '@/api/eqpt/device/certificate'
+import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model'
const { proxy } = getCurrentInstance() as any
const listQuery = reactive({
- approvalStatus: '',
- certificateName: '',
- certificateNo: '',
certificateValidEnd: '',
certificateValidStart: '',
- checkOrganization: '',
equipmentName: '',
- equipmentNo: '',
- offset: 1,
- limit: 20,
+ model: '',
+ manufactureNo: '',
+ companyId: '',
+ deptIds: '',
+ usePosition: '',
+ directorName: '',
+ checkOrganization: '',
+ certificateNo: '',
+ offset: 20,
+ limit: 1,
})
const columns = ref([
{
- text: '证书编号',
- value: 'certificateNo',
- align: 'center',
- },
- {
- text: '证书名称',
- value: 'certificateName',
- align: 'center',
- },
- {
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
},
{
+ text: '规格型号',
+ value: 'model',
+ align: 'center',
+ },
+ {
+ text: '出厂编号',
+ value: 'manufactureNo',
+ align: 'center',
+ },
+ {
+ text: '所在单位',
+ value: 'companyName',
+ align: 'center',
+ },
+ {
+ text: '使用部门',
+ value: 'deptName',
+ align: 'center',
+ },
+ {
text: '校准(检定)单位',
value: 'checkOrganization',
align: 'center',
@@ -48,6 +57,11 @@
align: 'center',
},
{
+ text: '证书编号',
+ value: 'certificateNo',
+ align: 'center',
+ },
+ {
text: '证书有效期',
value: 'certificateValid',
align: 'center',
@@ -112,18 +126,51 @@
})
const reset = () => {
range.value = []
- listQuery.approvalStatus = ''
- listQuery.certificateName = ''
- listQuery.certificateNo = ''
listQuery.certificateValidEnd = ''
listQuery.certificateValidStart = ''
- listQuery.checkOrganization = ''
listQuery.equipmentName = ''
- listQuery.equipmentNo = ''
+ listQuery.model = ''
+ listQuery.manufactureNo = ''
+ listQuery.companyId = ''
+ listQuery.deptIds = ''
+ listQuery.usePosition = ''
+ listQuery.directorName = ''
+ listQuery.checkOrganization = ''
+ listQuery.certificateNo = ''
listQuery.offset = 20
listQuery.limit = 1
search()
}
+// 设备名称
+const deviceNameList = ref([])
+// 规格型号
+const modelList = ref([])
+const allList = ref([])
+const fetchDict = () => {
+ // 设备名称
+ getDeviceNameList().then((res) => {
+ deviceNameList.value = res.data
+ })
+ // 规格型号
+ getModelAllList({}).then((res) => {
+ allList.value = res.data
+ modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
+ })
+}
+fetchDict()
+// 监听设备名称下拉框,修改规格型号和辅助字段
+watch(() => listQuery.equipmentName, (newVal) => {
+ if (newVal) {
+ listQuery.model = ''
+ // 修改规格型号和辅助字段列表
+ const data = allList.value.filter(item => item.equipmentName === newVal)
+ modelList.value = Array.from(new Set(data.filter(item => item.model).map(item => item.model)))
+ }
+ else {
+ listQuery.model = ''
+ modelList.value = Array.from(new Set(allList.value.filter(item => item.model).map(item => item.model)))
+ }
+})
@@ -131,6 +178,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tested/device/group/components/selectDevice.vue b/src/views/tested/device/group/components/selectDevice.vue
index ce18fc2..c519728 100644
--- a/src/views/tested/device/group/components/selectDevice.vue
+++ b/src/views/tested/device/group/components/selectDevice.vue
@@ -53,11 +53,6 @@
// 表头
const columns = ref([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -73,8 +68,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -82,6 +82,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -92,6 +93,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -209,13 +215,12 @@
-
+
+ -->
+
diff --git a/src/views/tested/device/group/components/tableList.vue b/src/views/tested/device/group/components/tableList.vue
index 2ede3c1..5db85d5 100644
--- a/src/views/tested/device/group/components/tableList.vue
+++ b/src/views/tested/device/group/components/tableList.vue
@@ -2,6 +2,7 @@
+
扫描增加
+
+ 批量增加
+
增加行
@@ -175,7 +254,7 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
+ {{ scope.row[item.value] }}
-
+ /> -->
+
+ {{ scope.row[item.value] }}
+
diff --git a/src/views/tested/device/info/components/edit.vue b/src/views/tested/device/info/components/edit.vue
index fe45d7e..22c6431 100644
--- a/src/views/tested/device/info/components/edit.vue
+++ b/src/views/tested/device/info/components/edit.vue
@@ -90,7 +90,22 @@
helpInstruction: '', // 辅助字段
companyName: '',
certificateList: [],
+ submission: '0', // 送检状态
}) // 表单
+// 是否展示检定机构等一行信息
+const submissionShow = ref(false)
+// 送检状态
+watch(() => ruleForm.value.submission, (newVal) => {
+ if (newVal === '0') {
+ submissionShow.value = false
+ }
+ else if (newVal === '1') {
+ submissionShow.value = true
+ }
+}, {
+ deep: true,
+})
+// 参试任务
const testTask = ref([])
watch(() => testTask.value, (newVal) => {
if (newVal.length) {
@@ -128,8 +143,8 @@
helpInstruction: [{ required: true, message: '辅助字段必选', trigger: ['blur', 'change'] }],
qualityCondition: [{ required: true, message: '质量状况必填', trigger: ['blur', 'change'] }],
deptId: [{ required: true, message: '使用部门必选', trigger: ['blur', 'change'] }],
- category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
- checkCycle: [{ required: true, message: '检定周期必填', trigger: ['blur', 'change'] }],
+ // category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
+ // checkCycle: [{ required: true, message: '检定周期必填', trigger: ['blur', 'change'] }],
})
const rules2 = ref({
usePosition: [{ required: true, message: '使用岗位必填', trigger: ['blur', 'change'] }],
@@ -240,11 +255,13 @@
const arr = allList.value.filter((item: any) => item.helpInstruction === ruleForm.value.helpInstruction && item.model === ruleForm.value.model && item.equipmentName === ruleForm.value.equipmentName)
if (arr.length) {
const data = arr[0]
+ console.log(data, '选中的设备')
ruleForm.value.category = data.category
// ruleForm.value.remark = data.remark
ruleForm.value.technicalTargetList = data.technicalTargetList
ruleForm.value.checkCycle = data.checkCycle
ruleForm.value.modelId = data.id
+ ruleForm.value.instructionsFile = data.instructionsFile
}
}
// if ((helpList.value.length === 0 || (helpList.value.length === 1)) && ruleForm.value.model && ruleForm.value.equipmentName) {
@@ -793,21 +810,32 @@
+
+
+
+
+
-
+
-
-
-
+
+ {}" />
+
+
-
+
diff --git a/src/assets/icons/icon-zhankai.svg b/src/assets/icons/icon-zhankai.svg
new file mode 100644
index 0000000..bb5a83c
--- /dev/null
+++ b/src/assets/icons/icon-zhankai.svg
@@ -0,0 +1 @@
+
diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue
index aefbd8b..d3cac7c 100644
--- a/src/components/NormalTable/index.vue
+++ b/src/components/NormalTable/index.vue
@@ -51,6 +51,10 @@
return null
},
},
+ tableRowClassName: {
+ type: String,
+ default: '',
+ },
// 数据总数
total: {
type: Number,
@@ -195,6 +199,15 @@
}
}
}
+// 筛选功能
+const filterHandler = (
+ value: string,
+ row: any,
+ column: any,
+) => {
+ const property = column.property
+ return row[property] === value
+}
@@ -210,6 +223,7 @@
:size="size"
:default-sort="props.sort"
:show-header="showHeader"
+ :row-class-name="props.tableRowClassName"
style="width: 100%;"
@selection-change="handleSelectionChange"
@select="selectClick"
@@ -224,7 +238,7 @@
-
+
{{ scope.row[column.value] }}
{{ column.filter(scope.row) }}
@@ -271,4 +285,8 @@
display: none !important;
}
}
+
+// .danger-class {
+// background-color: #ff00004a !important;
+// }
diff --git a/src/components/NormalTable/table_interface.ts b/src/components/NormalTable/table_interface.ts
index d1f5b24..bda01b3 100644
--- a/src/components/NormalTable/table_interface.ts
+++ b/src/components/NormalTable/table_interface.ts
@@ -8,5 +8,6 @@
filter?: Function // 字段过滤器
styleFilter?: Function // 文字过滤器
fixed?: boolean // 固定列
+ filters?: Array // 筛选行数据
}
diff --git a/src/components/SearchArea/index.vue b/src/components/SearchArea/index.vue
index 475f4ad..55f8cf9 100644
--- a/src/components/SearchArea/index.vue
+++ b/src/components/SearchArea/index.vue
@@ -93,6 +93,7 @@
+
查询
diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue
index ed89a1c..aad4174 100644
--- a/src/components/drawer/approverDrawer.vue
+++ b/src/components/drawer/approverDrawer.vue
@@ -66,13 +66,22 @@
checkedRoleList.value = approverConfig.value.nodeUserList
}
// 选择好成员
-const sureApprover = (data: IEmployees) => {
- approverConfig.value.nodeUserList = data
+const sureApprover = (data: IEmployees[]) => {
+ data.forEach((user: IEmployees) => {
+ if (approverConfig.value.nodeUserList.every((ele: IEmployees) => ele.id !== user.id)) {
+ approverConfig.value.nodeUserList.push(user)
+ }
+ })
approverVisible.value = false
}
// 选择好角色
-const sureRoleApprover = (data: IroleInfo) => {
- approverConfig.value.nodeUserList = data
+const sureRoleApprover = (data: IroleInfo[]) => {
+ data.forEach((role: IroleInfo) => {
+ if (approverConfig.value.nodeUserList.every((ele: IroleInfo) => ele.id !== role.id)) {
+ approverConfig.value.nodeUserList.push(role)
+ }
+ })
+ // approverConfig.value.nodeUserList = data
approverRoleVisible.value = false
}
// 点击确定,保存审批设置
diff --git a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
index 01bb831..ac3c413 100644
--- a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
@@ -39,11 +39,6 @@
// 表头
const columns = ref
([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -59,8 +54,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -68,6 +68,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -78,6 +79,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -196,13 +202,12 @@
-
+
+ -->
+
diff --git a/src/views/tested/MeasurementPlan/plan/components/table.vue b/src/views/tested/MeasurementPlan/plan/components/table.vue
index b8877a6..52ed729 100644
--- a/src/views/tested/MeasurementPlan/plan/components/table.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/table.vue
@@ -127,25 +127,27 @@
// 判断是单选还是多选
if (Array.isArray(device)) {
- const data = list.value.filter((item) => {
- return device.some((child: any) => child.id === item.equipmentId)
- })
- if (data.length) {
- ElMessage.warning('选择设备重复')
- return
- }
+ // const data = list.value.filter((item) => {
+ // return device.some((child: any) => child.id === item.equipmentId)
+ // })
+ // if (data.length) {
+ // ElMessage.warning('选择设备重复')
+ // return
+ // }
// 多选
device.forEach((item) => {
- list.value.push({
- ...item,
- equipmentId: item.id,
- id: null,
- groupId: null,
- editable: true,
- planId: '',
- planName: '',
- planNo: '',
- })
+ if (list.value.every(citem => citem.equipmentId !== item.id)) {
+ list.value.push({
+ ...item,
+ equipmentId: item.id,
+ id: null,
+ groupId: null,
+ editable: true,
+ planId: '',
+ planName: '',
+ planNo: '',
+ })
+ }
})
}
else {
diff --git a/src/views/tested/MeasurementPlan/task/index.vue b/src/views/tested/MeasurementPlan/task/index.vue
index 6685a24..570ae29 100644
--- a/src/views/tested/MeasurementPlan/task/index.vue
+++ b/src/views/tested/MeasurementPlan/task/index.vue
@@ -38,11 +38,26 @@
align: 'center',
},
{
- text: '溯源单位',
- value: 'measureCompany',
+ text: '使用部门',
+ value: 'deptName',
align: 'center',
},
{
+ text: '使用岗位',
+ value: 'usePosition',
+ align: 'center',
+ },
+ {
+ text: '检定单位',
+ value: 'checkOrganization',
+ align: 'center',
+ },
+ // {
+ // text: '溯源单位',
+ // value: 'measureCompany',
+ // align: 'center',
+ // },
+ {
text: '创建人',
value: 'createUserName',
align: 'center',
@@ -143,24 +158,41 @@
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tested/device/certificate/components/edit.vue b/src/views/tested/device/certificate/components/edit.vue
index ad74c4d..de32a93 100644
--- a/src/views/tested/device/certificate/components/edit.vue
+++ b/src/views/tested/device/certificate/components/edit.vue
@@ -49,52 +49,6 @@
const close = () => {
$router.back()
}
-// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认保存吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then((res) => {
- ruleForm.value.attachments = tableRef.value.list
- ruleForm.value.technicalTargetList = technologyRef.value.list
- editInfo(ruleForm.value).then((res) => {
- console.log(res.data, '123')
- ElMessage.success('保存成功')
- submitId.value = res.data
- })
- })
- }
- })
-}
-// 提交
-const submitForm = () => {
- if (!submitId.value) {
- ElMessage.warning('请先保存')
- return false
- }
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then((res) => {
- submitInfo({ id: submitId.value, formId: SCHEDULE.DEVICE_INFO_APPROVAL }).then((res) => {
- ElMessage.success('已提交')
- close()
- })
- })
-}
// 取消
const resetForm = (formEl: FormInstance | undefined) => {
formEl?.resetFields()
diff --git a/src/views/tested/device/certificate/index.vue b/src/views/tested/device/certificate/index.vue
index 175d029..c9e74e7 100644
--- a/src/views/tested/device/certificate/index.vue
+++ b/src/views/tested/device/certificate/index.vue
@@ -3,41 +3,50 @@
import { reactive, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { getCertificateList } from '@/api/eqpt/device/certificate'
+import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model'
const { proxy } = getCurrentInstance() as any
const listQuery = reactive({
- approvalStatus: '',
- certificateName: '',
- certificateNo: '',
certificateValidEnd: '',
certificateValidStart: '',
- checkOrganization: '',
equipmentName: '',
- equipmentNo: '',
- offset: 1,
- limit: 20,
+ model: '',
+ manufactureNo: '',
+ companyId: '',
+ deptIds: '',
+ usePosition: '',
+ directorName: '',
+ checkOrganization: '',
+ certificateNo: '',
+ offset: 20,
+ limit: 1,
})
const columns = ref([
{
- text: '证书编号',
- value: 'certificateNo',
- align: 'center',
- },
- {
- text: '证书名称',
- value: 'certificateName',
- align: 'center',
- },
- {
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
},
{
+ text: '规格型号',
+ value: 'model',
+ align: 'center',
+ },
+ {
+ text: '出厂编号',
+ value: 'manufactureNo',
+ align: 'center',
+ },
+ {
+ text: '所在单位',
+ value: 'companyName',
+ align: 'center',
+ },
+ {
+ text: '使用部门',
+ value: 'deptName',
+ align: 'center',
+ },
+ {
text: '校准(检定)单位',
value: 'checkOrganization',
align: 'center',
@@ -48,6 +57,11 @@
align: 'center',
},
{
+ text: '证书编号',
+ value: 'certificateNo',
+ align: 'center',
+ },
+ {
text: '证书有效期',
value: 'certificateValid',
align: 'center',
@@ -112,18 +126,51 @@
})
const reset = () => {
range.value = []
- listQuery.approvalStatus = ''
- listQuery.certificateName = ''
- listQuery.certificateNo = ''
listQuery.certificateValidEnd = ''
listQuery.certificateValidStart = ''
- listQuery.checkOrganization = ''
listQuery.equipmentName = ''
- listQuery.equipmentNo = ''
+ listQuery.model = ''
+ listQuery.manufactureNo = ''
+ listQuery.companyId = ''
+ listQuery.deptIds = ''
+ listQuery.usePosition = ''
+ listQuery.directorName = ''
+ listQuery.checkOrganization = ''
+ listQuery.certificateNo = ''
listQuery.offset = 20
listQuery.limit = 1
search()
}
+// 设备名称
+const deviceNameList = ref([])
+// 规格型号
+const modelList = ref([])
+const allList = ref([])
+const fetchDict = () => {
+ // 设备名称
+ getDeviceNameList().then((res) => {
+ deviceNameList.value = res.data
+ })
+ // 规格型号
+ getModelAllList({}).then((res) => {
+ allList.value = res.data
+ modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
+ })
+}
+fetchDict()
+// 监听设备名称下拉框,修改规格型号和辅助字段
+watch(() => listQuery.equipmentName, (newVal) => {
+ if (newVal) {
+ listQuery.model = ''
+ // 修改规格型号和辅助字段列表
+ const data = allList.value.filter(item => item.equipmentName === newVal)
+ modelList.value = Array.from(new Set(data.filter(item => item.model).map(item => item.model)))
+ }
+ else {
+ listQuery.model = ''
+ modelList.value = Array.from(new Set(allList.value.filter(item => item.model).map(item => item.model)))
+ }
+})
@@ -131,6 +178,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tested/device/group/components/selectDevice.vue b/src/views/tested/device/group/components/selectDevice.vue
index ce18fc2..c519728 100644
--- a/src/views/tested/device/group/components/selectDevice.vue
+++ b/src/views/tested/device/group/components/selectDevice.vue
@@ -53,11 +53,6 @@
// 表头
const columns = ref([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -73,8 +68,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -82,6 +82,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -92,6 +93,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -209,13 +215,12 @@
-
+
+ -->
+
diff --git a/src/views/tested/device/group/components/tableList.vue b/src/views/tested/device/group/components/tableList.vue
index 2ede3c1..5db85d5 100644
--- a/src/views/tested/device/group/components/tableList.vue
+++ b/src/views/tested/device/group/components/tableList.vue
@@ -2,6 +2,7 @@
+
扫描增加
+
+ 批量增加
+
增加行
@@ -175,7 +254,7 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
+ {{ scope.row[item.value] }}
-
+ /> -->
+
+ {{ scope.row[item.value] }}
+
diff --git a/src/views/tested/device/info/components/edit.vue b/src/views/tested/device/info/components/edit.vue
index fe45d7e..22c6431 100644
--- a/src/views/tested/device/info/components/edit.vue
+++ b/src/views/tested/device/info/components/edit.vue
@@ -90,7 +90,22 @@
helpInstruction: '', // 辅助字段
companyName: '',
certificateList: [],
+ submission: '0', // 送检状态
}) // 表单
+// 是否展示检定机构等一行信息
+const submissionShow = ref(false)
+// 送检状态
+watch(() => ruleForm.value.submission, (newVal) => {
+ if (newVal === '0') {
+ submissionShow.value = false
+ }
+ else if (newVal === '1') {
+ submissionShow.value = true
+ }
+}, {
+ deep: true,
+})
+// 参试任务
const testTask = ref([])
watch(() => testTask.value, (newVal) => {
if (newVal.length) {
@@ -128,8 +143,8 @@
helpInstruction: [{ required: true, message: '辅助字段必选', trigger: ['blur', 'change'] }],
qualityCondition: [{ required: true, message: '质量状况必填', trigger: ['blur', 'change'] }],
deptId: [{ required: true, message: '使用部门必选', trigger: ['blur', 'change'] }],
- category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
- checkCycle: [{ required: true, message: '检定周期必填', trigger: ['blur', 'change'] }],
+ // category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
+ // checkCycle: [{ required: true, message: '检定周期必填', trigger: ['blur', 'change'] }],
})
const rules2 = ref({
usePosition: [{ required: true, message: '使用岗位必填', trigger: ['blur', 'change'] }],
@@ -240,11 +255,13 @@
const arr = allList.value.filter((item: any) => item.helpInstruction === ruleForm.value.helpInstruction && item.model === ruleForm.value.model && item.equipmentName === ruleForm.value.equipmentName)
if (arr.length) {
const data = arr[0]
+ console.log(data, '选中的设备')
ruleForm.value.category = data.category
// ruleForm.value.remark = data.remark
ruleForm.value.technicalTargetList = data.technicalTargetList
ruleForm.value.checkCycle = data.checkCycle
ruleForm.value.modelId = data.id
+ ruleForm.value.instructionsFile = data.instructionsFile
}
}
// if ((helpList.value.length === 0 || (helpList.value.length === 1)) && ruleForm.value.model && ruleForm.value.equipmentName) {
@@ -793,21 +810,32 @@
+
+
+
+
+
-
+
-
-
-
+
+ {}" />
+
+
-
+
diff --git a/src/views/tested/device/info/components/list.vue b/src/views/tested/device/info/components/list.vue
index da7765b..472ae0a 100644
--- a/src/views/tested/device/info/components/list.vue
+++ b/src/views/tested/device/info/components/list.vue
@@ -2,6 +2,7 @@
@@ -210,6 +223,7 @@
:size="size"
:default-sort="props.sort"
:show-header="showHeader"
+ :row-class-name="props.tableRowClassName"
style="width: 100%;"
@selection-change="handleSelectionChange"
@select="selectClick"
@@ -224,7 +238,7 @@
-
+
{{ scope.row[column.value] }}
{{ column.filter(scope.row) }}
@@ -271,4 +285,8 @@
display: none !important;
}
}
+
+// .danger-class {
+// background-color: #ff00004a !important;
+// }
diff --git a/src/components/NormalTable/table_interface.ts b/src/components/NormalTable/table_interface.ts
index d1f5b24..bda01b3 100644
--- a/src/components/NormalTable/table_interface.ts
+++ b/src/components/NormalTable/table_interface.ts
@@ -8,5 +8,6 @@
filter?: Function // 字段过滤器
styleFilter?: Function // 文字过滤器
fixed?: boolean // 固定列
+ filters?: Array // 筛选行数据
}
diff --git a/src/components/SearchArea/index.vue b/src/components/SearchArea/index.vue
index 475f4ad..55f8cf9 100644
--- a/src/components/SearchArea/index.vue
+++ b/src/components/SearchArea/index.vue
@@ -93,6 +93,7 @@
+
查询
diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue
index ed89a1c..aad4174 100644
--- a/src/components/drawer/approverDrawer.vue
+++ b/src/components/drawer/approverDrawer.vue
@@ -66,13 +66,22 @@
checkedRoleList.value = approverConfig.value.nodeUserList
}
// 选择好成员
-const sureApprover = (data: IEmployees) => {
- approverConfig.value.nodeUserList = data
+const sureApprover = (data: IEmployees[]) => {
+ data.forEach((user: IEmployees) => {
+ if (approverConfig.value.nodeUserList.every((ele: IEmployees) => ele.id !== user.id)) {
+ approverConfig.value.nodeUserList.push(user)
+ }
+ })
approverVisible.value = false
}
// 选择好角色
-const sureRoleApprover = (data: IroleInfo) => {
- approverConfig.value.nodeUserList = data
+const sureRoleApprover = (data: IroleInfo[]) => {
+ data.forEach((role: IroleInfo) => {
+ if (approverConfig.value.nodeUserList.every((ele: IroleInfo) => ele.id !== role.id)) {
+ approverConfig.value.nodeUserList.push(role)
+ }
+ })
+ // approverConfig.value.nodeUserList = data
approverRoleVisible.value = false
}
// 点击确定,保存审批设置
diff --git a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
index 01bb831..ac3c413 100644
--- a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
@@ -39,11 +39,6 @@
// 表头
const columns = ref
([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -59,8 +54,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -68,6 +68,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -78,6 +79,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -196,13 +202,12 @@
-
+
+ -->
+
diff --git a/src/views/tested/MeasurementPlan/plan/components/table.vue b/src/views/tested/MeasurementPlan/plan/components/table.vue
index b8877a6..52ed729 100644
--- a/src/views/tested/MeasurementPlan/plan/components/table.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/table.vue
@@ -127,25 +127,27 @@
// 判断是单选还是多选
if (Array.isArray(device)) {
- const data = list.value.filter((item) => {
- return device.some((child: any) => child.id === item.equipmentId)
- })
- if (data.length) {
- ElMessage.warning('选择设备重复')
- return
- }
+ // const data = list.value.filter((item) => {
+ // return device.some((child: any) => child.id === item.equipmentId)
+ // })
+ // if (data.length) {
+ // ElMessage.warning('选择设备重复')
+ // return
+ // }
// 多选
device.forEach((item) => {
- list.value.push({
- ...item,
- equipmentId: item.id,
- id: null,
- groupId: null,
- editable: true,
- planId: '',
- planName: '',
- planNo: '',
- })
+ if (list.value.every(citem => citem.equipmentId !== item.id)) {
+ list.value.push({
+ ...item,
+ equipmentId: item.id,
+ id: null,
+ groupId: null,
+ editable: true,
+ planId: '',
+ planName: '',
+ planNo: '',
+ })
+ }
})
}
else {
diff --git a/src/views/tested/MeasurementPlan/task/index.vue b/src/views/tested/MeasurementPlan/task/index.vue
index 6685a24..570ae29 100644
--- a/src/views/tested/MeasurementPlan/task/index.vue
+++ b/src/views/tested/MeasurementPlan/task/index.vue
@@ -38,11 +38,26 @@
align: 'center',
},
{
- text: '溯源单位',
- value: 'measureCompany',
+ text: '使用部门',
+ value: 'deptName',
align: 'center',
},
{
+ text: '使用岗位',
+ value: 'usePosition',
+ align: 'center',
+ },
+ {
+ text: '检定单位',
+ value: 'checkOrganization',
+ align: 'center',
+ },
+ // {
+ // text: '溯源单位',
+ // value: 'measureCompany',
+ // align: 'center',
+ // },
+ {
text: '创建人',
value: 'createUserName',
align: 'center',
@@ -143,24 +158,41 @@
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tested/device/certificate/components/edit.vue b/src/views/tested/device/certificate/components/edit.vue
index ad74c4d..de32a93 100644
--- a/src/views/tested/device/certificate/components/edit.vue
+++ b/src/views/tested/device/certificate/components/edit.vue
@@ -49,52 +49,6 @@
const close = () => {
$router.back()
}
-// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认保存吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then((res) => {
- ruleForm.value.attachments = tableRef.value.list
- ruleForm.value.technicalTargetList = technologyRef.value.list
- editInfo(ruleForm.value).then((res) => {
- console.log(res.data, '123')
- ElMessage.success('保存成功')
- submitId.value = res.data
- })
- })
- }
- })
-}
-// 提交
-const submitForm = () => {
- if (!submitId.value) {
- ElMessage.warning('请先保存')
- return false
- }
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then((res) => {
- submitInfo({ id: submitId.value, formId: SCHEDULE.DEVICE_INFO_APPROVAL }).then((res) => {
- ElMessage.success('已提交')
- close()
- })
- })
-}
// 取消
const resetForm = (formEl: FormInstance | undefined) => {
formEl?.resetFields()
diff --git a/src/views/tested/device/certificate/index.vue b/src/views/tested/device/certificate/index.vue
index 175d029..c9e74e7 100644
--- a/src/views/tested/device/certificate/index.vue
+++ b/src/views/tested/device/certificate/index.vue
@@ -3,41 +3,50 @@
import { reactive, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { getCertificateList } from '@/api/eqpt/device/certificate'
+import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model'
const { proxy } = getCurrentInstance() as any
const listQuery = reactive({
- approvalStatus: '',
- certificateName: '',
- certificateNo: '',
certificateValidEnd: '',
certificateValidStart: '',
- checkOrganization: '',
equipmentName: '',
- equipmentNo: '',
- offset: 1,
- limit: 20,
+ model: '',
+ manufactureNo: '',
+ companyId: '',
+ deptIds: '',
+ usePosition: '',
+ directorName: '',
+ checkOrganization: '',
+ certificateNo: '',
+ offset: 20,
+ limit: 1,
})
const columns = ref([
{
- text: '证书编号',
- value: 'certificateNo',
- align: 'center',
- },
- {
- text: '证书名称',
- value: 'certificateName',
- align: 'center',
- },
- {
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
},
{
+ text: '规格型号',
+ value: 'model',
+ align: 'center',
+ },
+ {
+ text: '出厂编号',
+ value: 'manufactureNo',
+ align: 'center',
+ },
+ {
+ text: '所在单位',
+ value: 'companyName',
+ align: 'center',
+ },
+ {
+ text: '使用部门',
+ value: 'deptName',
+ align: 'center',
+ },
+ {
text: '校准(检定)单位',
value: 'checkOrganization',
align: 'center',
@@ -48,6 +57,11 @@
align: 'center',
},
{
+ text: '证书编号',
+ value: 'certificateNo',
+ align: 'center',
+ },
+ {
text: '证书有效期',
value: 'certificateValid',
align: 'center',
@@ -112,18 +126,51 @@
})
const reset = () => {
range.value = []
- listQuery.approvalStatus = ''
- listQuery.certificateName = ''
- listQuery.certificateNo = ''
listQuery.certificateValidEnd = ''
listQuery.certificateValidStart = ''
- listQuery.checkOrganization = ''
listQuery.equipmentName = ''
- listQuery.equipmentNo = ''
+ listQuery.model = ''
+ listQuery.manufactureNo = ''
+ listQuery.companyId = ''
+ listQuery.deptIds = ''
+ listQuery.usePosition = ''
+ listQuery.directorName = ''
+ listQuery.checkOrganization = ''
+ listQuery.certificateNo = ''
listQuery.offset = 20
listQuery.limit = 1
search()
}
+// 设备名称
+const deviceNameList = ref([])
+// 规格型号
+const modelList = ref([])
+const allList = ref([])
+const fetchDict = () => {
+ // 设备名称
+ getDeviceNameList().then((res) => {
+ deviceNameList.value = res.data
+ })
+ // 规格型号
+ getModelAllList({}).then((res) => {
+ allList.value = res.data
+ modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
+ })
+}
+fetchDict()
+// 监听设备名称下拉框,修改规格型号和辅助字段
+watch(() => listQuery.equipmentName, (newVal) => {
+ if (newVal) {
+ listQuery.model = ''
+ // 修改规格型号和辅助字段列表
+ const data = allList.value.filter(item => item.equipmentName === newVal)
+ modelList.value = Array.from(new Set(data.filter(item => item.model).map(item => item.model)))
+ }
+ else {
+ listQuery.model = ''
+ modelList.value = Array.from(new Set(allList.value.filter(item => item.model).map(item => item.model)))
+ }
+})
@@ -131,6 +178,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tested/device/group/components/selectDevice.vue b/src/views/tested/device/group/components/selectDevice.vue
index ce18fc2..c519728 100644
--- a/src/views/tested/device/group/components/selectDevice.vue
+++ b/src/views/tested/device/group/components/selectDevice.vue
@@ -53,11 +53,6 @@
// 表头
const columns = ref([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -73,8 +68,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -82,6 +82,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -92,6 +93,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -209,13 +215,12 @@
-
+
+ -->
+
diff --git a/src/views/tested/device/group/components/tableList.vue b/src/views/tested/device/group/components/tableList.vue
index 2ede3c1..5db85d5 100644
--- a/src/views/tested/device/group/components/tableList.vue
+++ b/src/views/tested/device/group/components/tableList.vue
@@ -2,6 +2,7 @@
+
扫描增加
+
+ 批量增加
+
增加行
@@ -175,7 +254,7 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
+ {{ scope.row[item.value] }}
-
+ /> -->
+
+ {{ scope.row[item.value] }}
+
diff --git a/src/views/tested/device/info/components/edit.vue b/src/views/tested/device/info/components/edit.vue
index fe45d7e..22c6431 100644
--- a/src/views/tested/device/info/components/edit.vue
+++ b/src/views/tested/device/info/components/edit.vue
@@ -90,7 +90,22 @@
helpInstruction: '', // 辅助字段
companyName: '',
certificateList: [],
+ submission: '0', // 送检状态
}) // 表单
+// 是否展示检定机构等一行信息
+const submissionShow = ref(false)
+// 送检状态
+watch(() => ruleForm.value.submission, (newVal) => {
+ if (newVal === '0') {
+ submissionShow.value = false
+ }
+ else if (newVal === '1') {
+ submissionShow.value = true
+ }
+}, {
+ deep: true,
+})
+// 参试任务
const testTask = ref([])
watch(() => testTask.value, (newVal) => {
if (newVal.length) {
@@ -128,8 +143,8 @@
helpInstruction: [{ required: true, message: '辅助字段必选', trigger: ['blur', 'change'] }],
qualityCondition: [{ required: true, message: '质量状况必填', trigger: ['blur', 'change'] }],
deptId: [{ required: true, message: '使用部门必选', trigger: ['blur', 'change'] }],
- category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
- checkCycle: [{ required: true, message: '检定周期必填', trigger: ['blur', 'change'] }],
+ // category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
+ // checkCycle: [{ required: true, message: '检定周期必填', trigger: ['blur', 'change'] }],
})
const rules2 = ref({
usePosition: [{ required: true, message: '使用岗位必填', trigger: ['blur', 'change'] }],
@@ -240,11 +255,13 @@
const arr = allList.value.filter((item: any) => item.helpInstruction === ruleForm.value.helpInstruction && item.model === ruleForm.value.model && item.equipmentName === ruleForm.value.equipmentName)
if (arr.length) {
const data = arr[0]
+ console.log(data, '选中的设备')
ruleForm.value.category = data.category
// ruleForm.value.remark = data.remark
ruleForm.value.technicalTargetList = data.technicalTargetList
ruleForm.value.checkCycle = data.checkCycle
ruleForm.value.modelId = data.id
+ ruleForm.value.instructionsFile = data.instructionsFile
}
}
// if ((helpList.value.length === 0 || (helpList.value.length === 1)) && ruleForm.value.model && ruleForm.value.equipmentName) {
@@ -793,21 +810,32 @@
+
+
+
+
+
-
+
-
-
-
+
+ {}" />
+
+
-
+
diff --git a/src/views/tested/device/info/components/list.vue b/src/views/tested/device/info/components/list.vue
index da7765b..472ae0a 100644
--- a/src/views/tested/device/info/components/list.vue
+++ b/src/views/tested/device/info/components/list.vue
@@ -2,6 +2,7 @@
@@ -210,6 +223,7 @@
:size="size"
:default-sort="props.sort"
:show-header="showHeader"
+ :row-class-name="props.tableRowClassName"
style="width: 100%;"
@selection-change="handleSelectionChange"
@select="selectClick"
@@ -224,7 +238,7 @@
-
+
{{ scope.row[column.value] }}
{{ column.filter(scope.row) }}
@@ -271,4 +285,8 @@
display: none !important;
}
}
+
+// .danger-class {
+// background-color: #ff00004a !important;
+// }
diff --git a/src/components/NormalTable/table_interface.ts b/src/components/NormalTable/table_interface.ts
index d1f5b24..bda01b3 100644
--- a/src/components/NormalTable/table_interface.ts
+++ b/src/components/NormalTable/table_interface.ts
@@ -8,5 +8,6 @@
filter?: Function // 字段过滤器
styleFilter?: Function // 文字过滤器
fixed?: boolean // 固定列
+ filters?: Array // 筛选行数据
}
diff --git a/src/components/SearchArea/index.vue b/src/components/SearchArea/index.vue
index 475f4ad..55f8cf9 100644
--- a/src/components/SearchArea/index.vue
+++ b/src/components/SearchArea/index.vue
@@ -93,6 +93,7 @@
+
查询
diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue
index ed89a1c..aad4174 100644
--- a/src/components/drawer/approverDrawer.vue
+++ b/src/components/drawer/approverDrawer.vue
@@ -66,13 +66,22 @@
checkedRoleList.value = approverConfig.value.nodeUserList
}
// 选择好成员
-const sureApprover = (data: IEmployees) => {
- approverConfig.value.nodeUserList = data
+const sureApprover = (data: IEmployees[]) => {
+ data.forEach((user: IEmployees) => {
+ if (approverConfig.value.nodeUserList.every((ele: IEmployees) => ele.id !== user.id)) {
+ approverConfig.value.nodeUserList.push(user)
+ }
+ })
approverVisible.value = false
}
// 选择好角色
-const sureRoleApprover = (data: IroleInfo) => {
- approverConfig.value.nodeUserList = data
+const sureRoleApprover = (data: IroleInfo[]) => {
+ data.forEach((role: IroleInfo) => {
+ if (approverConfig.value.nodeUserList.every((ele: IroleInfo) => ele.id !== role.id)) {
+ approverConfig.value.nodeUserList.push(role)
+ }
+ })
+ // approverConfig.value.nodeUserList = data
approverRoleVisible.value = false
}
// 点击确定,保存审批设置
diff --git a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
index 01bb831..ac3c413 100644
--- a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue
@@ -39,11 +39,6 @@
// 表头
const columns = ref
([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -59,8 +54,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -68,6 +68,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -78,6 +79,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -196,13 +202,12 @@
-
+
+ -->
+
diff --git a/src/views/tested/MeasurementPlan/plan/components/table.vue b/src/views/tested/MeasurementPlan/plan/components/table.vue
index b8877a6..52ed729 100644
--- a/src/views/tested/MeasurementPlan/plan/components/table.vue
+++ b/src/views/tested/MeasurementPlan/plan/components/table.vue
@@ -127,25 +127,27 @@
// 判断是单选还是多选
if (Array.isArray(device)) {
- const data = list.value.filter((item) => {
- return device.some((child: any) => child.id === item.equipmentId)
- })
- if (data.length) {
- ElMessage.warning('选择设备重复')
- return
- }
+ // const data = list.value.filter((item) => {
+ // return device.some((child: any) => child.id === item.equipmentId)
+ // })
+ // if (data.length) {
+ // ElMessage.warning('选择设备重复')
+ // return
+ // }
// 多选
device.forEach((item) => {
- list.value.push({
- ...item,
- equipmentId: item.id,
- id: null,
- groupId: null,
- editable: true,
- planId: '',
- planName: '',
- planNo: '',
- })
+ if (list.value.every(citem => citem.equipmentId !== item.id)) {
+ list.value.push({
+ ...item,
+ equipmentId: item.id,
+ id: null,
+ groupId: null,
+ editable: true,
+ planId: '',
+ planName: '',
+ planNo: '',
+ })
+ }
})
}
else {
diff --git a/src/views/tested/MeasurementPlan/task/index.vue b/src/views/tested/MeasurementPlan/task/index.vue
index 6685a24..570ae29 100644
--- a/src/views/tested/MeasurementPlan/task/index.vue
+++ b/src/views/tested/MeasurementPlan/task/index.vue
@@ -38,11 +38,26 @@
align: 'center',
},
{
- text: '溯源单位',
- value: 'measureCompany',
+ text: '使用部门',
+ value: 'deptName',
align: 'center',
},
{
+ text: '使用岗位',
+ value: 'usePosition',
+ align: 'center',
+ },
+ {
+ text: '检定单位',
+ value: 'checkOrganization',
+ align: 'center',
+ },
+ // {
+ // text: '溯源单位',
+ // value: 'measureCompany',
+ // align: 'center',
+ // },
+ {
text: '创建人',
value: 'createUserName',
align: 'center',
@@ -143,24 +158,41 @@
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tested/device/certificate/components/edit.vue b/src/views/tested/device/certificate/components/edit.vue
index ad74c4d..de32a93 100644
--- a/src/views/tested/device/certificate/components/edit.vue
+++ b/src/views/tested/device/certificate/components/edit.vue
@@ -49,52 +49,6 @@
const close = () => {
$router.back()
}
-// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) { return }
- await formEl.validate((valid, fields) => {
- if (valid) {
- ElMessageBox.confirm(
- '确认保存吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then((res) => {
- ruleForm.value.attachments = tableRef.value.list
- ruleForm.value.technicalTargetList = technologyRef.value.list
- editInfo(ruleForm.value).then((res) => {
- console.log(res.data, '123')
- ElMessage.success('保存成功')
- submitId.value = res.data
- })
- })
- }
- })
-}
-// 提交
-const submitForm = () => {
- if (!submitId.value) {
- ElMessage.warning('请先保存')
- return false
- }
- ElMessageBox.confirm(
- '确认提交吗?',
- '提示',
- {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- },
- ).then((res) => {
- submitInfo({ id: submitId.value, formId: SCHEDULE.DEVICE_INFO_APPROVAL }).then((res) => {
- ElMessage.success('已提交')
- close()
- })
- })
-}
// 取消
const resetForm = (formEl: FormInstance | undefined) => {
formEl?.resetFields()
diff --git a/src/views/tested/device/certificate/index.vue b/src/views/tested/device/certificate/index.vue
index 175d029..c9e74e7 100644
--- a/src/views/tested/device/certificate/index.vue
+++ b/src/views/tested/device/certificate/index.vue
@@ -3,41 +3,50 @@
import { reactive, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { getCertificateList } from '@/api/eqpt/device/certificate'
+import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model'
const { proxy } = getCurrentInstance() as any
const listQuery = reactive({
- approvalStatus: '',
- certificateName: '',
- certificateNo: '',
certificateValidEnd: '',
certificateValidStart: '',
- checkOrganization: '',
equipmentName: '',
- equipmentNo: '',
- offset: 1,
- limit: 20,
+ model: '',
+ manufactureNo: '',
+ companyId: '',
+ deptIds: '',
+ usePosition: '',
+ directorName: '',
+ checkOrganization: '',
+ certificateNo: '',
+ offset: 20,
+ limit: 1,
})
const columns = ref([
{
- text: '证书编号',
- value: 'certificateNo',
- align: 'center',
- },
- {
- text: '证书名称',
- value: 'certificateName',
- align: 'center',
- },
- {
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
},
{
+ text: '规格型号',
+ value: 'model',
+ align: 'center',
+ },
+ {
+ text: '出厂编号',
+ value: 'manufactureNo',
+ align: 'center',
+ },
+ {
+ text: '所在单位',
+ value: 'companyName',
+ align: 'center',
+ },
+ {
+ text: '使用部门',
+ value: 'deptName',
+ align: 'center',
+ },
+ {
text: '校准(检定)单位',
value: 'checkOrganization',
align: 'center',
@@ -48,6 +57,11 @@
align: 'center',
},
{
+ text: '证书编号',
+ value: 'certificateNo',
+ align: 'center',
+ },
+ {
text: '证书有效期',
value: 'certificateValid',
align: 'center',
@@ -112,18 +126,51 @@
})
const reset = () => {
range.value = []
- listQuery.approvalStatus = ''
- listQuery.certificateName = ''
- listQuery.certificateNo = ''
listQuery.certificateValidEnd = ''
listQuery.certificateValidStart = ''
- listQuery.checkOrganization = ''
listQuery.equipmentName = ''
- listQuery.equipmentNo = ''
+ listQuery.model = ''
+ listQuery.manufactureNo = ''
+ listQuery.companyId = ''
+ listQuery.deptIds = ''
+ listQuery.usePosition = ''
+ listQuery.directorName = ''
+ listQuery.checkOrganization = ''
+ listQuery.certificateNo = ''
listQuery.offset = 20
listQuery.limit = 1
search()
}
+// 设备名称
+const deviceNameList = ref([])
+// 规格型号
+const modelList = ref([])
+const allList = ref([])
+const fetchDict = () => {
+ // 设备名称
+ getDeviceNameList().then((res) => {
+ deviceNameList.value = res.data
+ })
+ // 规格型号
+ getModelAllList({}).then((res) => {
+ allList.value = res.data
+ modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
+ })
+}
+fetchDict()
+// 监听设备名称下拉框,修改规格型号和辅助字段
+watch(() => listQuery.equipmentName, (newVal) => {
+ if (newVal) {
+ listQuery.model = ''
+ // 修改规格型号和辅助字段列表
+ const data = allList.value.filter(item => item.equipmentName === newVal)
+ modelList.value = Array.from(new Set(data.filter(item => item.model).map(item => item.model)))
+ }
+ else {
+ listQuery.model = ''
+ modelList.value = Array.from(new Set(allList.value.filter(item => item.model).map(item => item.model)))
+ }
+})
@@ -131,6 +178,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tested/device/group/components/selectDevice.vue b/src/views/tested/device/group/components/selectDevice.vue
index ce18fc2..c519728 100644
--- a/src/views/tested/device/group/components/selectDevice.vue
+++ b/src/views/tested/device/group/components/selectDevice.vue
@@ -53,11 +53,6 @@
// 表头
const columns = ref([
{
- text: '统一编号',
- value: 'equipmentNo',
- align: 'center',
- },
- {
text: '设备名称',
value: 'equipmentName',
align: 'center',
@@ -73,8 +68,13 @@
align: 'center',
},
{
- text: '使用岗位',
- value: 'usePosition',
+ text: '生产厂家',
+ value: 'manufacturer',
+ align: 'center',
+ },
+ {
+ text: '负责人',
+ value: 'directorName',
align: 'center',
},
{
@@ -82,6 +82,7 @@
value: 'meterIdentifyName',
align: 'center',
},
+
{
text: '使用状态',
value: 'usageStatusName',
@@ -92,6 +93,11 @@
value: 'certificateValid',
align: 'center',
},
+ {
+ text: '安装位置',
+ value: 'installLocation',
+ align: 'center',
+ },
])
// 获取使用状态列表
const useStatusList = ref()
@@ -209,13 +215,12 @@
-
+
+ -->
+
diff --git a/src/views/tested/device/group/components/tableList.vue b/src/views/tested/device/group/components/tableList.vue
index 2ede3c1..5db85d5 100644
--- a/src/views/tested/device/group/components/tableList.vue
+++ b/src/views/tested/device/group/components/tableList.vue
@@ -2,6 +2,7 @@
+
扫描增加
+
+ 批量增加
+
增加行
@@ -175,7 +254,7 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
+ {{ scope.row[item.value] }}
-
+ /> -->
+
+ {{ scope.row[item.value] }}
+
diff --git a/src/views/tested/device/info/components/edit.vue b/src/views/tested/device/info/components/edit.vue
index fe45d7e..22c6431 100644
--- a/src/views/tested/device/info/components/edit.vue
+++ b/src/views/tested/device/info/components/edit.vue
@@ -90,7 +90,22 @@
helpInstruction: '', // 辅助字段
companyName: '',
certificateList: [],
+ submission: '0', // 送检状态
}) // 表单
+// 是否展示检定机构等一行信息
+const submissionShow = ref(false)
+// 送检状态
+watch(() => ruleForm.value.submission, (newVal) => {
+ if (newVal === '0') {
+ submissionShow.value = false
+ }
+ else if (newVal === '1') {
+ submissionShow.value = true
+ }
+}, {
+ deep: true,
+})
+// 参试任务
const testTask = ref([])
watch(() => testTask.value, (newVal) => {
if (newVal.length) {
@@ -128,8 +143,8 @@
helpInstruction: [{ required: true, message: '辅助字段必选', trigger: ['blur', 'change'] }],
qualityCondition: [{ required: true, message: '质量状况必填', trigger: ['blur', 'change'] }],
deptId: [{ required: true, message: '使用部门必选', trigger: ['blur', 'change'] }],
- category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
- checkCycle: [{ required: true, message: '检定周期必填', trigger: ['blur', 'change'] }],
+ // category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
+ // checkCycle: [{ required: true, message: '检定周期必填', trigger: ['blur', 'change'] }],
})
const rules2 = ref({
usePosition: [{ required: true, message: '使用岗位必填', trigger: ['blur', 'change'] }],
@@ -240,11 +255,13 @@
const arr = allList.value.filter((item: any) => item.helpInstruction === ruleForm.value.helpInstruction && item.model === ruleForm.value.model && item.equipmentName === ruleForm.value.equipmentName)
if (arr.length) {
const data = arr[0]
+ console.log(data, '选中的设备')
ruleForm.value.category = data.category
// ruleForm.value.remark = data.remark
ruleForm.value.technicalTargetList = data.technicalTargetList
ruleForm.value.checkCycle = data.checkCycle
ruleForm.value.modelId = data.id
+ ruleForm.value.instructionsFile = data.instructionsFile
}
}
// if ((helpList.value.length === 0 || (helpList.value.length === 1)) && ruleForm.value.model && ruleForm.value.equipmentName) {
@@ -793,21 +810,32 @@
+
+
+
+
+
-
+
-
-
-
+
+ {}" />
+
+
-
+
diff --git a/src/views/tested/device/info/components/list.vue b/src/views/tested/device/info/components/list.vue
index da7765b..472ae0a 100644
--- a/src/views/tested/device/info/components/list.vue
+++ b/src/views/tested/device/info/components/list.vue
@@ -2,6 +2,7 @@
-
+
@@ -282,16 +303,46 @@
-->
-
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -317,9 +368,16 @@
+
+
+ {{ scope.row. certificateValid }}
+
+
+
@@ -337,3 +395,13 @@
+
+