diff --git a/src/api/eqpt/device/info.ts b/src/api/eqpt/device/info.ts
index 4611f3c..fec84e0 100644
--- a/src/api/eqpt/device/info.ts
+++ b/src/api/eqpt/device/info.ts
@@ -207,3 +207,10 @@
method: 'get',
})
}
+// 生产厂家列表
+export function getListManufacturer() {
+ return request({
+ url: '/equipment/listManufacturer',
+ method: 'get',
+ })
+}
diff --git a/src/api/eqpt/device/info.ts b/src/api/eqpt/device/info.ts
index 4611f3c..fec84e0 100644
--- a/src/api/eqpt/device/info.ts
+++ b/src/api/eqpt/device/info.ts
@@ -207,3 +207,10 @@
method: 'get',
})
}
+// 生产厂家列表
+export function getListManufacturer() {
+ return request({
+ url: '/equipment/listManufacturer',
+ method: 'get',
+ })
+}
diff --git a/src/views/tested/MeasurementPlan/early/components/table.vue b/src/views/tested/MeasurementPlan/early/components/table.vue
index e6b80f8..b351c2e 100644
--- a/src/views/tested/MeasurementPlan/early/components/table.vue
+++ b/src/views/tested/MeasurementPlan/early/components/table.vue
@@ -480,7 +480,7 @@
删除行
-
+
diff --git a/src/api/eqpt/device/info.ts b/src/api/eqpt/device/info.ts
index 4611f3c..fec84e0 100644
--- a/src/api/eqpt/device/info.ts
+++ b/src/api/eqpt/device/info.ts
@@ -207,3 +207,10 @@
method: 'get',
})
}
+// 生产厂家列表
+export function getListManufacturer() {
+ return request({
+ url: '/equipment/listManufacturer',
+ method: 'get',
+ })
+}
diff --git a/src/views/tested/MeasurementPlan/early/components/table.vue b/src/views/tested/MeasurementPlan/early/components/table.vue
index e6b80f8..b351c2e 100644
--- a/src/views/tested/MeasurementPlan/early/components/table.vue
+++ b/src/views/tested/MeasurementPlan/early/components/table.vue
@@ -480,7 +480,7 @@
删除行
-
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index eaaec42..cf9159a 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -6,6 +6,7 @@
import showPhoto from '@/views/tested/device/info/components/showPhotoSinge.vue'
import showPhotos from '@/views/tested/device/info/components/showPhoto.vue'
import { uploadApi } from '@/api/system/notice'
+import { uniqueMultiArray } from '@/utils/Array'
import { useCheckList } from '@/utils/useCheckList'
import { getInfoDetail } from '@/api/eqpt/device/info'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
@@ -198,6 +199,7 @@
watch(() => $props.data, (newVal) => {
if (newVal) {
list.value = newVal
+ fetchTogetherData()
}
}, {
deep: true,
@@ -533,15 +535,22 @@
])
const togetherList = ref([])
const expandList = ref([])
-const fetchTogetherData = () => {
+function fetchTogetherData() {
if (!$route.path.includes('detail')) { return }
- const id = JSON.parse($route.query.row as string).id
- getTaskTogether(id).then((res) => {
- togetherList.value = res.data
+ // const id = JSON.parse($route.query.row as string).id
+ // getTaskTogether(id).then((res) => {
+ // togetherList.value = res.data
+ // })
+ togetherList.value = []
+ const equipmentNames = uniqueMultiArray(list.value, 'sampleName')
+ equipmentNames.forEach((element: any) => {
+ togetherList.value.push({
+ sampleName: element.sampleName,
+ deviceNum: list.value.filter((citem: any) => citem.sampleName === element.sampleName).length,
+ })
})
+ console.log(togetherList.value, 'togetherList.value')
}
-fetchTogetherData()
-
const getRowKeys = (row: any) => { // 获取当前行id
return row.sampleName // 这里看这一行中需要根据哪个属性值是id
}
diff --git a/src/api/eqpt/device/info.ts b/src/api/eqpt/device/info.ts
index 4611f3c..fec84e0 100644
--- a/src/api/eqpt/device/info.ts
+++ b/src/api/eqpt/device/info.ts
@@ -207,3 +207,10 @@
method: 'get',
})
}
+// 生产厂家列表
+export function getListManufacturer() {
+ return request({
+ url: '/equipment/listManufacturer',
+ method: 'get',
+ })
+}
diff --git a/src/views/tested/MeasurementPlan/early/components/table.vue b/src/views/tested/MeasurementPlan/early/components/table.vue
index e6b80f8..b351c2e 100644
--- a/src/views/tested/MeasurementPlan/early/components/table.vue
+++ b/src/views/tested/MeasurementPlan/early/components/table.vue
@@ -480,7 +480,7 @@
删除行
-
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index eaaec42..cf9159a 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -6,6 +6,7 @@
import showPhoto from '@/views/tested/device/info/components/showPhotoSinge.vue'
import showPhotos from '@/views/tested/device/info/components/showPhoto.vue'
import { uploadApi } from '@/api/system/notice'
+import { uniqueMultiArray } from '@/utils/Array'
import { useCheckList } from '@/utils/useCheckList'
import { getInfoDetail } from '@/api/eqpt/device/info'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
@@ -198,6 +199,7 @@
watch(() => $props.data, (newVal) => {
if (newVal) {
list.value = newVal
+ fetchTogetherData()
}
}, {
deep: true,
@@ -533,15 +535,22 @@
])
const togetherList = ref([])
const expandList = ref([])
-const fetchTogetherData = () => {
+function fetchTogetherData() {
if (!$route.path.includes('detail')) { return }
- const id = JSON.parse($route.query.row as string).id
- getTaskTogether(id).then((res) => {
- togetherList.value = res.data
+ // const id = JSON.parse($route.query.row as string).id
+ // getTaskTogether(id).then((res) => {
+ // togetherList.value = res.data
+ // })
+ togetherList.value = []
+ const equipmentNames = uniqueMultiArray(list.value, 'sampleName')
+ equipmentNames.forEach((element: any) => {
+ togetherList.value.push({
+ sampleName: element.sampleName,
+ deviceNum: list.value.filter((citem: any) => citem.sampleName === element.sampleName).length,
+ })
})
+ console.log(togetherList.value, 'togetherList.value')
}
-fetchTogetherData()
-
const getRowKeys = (row: any) => { // 获取当前行id
return row.sampleName // 这里看这一行中需要根据哪个属性值是id
}
diff --git a/src/views/tested/device/info/components/edit.vue b/src/views/tested/device/info/components/edit.vue
index 163fb95..5e68512 100644
--- a/src/views/tested/device/info/components/edit.vue
+++ b/src/views/tested/device/info/components/edit.vue
@@ -11,7 +11,7 @@
import { getDeptTree, getDeptTreeList, getDeptTreeListByPid } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
-import { cancelInfo, defaultCheckDestination, deleteInfo, editInfo, editInfoNoApproval, getApprovalDetail, getInfoDetail, submitInfo } from '@/api/eqpt/device/info'
+import { cancelInfo, defaultCheckDestination, deleteInfo, editInfo, editInfoNoApproval, getApprovalDetail, getInfoDetail, getListManufacturer, submitInfo } from '@/api/eqpt/device/info'
import { getDictByCode } from '@/api/system/dict'
import { SCHEDULE } from '@/utils/scheduleDict'
import { uploadApi } from '@/api/system/notice'
@@ -207,6 +207,7 @@
})
// 获取下拉框数据
const useStatusList = ref<{ id: string; value: string; name: string }[]>() // 使用状态
+const manufacturerList = ref() // 生产厂家
const levelList = ref<{ id: string; value: string; name: string }[]>() // 设备重要等级
const deviceTypeList = ref<{ id: string; value: string; name: string }[]>() // 设备分类
const inUseList = ref<{ id: string; value: string; name: string }[]>() // 设备在用信息
@@ -255,6 +256,10 @@
}
}
const fetchDict = () => {
+ // manufacturerList
+ getListManufacturer().then((res) => {
+ manufacturerList.value = res.data
+ })
getDictByCode('eqptDeviceUseStatus').then((res) => {
useStatusList.value = res.data
})
@@ -897,7 +902,10 @@
-
+
+
+
+
diff --git a/src/api/eqpt/device/info.ts b/src/api/eqpt/device/info.ts
index 4611f3c..fec84e0 100644
--- a/src/api/eqpt/device/info.ts
+++ b/src/api/eqpt/device/info.ts
@@ -207,3 +207,10 @@
method: 'get',
})
}
+// 生产厂家列表
+export function getListManufacturer() {
+ return request({
+ url: '/equipment/listManufacturer',
+ method: 'get',
+ })
+}
diff --git a/src/views/tested/MeasurementPlan/early/components/table.vue b/src/views/tested/MeasurementPlan/early/components/table.vue
index e6b80f8..b351c2e 100644
--- a/src/views/tested/MeasurementPlan/early/components/table.vue
+++ b/src/views/tested/MeasurementPlan/early/components/table.vue
@@ -480,7 +480,7 @@
删除行
-
+
diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue
index eaaec42..cf9159a 100644
--- a/src/views/tested/MeasurementPlan/task/components/tableList.vue
+++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue
@@ -6,6 +6,7 @@
import showPhoto from '@/views/tested/device/info/components/showPhotoSinge.vue'
import showPhotos from '@/views/tested/device/info/components/showPhoto.vue'
import { uploadApi } from '@/api/system/notice'
+import { uniqueMultiArray } from '@/utils/Array'
import { useCheckList } from '@/utils/useCheckList'
import { getInfoDetail } from '@/api/eqpt/device/info'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
@@ -198,6 +199,7 @@
watch(() => $props.data, (newVal) => {
if (newVal) {
list.value = newVal
+ fetchTogetherData()
}
}, {
deep: true,
@@ -533,15 +535,22 @@
])
const togetherList = ref([])
const expandList = ref([])
-const fetchTogetherData = () => {
+function fetchTogetherData() {
if (!$route.path.includes('detail')) { return }
- const id = JSON.parse($route.query.row as string).id
- getTaskTogether(id).then((res) => {
- togetherList.value = res.data
+ // const id = JSON.parse($route.query.row as string).id
+ // getTaskTogether(id).then((res) => {
+ // togetherList.value = res.data
+ // })
+ togetherList.value = []
+ const equipmentNames = uniqueMultiArray(list.value, 'sampleName')
+ equipmentNames.forEach((element: any) => {
+ togetherList.value.push({
+ sampleName: element.sampleName,
+ deviceNum: list.value.filter((citem: any) => citem.sampleName === element.sampleName).length,
+ })
})
+ console.log(togetherList.value, 'togetherList.value')
}
-fetchTogetherData()
-
const getRowKeys = (row: any) => { // 获取当前行id
return row.sampleName // 这里看这一行中需要根据哪个属性值是id
}
diff --git a/src/views/tested/device/info/components/edit.vue b/src/views/tested/device/info/components/edit.vue
index 163fb95..5e68512 100644
--- a/src/views/tested/device/info/components/edit.vue
+++ b/src/views/tested/device/info/components/edit.vue
@@ -11,7 +11,7 @@
import { getDeptTree, getDeptTreeList, getDeptTreeListByPid } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
-import { cancelInfo, defaultCheckDestination, deleteInfo, editInfo, editInfoNoApproval, getApprovalDetail, getInfoDetail, submitInfo } from '@/api/eqpt/device/info'
+import { cancelInfo, defaultCheckDestination, deleteInfo, editInfo, editInfoNoApproval, getApprovalDetail, getInfoDetail, getListManufacturer, submitInfo } from '@/api/eqpt/device/info'
import { getDictByCode } from '@/api/system/dict'
import { SCHEDULE } from '@/utils/scheduleDict'
import { uploadApi } from '@/api/system/notice'
@@ -207,6 +207,7 @@
})
// 获取下拉框数据
const useStatusList = ref<{ id: string; value: string; name: string }[]>() // 使用状态
+const manufacturerList = ref() // 生产厂家
const levelList = ref<{ id: string; value: string; name: string }[]>() // 设备重要等级
const deviceTypeList = ref<{ id: string; value: string; name: string }[]>() // 设备分类
const inUseList = ref<{ id: string; value: string; name: string }[]>() // 设备在用信息
@@ -255,6 +256,10 @@
}
}
const fetchDict = () => {
+ // manufacturerList
+ getListManufacturer().then((res) => {
+ manufacturerList.value = res.data
+ })
getDictByCode('eqptDeviceUseStatus').then((res) => {
useStatusList.value = res.data
})
@@ -897,7 +902,10 @@
-
+
+
+
+
diff --git a/src/views/tested/subpackage/task/components/deviceTable.vue b/src/views/tested/subpackage/task/components/deviceTable.vue
index 51531eb..e27ec59 100644
--- a/src/views/tested/subpackage/task/components/deviceTable.vue
+++ b/src/views/tested/subpackage/task/components/deviceTable.vue
@@ -1,9 +1,11 @@
-
-
- 批量添加
-
-
- 删除行
-
+
+
+
+ 批量添加
+
+
+ 删除行
+
+
+
+
+
+
-
+
*{{ item.text }}
- {{ scope.row[item.value] }}
- {{ scope.row[item.value] }}
+ {{ scope.row[item.value]
+ }}
+ {{
+ scope.row[item.value] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 共计{{ scope.row.deviceNum }}台
+
+
+
@@ -203,4 +307,14 @@
cursor: pointer;
}
}
+
+.nortable-header {
+ ::v-deep(.el-table__body-wrapper) {
+ display: none;
+ }
+}
+
+::v-deep(.el-table__expanded-cell) {
+ padding: 0;
+}