{{ 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/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue
index 6fc4d0f..19e17ae 100644
--- a/src/views/tested/MeasurementPlan/task/components/edit.vue
+++ b/src/views/tested/MeasurementPlan/task/components/edit.vue
@@ -4,10 +4,10 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import tableList from './tableList.vue'
+import { getUserDept, getUserList } from '@/api/system/user'
import { addTask, detailTask, updateTask } from '@/api/eqpt/measurementPlan/task'
import { getDictByCode } from '@/api/system/dict'
import useUserStore from '@/store/modules/user'
-import { getUserDept } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -63,11 +63,11 @@
}
const rules = ref({
deliverer: [{ required: true, message: '送检人必填', trigger: ['blur', 'change'] }],
- customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
+ // customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
customerPhone: [{ required: true, message: '电话必填', trigger: ['blur', 'change'] }],
- maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
+ // maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
planDeliverTime: [{ required: true, message: '预计送达时间必选', trigger: ['blur', 'change'] }],
- requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
+ // requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
isUrgent: [{ required: true, message: '是否加急必选', trigger: ['blur', 'change'] }],
measureCompany: [{ required: true, message: '检定(校准)单位必填', trigger: ['blur', 'change'] }],
undertakerName: [{ required: true, message: '承接人必填', trigger: ['blur', 'change'] }],
@@ -106,10 +106,17 @@
})
// 获取是否加急下拉列表
const isUrgentList = ref<{ id: string; value: string; name: string }[]>()
+// 送检人列表
+const personList = ref()
const fetchListData = () => {
getDictByCode('eqptisUrgent').then((res) => {
isUrgentList.value = res.data
})
+ getUserDept().then((res1) => {
+ getUserList({ offset: 1, limit: 99999, deptId: $route.path.includes('detail') ? '' : res1.data.id }).then((res) => {
+ personList.value = res.data.rows
+ })
+ })
}
fetchListData()
// 关闭弹窗
@@ -200,7 +207,18 @@
-
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
diff --git a/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue
index 6fc4d0f..19e17ae 100644
--- a/src/views/tested/MeasurementPlan/task/components/edit.vue
+++ b/src/views/tested/MeasurementPlan/task/components/edit.vue
@@ -4,10 +4,10 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import tableList from './tableList.vue'
+import { getUserDept, getUserList } from '@/api/system/user'
import { addTask, detailTask, updateTask } from '@/api/eqpt/measurementPlan/task'
import { getDictByCode } from '@/api/system/dict'
import useUserStore from '@/store/modules/user'
-import { getUserDept } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -63,11 +63,11 @@
}
const rules = ref({
deliverer: [{ required: true, message: '送检人必填', trigger: ['blur', 'change'] }],
- customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
+ // customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
customerPhone: [{ required: true, message: '电话必填', trigger: ['blur', 'change'] }],
- maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
+ // maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
planDeliverTime: [{ required: true, message: '预计送达时间必选', trigger: ['blur', 'change'] }],
- requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
+ // requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
isUrgent: [{ required: true, message: '是否加急必选', trigger: ['blur', 'change'] }],
measureCompany: [{ required: true, message: '检定(校准)单位必填', trigger: ['blur', 'change'] }],
undertakerName: [{ required: true, message: '承接人必填', trigger: ['blur', 'change'] }],
@@ -106,10 +106,17 @@
})
// 获取是否加急下拉列表
const isUrgentList = ref<{ id: string; value: string; name: string }[]>()
+// 送检人列表
+const personList = ref()
const fetchListData = () => {
getDictByCode('eqptisUrgent').then((res) => {
isUrgentList.value = res.data
})
+ getUserDept().then((res1) => {
+ getUserList({ offset: 1, limit: 99999, deptId: $route.path.includes('detail') ? '' : res1.data.id }).then((res) => {
+ personList.value = res.data.rows
+ })
+ })
}
fetchListData()
// 关闭弹窗
@@ -200,7 +207,18 @@
-
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index 7a7f676..6777bb8 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -18,23 +18,30 @@
const $route = useRoute()
// 表头显示标题
const columnsHandler = ref([
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
- text: '统一编号',
- value: 'sampleNo',
+ text: '设备名称',
+ value: 'sampleName',
required: true,
isBtn: true,
isUpload: false,
},
{
- text: '设备名称',
- value: 'sampleName',
- required: true,
+ text: '规格型号',
+ value: 'sampleModel',
+ required: false,
isBtn: false,
isUpload: false,
},
{
- text: '型号',
- value: 'sampleModel',
+ text: '生产厂家',
+ value: 'manufacturer',
required: false,
isBtn: false,
isUpload: false,
@@ -47,13 +54,13 @@
isUpload: true,
width: '350px',
},
- {
- text: '外观和功能检查',
- value: 'appearanceInspect',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '外观和功能检查',
+ // value: 'appearanceInspect',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
{
text: '特殊要求',
value: 'specialRequire',
@@ -61,22 +68,22 @@
isBtn: false,
isUpload: false,
},
- {
- text: '检校项目',
- value: 'measureContent',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '检校项目',
+ // value: 'measureContent',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
])
const columnsDetail = ref([
- {
- text: '统一编号',
- value: 'sampleNo',
- required: true,
- isBtn: true,
- isUpload: false,
- },
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
text: '设备名称',
value: 'sampleName',
@@ -85,13 +92,20 @@
isUpload: false,
},
{
- text: '型号',
+ text: '规格型号',
value: 'sampleModel',
required: false,
isBtn: false,
isUpload: false,
},
{
+ text: '生产厂家',
+ value: 'manufacturer',
+ required: false,
+ isBtn: false,
+ isUpload: false,
+ },
+ {
text: '附件',
value: 'appendixDescn',
required: false,
@@ -150,6 +164,7 @@
if (checkCertificateList()) {
setAllRowReadable()
list.value.push({
+ manufacturer: '',
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -189,7 +204,7 @@
const selectRow = ref()
// 单选设备
const select = (text: string, index: any) => {
- if (text === '统一编号') {
+ if (text === '设备名称') {
deviceSingeRef.value.initDialog()
selectRow.value = index
}
@@ -206,22 +221,26 @@
if (Array.isArray(device)) {
// 多选
device.forEach((item) => {
- list.value.push({
- appearanceInspect: '',
- appendixDescn: '',
- measureContent: '',
- sampleModel: item.model,
- sampleNo: item.equipmentNo,
- sampleId: item.id,
- sampleName: item.equipmentName,
- specialRequire: '',
- editable: true,
- })
+ if (!list.value.filter((c: any) => c.sampleId === item.id).length) {
+ list.value.push({
+ appearanceInspect: '',
+ appendixDescn: '',
+ measureContent: '',
+ manufacturer: item.manufacturer,
+ sampleModel: item.model,
+ sampleNo: item.equipmentNo,
+ sampleId: item.id,
+ sampleName: item.equipmentName,
+ specialRequire: '',
+ editable: false,
+ })
+ }
})
}
else {
// 单选
const row = {
+ manufacturer: device.manufacturer,
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -230,7 +249,7 @@
sampleNo: device.equipmentNo,
sampleName: device.equipmentName,
specialRequire: '',
- editable: true,
+ editable: false,
}
list.value[selectRow.value] = row
}
@@ -247,6 +266,7 @@
})
fd.append('multipartFile', event.target.files[0])
uploadApi(fd).then((res) => {
+ fileRef.value.value = ''
if (res.code === 200) {
list.value[currentIndex.value].appendixDescn = res.data[0]
// 重置当前验证
@@ -261,9 +281,12 @@
})
}
}
+const uploadRef = ref()
const upload = (index: number) => {
currentIndex.value = index
+ // window.onclick()
fileRef.value.click()
+ // deviceRef.value?.click()
}
const $router = useRouter()
const deviceDetail = (row: any) => {
@@ -338,10 +361,12 @@
-
+
+
+
diff --git a/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue
index 6fc4d0f..19e17ae 100644
--- a/src/views/tested/MeasurementPlan/task/components/edit.vue
+++ b/src/views/tested/MeasurementPlan/task/components/edit.vue
@@ -4,10 +4,10 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import tableList from './tableList.vue'
+import { getUserDept, getUserList } from '@/api/system/user'
import { addTask, detailTask, updateTask } from '@/api/eqpt/measurementPlan/task'
import { getDictByCode } from '@/api/system/dict'
import useUserStore from '@/store/modules/user'
-import { getUserDept } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -63,11 +63,11 @@
}
const rules = ref({
deliverer: [{ required: true, message: '送检人必填', trigger: ['blur', 'change'] }],
- customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
+ // customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
customerPhone: [{ required: true, message: '电话必填', trigger: ['blur', 'change'] }],
- maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
+ // maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
planDeliverTime: [{ required: true, message: '预计送达时间必选', trigger: ['blur', 'change'] }],
- requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
+ // requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
isUrgent: [{ required: true, message: '是否加急必选', trigger: ['blur', 'change'] }],
measureCompany: [{ required: true, message: '检定(校准)单位必填', trigger: ['blur', 'change'] }],
undertakerName: [{ required: true, message: '承接人必填', trigger: ['blur', 'change'] }],
@@ -106,10 +106,17 @@
})
// 获取是否加急下拉列表
const isUrgentList = ref<{ id: string; value: string; name: string }[]>()
+// 送检人列表
+const personList = ref()
const fetchListData = () => {
getDictByCode('eqptisUrgent').then((res) => {
isUrgentList.value = res.data
})
+ getUserDept().then((res1) => {
+ getUserList({ offset: 1, limit: 99999, deptId: $route.path.includes('detail') ? '' : res1.data.id }).then((res) => {
+ personList.value = res.data.rows
+ })
+ })
}
fetchListData()
// 关闭弹窗
@@ -200,7 +207,18 @@
-
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index 7a7f676..6777bb8 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -18,23 +18,30 @@
const $route = useRoute()
// 表头显示标题
const columnsHandler = ref([
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
- text: '统一编号',
- value: 'sampleNo',
+ text: '设备名称',
+ value: 'sampleName',
required: true,
isBtn: true,
isUpload: false,
},
{
- text: '设备名称',
- value: 'sampleName',
- required: true,
+ text: '规格型号',
+ value: 'sampleModel',
+ required: false,
isBtn: false,
isUpload: false,
},
{
- text: '型号',
- value: 'sampleModel',
+ text: '生产厂家',
+ value: 'manufacturer',
required: false,
isBtn: false,
isUpload: false,
@@ -47,13 +54,13 @@
isUpload: true,
width: '350px',
},
- {
- text: '外观和功能检查',
- value: 'appearanceInspect',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '外观和功能检查',
+ // value: 'appearanceInspect',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
{
text: '特殊要求',
value: 'specialRequire',
@@ -61,22 +68,22 @@
isBtn: false,
isUpload: false,
},
- {
- text: '检校项目',
- value: 'measureContent',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '检校项目',
+ // value: 'measureContent',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
])
const columnsDetail = ref([
- {
- text: '统一编号',
- value: 'sampleNo',
- required: true,
- isBtn: true,
- isUpload: false,
- },
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
text: '设备名称',
value: 'sampleName',
@@ -85,13 +92,20 @@
isUpload: false,
},
{
- text: '型号',
+ text: '规格型号',
value: 'sampleModel',
required: false,
isBtn: false,
isUpload: false,
},
{
+ text: '生产厂家',
+ value: 'manufacturer',
+ required: false,
+ isBtn: false,
+ isUpload: false,
+ },
+ {
text: '附件',
value: 'appendixDescn',
required: false,
@@ -150,6 +164,7 @@
if (checkCertificateList()) {
setAllRowReadable()
list.value.push({
+ manufacturer: '',
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -189,7 +204,7 @@
const selectRow = ref()
// 单选设备
const select = (text: string, index: any) => {
- if (text === '统一编号') {
+ if (text === '设备名称') {
deviceSingeRef.value.initDialog()
selectRow.value = index
}
@@ -206,22 +221,26 @@
if (Array.isArray(device)) {
// 多选
device.forEach((item) => {
- list.value.push({
- appearanceInspect: '',
- appendixDescn: '',
- measureContent: '',
- sampleModel: item.model,
- sampleNo: item.equipmentNo,
- sampleId: item.id,
- sampleName: item.equipmentName,
- specialRequire: '',
- editable: true,
- })
+ if (!list.value.filter((c: any) => c.sampleId === item.id).length) {
+ list.value.push({
+ appearanceInspect: '',
+ appendixDescn: '',
+ measureContent: '',
+ manufacturer: item.manufacturer,
+ sampleModel: item.model,
+ sampleNo: item.equipmentNo,
+ sampleId: item.id,
+ sampleName: item.equipmentName,
+ specialRequire: '',
+ editable: false,
+ })
+ }
})
}
else {
// 单选
const row = {
+ manufacturer: device.manufacturer,
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -230,7 +249,7 @@
sampleNo: device.equipmentNo,
sampleName: device.equipmentName,
specialRequire: '',
- editable: true,
+ editable: false,
}
list.value[selectRow.value] = row
}
@@ -247,6 +266,7 @@
})
fd.append('multipartFile', event.target.files[0])
uploadApi(fd).then((res) => {
+ fileRef.value.value = ''
if (res.code === 200) {
list.value[currentIndex.value].appendixDescn = res.data[0]
// 重置当前验证
@@ -261,9 +281,12 @@
})
}
}
+const uploadRef = ref()
const upload = (index: number) => {
currentIndex.value = index
+ // window.onclick()
fileRef.value.click()
+ // deviceRef.value?.click()
}
const $router = useRouter()
const deviceDetail = (row: any) => {
@@ -338,10 +361,12 @@
-
+
+
+
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/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue
index 6fc4d0f..19e17ae 100644
--- a/src/views/tested/MeasurementPlan/task/components/edit.vue
+++ b/src/views/tested/MeasurementPlan/task/components/edit.vue
@@ -4,10 +4,10 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import tableList from './tableList.vue'
+import { getUserDept, getUserList } from '@/api/system/user'
import { addTask, detailTask, updateTask } from '@/api/eqpt/measurementPlan/task'
import { getDictByCode } from '@/api/system/dict'
import useUserStore from '@/store/modules/user'
-import { getUserDept } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -63,11 +63,11 @@
}
const rules = ref({
deliverer: [{ required: true, message: '送检人必填', trigger: ['blur', 'change'] }],
- customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
+ // customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
customerPhone: [{ required: true, message: '电话必填', trigger: ['blur', 'change'] }],
- maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
+ // maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
planDeliverTime: [{ required: true, message: '预计送达时间必选', trigger: ['blur', 'change'] }],
- requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
+ // requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
isUrgent: [{ required: true, message: '是否加急必选', trigger: ['blur', 'change'] }],
measureCompany: [{ required: true, message: '检定(校准)单位必填', trigger: ['blur', 'change'] }],
undertakerName: [{ required: true, message: '承接人必填', trigger: ['blur', 'change'] }],
@@ -106,10 +106,17 @@
})
// 获取是否加急下拉列表
const isUrgentList = ref<{ id: string; value: string; name: string }[]>()
+// 送检人列表
+const personList = ref()
const fetchListData = () => {
getDictByCode('eqptisUrgent').then((res) => {
isUrgentList.value = res.data
})
+ getUserDept().then((res1) => {
+ getUserList({ offset: 1, limit: 99999, deptId: $route.path.includes('detail') ? '' : res1.data.id }).then((res) => {
+ personList.value = res.data.rows
+ })
+ })
}
fetchListData()
// 关闭弹窗
@@ -200,7 +207,18 @@
-
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index 7a7f676..6777bb8 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -18,23 +18,30 @@
const $route = useRoute()
// 表头显示标题
const columnsHandler = ref([
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
- text: '统一编号',
- value: 'sampleNo',
+ text: '设备名称',
+ value: 'sampleName',
required: true,
isBtn: true,
isUpload: false,
},
{
- text: '设备名称',
- value: 'sampleName',
- required: true,
+ text: '规格型号',
+ value: 'sampleModel',
+ required: false,
isBtn: false,
isUpload: false,
},
{
- text: '型号',
- value: 'sampleModel',
+ text: '生产厂家',
+ value: 'manufacturer',
required: false,
isBtn: false,
isUpload: false,
@@ -47,13 +54,13 @@
isUpload: true,
width: '350px',
},
- {
- text: '外观和功能检查',
- value: 'appearanceInspect',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '外观和功能检查',
+ // value: 'appearanceInspect',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
{
text: '特殊要求',
value: 'specialRequire',
@@ -61,22 +68,22 @@
isBtn: false,
isUpload: false,
},
- {
- text: '检校项目',
- value: 'measureContent',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '检校项目',
+ // value: 'measureContent',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
])
const columnsDetail = ref([
- {
- text: '统一编号',
- value: 'sampleNo',
- required: true,
- isBtn: true,
- isUpload: false,
- },
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
text: '设备名称',
value: 'sampleName',
@@ -85,13 +92,20 @@
isUpload: false,
},
{
- text: '型号',
+ text: '规格型号',
value: 'sampleModel',
required: false,
isBtn: false,
isUpload: false,
},
{
+ text: '生产厂家',
+ value: 'manufacturer',
+ required: false,
+ isBtn: false,
+ isUpload: false,
+ },
+ {
text: '附件',
value: 'appendixDescn',
required: false,
@@ -150,6 +164,7 @@
if (checkCertificateList()) {
setAllRowReadable()
list.value.push({
+ manufacturer: '',
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -189,7 +204,7 @@
const selectRow = ref()
// 单选设备
const select = (text: string, index: any) => {
- if (text === '统一编号') {
+ if (text === '设备名称') {
deviceSingeRef.value.initDialog()
selectRow.value = index
}
@@ -206,22 +221,26 @@
if (Array.isArray(device)) {
// 多选
device.forEach((item) => {
- list.value.push({
- appearanceInspect: '',
- appendixDescn: '',
- measureContent: '',
- sampleModel: item.model,
- sampleNo: item.equipmentNo,
- sampleId: item.id,
- sampleName: item.equipmentName,
- specialRequire: '',
- editable: true,
- })
+ if (!list.value.filter((c: any) => c.sampleId === item.id).length) {
+ list.value.push({
+ appearanceInspect: '',
+ appendixDescn: '',
+ measureContent: '',
+ manufacturer: item.manufacturer,
+ sampleModel: item.model,
+ sampleNo: item.equipmentNo,
+ sampleId: item.id,
+ sampleName: item.equipmentName,
+ specialRequire: '',
+ editable: false,
+ })
+ }
})
}
else {
// 单选
const row = {
+ manufacturer: device.manufacturer,
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -230,7 +249,7 @@
sampleNo: device.equipmentNo,
sampleName: device.equipmentName,
specialRequire: '',
- editable: true,
+ editable: false,
}
list.value[selectRow.value] = row
}
@@ -247,6 +266,7 @@
})
fd.append('multipartFile', event.target.files[0])
uploadApi(fd).then((res) => {
+ fileRef.value.value = ''
if (res.code === 200) {
list.value[currentIndex.value].appendixDescn = res.data[0]
// 重置当前验证
@@ -261,9 +281,12 @@
})
}
}
+const uploadRef = ref()
const upload = (index: number) => {
currentIndex.value = index
+ // window.onclick()
fileRef.value.click()
+ // deviceRef.value?.click()
}
const $router = useRouter()
const deviceDetail = (row: any) => {
@@ -338,10 +361,12 @@
-
+
+
+
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/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue
index 6fc4d0f..19e17ae 100644
--- a/src/views/tested/MeasurementPlan/task/components/edit.vue
+++ b/src/views/tested/MeasurementPlan/task/components/edit.vue
@@ -4,10 +4,10 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import tableList from './tableList.vue'
+import { getUserDept, getUserList } from '@/api/system/user'
import { addTask, detailTask, updateTask } from '@/api/eqpt/measurementPlan/task'
import { getDictByCode } from '@/api/system/dict'
import useUserStore from '@/store/modules/user'
-import { getUserDept } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -63,11 +63,11 @@
}
const rules = ref({
deliverer: [{ required: true, message: '送检人必填', trigger: ['blur', 'change'] }],
- customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
+ // customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
customerPhone: [{ required: true, message: '电话必填', trigger: ['blur', 'change'] }],
- maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
+ // maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
planDeliverTime: [{ required: true, message: '预计送达时间必选', trigger: ['blur', 'change'] }],
- requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
+ // requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
isUrgent: [{ required: true, message: '是否加急必选', trigger: ['blur', 'change'] }],
measureCompany: [{ required: true, message: '检定(校准)单位必填', trigger: ['blur', 'change'] }],
undertakerName: [{ required: true, message: '承接人必填', trigger: ['blur', 'change'] }],
@@ -106,10 +106,17 @@
})
// 获取是否加急下拉列表
const isUrgentList = ref<{ id: string; value: string; name: string }[]>()
+// 送检人列表
+const personList = ref()
const fetchListData = () => {
getDictByCode('eqptisUrgent').then((res) => {
isUrgentList.value = res.data
})
+ getUserDept().then((res1) => {
+ getUserList({ offset: 1, limit: 99999, deptId: $route.path.includes('detail') ? '' : res1.data.id }).then((res) => {
+ personList.value = res.data.rows
+ })
+ })
}
fetchListData()
// 关闭弹窗
@@ -200,7 +207,18 @@
-
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index 7a7f676..6777bb8 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -18,23 +18,30 @@
const $route = useRoute()
// 表头显示标题
const columnsHandler = ref([
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
- text: '统一编号',
- value: 'sampleNo',
+ text: '设备名称',
+ value: 'sampleName',
required: true,
isBtn: true,
isUpload: false,
},
{
- text: '设备名称',
- value: 'sampleName',
- required: true,
+ text: '规格型号',
+ value: 'sampleModel',
+ required: false,
isBtn: false,
isUpload: false,
},
{
- text: '型号',
- value: 'sampleModel',
+ text: '生产厂家',
+ value: 'manufacturer',
required: false,
isBtn: false,
isUpload: false,
@@ -47,13 +54,13 @@
isUpload: true,
width: '350px',
},
- {
- text: '外观和功能检查',
- value: 'appearanceInspect',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '外观和功能检查',
+ // value: 'appearanceInspect',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
{
text: '特殊要求',
value: 'specialRequire',
@@ -61,22 +68,22 @@
isBtn: false,
isUpload: false,
},
- {
- text: '检校项目',
- value: 'measureContent',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '检校项目',
+ // value: 'measureContent',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
])
const columnsDetail = ref([
- {
- text: '统一编号',
- value: 'sampleNo',
- required: true,
- isBtn: true,
- isUpload: false,
- },
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
text: '设备名称',
value: 'sampleName',
@@ -85,13 +92,20 @@
isUpload: false,
},
{
- text: '型号',
+ text: '规格型号',
value: 'sampleModel',
required: false,
isBtn: false,
isUpload: false,
},
{
+ text: '生产厂家',
+ value: 'manufacturer',
+ required: false,
+ isBtn: false,
+ isUpload: false,
+ },
+ {
text: '附件',
value: 'appendixDescn',
required: false,
@@ -150,6 +164,7 @@
if (checkCertificateList()) {
setAllRowReadable()
list.value.push({
+ manufacturer: '',
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -189,7 +204,7 @@
const selectRow = ref()
// 单选设备
const select = (text: string, index: any) => {
- if (text === '统一编号') {
+ if (text === '设备名称') {
deviceSingeRef.value.initDialog()
selectRow.value = index
}
@@ -206,22 +221,26 @@
if (Array.isArray(device)) {
// 多选
device.forEach((item) => {
- list.value.push({
- appearanceInspect: '',
- appendixDescn: '',
- measureContent: '',
- sampleModel: item.model,
- sampleNo: item.equipmentNo,
- sampleId: item.id,
- sampleName: item.equipmentName,
- specialRequire: '',
- editable: true,
- })
+ if (!list.value.filter((c: any) => c.sampleId === item.id).length) {
+ list.value.push({
+ appearanceInspect: '',
+ appendixDescn: '',
+ measureContent: '',
+ manufacturer: item.manufacturer,
+ sampleModel: item.model,
+ sampleNo: item.equipmentNo,
+ sampleId: item.id,
+ sampleName: item.equipmentName,
+ specialRequire: '',
+ editable: false,
+ })
+ }
})
}
else {
// 单选
const row = {
+ manufacturer: device.manufacturer,
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -230,7 +249,7 @@
sampleNo: device.equipmentNo,
sampleName: device.equipmentName,
specialRequire: '',
- editable: true,
+ editable: false,
}
list.value[selectRow.value] = row
}
@@ -247,6 +266,7 @@
})
fd.append('multipartFile', event.target.files[0])
uploadApi(fd).then((res) => {
+ fileRef.value.value = ''
if (res.code === 200) {
list.value[currentIndex.value].appendixDescn = res.data[0]
// 重置当前验证
@@ -261,9 +281,12 @@
})
}
}
+const uploadRef = ref()
const upload = (index: number) => {
currentIndex.value = index
+ // window.onclick()
fileRef.value.click()
+ // deviceRef.value?.click()
}
const $router = useRouter()
const deviceDetail = (row: any) => {
@@ -338,10 +361,12 @@
-
+
+
+
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..138a543 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({ equipmentType: '1' }).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/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue
index 6fc4d0f..19e17ae 100644
--- a/src/views/tested/MeasurementPlan/task/components/edit.vue
+++ b/src/views/tested/MeasurementPlan/task/components/edit.vue
@@ -4,10 +4,10 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import tableList from './tableList.vue'
+import { getUserDept, getUserList } from '@/api/system/user'
import { addTask, detailTask, updateTask } from '@/api/eqpt/measurementPlan/task'
import { getDictByCode } from '@/api/system/dict'
import useUserStore from '@/store/modules/user'
-import { getUserDept } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -63,11 +63,11 @@
}
const rules = ref({
deliverer: [{ required: true, message: '送检人必填', trigger: ['blur', 'change'] }],
- customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
+ // customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
customerPhone: [{ required: true, message: '电话必填', trigger: ['blur', 'change'] }],
- maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
+ // maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
planDeliverTime: [{ required: true, message: '预计送达时间必选', trigger: ['blur', 'change'] }],
- requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
+ // requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
isUrgent: [{ required: true, message: '是否加急必选', trigger: ['blur', 'change'] }],
measureCompany: [{ required: true, message: '检定(校准)单位必填', trigger: ['blur', 'change'] }],
undertakerName: [{ required: true, message: '承接人必填', trigger: ['blur', 'change'] }],
@@ -106,10 +106,17 @@
})
// 获取是否加急下拉列表
const isUrgentList = ref<{ id: string; value: string; name: string }[]>()
+// 送检人列表
+const personList = ref()
const fetchListData = () => {
getDictByCode('eqptisUrgent').then((res) => {
isUrgentList.value = res.data
})
+ getUserDept().then((res1) => {
+ getUserList({ offset: 1, limit: 99999, deptId: $route.path.includes('detail') ? '' : res1.data.id }).then((res) => {
+ personList.value = res.data.rows
+ })
+ })
}
fetchListData()
// 关闭弹窗
@@ -200,7 +207,18 @@
-
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index 7a7f676..6777bb8 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -18,23 +18,30 @@
const $route = useRoute()
// 表头显示标题
const columnsHandler = ref([
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
- text: '统一编号',
- value: 'sampleNo',
+ text: '设备名称',
+ value: 'sampleName',
required: true,
isBtn: true,
isUpload: false,
},
{
- text: '设备名称',
- value: 'sampleName',
- required: true,
+ text: '规格型号',
+ value: 'sampleModel',
+ required: false,
isBtn: false,
isUpload: false,
},
{
- text: '型号',
- value: 'sampleModel',
+ text: '生产厂家',
+ value: 'manufacturer',
required: false,
isBtn: false,
isUpload: false,
@@ -47,13 +54,13 @@
isUpload: true,
width: '350px',
},
- {
- text: '外观和功能检查',
- value: 'appearanceInspect',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '外观和功能检查',
+ // value: 'appearanceInspect',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
{
text: '特殊要求',
value: 'specialRequire',
@@ -61,22 +68,22 @@
isBtn: false,
isUpload: false,
},
- {
- text: '检校项目',
- value: 'measureContent',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '检校项目',
+ // value: 'measureContent',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
])
const columnsDetail = ref([
- {
- text: '统一编号',
- value: 'sampleNo',
- required: true,
- isBtn: true,
- isUpload: false,
- },
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
text: '设备名称',
value: 'sampleName',
@@ -85,13 +92,20 @@
isUpload: false,
},
{
- text: '型号',
+ text: '规格型号',
value: 'sampleModel',
required: false,
isBtn: false,
isUpload: false,
},
{
+ text: '生产厂家',
+ value: 'manufacturer',
+ required: false,
+ isBtn: false,
+ isUpload: false,
+ },
+ {
text: '附件',
value: 'appendixDescn',
required: false,
@@ -150,6 +164,7 @@
if (checkCertificateList()) {
setAllRowReadable()
list.value.push({
+ manufacturer: '',
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -189,7 +204,7 @@
const selectRow = ref()
// 单选设备
const select = (text: string, index: any) => {
- if (text === '统一编号') {
+ if (text === '设备名称') {
deviceSingeRef.value.initDialog()
selectRow.value = index
}
@@ -206,22 +221,26 @@
if (Array.isArray(device)) {
// 多选
device.forEach((item) => {
- list.value.push({
- appearanceInspect: '',
- appendixDescn: '',
- measureContent: '',
- sampleModel: item.model,
- sampleNo: item.equipmentNo,
- sampleId: item.id,
- sampleName: item.equipmentName,
- specialRequire: '',
- editable: true,
- })
+ if (!list.value.filter((c: any) => c.sampleId === item.id).length) {
+ list.value.push({
+ appearanceInspect: '',
+ appendixDescn: '',
+ measureContent: '',
+ manufacturer: item.manufacturer,
+ sampleModel: item.model,
+ sampleNo: item.equipmentNo,
+ sampleId: item.id,
+ sampleName: item.equipmentName,
+ specialRequire: '',
+ editable: false,
+ })
+ }
})
}
else {
// 单选
const row = {
+ manufacturer: device.manufacturer,
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -230,7 +249,7 @@
sampleNo: device.equipmentNo,
sampleName: device.equipmentName,
specialRequire: '',
- editable: true,
+ editable: false,
}
list.value[selectRow.value] = row
}
@@ -247,6 +266,7 @@
})
fd.append('multipartFile', event.target.files[0])
uploadApi(fd).then((res) => {
+ fileRef.value.value = ''
if (res.code === 200) {
list.value[currentIndex.value].appendixDescn = res.data[0]
// 重置当前验证
@@ -261,9 +281,12 @@
})
}
}
+const uploadRef = ref()
const upload = (index: number) => {
currentIndex.value = index
+ // window.onclick()
fileRef.value.click()
+ // deviceRef.value?.click()
}
const $router = useRouter()
const deviceDetail = (row: any) => {
@@ -338,10 +361,12 @@
-
+
+
+
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..138a543 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({ equipmentType: '1' }).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/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue
index 6fc4d0f..19e17ae 100644
--- a/src/views/tested/MeasurementPlan/task/components/edit.vue
+++ b/src/views/tested/MeasurementPlan/task/components/edit.vue
@@ -4,10 +4,10 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import tableList from './tableList.vue'
+import { getUserDept, getUserList } from '@/api/system/user'
import { addTask, detailTask, updateTask } from '@/api/eqpt/measurementPlan/task'
import { getDictByCode } from '@/api/system/dict'
import useUserStore from '@/store/modules/user'
-import { getUserDept } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -63,11 +63,11 @@
}
const rules = ref({
deliverer: [{ required: true, message: '送检人必填', trigger: ['blur', 'change'] }],
- customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
+ // customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
customerPhone: [{ required: true, message: '电话必填', trigger: ['blur', 'change'] }],
- maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
+ // maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
planDeliverTime: [{ required: true, message: '预计送达时间必选', trigger: ['blur', 'change'] }],
- requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
+ // requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
isUrgent: [{ required: true, message: '是否加急必选', trigger: ['blur', 'change'] }],
measureCompany: [{ required: true, message: '检定(校准)单位必填', trigger: ['blur', 'change'] }],
undertakerName: [{ required: true, message: '承接人必填', trigger: ['blur', 'change'] }],
@@ -106,10 +106,17 @@
})
// 获取是否加急下拉列表
const isUrgentList = ref<{ id: string; value: string; name: string }[]>()
+// 送检人列表
+const personList = ref()
const fetchListData = () => {
getDictByCode('eqptisUrgent').then((res) => {
isUrgentList.value = res.data
})
+ getUserDept().then((res1) => {
+ getUserList({ offset: 1, limit: 99999, deptId: $route.path.includes('detail') ? '' : res1.data.id }).then((res) => {
+ personList.value = res.data.rows
+ })
+ })
}
fetchListData()
// 关闭弹窗
@@ -200,7 +207,18 @@
-
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index 7a7f676..6777bb8 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -18,23 +18,30 @@
const $route = useRoute()
// 表头显示标题
const columnsHandler = ref([
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
- text: '统一编号',
- value: 'sampleNo',
+ text: '设备名称',
+ value: 'sampleName',
required: true,
isBtn: true,
isUpload: false,
},
{
- text: '设备名称',
- value: 'sampleName',
- required: true,
+ text: '规格型号',
+ value: 'sampleModel',
+ required: false,
isBtn: false,
isUpload: false,
},
{
- text: '型号',
- value: 'sampleModel',
+ text: '生产厂家',
+ value: 'manufacturer',
required: false,
isBtn: false,
isUpload: false,
@@ -47,13 +54,13 @@
isUpload: true,
width: '350px',
},
- {
- text: '外观和功能检查',
- value: 'appearanceInspect',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '外观和功能检查',
+ // value: 'appearanceInspect',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
{
text: '特殊要求',
value: 'specialRequire',
@@ -61,22 +68,22 @@
isBtn: false,
isUpload: false,
},
- {
- text: '检校项目',
- value: 'measureContent',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '检校项目',
+ // value: 'measureContent',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
])
const columnsDetail = ref([
- {
- text: '统一编号',
- value: 'sampleNo',
- required: true,
- isBtn: true,
- isUpload: false,
- },
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
text: '设备名称',
value: 'sampleName',
@@ -85,13 +92,20 @@
isUpload: false,
},
{
- text: '型号',
+ text: '规格型号',
value: 'sampleModel',
required: false,
isBtn: false,
isUpload: false,
},
{
+ text: '生产厂家',
+ value: 'manufacturer',
+ required: false,
+ isBtn: false,
+ isUpload: false,
+ },
+ {
text: '附件',
value: 'appendixDescn',
required: false,
@@ -150,6 +164,7 @@
if (checkCertificateList()) {
setAllRowReadable()
list.value.push({
+ manufacturer: '',
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -189,7 +204,7 @@
const selectRow = ref()
// 单选设备
const select = (text: string, index: any) => {
- if (text === '统一编号') {
+ if (text === '设备名称') {
deviceSingeRef.value.initDialog()
selectRow.value = index
}
@@ -206,22 +221,26 @@
if (Array.isArray(device)) {
// 多选
device.forEach((item) => {
- list.value.push({
- appearanceInspect: '',
- appendixDescn: '',
- measureContent: '',
- sampleModel: item.model,
- sampleNo: item.equipmentNo,
- sampleId: item.id,
- sampleName: item.equipmentName,
- specialRequire: '',
- editable: true,
- })
+ if (!list.value.filter((c: any) => c.sampleId === item.id).length) {
+ list.value.push({
+ appearanceInspect: '',
+ appendixDescn: '',
+ measureContent: '',
+ manufacturer: item.manufacturer,
+ sampleModel: item.model,
+ sampleNo: item.equipmentNo,
+ sampleId: item.id,
+ sampleName: item.equipmentName,
+ specialRequire: '',
+ editable: false,
+ })
+ }
})
}
else {
// 单选
const row = {
+ manufacturer: device.manufacturer,
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -230,7 +249,7 @@
sampleNo: device.equipmentNo,
sampleName: device.equipmentName,
specialRequire: '',
- editable: true,
+ editable: false,
}
list.value[selectRow.value] = row
}
@@ -247,6 +266,7 @@
})
fd.append('multipartFile', event.target.files[0])
uploadApi(fd).then((res) => {
+ fileRef.value.value = ''
if (res.code === 200) {
list.value[currentIndex.value].appendixDescn = res.data[0]
// 重置当前验证
@@ -261,9 +281,12 @@
})
}
}
+const uploadRef = ref()
const upload = (index: number) => {
currentIndex.value = index
+ // window.onclick()
fileRef.value.click()
+ // deviceRef.value?.click()
}
const $router = useRouter()
const deviceDetail = (row: any) => {
@@ -338,10 +361,12 @@
-
+
+
+
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..138a543 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({ equipmentType: '1' }).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/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue
index 6fc4d0f..19e17ae 100644
--- a/src/views/tested/MeasurementPlan/task/components/edit.vue
+++ b/src/views/tested/MeasurementPlan/task/components/edit.vue
@@ -4,10 +4,10 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import tableList from './tableList.vue'
+import { getUserDept, getUserList } from '@/api/system/user'
import { addTask, detailTask, updateTask } from '@/api/eqpt/measurementPlan/task'
import { getDictByCode } from '@/api/system/dict'
import useUserStore from '@/store/modules/user'
-import { getUserDept } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -63,11 +63,11 @@
}
const rules = ref({
deliverer: [{ required: true, message: '送检人必填', trigger: ['blur', 'change'] }],
- customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
+ // customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
customerPhone: [{ required: true, message: '电话必填', trigger: ['blur', 'change'] }],
- maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
+ // maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
planDeliverTime: [{ required: true, message: '预计送达时间必选', trigger: ['blur', 'change'] }],
- requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
+ // requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
isUrgent: [{ required: true, message: '是否加急必选', trigger: ['blur', 'change'] }],
measureCompany: [{ required: true, message: '检定(校准)单位必填', trigger: ['blur', 'change'] }],
undertakerName: [{ required: true, message: '承接人必填', trigger: ['blur', 'change'] }],
@@ -106,10 +106,17 @@
})
// 获取是否加急下拉列表
const isUrgentList = ref<{ id: string; value: string; name: string }[]>()
+// 送检人列表
+const personList = ref()
const fetchListData = () => {
getDictByCode('eqptisUrgent').then((res) => {
isUrgentList.value = res.data
})
+ getUserDept().then((res1) => {
+ getUserList({ offset: 1, limit: 99999, deptId: $route.path.includes('detail') ? '' : res1.data.id }).then((res) => {
+ personList.value = res.data.rows
+ })
+ })
}
fetchListData()
// 关闭弹窗
@@ -200,7 +207,18 @@
-
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index 7a7f676..6777bb8 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -18,23 +18,30 @@
const $route = useRoute()
// 表头显示标题
const columnsHandler = ref([
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
- text: '统一编号',
- value: 'sampleNo',
+ text: '设备名称',
+ value: 'sampleName',
required: true,
isBtn: true,
isUpload: false,
},
{
- text: '设备名称',
- value: 'sampleName',
- required: true,
+ text: '规格型号',
+ value: 'sampleModel',
+ required: false,
isBtn: false,
isUpload: false,
},
{
- text: '型号',
- value: 'sampleModel',
+ text: '生产厂家',
+ value: 'manufacturer',
required: false,
isBtn: false,
isUpload: false,
@@ -47,13 +54,13 @@
isUpload: true,
width: '350px',
},
- {
- text: '外观和功能检查',
- value: 'appearanceInspect',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '外观和功能检查',
+ // value: 'appearanceInspect',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
{
text: '特殊要求',
value: 'specialRequire',
@@ -61,22 +68,22 @@
isBtn: false,
isUpload: false,
},
- {
- text: '检校项目',
- value: 'measureContent',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '检校项目',
+ // value: 'measureContent',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
])
const columnsDetail = ref([
- {
- text: '统一编号',
- value: 'sampleNo',
- required: true,
- isBtn: true,
- isUpload: false,
- },
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
text: '设备名称',
value: 'sampleName',
@@ -85,13 +92,20 @@
isUpload: false,
},
{
- text: '型号',
+ text: '规格型号',
value: 'sampleModel',
required: false,
isBtn: false,
isUpload: false,
},
{
+ text: '生产厂家',
+ value: 'manufacturer',
+ required: false,
+ isBtn: false,
+ isUpload: false,
+ },
+ {
text: '附件',
value: 'appendixDescn',
required: false,
@@ -150,6 +164,7 @@
if (checkCertificateList()) {
setAllRowReadable()
list.value.push({
+ manufacturer: '',
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -189,7 +204,7 @@
const selectRow = ref()
// 单选设备
const select = (text: string, index: any) => {
- if (text === '统一编号') {
+ if (text === '设备名称') {
deviceSingeRef.value.initDialog()
selectRow.value = index
}
@@ -206,22 +221,26 @@
if (Array.isArray(device)) {
// 多选
device.forEach((item) => {
- list.value.push({
- appearanceInspect: '',
- appendixDescn: '',
- measureContent: '',
- sampleModel: item.model,
- sampleNo: item.equipmentNo,
- sampleId: item.id,
- sampleName: item.equipmentName,
- specialRequire: '',
- editable: true,
- })
+ if (!list.value.filter((c: any) => c.sampleId === item.id).length) {
+ list.value.push({
+ appearanceInspect: '',
+ appendixDescn: '',
+ measureContent: '',
+ manufacturer: item.manufacturer,
+ sampleModel: item.model,
+ sampleNo: item.equipmentNo,
+ sampleId: item.id,
+ sampleName: item.equipmentName,
+ specialRequire: '',
+ editable: false,
+ })
+ }
})
}
else {
// 单选
const row = {
+ manufacturer: device.manufacturer,
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -230,7 +249,7 @@
sampleNo: device.equipmentNo,
sampleName: device.equipmentName,
specialRequire: '',
- editable: true,
+ editable: false,
}
list.value[selectRow.value] = row
}
@@ -247,6 +266,7 @@
})
fd.append('multipartFile', event.target.files[0])
uploadApi(fd).then((res) => {
+ fileRef.value.value = ''
if (res.code === 200) {
list.value[currentIndex.value].appendixDescn = res.data[0]
// 重置当前验证
@@ -261,9 +281,12 @@
})
}
}
+const uploadRef = ref()
const upload = (index: number) => {
currentIndex.value = index
+ // window.onclick()
fileRef.value.click()
+ // deviceRef.value?.click()
}
const $router = useRouter()
const deviceDetail = (row: any) => {
@@ -338,10 +361,12 @@
-
+
+
+
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..138a543 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({ equipmentType: '1' }).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..d310206 100644
--- a/src/views/tested/device/info/components/edit.vue
+++ b/src/views/tested/device/info/components/edit.vue
@@ -21,6 +21,8 @@
import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model'
import { equipmentLabelBind } from '@/api/reader'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
+import { getLocationList } from '@/api/system/installation'
+import { getPostList } from '@/api/system/post'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -90,7 +92,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 +145,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'] }],
@@ -156,9 +173,13 @@
// 辅助字段
const helpList = ref([])
const allList = ref([])
+// 安装位置
+const installLocationList = ref([])
+// 使用岗位
+const usePositionList = ref([])
const fetchSelectData = async () => {
// 规格型号及辅助字段
- const res = await getModelAllList({})
+ const res = await getModelAllList({ equipmentType: $route.query.equipmentType })
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
@@ -180,10 +201,19 @@
deviceQualityList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: $route.query.equipmentType }).then((res) => {
deviceNameList.value = res.data
console.log(res.data, '设备名称')
})
+ // 使用岗位
+ getPostList({}).then((res) => {
+ usePositionList.value = res.data
+ })
+ // 安装位置
+ getLocationList().then((res) => {
+ // console.log(res.data, '安装位置')
+ installLocationList.value = res.data
+ })
}
// 监听设备名称下拉框,修改规格型号和辅助字段
watch(() => ruleForm.value.equipmentName, (newVal) => {
@@ -240,11 +270,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 +825,32 @@
+
+
+
+
+
-
+
-
-
-
+
+ {}" />
+
+
-
+
@@ -847,7 +890,10 @@
-
+
+
+
+
@@ -882,21 +928,26 @@
-
-
-
-
+
+
+
+
-
+
+
+
+
-
-
+
+
+
+
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue
index 6fc4d0f..19e17ae 100644
--- a/src/views/tested/MeasurementPlan/task/components/edit.vue
+++ b/src/views/tested/MeasurementPlan/task/components/edit.vue
@@ -4,10 +4,10 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import tableList from './tableList.vue'
+import { getUserDept, getUserList } from '@/api/system/user'
import { addTask, detailTask, updateTask } from '@/api/eqpt/measurementPlan/task'
import { getDictByCode } from '@/api/system/dict'
import useUserStore from '@/store/modules/user'
-import { getUserDept } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -63,11 +63,11 @@
}
const rules = ref({
deliverer: [{ required: true, message: '送检人必填', trigger: ['blur', 'change'] }],
- customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
+ // customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
customerPhone: [{ required: true, message: '电话必填', trigger: ['blur', 'change'] }],
- maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
+ // maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
planDeliverTime: [{ required: true, message: '预计送达时间必选', trigger: ['blur', 'change'] }],
- requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
+ // requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
isUrgent: [{ required: true, message: '是否加急必选', trigger: ['blur', 'change'] }],
measureCompany: [{ required: true, message: '检定(校准)单位必填', trigger: ['blur', 'change'] }],
undertakerName: [{ required: true, message: '承接人必填', trigger: ['blur', 'change'] }],
@@ -106,10 +106,17 @@
})
// 获取是否加急下拉列表
const isUrgentList = ref<{ id: string; value: string; name: string }[]>()
+// 送检人列表
+const personList = ref()
const fetchListData = () => {
getDictByCode('eqptisUrgent').then((res) => {
isUrgentList.value = res.data
})
+ getUserDept().then((res1) => {
+ getUserList({ offset: 1, limit: 99999, deptId: $route.path.includes('detail') ? '' : res1.data.id }).then((res) => {
+ personList.value = res.data.rows
+ })
+ })
}
fetchListData()
// 关闭弹窗
@@ -200,7 +207,18 @@
-
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index 7a7f676..6777bb8 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -18,23 +18,30 @@
const $route = useRoute()
// 表头显示标题
const columnsHandler = ref([
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
- text: '统一编号',
- value: 'sampleNo',
+ text: '设备名称',
+ value: 'sampleName',
required: true,
isBtn: true,
isUpload: false,
},
{
- text: '设备名称',
- value: 'sampleName',
- required: true,
+ text: '规格型号',
+ value: 'sampleModel',
+ required: false,
isBtn: false,
isUpload: false,
},
{
- text: '型号',
- value: 'sampleModel',
+ text: '生产厂家',
+ value: 'manufacturer',
required: false,
isBtn: false,
isUpload: false,
@@ -47,13 +54,13 @@
isUpload: true,
width: '350px',
},
- {
- text: '外观和功能检查',
- value: 'appearanceInspect',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '外观和功能检查',
+ // value: 'appearanceInspect',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
{
text: '特殊要求',
value: 'specialRequire',
@@ -61,22 +68,22 @@
isBtn: false,
isUpload: false,
},
- {
- text: '检校项目',
- value: 'measureContent',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '检校项目',
+ // value: 'measureContent',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
])
const columnsDetail = ref([
- {
- text: '统一编号',
- value: 'sampleNo',
- required: true,
- isBtn: true,
- isUpload: false,
- },
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
text: '设备名称',
value: 'sampleName',
@@ -85,13 +92,20 @@
isUpload: false,
},
{
- text: '型号',
+ text: '规格型号',
value: 'sampleModel',
required: false,
isBtn: false,
isUpload: false,
},
{
+ text: '生产厂家',
+ value: 'manufacturer',
+ required: false,
+ isBtn: false,
+ isUpload: false,
+ },
+ {
text: '附件',
value: 'appendixDescn',
required: false,
@@ -150,6 +164,7 @@
if (checkCertificateList()) {
setAllRowReadable()
list.value.push({
+ manufacturer: '',
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -189,7 +204,7 @@
const selectRow = ref()
// 单选设备
const select = (text: string, index: any) => {
- if (text === '统一编号') {
+ if (text === '设备名称') {
deviceSingeRef.value.initDialog()
selectRow.value = index
}
@@ -206,22 +221,26 @@
if (Array.isArray(device)) {
// 多选
device.forEach((item) => {
- list.value.push({
- appearanceInspect: '',
- appendixDescn: '',
- measureContent: '',
- sampleModel: item.model,
- sampleNo: item.equipmentNo,
- sampleId: item.id,
- sampleName: item.equipmentName,
- specialRequire: '',
- editable: true,
- })
+ if (!list.value.filter((c: any) => c.sampleId === item.id).length) {
+ list.value.push({
+ appearanceInspect: '',
+ appendixDescn: '',
+ measureContent: '',
+ manufacturer: item.manufacturer,
+ sampleModel: item.model,
+ sampleNo: item.equipmentNo,
+ sampleId: item.id,
+ sampleName: item.equipmentName,
+ specialRequire: '',
+ editable: false,
+ })
+ }
})
}
else {
// 单选
const row = {
+ manufacturer: device.manufacturer,
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -230,7 +249,7 @@
sampleNo: device.equipmentNo,
sampleName: device.equipmentName,
specialRequire: '',
- editable: true,
+ editable: false,
}
list.value[selectRow.value] = row
}
@@ -247,6 +266,7 @@
})
fd.append('multipartFile', event.target.files[0])
uploadApi(fd).then((res) => {
+ fileRef.value.value = ''
if (res.code === 200) {
list.value[currentIndex.value].appendixDescn = res.data[0]
// 重置当前验证
@@ -261,9 +281,12 @@
})
}
}
+const uploadRef = ref()
const upload = (index: number) => {
currentIndex.value = index
+ // window.onclick()
fileRef.value.click()
+ // deviceRef.value?.click()
}
const $router = useRouter()
const deviceDetail = (row: any) => {
@@ -338,10 +361,12 @@
-
+
+
+
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..138a543 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({ equipmentType: '1' }).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..d310206 100644
--- a/src/views/tested/device/info/components/edit.vue
+++ b/src/views/tested/device/info/components/edit.vue
@@ -21,6 +21,8 @@
import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model'
import { equipmentLabelBind } from '@/api/reader'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
+import { getLocationList } from '@/api/system/installation'
+import { getPostList } from '@/api/system/post'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -90,7 +92,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 +145,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'] }],
@@ -156,9 +173,13 @@
// 辅助字段
const helpList = ref([])
const allList = ref([])
+// 安装位置
+const installLocationList = ref([])
+// 使用岗位
+const usePositionList = ref([])
const fetchSelectData = async () => {
// 规格型号及辅助字段
- const res = await getModelAllList({})
+ const res = await getModelAllList({ equipmentType: $route.query.equipmentType })
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
@@ -180,10 +201,19 @@
deviceQualityList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: $route.query.equipmentType }).then((res) => {
deviceNameList.value = res.data
console.log(res.data, '设备名称')
})
+ // 使用岗位
+ getPostList({}).then((res) => {
+ usePositionList.value = res.data
+ })
+ // 安装位置
+ getLocationList().then((res) => {
+ // console.log(res.data, '安装位置')
+ installLocationList.value = res.data
+ })
}
// 监听设备名称下拉框,修改规格型号和辅助字段
watch(() => ruleForm.value.equipmentName, (newVal) => {
@@ -240,11 +270,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 +825,32 @@
+
+
+
+
+
-
+
-
-
-
+
+ {}" />
+
+
-
+
@@ -847,7 +890,10 @@
-
+
+
+
+
@@ -882,21 +928,26 @@
-
-
-
-
+
+
+
+
-
+
+
+
+
-
-
+
+
+
+
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue
index 6fc4d0f..19e17ae 100644
--- a/src/views/tested/MeasurementPlan/task/components/edit.vue
+++ b/src/views/tested/MeasurementPlan/task/components/edit.vue
@@ -4,10 +4,10 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import tableList from './tableList.vue'
+import { getUserDept, getUserList } from '@/api/system/user'
import { addTask, detailTask, updateTask } from '@/api/eqpt/measurementPlan/task'
import { getDictByCode } from '@/api/system/dict'
import useUserStore from '@/store/modules/user'
-import { getUserDept } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -63,11 +63,11 @@
}
const rules = ref({
deliverer: [{ required: true, message: '送检人必填', trigger: ['blur', 'change'] }],
- customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
+ // customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
customerPhone: [{ required: true, message: '电话必填', trigger: ['blur', 'change'] }],
- maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
+ // maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
planDeliverTime: [{ required: true, message: '预计送达时间必选', trigger: ['blur', 'change'] }],
- requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
+ // requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
isUrgent: [{ required: true, message: '是否加急必选', trigger: ['blur', 'change'] }],
measureCompany: [{ required: true, message: '检定(校准)单位必填', trigger: ['blur', 'change'] }],
undertakerName: [{ required: true, message: '承接人必填', trigger: ['blur', 'change'] }],
@@ -106,10 +106,17 @@
})
// 获取是否加急下拉列表
const isUrgentList = ref<{ id: string; value: string; name: string }[]>()
+// 送检人列表
+const personList = ref()
const fetchListData = () => {
getDictByCode('eqptisUrgent').then((res) => {
isUrgentList.value = res.data
})
+ getUserDept().then((res1) => {
+ getUserList({ offset: 1, limit: 99999, deptId: $route.path.includes('detail') ? '' : res1.data.id }).then((res) => {
+ personList.value = res.data.rows
+ })
+ })
}
fetchListData()
// 关闭弹窗
@@ -200,7 +207,18 @@
-
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index 7a7f676..6777bb8 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -18,23 +18,30 @@
const $route = useRoute()
// 表头显示标题
const columnsHandler = ref([
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
- text: '统一编号',
- value: 'sampleNo',
+ text: '设备名称',
+ value: 'sampleName',
required: true,
isBtn: true,
isUpload: false,
},
{
- text: '设备名称',
- value: 'sampleName',
- required: true,
+ text: '规格型号',
+ value: 'sampleModel',
+ required: false,
isBtn: false,
isUpload: false,
},
{
- text: '型号',
- value: 'sampleModel',
+ text: '生产厂家',
+ value: 'manufacturer',
required: false,
isBtn: false,
isUpload: false,
@@ -47,13 +54,13 @@
isUpload: true,
width: '350px',
},
- {
- text: '外观和功能检查',
- value: 'appearanceInspect',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '外观和功能检查',
+ // value: 'appearanceInspect',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
{
text: '特殊要求',
value: 'specialRequire',
@@ -61,22 +68,22 @@
isBtn: false,
isUpload: false,
},
- {
- text: '检校项目',
- value: 'measureContent',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '检校项目',
+ // value: 'measureContent',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
])
const columnsDetail = ref([
- {
- text: '统一编号',
- value: 'sampleNo',
- required: true,
- isBtn: true,
- isUpload: false,
- },
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
text: '设备名称',
value: 'sampleName',
@@ -85,13 +92,20 @@
isUpload: false,
},
{
- text: '型号',
+ text: '规格型号',
value: 'sampleModel',
required: false,
isBtn: false,
isUpload: false,
},
{
+ text: '生产厂家',
+ value: 'manufacturer',
+ required: false,
+ isBtn: false,
+ isUpload: false,
+ },
+ {
text: '附件',
value: 'appendixDescn',
required: false,
@@ -150,6 +164,7 @@
if (checkCertificateList()) {
setAllRowReadable()
list.value.push({
+ manufacturer: '',
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -189,7 +204,7 @@
const selectRow = ref()
// 单选设备
const select = (text: string, index: any) => {
- if (text === '统一编号') {
+ if (text === '设备名称') {
deviceSingeRef.value.initDialog()
selectRow.value = index
}
@@ -206,22 +221,26 @@
if (Array.isArray(device)) {
// 多选
device.forEach((item) => {
- list.value.push({
- appearanceInspect: '',
- appendixDescn: '',
- measureContent: '',
- sampleModel: item.model,
- sampleNo: item.equipmentNo,
- sampleId: item.id,
- sampleName: item.equipmentName,
- specialRequire: '',
- editable: true,
- })
+ if (!list.value.filter((c: any) => c.sampleId === item.id).length) {
+ list.value.push({
+ appearanceInspect: '',
+ appendixDescn: '',
+ measureContent: '',
+ manufacturer: item.manufacturer,
+ sampleModel: item.model,
+ sampleNo: item.equipmentNo,
+ sampleId: item.id,
+ sampleName: item.equipmentName,
+ specialRequire: '',
+ editable: false,
+ })
+ }
})
}
else {
// 单选
const row = {
+ manufacturer: device.manufacturer,
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -230,7 +249,7 @@
sampleNo: device.equipmentNo,
sampleName: device.equipmentName,
specialRequire: '',
- editable: true,
+ editable: false,
}
list.value[selectRow.value] = row
}
@@ -247,6 +266,7 @@
})
fd.append('multipartFile', event.target.files[0])
uploadApi(fd).then((res) => {
+ fileRef.value.value = ''
if (res.code === 200) {
list.value[currentIndex.value].appendixDescn = res.data[0]
// 重置当前验证
@@ -261,9 +281,12 @@
})
}
}
+const uploadRef = ref()
const upload = (index: number) => {
currentIndex.value = index
+ // window.onclick()
fileRef.value.click()
+ // deviceRef.value?.click()
}
const $router = useRouter()
const deviceDetail = (row: any) => {
@@ -338,10 +361,12 @@
-
+
+
+
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..138a543 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({ equipmentType: '1' }).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..d310206 100644
--- a/src/views/tested/device/info/components/edit.vue
+++ b/src/views/tested/device/info/components/edit.vue
@@ -21,6 +21,8 @@
import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model'
import { equipmentLabelBind } from '@/api/reader'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
+import { getLocationList } from '@/api/system/installation'
+import { getPostList } from '@/api/system/post'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -90,7 +92,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 +145,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'] }],
@@ -156,9 +173,13 @@
// 辅助字段
const helpList = ref([])
const allList = ref([])
+// 安装位置
+const installLocationList = ref([])
+// 使用岗位
+const usePositionList = ref([])
const fetchSelectData = async () => {
// 规格型号及辅助字段
- const res = await getModelAllList({})
+ const res = await getModelAllList({ equipmentType: $route.query.equipmentType })
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
@@ -180,10 +201,19 @@
deviceQualityList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: $route.query.equipmentType }).then((res) => {
deviceNameList.value = res.data
console.log(res.data, '设备名称')
})
+ // 使用岗位
+ getPostList({}).then((res) => {
+ usePositionList.value = res.data
+ })
+ // 安装位置
+ getLocationList().then((res) => {
+ // console.log(res.data, '安装位置')
+ installLocationList.value = res.data
+ })
}
// 监听设备名称下拉框,修改规格型号和辅助字段
watch(() => ruleForm.value.equipmentName, (newVal) => {
@@ -240,11 +270,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 +825,32 @@
+
+
+
+
+
-
+
-
-
-
+
+ {}" />
+
+
-
+
@@ -847,7 +890,10 @@
-
+
+
+
+
@@ -882,21 +928,26 @@
-
-
-
-
+
+
+
+
-
+
+
+
+
-
-
+
+
+
+
-
+
@@ -734,9 +822,7 @@
-
-
-
+
@@ -745,44 +831,76 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 只看我负责的
+
+
+
+
@@ -799,20 +917,20 @@
-
+
+
diff --git a/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue
index 6fc4d0f..19e17ae 100644
--- a/src/views/tested/MeasurementPlan/task/components/edit.vue
+++ b/src/views/tested/MeasurementPlan/task/components/edit.vue
@@ -4,10 +4,10 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import tableList from './tableList.vue'
+import { getUserDept, getUserList } from '@/api/system/user'
import { addTask, detailTask, updateTask } from '@/api/eqpt/measurementPlan/task'
import { getDictByCode } from '@/api/system/dict'
import useUserStore from '@/store/modules/user'
-import { getUserDept } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -63,11 +63,11 @@
}
const rules = ref({
deliverer: [{ required: true, message: '送检人必填', trigger: ['blur', 'change'] }],
- customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
+ // customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
customerPhone: [{ required: true, message: '电话必填', trigger: ['blur', 'change'] }],
- maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
+ // maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
planDeliverTime: [{ required: true, message: '预计送达时间必选', trigger: ['blur', 'change'] }],
- requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
+ // requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
isUrgent: [{ required: true, message: '是否加急必选', trigger: ['blur', 'change'] }],
measureCompany: [{ required: true, message: '检定(校准)单位必填', trigger: ['blur', 'change'] }],
undertakerName: [{ required: true, message: '承接人必填', trigger: ['blur', 'change'] }],
@@ -106,10 +106,17 @@
})
// 获取是否加急下拉列表
const isUrgentList = ref<{ id: string; value: string; name: string }[]>()
+// 送检人列表
+const personList = ref()
const fetchListData = () => {
getDictByCode('eqptisUrgent').then((res) => {
isUrgentList.value = res.data
})
+ getUserDept().then((res1) => {
+ getUserList({ offset: 1, limit: 99999, deptId: $route.path.includes('detail') ? '' : res1.data.id }).then((res) => {
+ personList.value = res.data.rows
+ })
+ })
}
fetchListData()
// 关闭弹窗
@@ -200,7 +207,18 @@
-
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index 7a7f676..6777bb8 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -18,23 +18,30 @@
const $route = useRoute()
// 表头显示标题
const columnsHandler = ref([
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
- text: '统一编号',
- value: 'sampleNo',
+ text: '设备名称',
+ value: 'sampleName',
required: true,
isBtn: true,
isUpload: false,
},
{
- text: '设备名称',
- value: 'sampleName',
- required: true,
+ text: '规格型号',
+ value: 'sampleModel',
+ required: false,
isBtn: false,
isUpload: false,
},
{
- text: '型号',
- value: 'sampleModel',
+ text: '生产厂家',
+ value: 'manufacturer',
required: false,
isBtn: false,
isUpload: false,
@@ -47,13 +54,13 @@
isUpload: true,
width: '350px',
},
- {
- text: '外观和功能检查',
- value: 'appearanceInspect',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '外观和功能检查',
+ // value: 'appearanceInspect',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
{
text: '特殊要求',
value: 'specialRequire',
@@ -61,22 +68,22 @@
isBtn: false,
isUpload: false,
},
- {
- text: '检校项目',
- value: 'measureContent',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '检校项目',
+ // value: 'measureContent',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
])
const columnsDetail = ref([
- {
- text: '统一编号',
- value: 'sampleNo',
- required: true,
- isBtn: true,
- isUpload: false,
- },
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
text: '设备名称',
value: 'sampleName',
@@ -85,13 +92,20 @@
isUpload: false,
},
{
- text: '型号',
+ text: '规格型号',
value: 'sampleModel',
required: false,
isBtn: false,
isUpload: false,
},
{
+ text: '生产厂家',
+ value: 'manufacturer',
+ required: false,
+ isBtn: false,
+ isUpload: false,
+ },
+ {
text: '附件',
value: 'appendixDescn',
required: false,
@@ -150,6 +164,7 @@
if (checkCertificateList()) {
setAllRowReadable()
list.value.push({
+ manufacturer: '',
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -189,7 +204,7 @@
const selectRow = ref()
// 单选设备
const select = (text: string, index: any) => {
- if (text === '统一编号') {
+ if (text === '设备名称') {
deviceSingeRef.value.initDialog()
selectRow.value = index
}
@@ -206,22 +221,26 @@
if (Array.isArray(device)) {
// 多选
device.forEach((item) => {
- list.value.push({
- appearanceInspect: '',
- appendixDescn: '',
- measureContent: '',
- sampleModel: item.model,
- sampleNo: item.equipmentNo,
- sampleId: item.id,
- sampleName: item.equipmentName,
- specialRequire: '',
- editable: true,
- })
+ if (!list.value.filter((c: any) => c.sampleId === item.id).length) {
+ list.value.push({
+ appearanceInspect: '',
+ appendixDescn: '',
+ measureContent: '',
+ manufacturer: item.manufacturer,
+ sampleModel: item.model,
+ sampleNo: item.equipmentNo,
+ sampleId: item.id,
+ sampleName: item.equipmentName,
+ specialRequire: '',
+ editable: false,
+ })
+ }
})
}
else {
// 单选
const row = {
+ manufacturer: device.manufacturer,
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -230,7 +249,7 @@
sampleNo: device.equipmentNo,
sampleName: device.equipmentName,
specialRequire: '',
- editable: true,
+ editable: false,
}
list.value[selectRow.value] = row
}
@@ -247,6 +266,7 @@
})
fd.append('multipartFile', event.target.files[0])
uploadApi(fd).then((res) => {
+ fileRef.value.value = ''
if (res.code === 200) {
list.value[currentIndex.value].appendixDescn = res.data[0]
// 重置当前验证
@@ -261,9 +281,12 @@
})
}
}
+const uploadRef = ref()
const upload = (index: number) => {
currentIndex.value = index
+ // window.onclick()
fileRef.value.click()
+ // deviceRef.value?.click()
}
const $router = useRouter()
const deviceDetail = (row: any) => {
@@ -338,10 +361,12 @@
-
+
+
+
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..138a543 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({ equipmentType: '1' }).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..d310206 100644
--- a/src/views/tested/device/info/components/edit.vue
+++ b/src/views/tested/device/info/components/edit.vue
@@ -21,6 +21,8 @@
import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model'
import { equipmentLabelBind } from '@/api/reader'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
+import { getLocationList } from '@/api/system/installation'
+import { getPostList } from '@/api/system/post'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -90,7 +92,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 +145,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'] }],
@@ -156,9 +173,13 @@
// 辅助字段
const helpList = ref([])
const allList = ref([])
+// 安装位置
+const installLocationList = ref([])
+// 使用岗位
+const usePositionList = ref([])
const fetchSelectData = async () => {
// 规格型号及辅助字段
- const res = await getModelAllList({})
+ const res = await getModelAllList({ equipmentType: $route.query.equipmentType })
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
@@ -180,10 +201,19 @@
deviceQualityList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: $route.query.equipmentType }).then((res) => {
deviceNameList.value = res.data
console.log(res.data, '设备名称')
})
+ // 使用岗位
+ getPostList({}).then((res) => {
+ usePositionList.value = res.data
+ })
+ // 安装位置
+ getLocationList().then((res) => {
+ // console.log(res.data, '安装位置')
+ installLocationList.value = res.data
+ })
}
// 监听设备名称下拉框,修改规格型号和辅助字段
watch(() => ruleForm.value.equipmentName, (newVal) => {
@@ -240,11 +270,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 +825,32 @@
+
+
+
+
+
-
+
-
-
-
+
+ {}" />
+
+
-
+
@@ -847,7 +890,10 @@
-
+
+
+
+
@@ -882,21 +928,26 @@
-
-
-
-
+
+
+
+
-
+
+
+
+
-
-
+
+
+
+
-
+
@@ -734,9 +822,7 @@
-
-
-
+
@@ -745,44 +831,76 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 只看我负责的
+
+
+
+
@@ -799,20 +917,20 @@
-
+
+
diff --git a/src/views/tested/device/info/components/showPhoto.vue b/src/views/tested/device/info/components/showPhoto.vue
index 3af1845..20148da 100644
--- a/src/views/tested/device/info/components/showPhoto.vue
+++ b/src/views/tested/device/info/components/showPhoto.vue
@@ -14,6 +14,10 @@
type: String,
default: '100px',
},
+ showClose: {
+ type: Boolean,
+ default: true,
+ },
})
const $emits = defineEmits(['delete'])
const $route = useRoute()
@@ -60,7 +64,7 @@
{{ item.minioFileName }}
- x
+ x
diff --git a/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue
index 6fc4d0f..19e17ae 100644
--- a/src/views/tested/MeasurementPlan/task/components/edit.vue
+++ b/src/views/tested/MeasurementPlan/task/components/edit.vue
@@ -4,10 +4,10 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import tableList from './tableList.vue'
+import { getUserDept, getUserList } from '@/api/system/user'
import { addTask, detailTask, updateTask } from '@/api/eqpt/measurementPlan/task'
import { getDictByCode } from '@/api/system/dict'
import useUserStore from '@/store/modules/user'
-import { getUserDept } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -63,11 +63,11 @@
}
const rules = ref({
deliverer: [{ required: true, message: '送检人必填', trigger: ['blur', 'change'] }],
- customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
+ // customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
customerPhone: [{ required: true, message: '电话必填', trigger: ['blur', 'change'] }],
- maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
+ // maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
planDeliverTime: [{ required: true, message: '预计送达时间必选', trigger: ['blur', 'change'] }],
- requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
+ // requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
isUrgent: [{ required: true, message: '是否加急必选', trigger: ['blur', 'change'] }],
measureCompany: [{ required: true, message: '检定(校准)单位必填', trigger: ['blur', 'change'] }],
undertakerName: [{ required: true, message: '承接人必填', trigger: ['blur', 'change'] }],
@@ -106,10 +106,17 @@
})
// 获取是否加急下拉列表
const isUrgentList = ref<{ id: string; value: string; name: string }[]>()
+// 送检人列表
+const personList = ref()
const fetchListData = () => {
getDictByCode('eqptisUrgent').then((res) => {
isUrgentList.value = res.data
})
+ getUserDept().then((res1) => {
+ getUserList({ offset: 1, limit: 99999, deptId: $route.path.includes('detail') ? '' : res1.data.id }).then((res) => {
+ personList.value = res.data.rows
+ })
+ })
}
fetchListData()
// 关闭弹窗
@@ -200,7 +207,18 @@
-
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index 7a7f676..6777bb8 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -18,23 +18,30 @@
const $route = useRoute()
// 表头显示标题
const columnsHandler = ref([
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
- text: '统一编号',
- value: 'sampleNo',
+ text: '设备名称',
+ value: 'sampleName',
required: true,
isBtn: true,
isUpload: false,
},
{
- text: '设备名称',
- value: 'sampleName',
- required: true,
+ text: '规格型号',
+ value: 'sampleModel',
+ required: false,
isBtn: false,
isUpload: false,
},
{
- text: '型号',
- value: 'sampleModel',
+ text: '生产厂家',
+ value: 'manufacturer',
required: false,
isBtn: false,
isUpload: false,
@@ -47,13 +54,13 @@
isUpload: true,
width: '350px',
},
- {
- text: '外观和功能检查',
- value: 'appearanceInspect',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '外观和功能检查',
+ // value: 'appearanceInspect',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
{
text: '特殊要求',
value: 'specialRequire',
@@ -61,22 +68,22 @@
isBtn: false,
isUpload: false,
},
- {
- text: '检校项目',
- value: 'measureContent',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '检校项目',
+ // value: 'measureContent',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
])
const columnsDetail = ref([
- {
- text: '统一编号',
- value: 'sampleNo',
- required: true,
- isBtn: true,
- isUpload: false,
- },
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
text: '设备名称',
value: 'sampleName',
@@ -85,13 +92,20 @@
isUpload: false,
},
{
- text: '型号',
+ text: '规格型号',
value: 'sampleModel',
required: false,
isBtn: false,
isUpload: false,
},
{
+ text: '生产厂家',
+ value: 'manufacturer',
+ required: false,
+ isBtn: false,
+ isUpload: false,
+ },
+ {
text: '附件',
value: 'appendixDescn',
required: false,
@@ -150,6 +164,7 @@
if (checkCertificateList()) {
setAllRowReadable()
list.value.push({
+ manufacturer: '',
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -189,7 +204,7 @@
const selectRow = ref()
// 单选设备
const select = (text: string, index: any) => {
- if (text === '统一编号') {
+ if (text === '设备名称') {
deviceSingeRef.value.initDialog()
selectRow.value = index
}
@@ -206,22 +221,26 @@
if (Array.isArray(device)) {
// 多选
device.forEach((item) => {
- list.value.push({
- appearanceInspect: '',
- appendixDescn: '',
- measureContent: '',
- sampleModel: item.model,
- sampleNo: item.equipmentNo,
- sampleId: item.id,
- sampleName: item.equipmentName,
- specialRequire: '',
- editable: true,
- })
+ if (!list.value.filter((c: any) => c.sampleId === item.id).length) {
+ list.value.push({
+ appearanceInspect: '',
+ appendixDescn: '',
+ measureContent: '',
+ manufacturer: item.manufacturer,
+ sampleModel: item.model,
+ sampleNo: item.equipmentNo,
+ sampleId: item.id,
+ sampleName: item.equipmentName,
+ specialRequire: '',
+ editable: false,
+ })
+ }
})
}
else {
// 单选
const row = {
+ manufacturer: device.manufacturer,
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -230,7 +249,7 @@
sampleNo: device.equipmentNo,
sampleName: device.equipmentName,
specialRequire: '',
- editable: true,
+ editable: false,
}
list.value[selectRow.value] = row
}
@@ -247,6 +266,7 @@
})
fd.append('multipartFile', event.target.files[0])
uploadApi(fd).then((res) => {
+ fileRef.value.value = ''
if (res.code === 200) {
list.value[currentIndex.value].appendixDescn = res.data[0]
// 重置当前验证
@@ -261,9 +281,12 @@
})
}
}
+const uploadRef = ref()
const upload = (index: number) => {
currentIndex.value = index
+ // window.onclick()
fileRef.value.click()
+ // deviceRef.value?.click()
}
const $router = useRouter()
const deviceDetail = (row: any) => {
@@ -338,10 +361,12 @@
-
+
+
+
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..138a543 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({ equipmentType: '1' }).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..d310206 100644
--- a/src/views/tested/device/info/components/edit.vue
+++ b/src/views/tested/device/info/components/edit.vue
@@ -21,6 +21,8 @@
import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model'
import { equipmentLabelBind } from '@/api/reader'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
+import { getLocationList } from '@/api/system/installation'
+import { getPostList } from '@/api/system/post'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -90,7 +92,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 +145,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'] }],
@@ -156,9 +173,13 @@
// 辅助字段
const helpList = ref([])
const allList = ref([])
+// 安装位置
+const installLocationList = ref([])
+// 使用岗位
+const usePositionList = ref([])
const fetchSelectData = async () => {
// 规格型号及辅助字段
- const res = await getModelAllList({})
+ const res = await getModelAllList({ equipmentType: $route.query.equipmentType })
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
@@ -180,10 +201,19 @@
deviceQualityList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: $route.query.equipmentType }).then((res) => {
deviceNameList.value = res.data
console.log(res.data, '设备名称')
})
+ // 使用岗位
+ getPostList({}).then((res) => {
+ usePositionList.value = res.data
+ })
+ // 安装位置
+ getLocationList().then((res) => {
+ // console.log(res.data, '安装位置')
+ installLocationList.value = res.data
+ })
}
// 监听设备名称下拉框,修改规格型号和辅助字段
watch(() => ruleForm.value.equipmentName, (newVal) => {
@@ -240,11 +270,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 +825,32 @@
+
+
+
+
+
-
+
-
-
-
+
+ {}" />
+
+
-
+
@@ -847,7 +890,10 @@
-
+
+
+
+
@@ -882,21 +928,26 @@
-
-
-
-
+
+
+
+
-
+
+
+
+
-
-
+
+
+
+
-
+
@@ -734,9 +822,7 @@
-
-
-
+
@@ -745,44 +831,76 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 只看我负责的
+
+
+
+
@@ -799,20 +917,20 @@
-
+
+
diff --git a/src/views/tested/device/info/components/showPhoto.vue b/src/views/tested/device/info/components/showPhoto.vue
index 3af1845..20148da 100644
--- a/src/views/tested/device/info/components/showPhoto.vue
+++ b/src/views/tested/device/info/components/showPhoto.vue
@@ -14,6 +14,10 @@
type: String,
default: '100px',
},
+ showClose: {
+ type: Boolean,
+ default: true,
+ },
})
const $emits = defineEmits(['delete'])
const $route = useRoute()
@@ -60,7 +64,7 @@
{{ item.minioFileName }}
- x
+ x
diff --git a/src/views/tested/device/model/components/edit.vue b/src/views/tested/device/model/components/edit.vue
index 86765f3..f9b05e5 100644
--- a/src/views/tested/device/model/components/edit.vue
+++ b/src/views/tested/device/model/components/edit.vue
@@ -39,6 +39,8 @@
remark: '', // 备注
technicalTargetList: [], // 技术指标
updateTime: '',
+ equipmentType: '',
+ inspectable: [] as any,
}) // 表单
// 设备名称验证规则
const checkCycle = (rule: any, value: any, callback: any) => {
@@ -52,12 +54,20 @@
callback()
}
}
+// 表单验证规则
const rules = ref({
- equipmentName: [{ required: true, message: '设备名称名称必填', trigger: ['blur', 'change'] }],
- category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
+ equipmentName: [{ required: true, message: '设备名称必填', trigger: ['blur', 'change'] }],
+ equipmentType: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
+ // category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
model: [{ required: true, message: '规格型号必填', trigger: ['blur', 'change'] }],
checkCycle: [{ required: true, validator: checkCycle, trigger: ['blur', 'change'] }],
-}) // 表单验证规则
+})
+// 当计量站可检时,设备分类必填
+watch(() => ruleForm.value.inspectable, (newVal) => {
+ if (newVal?.length) {
+ rules.value.category = [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }]
+ }
+}, { deep: true })
// 弹窗初始化
const initDialog = () => {
dialogStatus.value = $route.params.type as string
@@ -74,8 +84,15 @@
else {
const data = JSON.parse($route.query.row as string)
// detailGroup({ groupId: data.id }).then((res) => {
- ruleForm.value = data
// })
+ ruleForm.value = data
+ // 计量站是否可检
+ if (data.inspectable) {
+ ruleForm.value.inspectable = data.inspectable.split(',')
+ }
+ else {
+ ruleForm.value.inspectable = []
+ }
}
}
onMounted(() => {
@@ -105,8 +122,12 @@
ruleForm.value.helpInstruction = '/'
}
ruleForm.value.technicalTargetList = tableRef.value.list
+ const data = {
+ ...ruleForm.value,
+ inspectable: ruleForm.value.inspectable.join(','),
+ }
if ($route.params.type === 'create') {
- handlerFunApi('create', ruleForm.value).then((res) => {
+ handlerFunApi('create', data).then((res) => {
ElMessage.success('添加成功')
close()
})
@@ -114,7 +135,7 @@
else {
// ruleForm.value.technicalTargetList = tableRef.value.list
console.log(ruleForm.value)
- handlerFunApi('update', ruleForm.value).then((res) => {
+ handlerFunApi('update', data).then((res) => {
ElMessage.success('修改成功')
close()
})
@@ -166,11 +187,17 @@
}
// 设备分类
const deviceTypeList = ref<{ id: string; value: string; name: string }[]>([])
+// 设备类型
+const deviceCateList = ref<{ id: string; value: string; name: string }[]>([])
const fetchSelect = () => {
// 设备分类
getDictByCode('eqptDeviceType').then((res) => {
deviceTypeList.value = res.data
})
+ // 设备类型
+ getDictByCode('eqptDeviceCategory').then((res) => {
+ deviceCateList.value = res.data
+ })
// 设备名称
// getDeviceNameList().then((res) => {
// console.log(res.data, '设备名称')
@@ -208,34 +235,40 @@
:model="ruleForm"
:rules="rules" label-position="right" label-width="110px" class="form"
:disabled="dialogStatus === 'detail'"
- :class="$route.path.includes('detail') ? 'isDetail' : ''"
+ :class="[$route.path.includes('detail') ? 'isDetail' : '']"
>
-
+
+
+
+
+
+
-
+
-
+
-
+
-
+
@@ -267,8 +300,8 @@
-
-
+
+
@@ -278,11 +311,19 @@
+
+
+
+
+
+
+
+
-
+
@@ -295,5 +336,13 @@
diff --git a/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue
index 6fc4d0f..19e17ae 100644
--- a/src/views/tested/MeasurementPlan/task/components/edit.vue
+++ b/src/views/tested/MeasurementPlan/task/components/edit.vue
@@ -4,10 +4,10 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import tableList from './tableList.vue'
+import { getUserDept, getUserList } from '@/api/system/user'
import { addTask, detailTask, updateTask } from '@/api/eqpt/measurementPlan/task'
import { getDictByCode } from '@/api/system/dict'
import useUserStore from '@/store/modules/user'
-import { getUserDept } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -63,11 +63,11 @@
}
const rules = ref({
deliverer: [{ required: true, message: '送检人必填', trigger: ['blur', 'change'] }],
- customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
+ // customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
customerPhone: [{ required: true, message: '电话必填', trigger: ['blur', 'change'] }],
- maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
+ // maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
planDeliverTime: [{ required: true, message: '预计送达时间必选', trigger: ['blur', 'change'] }],
- requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
+ // requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
isUrgent: [{ required: true, message: '是否加急必选', trigger: ['blur', 'change'] }],
measureCompany: [{ required: true, message: '检定(校准)单位必填', trigger: ['blur', 'change'] }],
undertakerName: [{ required: true, message: '承接人必填', trigger: ['blur', 'change'] }],
@@ -106,10 +106,17 @@
})
// 获取是否加急下拉列表
const isUrgentList = ref<{ id: string; value: string; name: string }[]>()
+// 送检人列表
+const personList = ref()
const fetchListData = () => {
getDictByCode('eqptisUrgent').then((res) => {
isUrgentList.value = res.data
})
+ getUserDept().then((res1) => {
+ getUserList({ offset: 1, limit: 99999, deptId: $route.path.includes('detail') ? '' : res1.data.id }).then((res) => {
+ personList.value = res.data.rows
+ })
+ })
}
fetchListData()
// 关闭弹窗
@@ -200,7 +207,18 @@
-
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index 7a7f676..6777bb8 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -18,23 +18,30 @@
const $route = useRoute()
// 表头显示标题
const columnsHandler = ref([
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
- text: '统一编号',
- value: 'sampleNo',
+ text: '设备名称',
+ value: 'sampleName',
required: true,
isBtn: true,
isUpload: false,
},
{
- text: '设备名称',
- value: 'sampleName',
- required: true,
+ text: '规格型号',
+ value: 'sampleModel',
+ required: false,
isBtn: false,
isUpload: false,
},
{
- text: '型号',
- value: 'sampleModel',
+ text: '生产厂家',
+ value: 'manufacturer',
required: false,
isBtn: false,
isUpload: false,
@@ -47,13 +54,13 @@
isUpload: true,
width: '350px',
},
- {
- text: '外观和功能检查',
- value: 'appearanceInspect',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '外观和功能检查',
+ // value: 'appearanceInspect',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
{
text: '特殊要求',
value: 'specialRequire',
@@ -61,22 +68,22 @@
isBtn: false,
isUpload: false,
},
- {
- text: '检校项目',
- value: 'measureContent',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '检校项目',
+ // value: 'measureContent',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
])
const columnsDetail = ref([
- {
- text: '统一编号',
- value: 'sampleNo',
- required: true,
- isBtn: true,
- isUpload: false,
- },
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
text: '设备名称',
value: 'sampleName',
@@ -85,13 +92,20 @@
isUpload: false,
},
{
- text: '型号',
+ text: '规格型号',
value: 'sampleModel',
required: false,
isBtn: false,
isUpload: false,
},
{
+ text: '生产厂家',
+ value: 'manufacturer',
+ required: false,
+ isBtn: false,
+ isUpload: false,
+ },
+ {
text: '附件',
value: 'appendixDescn',
required: false,
@@ -150,6 +164,7 @@
if (checkCertificateList()) {
setAllRowReadable()
list.value.push({
+ manufacturer: '',
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -189,7 +204,7 @@
const selectRow = ref()
// 单选设备
const select = (text: string, index: any) => {
- if (text === '统一编号') {
+ if (text === '设备名称') {
deviceSingeRef.value.initDialog()
selectRow.value = index
}
@@ -206,22 +221,26 @@
if (Array.isArray(device)) {
// 多选
device.forEach((item) => {
- list.value.push({
- appearanceInspect: '',
- appendixDescn: '',
- measureContent: '',
- sampleModel: item.model,
- sampleNo: item.equipmentNo,
- sampleId: item.id,
- sampleName: item.equipmentName,
- specialRequire: '',
- editable: true,
- })
+ if (!list.value.filter((c: any) => c.sampleId === item.id).length) {
+ list.value.push({
+ appearanceInspect: '',
+ appendixDescn: '',
+ measureContent: '',
+ manufacturer: item.manufacturer,
+ sampleModel: item.model,
+ sampleNo: item.equipmentNo,
+ sampleId: item.id,
+ sampleName: item.equipmentName,
+ specialRequire: '',
+ editable: false,
+ })
+ }
})
}
else {
// 单选
const row = {
+ manufacturer: device.manufacturer,
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -230,7 +249,7 @@
sampleNo: device.equipmentNo,
sampleName: device.equipmentName,
specialRequire: '',
- editable: true,
+ editable: false,
}
list.value[selectRow.value] = row
}
@@ -247,6 +266,7 @@
})
fd.append('multipartFile', event.target.files[0])
uploadApi(fd).then((res) => {
+ fileRef.value.value = ''
if (res.code === 200) {
list.value[currentIndex.value].appendixDescn = res.data[0]
// 重置当前验证
@@ -261,9 +281,12 @@
})
}
}
+const uploadRef = ref()
const upload = (index: number) => {
currentIndex.value = index
+ // window.onclick()
fileRef.value.click()
+ // deviceRef.value?.click()
}
const $router = useRouter()
const deviceDetail = (row: any) => {
@@ -338,10 +361,12 @@
-
+
+
+
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..138a543 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({ equipmentType: '1' }).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..d310206 100644
--- a/src/views/tested/device/info/components/edit.vue
+++ b/src/views/tested/device/info/components/edit.vue
@@ -21,6 +21,8 @@
import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model'
import { equipmentLabelBind } from '@/api/reader'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
+import { getLocationList } from '@/api/system/installation'
+import { getPostList } from '@/api/system/post'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -90,7 +92,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 +145,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'] }],
@@ -156,9 +173,13 @@
// 辅助字段
const helpList = ref([])
const allList = ref([])
+// 安装位置
+const installLocationList = ref([])
+// 使用岗位
+const usePositionList = ref([])
const fetchSelectData = async () => {
// 规格型号及辅助字段
- const res = await getModelAllList({})
+ const res = await getModelAllList({ equipmentType: $route.query.equipmentType })
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
@@ -180,10 +201,19 @@
deviceQualityList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: $route.query.equipmentType }).then((res) => {
deviceNameList.value = res.data
console.log(res.data, '设备名称')
})
+ // 使用岗位
+ getPostList({}).then((res) => {
+ usePositionList.value = res.data
+ })
+ // 安装位置
+ getLocationList().then((res) => {
+ // console.log(res.data, '安装位置')
+ installLocationList.value = res.data
+ })
}
// 监听设备名称下拉框,修改规格型号和辅助字段
watch(() => ruleForm.value.equipmentName, (newVal) => {
@@ -240,11 +270,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 +825,32 @@
+
+
+
+
+
-
+
-
-
-
+
+ {}" />
+
+
-
+
@@ -847,7 +890,10 @@
-
+
+
+
+
@@ -882,21 +928,26 @@
-
-
-
-
+
+
+
+
-
+
+
+
+
-
-
+
+
+
+
-
+
@@ -734,9 +822,7 @@
-
-
-
+
@@ -745,44 +831,76 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 只看我负责的
+
+
+
+
@@ -799,20 +917,20 @@
-
+
+
diff --git a/src/views/tested/device/info/components/showPhoto.vue b/src/views/tested/device/info/components/showPhoto.vue
index 3af1845..20148da 100644
--- a/src/views/tested/device/info/components/showPhoto.vue
+++ b/src/views/tested/device/info/components/showPhoto.vue
@@ -14,6 +14,10 @@
type: String,
default: '100px',
},
+ showClose: {
+ type: Boolean,
+ default: true,
+ },
})
const $emits = defineEmits(['delete'])
const $route = useRoute()
@@ -60,7 +64,7 @@
{{ item.minioFileName }}
- x
+ x
diff --git a/src/views/tested/device/model/components/edit.vue b/src/views/tested/device/model/components/edit.vue
index 86765f3..f9b05e5 100644
--- a/src/views/tested/device/model/components/edit.vue
+++ b/src/views/tested/device/model/components/edit.vue
@@ -39,6 +39,8 @@
remark: '', // 备注
technicalTargetList: [], // 技术指标
updateTime: '',
+ equipmentType: '',
+ inspectable: [] as any,
}) // 表单
// 设备名称验证规则
const checkCycle = (rule: any, value: any, callback: any) => {
@@ -52,12 +54,20 @@
callback()
}
}
+// 表单验证规则
const rules = ref({
- equipmentName: [{ required: true, message: '设备名称名称必填', trigger: ['blur', 'change'] }],
- category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
+ equipmentName: [{ required: true, message: '设备名称必填', trigger: ['blur', 'change'] }],
+ equipmentType: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
+ // category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
model: [{ required: true, message: '规格型号必填', trigger: ['blur', 'change'] }],
checkCycle: [{ required: true, validator: checkCycle, trigger: ['blur', 'change'] }],
-}) // 表单验证规则
+})
+// 当计量站可检时,设备分类必填
+watch(() => ruleForm.value.inspectable, (newVal) => {
+ if (newVal?.length) {
+ rules.value.category = [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }]
+ }
+}, { deep: true })
// 弹窗初始化
const initDialog = () => {
dialogStatus.value = $route.params.type as string
@@ -74,8 +84,15 @@
else {
const data = JSON.parse($route.query.row as string)
// detailGroup({ groupId: data.id }).then((res) => {
- ruleForm.value = data
// })
+ ruleForm.value = data
+ // 计量站是否可检
+ if (data.inspectable) {
+ ruleForm.value.inspectable = data.inspectable.split(',')
+ }
+ else {
+ ruleForm.value.inspectable = []
+ }
}
}
onMounted(() => {
@@ -105,8 +122,12 @@
ruleForm.value.helpInstruction = '/'
}
ruleForm.value.technicalTargetList = tableRef.value.list
+ const data = {
+ ...ruleForm.value,
+ inspectable: ruleForm.value.inspectable.join(','),
+ }
if ($route.params.type === 'create') {
- handlerFunApi('create', ruleForm.value).then((res) => {
+ handlerFunApi('create', data).then((res) => {
ElMessage.success('添加成功')
close()
})
@@ -114,7 +135,7 @@
else {
// ruleForm.value.technicalTargetList = tableRef.value.list
console.log(ruleForm.value)
- handlerFunApi('update', ruleForm.value).then((res) => {
+ handlerFunApi('update', data).then((res) => {
ElMessage.success('修改成功')
close()
})
@@ -166,11 +187,17 @@
}
// 设备分类
const deviceTypeList = ref<{ id: string; value: string; name: string }[]>([])
+// 设备类型
+const deviceCateList = ref<{ id: string; value: string; name: string }[]>([])
const fetchSelect = () => {
// 设备分类
getDictByCode('eqptDeviceType').then((res) => {
deviceTypeList.value = res.data
})
+ // 设备类型
+ getDictByCode('eqptDeviceCategory').then((res) => {
+ deviceCateList.value = res.data
+ })
// 设备名称
// getDeviceNameList().then((res) => {
// console.log(res.data, '设备名称')
@@ -208,34 +235,40 @@
:model="ruleForm"
:rules="rules" label-position="right" label-width="110px" class="form"
:disabled="dialogStatus === 'detail'"
- :class="$route.path.includes('detail') ? 'isDetail' : ''"
+ :class="[$route.path.includes('detail') ? 'isDetail' : '']"
>
-
+
+
+
+
+
+
-
+
-
+
-
+
-
+
@@ -267,8 +300,8 @@
-
-
+
+
@@ -278,11 +311,19 @@
+
+
+
+
+
+
+
+
-
+
@@ -295,5 +336,13 @@
diff --git a/src/views/tested/device/model/components/list.vue b/src/views/tested/device/model/components/list.vue
index f3a4eca..5985bc6 100644
--- a/src/views/tested/device/model/components/list.vue
+++ b/src/views/tested/device/model/components/list.vue
@@ -5,9 +5,12 @@
import { deleteModel, exportModelList, getDeviceNameList, getModelAllList, getModelByname, getModelList } from '@/api/eqpt/device/model'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
+import { getPhotoUrl } from '@/api/system/tool'
+import { download } from '@/utils/download'
+import showPhoto from '@/views/tested/device/info/components/showPhoto.vue'
const { proxy } = getCurrentInstance() as any
const listQuery = reactive({
- // type: '',
+ equipmentType: '',
category: '',
equipmentName: '',
helpInstruction: '',
@@ -17,8 +20,8 @@
})
const columns = ref([
{
- text: '规格型号编号',
- value: 'modelNo',
+ text: '设备类型',
+ value: 'equipmentTypeName',
align: 'center',
},
{
@@ -46,16 +49,16 @@
value: 'checkCycle',
align: 'center',
},
- {
- text: '使用说明书',
- value: 'instructionsFile',
- align: 'center',
- },
- {
- text: '备注',
- value: 'remark',
- align: 'center',
- },
+ // {
+ // text: '使用说明书',
+ // value: 'instructionsFile',
+ // align: 'center',
+ // },
+ // {
+ // text: '备注',
+ // value: 'remark',
+ // align: 'center',
+ // },
])
const list = ref([])
const total = ref(0)
@@ -152,6 +155,13 @@
ElMessage.warning('无可导出内容')
}
}
+// 打开文件
+const clickFile = (fileName: string) => {
+ getPhotoUrl(fileName).then((res) => {
+ // console.log(res.data, 'url')
+ download(res.data, fileName)
+ })
+}
// 获取下拉列表相关
// 设备名称
const deviceNameList = ref
([])
@@ -174,11 +184,11 @@
deviceCategoryList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
@@ -186,13 +196,35 @@
}
fetchSelect()
// 监听设备分类
-// watch(() => listQuery.type, () => {
-// listQuery.helpInstruction = ''
-// listQuery.model = ''
-// listQuery.helpInstruction = ''
-// }, {
-// deep: true,
-// })
+watch(() => listQuery.equipmentType, (newVal) => {
+ listQuery.equipmentName = ''
+ listQuery.model = ''
+ listQuery.helpInstruction = ''
+ if (newVal) {
+ // 设备名称
+ getDeviceNameList({ equipmentType: newVal }).then((res) => {
+ deviceNameList.value = res.data
+ })
+ getModelAllList({ equipmentType: newVal }).then((res) => {
+ allList.value = res.data
+ modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
+ helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
+ })
+ }
+ else {
+ // 设备名称
+ getDeviceNameList({ equipmentType: '' }).then((res) => {
+ deviceNameList.value = res.data
+ })
+ getModelAllList({ equipmentType: '' }).then((res) => {
+ allList.value = res.data
+ modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
+ helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
+ })
+ }
+}, {
+ deep: true,
+})
// 监听设备名称下拉框,修改规格型号和辅助字段
watch(() => listQuery.equipmentName, (newVal) => {
listQuery.helpInstruction = ''
@@ -224,7 +256,7 @@
})
// 重置
const reset = () => {
- // listQuery.type = ''
+ listQuery.equipmentType = ''
listQuery.category = ''
listQuery.equipmentName = ''
listQuery.helpInstruction = ''
@@ -241,11 +273,11 @@
-
+
@@ -281,6 +313,19 @@
:is-showmulti-select="true" :is-multi="true" @change="changePage" @multi-select="multiSelect"
>
+
+
+
+ {}" />
+
+
+
+
+ {{ scope.row.remark }}
+
+
diff --git a/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue
index 6fc4d0f..19e17ae 100644
--- a/src/views/tested/MeasurementPlan/task/components/edit.vue
+++ b/src/views/tested/MeasurementPlan/task/components/edit.vue
@@ -4,10 +4,10 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import tableList from './tableList.vue'
+import { getUserDept, getUserList } from '@/api/system/user'
import { addTask, detailTask, updateTask } from '@/api/eqpt/measurementPlan/task'
import { getDictByCode } from '@/api/system/dict'
import useUserStore from '@/store/modules/user'
-import { getUserDept } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -63,11 +63,11 @@
}
const rules = ref({
deliverer: [{ required: true, message: '送检人必填', trigger: ['blur', 'change'] }],
- customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
+ // customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
customerPhone: [{ required: true, message: '电话必填', trigger: ['blur', 'change'] }],
- maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
+ // maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
planDeliverTime: [{ required: true, message: '预计送达时间必选', trigger: ['blur', 'change'] }],
- requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
+ // requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
isUrgent: [{ required: true, message: '是否加急必选', trigger: ['blur', 'change'] }],
measureCompany: [{ required: true, message: '检定(校准)单位必填', trigger: ['blur', 'change'] }],
undertakerName: [{ required: true, message: '承接人必填', trigger: ['blur', 'change'] }],
@@ -106,10 +106,17 @@
})
// 获取是否加急下拉列表
const isUrgentList = ref<{ id: string; value: string; name: string }[]>()
+// 送检人列表
+const personList = ref()
const fetchListData = () => {
getDictByCode('eqptisUrgent').then((res) => {
isUrgentList.value = res.data
})
+ getUserDept().then((res1) => {
+ getUserList({ offset: 1, limit: 99999, deptId: $route.path.includes('detail') ? '' : res1.data.id }).then((res) => {
+ personList.value = res.data.rows
+ })
+ })
}
fetchListData()
// 关闭弹窗
@@ -200,7 +207,18 @@
-
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index 7a7f676..6777bb8 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -18,23 +18,30 @@
const $route = useRoute()
// 表头显示标题
const columnsHandler = ref([
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
- text: '统一编号',
- value: 'sampleNo',
+ text: '设备名称',
+ value: 'sampleName',
required: true,
isBtn: true,
isUpload: false,
},
{
- text: '设备名称',
- value: 'sampleName',
- required: true,
+ text: '规格型号',
+ value: 'sampleModel',
+ required: false,
isBtn: false,
isUpload: false,
},
{
- text: '型号',
- value: 'sampleModel',
+ text: '生产厂家',
+ value: 'manufacturer',
required: false,
isBtn: false,
isUpload: false,
@@ -47,13 +54,13 @@
isUpload: true,
width: '350px',
},
- {
- text: '外观和功能检查',
- value: 'appearanceInspect',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '外观和功能检查',
+ // value: 'appearanceInspect',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
{
text: '特殊要求',
value: 'specialRequire',
@@ -61,22 +68,22 @@
isBtn: false,
isUpload: false,
},
- {
- text: '检校项目',
- value: 'measureContent',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '检校项目',
+ // value: 'measureContent',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
])
const columnsDetail = ref([
- {
- text: '统一编号',
- value: 'sampleNo',
- required: true,
- isBtn: true,
- isUpload: false,
- },
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
text: '设备名称',
value: 'sampleName',
@@ -85,13 +92,20 @@
isUpload: false,
},
{
- text: '型号',
+ text: '规格型号',
value: 'sampleModel',
required: false,
isBtn: false,
isUpload: false,
},
{
+ text: '生产厂家',
+ value: 'manufacturer',
+ required: false,
+ isBtn: false,
+ isUpload: false,
+ },
+ {
text: '附件',
value: 'appendixDescn',
required: false,
@@ -150,6 +164,7 @@
if (checkCertificateList()) {
setAllRowReadable()
list.value.push({
+ manufacturer: '',
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -189,7 +204,7 @@
const selectRow = ref()
// 单选设备
const select = (text: string, index: any) => {
- if (text === '统一编号') {
+ if (text === '设备名称') {
deviceSingeRef.value.initDialog()
selectRow.value = index
}
@@ -206,22 +221,26 @@
if (Array.isArray(device)) {
// 多选
device.forEach((item) => {
- list.value.push({
- appearanceInspect: '',
- appendixDescn: '',
- measureContent: '',
- sampleModel: item.model,
- sampleNo: item.equipmentNo,
- sampleId: item.id,
- sampleName: item.equipmentName,
- specialRequire: '',
- editable: true,
- })
+ if (!list.value.filter((c: any) => c.sampleId === item.id).length) {
+ list.value.push({
+ appearanceInspect: '',
+ appendixDescn: '',
+ measureContent: '',
+ manufacturer: item.manufacturer,
+ sampleModel: item.model,
+ sampleNo: item.equipmentNo,
+ sampleId: item.id,
+ sampleName: item.equipmentName,
+ specialRequire: '',
+ editable: false,
+ })
+ }
})
}
else {
// 单选
const row = {
+ manufacturer: device.manufacturer,
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -230,7 +249,7 @@
sampleNo: device.equipmentNo,
sampleName: device.equipmentName,
specialRequire: '',
- editable: true,
+ editable: false,
}
list.value[selectRow.value] = row
}
@@ -247,6 +266,7 @@
})
fd.append('multipartFile', event.target.files[0])
uploadApi(fd).then((res) => {
+ fileRef.value.value = ''
if (res.code === 200) {
list.value[currentIndex.value].appendixDescn = res.data[0]
// 重置当前验证
@@ -261,9 +281,12 @@
})
}
}
+const uploadRef = ref()
const upload = (index: number) => {
currentIndex.value = index
+ // window.onclick()
fileRef.value.click()
+ // deviceRef.value?.click()
}
const $router = useRouter()
const deviceDetail = (row: any) => {
@@ -338,10 +361,12 @@
-
+
+
+
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..138a543 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({ equipmentType: '1' }).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..d310206 100644
--- a/src/views/tested/device/info/components/edit.vue
+++ b/src/views/tested/device/info/components/edit.vue
@@ -21,6 +21,8 @@
import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model'
import { equipmentLabelBind } from '@/api/reader'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
+import { getLocationList } from '@/api/system/installation'
+import { getPostList } from '@/api/system/post'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -90,7 +92,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 +145,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'] }],
@@ -156,9 +173,13 @@
// 辅助字段
const helpList = ref([])
const allList = ref([])
+// 安装位置
+const installLocationList = ref([])
+// 使用岗位
+const usePositionList = ref([])
const fetchSelectData = async () => {
// 规格型号及辅助字段
- const res = await getModelAllList({})
+ const res = await getModelAllList({ equipmentType: $route.query.equipmentType })
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
@@ -180,10 +201,19 @@
deviceQualityList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: $route.query.equipmentType }).then((res) => {
deviceNameList.value = res.data
console.log(res.data, '设备名称')
})
+ // 使用岗位
+ getPostList({}).then((res) => {
+ usePositionList.value = res.data
+ })
+ // 安装位置
+ getLocationList().then((res) => {
+ // console.log(res.data, '安装位置')
+ installLocationList.value = res.data
+ })
}
// 监听设备名称下拉框,修改规格型号和辅助字段
watch(() => ruleForm.value.equipmentName, (newVal) => {
@@ -240,11 +270,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 +825,32 @@
+
+
+
+
+
-
+
-
-
-
+
+ {}" />
+
+
-
+
@@ -847,7 +890,10 @@
-
+
+
+
+
@@ -882,21 +928,26 @@
-
-
-
-
+
+
+
+
-
+
+
+
+
-
-
+
+
+
+
-
+
@@ -734,9 +822,7 @@
-
-
-
+
@@ -745,44 +831,76 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 只看我负责的
+
+
+
+
@@ -799,20 +917,20 @@
-
+
+
diff --git a/src/views/tested/device/info/components/showPhoto.vue b/src/views/tested/device/info/components/showPhoto.vue
index 3af1845..20148da 100644
--- a/src/views/tested/device/info/components/showPhoto.vue
+++ b/src/views/tested/device/info/components/showPhoto.vue
@@ -14,6 +14,10 @@
type: String,
default: '100px',
},
+ showClose: {
+ type: Boolean,
+ default: true,
+ },
})
const $emits = defineEmits(['delete'])
const $route = useRoute()
@@ -60,7 +64,7 @@
{{ item.minioFileName }}
- x
+ x
diff --git a/src/views/tested/device/model/components/edit.vue b/src/views/tested/device/model/components/edit.vue
index 86765f3..f9b05e5 100644
--- a/src/views/tested/device/model/components/edit.vue
+++ b/src/views/tested/device/model/components/edit.vue
@@ -39,6 +39,8 @@
remark: '', // 备注
technicalTargetList: [], // 技术指标
updateTime: '',
+ equipmentType: '',
+ inspectable: [] as any,
}) // 表单
// 设备名称验证规则
const checkCycle = (rule: any, value: any, callback: any) => {
@@ -52,12 +54,20 @@
callback()
}
}
+// 表单验证规则
const rules = ref({
- equipmentName: [{ required: true, message: '设备名称名称必填', trigger: ['blur', 'change'] }],
- category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
+ equipmentName: [{ required: true, message: '设备名称必填', trigger: ['blur', 'change'] }],
+ equipmentType: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
+ // category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
model: [{ required: true, message: '规格型号必填', trigger: ['blur', 'change'] }],
checkCycle: [{ required: true, validator: checkCycle, trigger: ['blur', 'change'] }],
-}) // 表单验证规则
+})
+// 当计量站可检时,设备分类必填
+watch(() => ruleForm.value.inspectable, (newVal) => {
+ if (newVal?.length) {
+ rules.value.category = [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }]
+ }
+}, { deep: true })
// 弹窗初始化
const initDialog = () => {
dialogStatus.value = $route.params.type as string
@@ -74,8 +84,15 @@
else {
const data = JSON.parse($route.query.row as string)
// detailGroup({ groupId: data.id }).then((res) => {
- ruleForm.value = data
// })
+ ruleForm.value = data
+ // 计量站是否可检
+ if (data.inspectable) {
+ ruleForm.value.inspectable = data.inspectable.split(',')
+ }
+ else {
+ ruleForm.value.inspectable = []
+ }
}
}
onMounted(() => {
@@ -105,8 +122,12 @@
ruleForm.value.helpInstruction = '/'
}
ruleForm.value.technicalTargetList = tableRef.value.list
+ const data = {
+ ...ruleForm.value,
+ inspectable: ruleForm.value.inspectable.join(','),
+ }
if ($route.params.type === 'create') {
- handlerFunApi('create', ruleForm.value).then((res) => {
+ handlerFunApi('create', data).then((res) => {
ElMessage.success('添加成功')
close()
})
@@ -114,7 +135,7 @@
else {
// ruleForm.value.technicalTargetList = tableRef.value.list
console.log(ruleForm.value)
- handlerFunApi('update', ruleForm.value).then((res) => {
+ handlerFunApi('update', data).then((res) => {
ElMessage.success('修改成功')
close()
})
@@ -166,11 +187,17 @@
}
// 设备分类
const deviceTypeList = ref<{ id: string; value: string; name: string }[]>([])
+// 设备类型
+const deviceCateList = ref<{ id: string; value: string; name: string }[]>([])
const fetchSelect = () => {
// 设备分类
getDictByCode('eqptDeviceType').then((res) => {
deviceTypeList.value = res.data
})
+ // 设备类型
+ getDictByCode('eqptDeviceCategory').then((res) => {
+ deviceCateList.value = res.data
+ })
// 设备名称
// getDeviceNameList().then((res) => {
// console.log(res.data, '设备名称')
@@ -208,34 +235,40 @@
:model="ruleForm"
:rules="rules" label-position="right" label-width="110px" class="form"
:disabled="dialogStatus === 'detail'"
- :class="$route.path.includes('detail') ? 'isDetail' : ''"
+ :class="[$route.path.includes('detail') ? 'isDetail' : '']"
>
-
+
+
+
+
+
+
-
+
-
+
-
+
-
+
@@ -267,8 +300,8 @@
-
-
+
+
@@ -278,11 +311,19 @@
+
+
+
+
+
+
+
+
-
+
@@ -295,5 +336,13 @@
diff --git a/src/views/tested/device/model/components/list.vue b/src/views/tested/device/model/components/list.vue
index f3a4eca..5985bc6 100644
--- a/src/views/tested/device/model/components/list.vue
+++ b/src/views/tested/device/model/components/list.vue
@@ -5,9 +5,12 @@
import { deleteModel, exportModelList, getDeviceNameList, getModelAllList, getModelByname, getModelList } from '@/api/eqpt/device/model'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
+import { getPhotoUrl } from '@/api/system/tool'
+import { download } from '@/utils/download'
+import showPhoto from '@/views/tested/device/info/components/showPhoto.vue'
const { proxy } = getCurrentInstance() as any
const listQuery = reactive({
- // type: '',
+ equipmentType: '',
category: '',
equipmentName: '',
helpInstruction: '',
@@ -17,8 +20,8 @@
})
const columns = ref([
{
- text: '规格型号编号',
- value: 'modelNo',
+ text: '设备类型',
+ value: 'equipmentTypeName',
align: 'center',
},
{
@@ -46,16 +49,16 @@
value: 'checkCycle',
align: 'center',
},
- {
- text: '使用说明书',
- value: 'instructionsFile',
- align: 'center',
- },
- {
- text: '备注',
- value: 'remark',
- align: 'center',
- },
+ // {
+ // text: '使用说明书',
+ // value: 'instructionsFile',
+ // align: 'center',
+ // },
+ // {
+ // text: '备注',
+ // value: 'remark',
+ // align: 'center',
+ // },
])
const list = ref([])
const total = ref(0)
@@ -152,6 +155,13 @@
ElMessage.warning('无可导出内容')
}
}
+// 打开文件
+const clickFile = (fileName: string) => {
+ getPhotoUrl(fileName).then((res) => {
+ // console.log(res.data, 'url')
+ download(res.data, fileName)
+ })
+}
// 获取下拉列表相关
// 设备名称
const deviceNameList = ref
([])
@@ -174,11 +184,11 @@
deviceCategoryList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
@@ -186,13 +196,35 @@
}
fetchSelect()
// 监听设备分类
-// watch(() => listQuery.type, () => {
-// listQuery.helpInstruction = ''
-// listQuery.model = ''
-// listQuery.helpInstruction = ''
-// }, {
-// deep: true,
-// })
+watch(() => listQuery.equipmentType, (newVal) => {
+ listQuery.equipmentName = ''
+ listQuery.model = ''
+ listQuery.helpInstruction = ''
+ if (newVal) {
+ // 设备名称
+ getDeviceNameList({ equipmentType: newVal }).then((res) => {
+ deviceNameList.value = res.data
+ })
+ getModelAllList({ equipmentType: newVal }).then((res) => {
+ allList.value = res.data
+ modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
+ helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
+ })
+ }
+ else {
+ // 设备名称
+ getDeviceNameList({ equipmentType: '' }).then((res) => {
+ deviceNameList.value = res.data
+ })
+ getModelAllList({ equipmentType: '' }).then((res) => {
+ allList.value = res.data
+ modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
+ helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
+ })
+ }
+}, {
+ deep: true,
+})
// 监听设备名称下拉框,修改规格型号和辅助字段
watch(() => listQuery.equipmentName, (newVal) => {
listQuery.helpInstruction = ''
@@ -224,7 +256,7 @@
})
// 重置
const reset = () => {
- // listQuery.type = ''
+ listQuery.equipmentType = ''
listQuery.category = ''
listQuery.equipmentName = ''
listQuery.helpInstruction = ''
@@ -241,11 +273,11 @@
-
+
@@ -281,6 +313,19 @@
:is-showmulti-select="true" :is-multi="true" @change="changePage" @multi-select="multiSelect"
>
+
+
+
+ {}" />
+
+
+
+
+ {{ scope.row.remark }}
+
+
diff --git a/src/views/tested/device/remind/components/trend.vue b/src/views/tested/device/remind/components/trend.vue
index 94759ec..0d4b47d 100644
--- a/src/views/tested/device/remind/components/trend.vue
+++ b/src/views/tested/device/remind/components/trend.vue
@@ -42,7 +42,7 @@
- 未来1月在用设备到期趋势
+ 未来3月在用设备到期趋势
diff --git a/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue
index 6fc4d0f..19e17ae 100644
--- a/src/views/tested/MeasurementPlan/task/components/edit.vue
+++ b/src/views/tested/MeasurementPlan/task/components/edit.vue
@@ -4,10 +4,10 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import tableList from './tableList.vue'
+import { getUserDept, getUserList } from '@/api/system/user'
import { addTask, detailTask, updateTask } from '@/api/eqpt/measurementPlan/task'
import { getDictByCode } from '@/api/system/dict'
import useUserStore from '@/store/modules/user'
-import { getUserDept } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -63,11 +63,11 @@
}
const rules = ref({
deliverer: [{ required: true, message: '送检人必填', trigger: ['blur', 'change'] }],
- customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
+ // customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
customerPhone: [{ required: true, message: '电话必填', trigger: ['blur', 'change'] }],
- maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
+ // maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
planDeliverTime: [{ required: true, message: '预计送达时间必选', trigger: ['blur', 'change'] }],
- requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
+ // requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
isUrgent: [{ required: true, message: '是否加急必选', trigger: ['blur', 'change'] }],
measureCompany: [{ required: true, message: '检定(校准)单位必填', trigger: ['blur', 'change'] }],
undertakerName: [{ required: true, message: '承接人必填', trigger: ['blur', 'change'] }],
@@ -106,10 +106,17 @@
})
// 获取是否加急下拉列表
const isUrgentList = ref<{ id: string; value: string; name: string }[]>()
+// 送检人列表
+const personList = ref()
const fetchListData = () => {
getDictByCode('eqptisUrgent').then((res) => {
isUrgentList.value = res.data
})
+ getUserDept().then((res1) => {
+ getUserList({ offset: 1, limit: 99999, deptId: $route.path.includes('detail') ? '' : res1.data.id }).then((res) => {
+ personList.value = res.data.rows
+ })
+ })
}
fetchListData()
// 关闭弹窗
@@ -200,7 +207,18 @@
-
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index 7a7f676..6777bb8 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -18,23 +18,30 @@
const $route = useRoute()
// 表头显示标题
const columnsHandler = ref([
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
- text: '统一编号',
- value: 'sampleNo',
+ text: '设备名称',
+ value: 'sampleName',
required: true,
isBtn: true,
isUpload: false,
},
{
- text: '设备名称',
- value: 'sampleName',
- required: true,
+ text: '规格型号',
+ value: 'sampleModel',
+ required: false,
isBtn: false,
isUpload: false,
},
{
- text: '型号',
- value: 'sampleModel',
+ text: '生产厂家',
+ value: 'manufacturer',
required: false,
isBtn: false,
isUpload: false,
@@ -47,13 +54,13 @@
isUpload: true,
width: '350px',
},
- {
- text: '外观和功能检查',
- value: 'appearanceInspect',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '外观和功能检查',
+ // value: 'appearanceInspect',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
{
text: '特殊要求',
value: 'specialRequire',
@@ -61,22 +68,22 @@
isBtn: false,
isUpload: false,
},
- {
- text: '检校项目',
- value: 'measureContent',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '检校项目',
+ // value: 'measureContent',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
])
const columnsDetail = ref([
- {
- text: '统一编号',
- value: 'sampleNo',
- required: true,
- isBtn: true,
- isUpload: false,
- },
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
text: '设备名称',
value: 'sampleName',
@@ -85,13 +92,20 @@
isUpload: false,
},
{
- text: '型号',
+ text: '规格型号',
value: 'sampleModel',
required: false,
isBtn: false,
isUpload: false,
},
{
+ text: '生产厂家',
+ value: 'manufacturer',
+ required: false,
+ isBtn: false,
+ isUpload: false,
+ },
+ {
text: '附件',
value: 'appendixDescn',
required: false,
@@ -150,6 +164,7 @@
if (checkCertificateList()) {
setAllRowReadable()
list.value.push({
+ manufacturer: '',
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -189,7 +204,7 @@
const selectRow = ref()
// 单选设备
const select = (text: string, index: any) => {
- if (text === '统一编号') {
+ if (text === '设备名称') {
deviceSingeRef.value.initDialog()
selectRow.value = index
}
@@ -206,22 +221,26 @@
if (Array.isArray(device)) {
// 多选
device.forEach((item) => {
- list.value.push({
- appearanceInspect: '',
- appendixDescn: '',
- measureContent: '',
- sampleModel: item.model,
- sampleNo: item.equipmentNo,
- sampleId: item.id,
- sampleName: item.equipmentName,
- specialRequire: '',
- editable: true,
- })
+ if (!list.value.filter((c: any) => c.sampleId === item.id).length) {
+ list.value.push({
+ appearanceInspect: '',
+ appendixDescn: '',
+ measureContent: '',
+ manufacturer: item.manufacturer,
+ sampleModel: item.model,
+ sampleNo: item.equipmentNo,
+ sampleId: item.id,
+ sampleName: item.equipmentName,
+ specialRequire: '',
+ editable: false,
+ })
+ }
})
}
else {
// 单选
const row = {
+ manufacturer: device.manufacturer,
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -230,7 +249,7 @@
sampleNo: device.equipmentNo,
sampleName: device.equipmentName,
specialRequire: '',
- editable: true,
+ editable: false,
}
list.value[selectRow.value] = row
}
@@ -247,6 +266,7 @@
})
fd.append('multipartFile', event.target.files[0])
uploadApi(fd).then((res) => {
+ fileRef.value.value = ''
if (res.code === 200) {
list.value[currentIndex.value].appendixDescn = res.data[0]
// 重置当前验证
@@ -261,9 +281,12 @@
})
}
}
+const uploadRef = ref()
const upload = (index: number) => {
currentIndex.value = index
+ // window.onclick()
fileRef.value.click()
+ // deviceRef.value?.click()
}
const $router = useRouter()
const deviceDetail = (row: any) => {
@@ -338,10 +361,12 @@
-
+
+
+
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..138a543 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({ equipmentType: '1' }).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..d310206 100644
--- a/src/views/tested/device/info/components/edit.vue
+++ b/src/views/tested/device/info/components/edit.vue
@@ -21,6 +21,8 @@
import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model'
import { equipmentLabelBind } from '@/api/reader'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
+import { getLocationList } from '@/api/system/installation'
+import { getPostList } from '@/api/system/post'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -90,7 +92,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 +145,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'] }],
@@ -156,9 +173,13 @@
// 辅助字段
const helpList = ref([])
const allList = ref([])
+// 安装位置
+const installLocationList = ref([])
+// 使用岗位
+const usePositionList = ref([])
const fetchSelectData = async () => {
// 规格型号及辅助字段
- const res = await getModelAllList({})
+ const res = await getModelAllList({ equipmentType: $route.query.equipmentType })
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
@@ -180,10 +201,19 @@
deviceQualityList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: $route.query.equipmentType }).then((res) => {
deviceNameList.value = res.data
console.log(res.data, '设备名称')
})
+ // 使用岗位
+ getPostList({}).then((res) => {
+ usePositionList.value = res.data
+ })
+ // 安装位置
+ getLocationList().then((res) => {
+ // console.log(res.data, '安装位置')
+ installLocationList.value = res.data
+ })
}
// 监听设备名称下拉框,修改规格型号和辅助字段
watch(() => ruleForm.value.equipmentName, (newVal) => {
@@ -240,11 +270,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 +825,32 @@
+
+
+
+
+
-
+
-
-
-
+
+ {}" />
+
+
-
+
@@ -847,7 +890,10 @@
-
+
+
+
+
@@ -882,21 +928,26 @@
-
-
-
-
+
+
+
+
-
+
+
+
+
-
-
+
+
+
+
-
+
@@ -734,9 +822,7 @@
-
-
-
+
@@ -745,44 +831,76 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 只看我负责的
+
+
+
+
@@ -799,20 +917,20 @@
-
+
+
diff --git a/src/views/tested/device/info/components/showPhoto.vue b/src/views/tested/device/info/components/showPhoto.vue
index 3af1845..20148da 100644
--- a/src/views/tested/device/info/components/showPhoto.vue
+++ b/src/views/tested/device/info/components/showPhoto.vue
@@ -14,6 +14,10 @@
type: String,
default: '100px',
},
+ showClose: {
+ type: Boolean,
+ default: true,
+ },
})
const $emits = defineEmits(['delete'])
const $route = useRoute()
@@ -60,7 +64,7 @@
{{ item.minioFileName }}
- x
+ x
diff --git a/src/views/tested/device/model/components/edit.vue b/src/views/tested/device/model/components/edit.vue
index 86765f3..f9b05e5 100644
--- a/src/views/tested/device/model/components/edit.vue
+++ b/src/views/tested/device/model/components/edit.vue
@@ -39,6 +39,8 @@
remark: '', // 备注
technicalTargetList: [], // 技术指标
updateTime: '',
+ equipmentType: '',
+ inspectable: [] as any,
}) // 表单
// 设备名称验证规则
const checkCycle = (rule: any, value: any, callback: any) => {
@@ -52,12 +54,20 @@
callback()
}
}
+// 表单验证规则
const rules = ref({
- equipmentName: [{ required: true, message: '设备名称名称必填', trigger: ['blur', 'change'] }],
- category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
+ equipmentName: [{ required: true, message: '设备名称必填', trigger: ['blur', 'change'] }],
+ equipmentType: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
+ // category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
model: [{ required: true, message: '规格型号必填', trigger: ['blur', 'change'] }],
checkCycle: [{ required: true, validator: checkCycle, trigger: ['blur', 'change'] }],
-}) // 表单验证规则
+})
+// 当计量站可检时,设备分类必填
+watch(() => ruleForm.value.inspectable, (newVal) => {
+ if (newVal?.length) {
+ rules.value.category = [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }]
+ }
+}, { deep: true })
// 弹窗初始化
const initDialog = () => {
dialogStatus.value = $route.params.type as string
@@ -74,8 +84,15 @@
else {
const data = JSON.parse($route.query.row as string)
// detailGroup({ groupId: data.id }).then((res) => {
- ruleForm.value = data
// })
+ ruleForm.value = data
+ // 计量站是否可检
+ if (data.inspectable) {
+ ruleForm.value.inspectable = data.inspectable.split(',')
+ }
+ else {
+ ruleForm.value.inspectable = []
+ }
}
}
onMounted(() => {
@@ -105,8 +122,12 @@
ruleForm.value.helpInstruction = '/'
}
ruleForm.value.technicalTargetList = tableRef.value.list
+ const data = {
+ ...ruleForm.value,
+ inspectable: ruleForm.value.inspectable.join(','),
+ }
if ($route.params.type === 'create') {
- handlerFunApi('create', ruleForm.value).then((res) => {
+ handlerFunApi('create', data).then((res) => {
ElMessage.success('添加成功')
close()
})
@@ -114,7 +135,7 @@
else {
// ruleForm.value.technicalTargetList = tableRef.value.list
console.log(ruleForm.value)
- handlerFunApi('update', ruleForm.value).then((res) => {
+ handlerFunApi('update', data).then((res) => {
ElMessage.success('修改成功')
close()
})
@@ -166,11 +187,17 @@
}
// 设备分类
const deviceTypeList = ref<{ id: string; value: string; name: string }[]>([])
+// 设备类型
+const deviceCateList = ref<{ id: string; value: string; name: string }[]>([])
const fetchSelect = () => {
// 设备分类
getDictByCode('eqptDeviceType').then((res) => {
deviceTypeList.value = res.data
})
+ // 设备类型
+ getDictByCode('eqptDeviceCategory').then((res) => {
+ deviceCateList.value = res.data
+ })
// 设备名称
// getDeviceNameList().then((res) => {
// console.log(res.data, '设备名称')
@@ -208,34 +235,40 @@
:model="ruleForm"
:rules="rules" label-position="right" label-width="110px" class="form"
:disabled="dialogStatus === 'detail'"
- :class="$route.path.includes('detail') ? 'isDetail' : ''"
+ :class="[$route.path.includes('detail') ? 'isDetail' : '']"
>
-
+
+
+
+
+
+
-
+
-
+
-
+
-
+
@@ -267,8 +300,8 @@
-
-
+
+
@@ -278,11 +311,19 @@
+
+
+
+
+
+
+
+
-
+
@@ -295,5 +336,13 @@
diff --git a/src/views/tested/device/model/components/list.vue b/src/views/tested/device/model/components/list.vue
index f3a4eca..5985bc6 100644
--- a/src/views/tested/device/model/components/list.vue
+++ b/src/views/tested/device/model/components/list.vue
@@ -5,9 +5,12 @@
import { deleteModel, exportModelList, getDeviceNameList, getModelAllList, getModelByname, getModelList } from '@/api/eqpt/device/model'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
+import { getPhotoUrl } from '@/api/system/tool'
+import { download } from '@/utils/download'
+import showPhoto from '@/views/tested/device/info/components/showPhoto.vue'
const { proxy } = getCurrentInstance() as any
const listQuery = reactive({
- // type: '',
+ equipmentType: '',
category: '',
equipmentName: '',
helpInstruction: '',
@@ -17,8 +20,8 @@
})
const columns = ref([
{
- text: '规格型号编号',
- value: 'modelNo',
+ text: '设备类型',
+ value: 'equipmentTypeName',
align: 'center',
},
{
@@ -46,16 +49,16 @@
value: 'checkCycle',
align: 'center',
},
- {
- text: '使用说明书',
- value: 'instructionsFile',
- align: 'center',
- },
- {
- text: '备注',
- value: 'remark',
- align: 'center',
- },
+ // {
+ // text: '使用说明书',
+ // value: 'instructionsFile',
+ // align: 'center',
+ // },
+ // {
+ // text: '备注',
+ // value: 'remark',
+ // align: 'center',
+ // },
])
const list = ref([])
const total = ref(0)
@@ -152,6 +155,13 @@
ElMessage.warning('无可导出内容')
}
}
+// 打开文件
+const clickFile = (fileName: string) => {
+ getPhotoUrl(fileName).then((res) => {
+ // console.log(res.data, 'url')
+ download(res.data, fileName)
+ })
+}
// 获取下拉列表相关
// 设备名称
const deviceNameList = ref
([])
@@ -174,11 +184,11 @@
deviceCategoryList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
@@ -186,13 +196,35 @@
}
fetchSelect()
// 监听设备分类
-// watch(() => listQuery.type, () => {
-// listQuery.helpInstruction = ''
-// listQuery.model = ''
-// listQuery.helpInstruction = ''
-// }, {
-// deep: true,
-// })
+watch(() => listQuery.equipmentType, (newVal) => {
+ listQuery.equipmentName = ''
+ listQuery.model = ''
+ listQuery.helpInstruction = ''
+ if (newVal) {
+ // 设备名称
+ getDeviceNameList({ equipmentType: newVal }).then((res) => {
+ deviceNameList.value = res.data
+ })
+ getModelAllList({ equipmentType: newVal }).then((res) => {
+ allList.value = res.data
+ modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
+ helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
+ })
+ }
+ else {
+ // 设备名称
+ getDeviceNameList({ equipmentType: '' }).then((res) => {
+ deviceNameList.value = res.data
+ })
+ getModelAllList({ equipmentType: '' }).then((res) => {
+ allList.value = res.data
+ modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
+ helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
+ })
+ }
+}, {
+ deep: true,
+})
// 监听设备名称下拉框,修改规格型号和辅助字段
watch(() => listQuery.equipmentName, (newVal) => {
listQuery.helpInstruction = ''
@@ -224,7 +256,7 @@
})
// 重置
const reset = () => {
- // listQuery.type = ''
+ listQuery.equipmentType = ''
listQuery.category = ''
listQuery.equipmentName = ''
listQuery.helpInstruction = ''
@@ -241,11 +273,11 @@
-
+
@@ -281,6 +313,19 @@
:is-showmulti-select="true" :is-multi="true" @change="changePage" @multi-select="multiSelect"
>
+
+
+
+ {}" />
+
+
+
+
+ {{ scope.row.remark }}
+
+
diff --git a/src/views/tested/device/remind/components/trend.vue b/src/views/tested/device/remind/components/trend.vue
index 94759ec..0d4b47d 100644
--- a/src/views/tested/device/remind/components/trend.vue
+++ b/src/views/tested/device/remind/components/trend.vue
@@ -42,7 +42,7 @@
- 未来1月在用设备到期趋势
+ 未来3月在用设备到期趋势
diff --git a/src/views/tested/device/remind/index.vue b/src/views/tested/device/remind/index.vue
index 4a83c5e..e54fea3 100644
--- a/src/views/tested/device/remind/index.vue
+++ b/src/views/tested/device/remind/index.vue
@@ -2,6 +2,7 @@
-
+
@@ -282,16 +303,46 @@
-->
-
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -317,9 +368,16 @@
+
+
+ {{ scope.row. certificateValid }}
+
+
+
@@ -337,3 +395,13 @@
+
+
diff --git a/.env.development b/.env.development
index b87a9f3..95707e0 100644
--- a/.env.development
+++ b/.env.development
@@ -3,10 +3,10 @@
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://192.168.8.100:5909
# VITE_METER_API_BASEURL = http://111.198.10.15:21606
-VITE_METER_API_BASEURL = http://111.198.10.15:21611
+VITE_METER_API_BASEURL = http://192.168.8.102:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
diff --git a/public/config/config.json b/public/config/config.json
index d2da659..cfca39a 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,7 +1,7 @@
{
"title":"计量业务系统",
- "baseUrl": "http://111.198.10.15:21611",
- "baseUrlBusiness": "http://111.198.10.15:21611",
+ "baseUrl": "http://192.168.8.102:5909",
+ "baseUrlBusiness": "http://192.168.8.102:5909",
"pathDict": {
"fbfpsbgl":"/reviewpage/detail",
"fbfmlgl":"/directorypage/detail",
diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts
index b1f2edf..6940165 100644
--- a/src/api/eqpt/device/model.ts
+++ b/src/api/eqpt/device/model.ts
@@ -28,10 +28,11 @@
})
}
// 设备名称列表/equipment/model/listEquipmentName
-export function getDeviceNameList() {
+export function getDeviceNameList(params: any) {
return request({
url: '/equipment/model/listEquipmentName',
method: 'get',
+ params,
})
}
// 导出
diff --git a/src/api/system/installation.ts b/src/api/system/installation.ts
new file mode 100644
index 0000000..bc33926
--- /dev/null
+++ b/src/api/system/installation.ts
@@ -0,0 +1,43 @@
+/*
+ * 安装位置管理
+*/
+import request from '../index'
+// 列表
+export function getLocationListPage(data: any) {
+ return request({
+ url: '/system/location/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addLocation(data: any) {
+ return request({
+ url: '/system/location/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updateLocation(data: any) {
+ return request({
+ url: '/system/location/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delLocation(data: any) {
+ return request({
+ url: '/system/location/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getLocationList() {
+ return request({
+ url: '/system/location/list',
+ method: 'get',
+ })
+}
diff --git a/src/api/system/post.ts b/src/api/system/post.ts
new file mode 100644
index 0000000..db0e6c7
--- /dev/null
+++ b/src/api/system/post.ts
@@ -0,0 +1,44 @@
+/*
+ * 岗位管理接口
+*/
+import request from '../index'
+// 列表
+export function getPostListPage(data: any) {
+ return request({
+ url: '/system/position/listPage',
+ method: 'get',
+ params: data,
+ })
+}
+// 新建
+export function addPost(data: any) {
+ return request({
+ url: '/system/position/add',
+ method: 'post',
+ data,
+ })
+}
+// 编辑
+export function updatePost(data: any) {
+ return request({
+ url: '/system/position/update',
+ method: 'post',
+ data,
+ })
+}
+// 删除
+export function delPost(data: any) {
+ return request({
+ url: '/system/position/delete',
+ method: 'post',
+ data,
+ })
+}
+// 列表 - 不分页
+export function getPostList(data: any) {
+ return request({
+ url: '/system/position/list',
+ method: 'get',
+ params: data,
+ })
+}
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/system/expire/device.vue b/src/views/system/expire/device.vue
index 34f42a8..b25a74b 100644
--- a/src/views/system/expire/device.vue
+++ b/src/views/system/expire/device.vue
@@ -114,11 +114,11 @@
deviceTypeList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue
index 637c07b..817930d 100644
--- a/src/views/system/installation/editDialog.vue
+++ b/src/views/system/installation/editDialog.vue
@@ -2,15 +2,18 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/views/system/installation/list.vue b/src/views/system/installation/list.vue
index 0eec641..72f1130 100644
--- a/src/views/system/installation/list.vue
+++ b/src/views/system/installation/list.vue
@@ -1,27 +1,42 @@
@@ -64,21 +116,22 @@
-
+
-
-
+
+
+
-
+
-
+
@@ -101,15 +154,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
diff --git a/src/views/system/post/editDialog.vue b/src/views/system/post/editDialog.vue
index b38e652..f99ddb9 100644
--- a/src/views/system/post/editDialog.vue
+++ b/src/views/system/post/editDialog.vue
@@ -2,15 +2,16 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/views/system/post/list.vue b/src/views/system/post/list.vue
index bfbc209..6b6cf27 100644
--- a/src/views/system/post/list.vue
+++ b/src/views/system/post/list.vue
@@ -1,26 +1,39 @@
@@ -63,17 +106,17 @@
-
+
-
+
-
+
@@ -96,15 +139,15 @@
-
+
-
+
查看
-
+
编辑
-
+
删除
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/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue
index 6fc4d0f..19e17ae 100644
--- a/src/views/tested/MeasurementPlan/task/components/edit.vue
+++ b/src/views/tested/MeasurementPlan/task/components/edit.vue
@@ -4,10 +4,10 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import tableList from './tableList.vue'
+import { getUserDept, getUserList } from '@/api/system/user'
import { addTask, detailTask, updateTask } from '@/api/eqpt/measurementPlan/task'
import { getDictByCode } from '@/api/system/dict'
import useUserStore from '@/store/modules/user'
-import { getUserDept } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -63,11 +63,11 @@
}
const rules = ref({
deliverer: [{ required: true, message: '送检人必填', trigger: ['blur', 'change'] }],
- customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
+ // customerAddress: [{ required: true, message: '委托方地址必填', trigger: ['blur', 'change'] }],
customerPhone: [{ required: true, message: '电话必填', trigger: ['blur', 'change'] }],
- maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
+ // maintainMajor: [{ required: true, message: '检修专业必填', trigger: ['blur', 'change'] }],
planDeliverTime: [{ required: true, message: '预计送达时间必选', trigger: ['blur', 'change'] }],
- requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
+ // requireOverTime: [{ required: true, message: '要求检完时间必选', trigger: ['blur', 'change'] }],
isUrgent: [{ required: true, message: '是否加急必选', trigger: ['blur', 'change'] }],
measureCompany: [{ required: true, message: '检定(校准)单位必填', trigger: ['blur', 'change'] }],
undertakerName: [{ required: true, message: '承接人必填', trigger: ['blur', 'change'] }],
@@ -106,10 +106,17 @@
})
// 获取是否加急下拉列表
const isUrgentList = ref<{ id: string; value: string; name: string }[]>()
+// 送检人列表
+const personList = ref()
const fetchListData = () => {
getDictByCode('eqptisUrgent').then((res) => {
isUrgentList.value = res.data
})
+ getUserDept().then((res1) => {
+ getUserList({ offset: 1, limit: 99999, deptId: $route.path.includes('detail') ? '' : res1.data.id }).then((res) => {
+ personList.value = res.data.rows
+ })
+ })
}
fetchListData()
// 关闭弹窗
@@ -200,7 +207,18 @@
-
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index 7a7f676..6777bb8 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -18,23 +18,30 @@
const $route = useRoute()
// 表头显示标题
const columnsHandler = ref([
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
- text: '统一编号',
- value: 'sampleNo',
+ text: '设备名称',
+ value: 'sampleName',
required: true,
isBtn: true,
isUpload: false,
},
{
- text: '设备名称',
- value: 'sampleName',
- required: true,
+ text: '规格型号',
+ value: 'sampleModel',
+ required: false,
isBtn: false,
isUpload: false,
},
{
- text: '型号',
- value: 'sampleModel',
+ text: '生产厂家',
+ value: 'manufacturer',
required: false,
isBtn: false,
isUpload: false,
@@ -47,13 +54,13 @@
isUpload: true,
width: '350px',
},
- {
- text: '外观和功能检查',
- value: 'appearanceInspect',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '外观和功能检查',
+ // value: 'appearanceInspect',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
{
text: '特殊要求',
value: 'specialRequire',
@@ -61,22 +68,22 @@
isBtn: false,
isUpload: false,
},
- {
- text: '检校项目',
- value: 'measureContent',
- required: false,
- isBtn: false,
- isUpload: false,
- },
+ // {
+ // text: '检校项目',
+ // value: 'measureContent',
+ // required: false,
+ // isBtn: false,
+ // isUpload: false,
+ // },
])
const columnsDetail = ref([
- {
- text: '统一编号',
- value: 'sampleNo',
- required: true,
- isBtn: true,
- isUpload: false,
- },
+ // {
+ // text: '统一编号',
+ // value: 'sampleNo',
+ // required: true,
+ // isBtn: true,
+ // isUpload: false,
+ // },
{
text: '设备名称',
value: 'sampleName',
@@ -85,13 +92,20 @@
isUpload: false,
},
{
- text: '型号',
+ text: '规格型号',
value: 'sampleModel',
required: false,
isBtn: false,
isUpload: false,
},
{
+ text: '生产厂家',
+ value: 'manufacturer',
+ required: false,
+ isBtn: false,
+ isUpload: false,
+ },
+ {
text: '附件',
value: 'appendixDescn',
required: false,
@@ -150,6 +164,7 @@
if (checkCertificateList()) {
setAllRowReadable()
list.value.push({
+ manufacturer: '',
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -189,7 +204,7 @@
const selectRow = ref()
// 单选设备
const select = (text: string, index: any) => {
- if (text === '统一编号') {
+ if (text === '设备名称') {
deviceSingeRef.value.initDialog()
selectRow.value = index
}
@@ -206,22 +221,26 @@
if (Array.isArray(device)) {
// 多选
device.forEach((item) => {
- list.value.push({
- appearanceInspect: '',
- appendixDescn: '',
- measureContent: '',
- sampleModel: item.model,
- sampleNo: item.equipmentNo,
- sampleId: item.id,
- sampleName: item.equipmentName,
- specialRequire: '',
- editable: true,
- })
+ if (!list.value.filter((c: any) => c.sampleId === item.id).length) {
+ list.value.push({
+ appearanceInspect: '',
+ appendixDescn: '',
+ measureContent: '',
+ manufacturer: item.manufacturer,
+ sampleModel: item.model,
+ sampleNo: item.equipmentNo,
+ sampleId: item.id,
+ sampleName: item.equipmentName,
+ specialRequire: '',
+ editable: false,
+ })
+ }
})
}
else {
// 单选
const row = {
+ manufacturer: device.manufacturer,
appearanceInspect: '',
appendixDescn: '',
measureContent: '',
@@ -230,7 +249,7 @@
sampleNo: device.equipmentNo,
sampleName: device.equipmentName,
specialRequire: '',
- editable: true,
+ editable: false,
}
list.value[selectRow.value] = row
}
@@ -247,6 +266,7 @@
})
fd.append('multipartFile', event.target.files[0])
uploadApi(fd).then((res) => {
+ fileRef.value.value = ''
if (res.code === 200) {
list.value[currentIndex.value].appendixDescn = res.data[0]
// 重置当前验证
@@ -261,9 +281,12 @@
})
}
}
+const uploadRef = ref()
const upload = (index: number) => {
currentIndex.value = index
+ // window.onclick()
fileRef.value.click()
+ // deviceRef.value?.click()
}
const $router = useRouter()
const deviceDetail = (row: any) => {
@@ -338,10 +361,12 @@
-
+
+
+
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..138a543 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({ equipmentType: '1' }).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..d310206 100644
--- a/src/views/tested/device/info/components/edit.vue
+++ b/src/views/tested/device/info/components/edit.vue
@@ -21,6 +21,8 @@
import { getDeviceNameList, getModelAllList, getModelList } from '@/api/eqpt/device/model'
import { equipmentLabelBind } from '@/api/reader'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
+import { getLocationList } from '@/api/system/installation'
+import { getPostList } from '@/api/system/post'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -90,7 +92,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 +145,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'] }],
@@ -156,9 +173,13 @@
// 辅助字段
const helpList = ref([])
const allList = ref([])
+// 安装位置
+const installLocationList = ref([])
+// 使用岗位
+const usePositionList = ref([])
const fetchSelectData = async () => {
// 规格型号及辅助字段
- const res = await getModelAllList({})
+ const res = await getModelAllList({ equipmentType: $route.query.equipmentType })
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
@@ -180,10 +201,19 @@
deviceQualityList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: $route.query.equipmentType }).then((res) => {
deviceNameList.value = res.data
console.log(res.data, '设备名称')
})
+ // 使用岗位
+ getPostList({}).then((res) => {
+ usePositionList.value = res.data
+ })
+ // 安装位置
+ getLocationList().then((res) => {
+ // console.log(res.data, '安装位置')
+ installLocationList.value = res.data
+ })
}
// 监听设备名称下拉框,修改规格型号和辅助字段
watch(() => ruleForm.value.equipmentName, (newVal) => {
@@ -240,11 +270,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 +825,32 @@
+
+
+
+
+
-
+
-
-
-
+
+ {}" />
+
+
-
+
@@ -847,7 +890,10 @@
-
+
+
+
+
@@ -882,21 +928,26 @@
-
-
-
-
+
+
+
+
-
+
+
+
+
-
-
+
+
+
+
-
+
@@ -734,9 +822,7 @@
-
-
-
+
@@ -745,44 +831,76 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{ item.deptName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 只看我负责的
+
+
+
+
@@ -799,20 +917,20 @@
-
+
+
diff --git a/src/views/tested/device/info/components/showPhoto.vue b/src/views/tested/device/info/components/showPhoto.vue
index 3af1845..20148da 100644
--- a/src/views/tested/device/info/components/showPhoto.vue
+++ b/src/views/tested/device/info/components/showPhoto.vue
@@ -14,6 +14,10 @@
type: String,
default: '100px',
},
+ showClose: {
+ type: Boolean,
+ default: true,
+ },
})
const $emits = defineEmits(['delete'])
const $route = useRoute()
@@ -60,7 +64,7 @@
{{ item.minioFileName }}
- x
+ x
diff --git a/src/views/tested/device/model/components/edit.vue b/src/views/tested/device/model/components/edit.vue
index 86765f3..f9b05e5 100644
--- a/src/views/tested/device/model/components/edit.vue
+++ b/src/views/tested/device/model/components/edit.vue
@@ -39,6 +39,8 @@
remark: '', // 备注
technicalTargetList: [], // 技术指标
updateTime: '',
+ equipmentType: '',
+ inspectable: [] as any,
}) // 表单
// 设备名称验证规则
const checkCycle = (rule: any, value: any, callback: any) => {
@@ -52,12 +54,20 @@
callback()
}
}
+// 表单验证规则
const rules = ref({
- equipmentName: [{ required: true, message: '设备名称名称必填', trigger: ['blur', 'change'] }],
- category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
+ equipmentName: [{ required: true, message: '设备名称必填', trigger: ['blur', 'change'] }],
+ equipmentType: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
+ // category: [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }],
model: [{ required: true, message: '规格型号必填', trigger: ['blur', 'change'] }],
checkCycle: [{ required: true, validator: checkCycle, trigger: ['blur', 'change'] }],
-}) // 表单验证规则
+})
+// 当计量站可检时,设备分类必填
+watch(() => ruleForm.value.inspectable, (newVal) => {
+ if (newVal?.length) {
+ rules.value.category = [{ required: true, message: '设备分类必选', trigger: ['blur', 'change'] }]
+ }
+}, { deep: true })
// 弹窗初始化
const initDialog = () => {
dialogStatus.value = $route.params.type as string
@@ -74,8 +84,15 @@
else {
const data = JSON.parse($route.query.row as string)
// detailGroup({ groupId: data.id }).then((res) => {
- ruleForm.value = data
// })
+ ruleForm.value = data
+ // 计量站是否可检
+ if (data.inspectable) {
+ ruleForm.value.inspectable = data.inspectable.split(',')
+ }
+ else {
+ ruleForm.value.inspectable = []
+ }
}
}
onMounted(() => {
@@ -105,8 +122,12 @@
ruleForm.value.helpInstruction = '/'
}
ruleForm.value.technicalTargetList = tableRef.value.list
+ const data = {
+ ...ruleForm.value,
+ inspectable: ruleForm.value.inspectable.join(','),
+ }
if ($route.params.type === 'create') {
- handlerFunApi('create', ruleForm.value).then((res) => {
+ handlerFunApi('create', data).then((res) => {
ElMessage.success('添加成功')
close()
})
@@ -114,7 +135,7 @@
else {
// ruleForm.value.technicalTargetList = tableRef.value.list
console.log(ruleForm.value)
- handlerFunApi('update', ruleForm.value).then((res) => {
+ handlerFunApi('update', data).then((res) => {
ElMessage.success('修改成功')
close()
})
@@ -166,11 +187,17 @@
}
// 设备分类
const deviceTypeList = ref<{ id: string; value: string; name: string }[]>([])
+// 设备类型
+const deviceCateList = ref<{ id: string; value: string; name: string }[]>([])
const fetchSelect = () => {
// 设备分类
getDictByCode('eqptDeviceType').then((res) => {
deviceTypeList.value = res.data
})
+ // 设备类型
+ getDictByCode('eqptDeviceCategory').then((res) => {
+ deviceCateList.value = res.data
+ })
// 设备名称
// getDeviceNameList().then((res) => {
// console.log(res.data, '设备名称')
@@ -208,34 +235,40 @@
:model="ruleForm"
:rules="rules" label-position="right" label-width="110px" class="form"
:disabled="dialogStatus === 'detail'"
- :class="$route.path.includes('detail') ? 'isDetail' : ''"
+ :class="[$route.path.includes('detail') ? 'isDetail' : '']"
>
-
+
+
+
+
+
+
-
+
-
+
-
+
-
+
@@ -267,8 +300,8 @@
-
-
+
+
@@ -278,11 +311,19 @@
+
+
+
+
+
+
+
+
-
+
@@ -295,5 +336,13 @@
diff --git a/src/views/tested/device/model/components/list.vue b/src/views/tested/device/model/components/list.vue
index f3a4eca..5985bc6 100644
--- a/src/views/tested/device/model/components/list.vue
+++ b/src/views/tested/device/model/components/list.vue
@@ -5,9 +5,12 @@
import { deleteModel, exportModelList, getDeviceNameList, getModelAllList, getModelByname, getModelList } from '@/api/eqpt/device/model'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
+import { getPhotoUrl } from '@/api/system/tool'
+import { download } from '@/utils/download'
+import showPhoto from '@/views/tested/device/info/components/showPhoto.vue'
const { proxy } = getCurrentInstance() as any
const listQuery = reactive({
- // type: '',
+ equipmentType: '',
category: '',
equipmentName: '',
helpInstruction: '',
@@ -17,8 +20,8 @@
})
const columns = ref([
{
- text: '规格型号编号',
- value: 'modelNo',
+ text: '设备类型',
+ value: 'equipmentTypeName',
align: 'center',
},
{
@@ -46,16 +49,16 @@
value: 'checkCycle',
align: 'center',
},
- {
- text: '使用说明书',
- value: 'instructionsFile',
- align: 'center',
- },
- {
- text: '备注',
- value: 'remark',
- align: 'center',
- },
+ // {
+ // text: '使用说明书',
+ // value: 'instructionsFile',
+ // align: 'center',
+ // },
+ // {
+ // text: '备注',
+ // value: 'remark',
+ // align: 'center',
+ // },
])
const list = ref([])
const total = ref(0)
@@ -152,6 +155,13 @@
ElMessage.warning('无可导出内容')
}
}
+// 打开文件
+const clickFile = (fileName: string) => {
+ getPhotoUrl(fileName).then((res) => {
+ // console.log(res.data, 'url')
+ download(res.data, fileName)
+ })
+}
// 获取下拉列表相关
// 设备名称
const deviceNameList = ref
([])
@@ -174,11 +184,11 @@
deviceCategoryList.value = res.data
})
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号及辅助字段
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
@@ -186,13 +196,35 @@
}
fetchSelect()
// 监听设备分类
-// watch(() => listQuery.type, () => {
-// listQuery.helpInstruction = ''
-// listQuery.model = ''
-// listQuery.helpInstruction = ''
-// }, {
-// deep: true,
-// })
+watch(() => listQuery.equipmentType, (newVal) => {
+ listQuery.equipmentName = ''
+ listQuery.model = ''
+ listQuery.helpInstruction = ''
+ if (newVal) {
+ // 设备名称
+ getDeviceNameList({ equipmentType: newVal }).then((res) => {
+ deviceNameList.value = res.data
+ })
+ getModelAllList({ equipmentType: newVal }).then((res) => {
+ allList.value = res.data
+ modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
+ helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
+ })
+ }
+ else {
+ // 设备名称
+ getDeviceNameList({ equipmentType: '' }).then((res) => {
+ deviceNameList.value = res.data
+ })
+ getModelAllList({ equipmentType: '' }).then((res) => {
+ allList.value = res.data
+ modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model)))
+ helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction)))
+ })
+ }
+}, {
+ deep: true,
+})
// 监听设备名称下拉框,修改规格型号和辅助字段
watch(() => listQuery.equipmentName, (newVal) => {
listQuery.helpInstruction = ''
@@ -224,7 +256,7 @@
})
// 重置
const reset = () => {
- // listQuery.type = ''
+ listQuery.equipmentType = ''
listQuery.category = ''
listQuery.equipmentName = ''
listQuery.helpInstruction = ''
@@ -241,11 +273,11 @@
-
+
@@ -281,6 +313,19 @@
:is-showmulti-select="true" :is-multi="true" @change="changePage" @multi-select="multiSelect"
>
+
+
+
+ {}" />
+
+
+
+
+ {{ scope.row.remark }}
+
+
diff --git a/src/views/tested/device/remind/components/trend.vue b/src/views/tested/device/remind/components/trend.vue
index 94759ec..0d4b47d 100644
--- a/src/views/tested/device/remind/components/trend.vue
+++ b/src/views/tested/device/remind/components/trend.vue
@@ -42,7 +42,7 @@
- 未来1月在用设备到期趋势
+ 未来3月在用设备到期趋势
diff --git a/src/views/tested/device/remind/index.vue b/src/views/tested/device/remind/index.vue
index 4a83c5e..e54fea3 100644
--- a/src/views/tested/device/remind/index.vue
+++ b/src/views/tested/device/remind/index.vue
@@ -2,6 +2,7 @@
-
+
@@ -282,16 +303,46 @@
-->
-
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -317,9 +368,16 @@
+
+
+ {{ scope.row. certificateValid }}
+
+
+
@@ -337,3 +395,13 @@
+
+
diff --git a/src/views/tested/subpackage/certificate/index.vue b/src/views/tested/subpackage/certificate/index.vue
index 6696082..1cc149b 100644
--- a/src/views/tested/subpackage/certificate/index.vue
+++ b/src/views/tested/subpackage/certificate/index.vue
@@ -299,11 +299,11 @@
// 获取下拉框
const fetchDict = () => {
// 设备名称
- getDeviceNameList().then((res) => {
+ getDeviceNameList({ equipmentType: '1' }).then((res) => {
deviceNameList.value = res.data
})
// 规格型号
- getModelAllList({}).then((res) => {
+ getModelAllList({ equipmentType: '1' }).then((res) => {
allList.value = res.data
modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map(item => item.model)))
})