diff --git a/src/api/dataManagement/data/device.ts b/src/api/dataManagement/data/device.ts new file mode 100644 index 0000000..2287990 --- /dev/null +++ b/src/api/dataManagement/data/device.ts @@ -0,0 +1,59 @@ +// 实验室设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/equipment/amount', + method: 'post', + data + }) +} +// 设备类型分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/equipment/category', + method: 'post', + data + }) +} +// 近一年部门设备到期趋势 +export function getDeptExpire(data: object) { + return request({ + url: '/data/equipment/expire/trendList', + method: 'post', + data + }) +} +// 设备维护保养情况(分页 +export function getDeviceMaintain(data: object) { + return request({ + url: '/data/equipment/maintainList', + method: 'post', + data + }) +} +// 标准设备种类分析 +export function getStandardDeviceType(data: object) { + return request({ + url: '/data/equipment/name/category', + method: 'post', + data + }) +} +// 设备状态分析 +export function getDeviceStatus(data: object) { + return request({ + url: '/data/equipment/status', + method: 'post', + data + }) +} +// 设备溯源分析 +export function getTraceAnalyse(data: object) { + return request({ + url: '/data/equipment/trace', + method: 'post', + data + }) +} diff --git a/src/api/dataManagement/data/device.ts b/src/api/dataManagement/data/device.ts new file mode 100644 index 0000000..2287990 --- /dev/null +++ b/src/api/dataManagement/data/device.ts @@ -0,0 +1,59 @@ +// 实验室设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/equipment/amount', + method: 'post', + data + }) +} +// 设备类型分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/equipment/category', + method: 'post', + data + }) +} +// 近一年部门设备到期趋势 +export function getDeptExpire(data: object) { + return request({ + url: '/data/equipment/expire/trendList', + method: 'post', + data + }) +} +// 设备维护保养情况(分页 +export function getDeviceMaintain(data: object) { + return request({ + url: '/data/equipment/maintainList', + method: 'post', + data + }) +} +// 标准设备种类分析 +export function getStandardDeviceType(data: object) { + return request({ + url: '/data/equipment/name/category', + method: 'post', + data + }) +} +// 设备状态分析 +export function getDeviceStatus(data: object) { + return request({ + url: '/data/equipment/status', + method: 'post', + data + }) +} +// 设备溯源分析 +export function getTraceAnalyse(data: object) { + return request({ + url: '/data/equipment/trace', + method: 'post', + data + }) +} diff --git a/src/api/dataManagement/data/eqptDevice.ts b/src/api/dataManagement/data/eqptDevice.ts new file mode 100644 index 0000000..4efea57 --- /dev/null +++ b/src/api/dataManagement/data/eqptDevice.ts @@ -0,0 +1,83 @@ +// 受检设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/sample/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/sample/category/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析-列表 +export function getDeviceTypeList(data: object) { + return request({ + url: '/data/sample/category/list', + method: 'post', + data + }) +} +// 受检设备已检数量趋势 +export function getAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/measured/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势 +export function getNotAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/noMeasure/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势-列表 +export function getNotAlreadyMeasuredList(data: object) { + return request({ + url: '/data/sample/noMeasure/list', + method: 'post', + data + }) +} +// 受检设备性能趋势(分页) +export function getDevicePerformance(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备应检数量趋势 +export function getShouldMeasured(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备来源分析 +export function getDeviceSource(data: object) { + return request({ + url: '/data/sample/source/amount', + method: 'post', + data + }) +} +// 受检设备来源分析-某单位受检设备列表(分页) +export function getDeviceSourceDept(data: object) { + return request({ + url: '/data/sample/source/list', + method: 'post', + data + }) +} diff --git a/src/api/dataManagement/data/device.ts b/src/api/dataManagement/data/device.ts new file mode 100644 index 0000000..2287990 --- /dev/null +++ b/src/api/dataManagement/data/device.ts @@ -0,0 +1,59 @@ +// 实验室设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/equipment/amount', + method: 'post', + data + }) +} +// 设备类型分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/equipment/category', + method: 'post', + data + }) +} +// 近一年部门设备到期趋势 +export function getDeptExpire(data: object) { + return request({ + url: '/data/equipment/expire/trendList', + method: 'post', + data + }) +} +// 设备维护保养情况(分页 +export function getDeviceMaintain(data: object) { + return request({ + url: '/data/equipment/maintainList', + method: 'post', + data + }) +} +// 标准设备种类分析 +export function getStandardDeviceType(data: object) { + return request({ + url: '/data/equipment/name/category', + method: 'post', + data + }) +} +// 设备状态分析 +export function getDeviceStatus(data: object) { + return request({ + url: '/data/equipment/status', + method: 'post', + data + }) +} +// 设备溯源分析 +export function getTraceAnalyse(data: object) { + return request({ + url: '/data/equipment/trace', + method: 'post', + data + }) +} diff --git a/src/api/dataManagement/data/eqptDevice.ts b/src/api/dataManagement/data/eqptDevice.ts new file mode 100644 index 0000000..4efea57 --- /dev/null +++ b/src/api/dataManagement/data/eqptDevice.ts @@ -0,0 +1,83 @@ +// 受检设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/sample/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/sample/category/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析-列表 +export function getDeviceTypeList(data: object) { + return request({ + url: '/data/sample/category/list', + method: 'post', + data + }) +} +// 受检设备已检数量趋势 +export function getAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/measured/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势 +export function getNotAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/noMeasure/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势-列表 +export function getNotAlreadyMeasuredList(data: object) { + return request({ + url: '/data/sample/noMeasure/list', + method: 'post', + data + }) +} +// 受检设备性能趋势(分页) +export function getDevicePerformance(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备应检数量趋势 +export function getShouldMeasured(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备来源分析 +export function getDeviceSource(data: object) { + return request({ + url: '/data/sample/source/amount', + method: 'post', + data + }) +} +// 受检设备来源分析-某单位受检设备列表(分页) +export function getDeviceSourceDept(data: object) { + return request({ + url: '/data/sample/source/list', + method: 'post', + data + }) +} diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..8f3e5a8 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git a/src/api/dataManagement/data/device.ts b/src/api/dataManagement/data/device.ts new file mode 100644 index 0000000..2287990 --- /dev/null +++ b/src/api/dataManagement/data/device.ts @@ -0,0 +1,59 @@ +// 实验室设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/equipment/amount', + method: 'post', + data + }) +} +// 设备类型分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/equipment/category', + method: 'post', + data + }) +} +// 近一年部门设备到期趋势 +export function getDeptExpire(data: object) { + return request({ + url: '/data/equipment/expire/trendList', + method: 'post', + data + }) +} +// 设备维护保养情况(分页 +export function getDeviceMaintain(data: object) { + return request({ + url: '/data/equipment/maintainList', + method: 'post', + data + }) +} +// 标准设备种类分析 +export function getStandardDeviceType(data: object) { + return request({ + url: '/data/equipment/name/category', + method: 'post', + data + }) +} +// 设备状态分析 +export function getDeviceStatus(data: object) { + return request({ + url: '/data/equipment/status', + method: 'post', + data + }) +} +// 设备溯源分析 +export function getTraceAnalyse(data: object) { + return request({ + url: '/data/equipment/trace', + method: 'post', + data + }) +} diff --git a/src/api/dataManagement/data/eqptDevice.ts b/src/api/dataManagement/data/eqptDevice.ts new file mode 100644 index 0000000..4efea57 --- /dev/null +++ b/src/api/dataManagement/data/eqptDevice.ts @@ -0,0 +1,83 @@ +// 受检设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/sample/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/sample/category/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析-列表 +export function getDeviceTypeList(data: object) { + return request({ + url: '/data/sample/category/list', + method: 'post', + data + }) +} +// 受检设备已检数量趋势 +export function getAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/measured/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势 +export function getNotAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/noMeasure/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势-列表 +export function getNotAlreadyMeasuredList(data: object) { + return request({ + url: '/data/sample/noMeasure/list', + method: 'post', + data + }) +} +// 受检设备性能趋势(分页) +export function getDevicePerformance(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备应检数量趋势 +export function getShouldMeasured(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备来源分析 +export function getDeviceSource(data: object) { + return request({ + url: '/data/sample/source/amount', + method: 'post', + data + }) +} +// 受检设备来源分析-某单位受检设备列表(分页) +export function getDeviceSourceDept(data: object) { + return request({ + url: '/data/sample/source/list', + method: 'post', + data + }) +} diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..8f3e5a8 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..57f6be6 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git a/src/api/dataManagement/data/device.ts b/src/api/dataManagement/data/device.ts new file mode 100644 index 0000000..2287990 --- /dev/null +++ b/src/api/dataManagement/data/device.ts @@ -0,0 +1,59 @@ +// 实验室设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/equipment/amount', + method: 'post', + data + }) +} +// 设备类型分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/equipment/category', + method: 'post', + data + }) +} +// 近一年部门设备到期趋势 +export function getDeptExpire(data: object) { + return request({ + url: '/data/equipment/expire/trendList', + method: 'post', + data + }) +} +// 设备维护保养情况(分页 +export function getDeviceMaintain(data: object) { + return request({ + url: '/data/equipment/maintainList', + method: 'post', + data + }) +} +// 标准设备种类分析 +export function getStandardDeviceType(data: object) { + return request({ + url: '/data/equipment/name/category', + method: 'post', + data + }) +} +// 设备状态分析 +export function getDeviceStatus(data: object) { + return request({ + url: '/data/equipment/status', + method: 'post', + data + }) +} +// 设备溯源分析 +export function getTraceAnalyse(data: object) { + return request({ + url: '/data/equipment/trace', + method: 'post', + data + }) +} diff --git a/src/api/dataManagement/data/eqptDevice.ts b/src/api/dataManagement/data/eqptDevice.ts new file mode 100644 index 0000000..4efea57 --- /dev/null +++ b/src/api/dataManagement/data/eqptDevice.ts @@ -0,0 +1,83 @@ +// 受检设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/sample/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/sample/category/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析-列表 +export function getDeviceTypeList(data: object) { + return request({ + url: '/data/sample/category/list', + method: 'post', + data + }) +} +// 受检设备已检数量趋势 +export function getAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/measured/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势 +export function getNotAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/noMeasure/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势-列表 +export function getNotAlreadyMeasuredList(data: object) { + return request({ + url: '/data/sample/noMeasure/list', + method: 'post', + data + }) +} +// 受检设备性能趋势(分页) +export function getDevicePerformance(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备应检数量趋势 +export function getShouldMeasured(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备来源分析 +export function getDeviceSource(data: object) { + return request({ + url: '/data/sample/source/amount', + method: 'post', + data + }) +} +// 受检设备来源分析-某单位受检设备列表(分页) +export function getDeviceSourceDept(data: object) { + return request({ + url: '/data/sample/source/list', + method: 'post', + data + }) +} diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..8f3e5a8 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..57f6be6 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" new file mode 100644 index 0000000..b343b44 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" Binary files differ diff --git a/src/api/dataManagement/data/device.ts b/src/api/dataManagement/data/device.ts new file mode 100644 index 0000000..2287990 --- /dev/null +++ b/src/api/dataManagement/data/device.ts @@ -0,0 +1,59 @@ +// 实验室设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/equipment/amount', + method: 'post', + data + }) +} +// 设备类型分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/equipment/category', + method: 'post', + data + }) +} +// 近一年部门设备到期趋势 +export function getDeptExpire(data: object) { + return request({ + url: '/data/equipment/expire/trendList', + method: 'post', + data + }) +} +// 设备维护保养情况(分页 +export function getDeviceMaintain(data: object) { + return request({ + url: '/data/equipment/maintainList', + method: 'post', + data + }) +} +// 标准设备种类分析 +export function getStandardDeviceType(data: object) { + return request({ + url: '/data/equipment/name/category', + method: 'post', + data + }) +} +// 设备状态分析 +export function getDeviceStatus(data: object) { + return request({ + url: '/data/equipment/status', + method: 'post', + data + }) +} +// 设备溯源分析 +export function getTraceAnalyse(data: object) { + return request({ + url: '/data/equipment/trace', + method: 'post', + data + }) +} diff --git a/src/api/dataManagement/data/eqptDevice.ts b/src/api/dataManagement/data/eqptDevice.ts new file mode 100644 index 0000000..4efea57 --- /dev/null +++ b/src/api/dataManagement/data/eqptDevice.ts @@ -0,0 +1,83 @@ +// 受检设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/sample/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/sample/category/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析-列表 +export function getDeviceTypeList(data: object) { + return request({ + url: '/data/sample/category/list', + method: 'post', + data + }) +} +// 受检设备已检数量趋势 +export function getAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/measured/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势 +export function getNotAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/noMeasure/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势-列表 +export function getNotAlreadyMeasuredList(data: object) { + return request({ + url: '/data/sample/noMeasure/list', + method: 'post', + data + }) +} +// 受检设备性能趋势(分页) +export function getDevicePerformance(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备应检数量趋势 +export function getShouldMeasured(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备来源分析 +export function getDeviceSource(data: object) { + return request({ + url: '/data/sample/source/amount', + method: 'post', + data + }) +} +// 受检设备来源分析-某单位受检设备列表(分页) +export function getDeviceSourceDept(data: object) { + return request({ + url: '/data/sample/source/list', + method: 'post', + data + }) +} diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..8f3e5a8 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..57f6be6 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" new file mode 100644 index 0000000..b343b44 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\271\264\345\272\246\345\210\260\346\234\237\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\271\264\345\272\246\345\210\260\346\234\237\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..35ff374 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\271\264\345\272\246\345\210\260\346\234\237\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git a/src/api/dataManagement/data/device.ts b/src/api/dataManagement/data/device.ts new file mode 100644 index 0000000..2287990 --- /dev/null +++ b/src/api/dataManagement/data/device.ts @@ -0,0 +1,59 @@ +// 实验室设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/equipment/amount', + method: 'post', + data + }) +} +// 设备类型分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/equipment/category', + method: 'post', + data + }) +} +// 近一年部门设备到期趋势 +export function getDeptExpire(data: object) { + return request({ + url: '/data/equipment/expire/trendList', + method: 'post', + data + }) +} +// 设备维护保养情况(分页 +export function getDeviceMaintain(data: object) { + return request({ + url: '/data/equipment/maintainList', + method: 'post', + data + }) +} +// 标准设备种类分析 +export function getStandardDeviceType(data: object) { + return request({ + url: '/data/equipment/name/category', + method: 'post', + data + }) +} +// 设备状态分析 +export function getDeviceStatus(data: object) { + return request({ + url: '/data/equipment/status', + method: 'post', + data + }) +} +// 设备溯源分析 +export function getTraceAnalyse(data: object) { + return request({ + url: '/data/equipment/trace', + method: 'post', + data + }) +} diff --git a/src/api/dataManagement/data/eqptDevice.ts b/src/api/dataManagement/data/eqptDevice.ts new file mode 100644 index 0000000..4efea57 --- /dev/null +++ b/src/api/dataManagement/data/eqptDevice.ts @@ -0,0 +1,83 @@ +// 受检设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/sample/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/sample/category/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析-列表 +export function getDeviceTypeList(data: object) { + return request({ + url: '/data/sample/category/list', + method: 'post', + data + }) +} +// 受检设备已检数量趋势 +export function getAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/measured/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势 +export function getNotAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/noMeasure/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势-列表 +export function getNotAlreadyMeasuredList(data: object) { + return request({ + url: '/data/sample/noMeasure/list', + method: 'post', + data + }) +} +// 受检设备性能趋势(分页) +export function getDevicePerformance(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备应检数量趋势 +export function getShouldMeasured(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备来源分析 +export function getDeviceSource(data: object) { + return request({ + url: '/data/sample/source/amount', + method: 'post', + data + }) +} +// 受检设备来源分析-某单位受检设备列表(分页) +export function getDeviceSourceDept(data: object) { + return request({ + url: '/data/sample/source/list', + method: 'post', + data + }) +} diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..8f3e5a8 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..57f6be6 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" new file mode 100644 index 0000000..b343b44 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\271\264\345\272\246\345\210\260\346\234\237\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\271\264\345\272\246\345\210\260\346\234\237\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..35ff374 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\271\264\345\272\246\345\210\260\346\234\237\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\272\224\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\272\224\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" new file mode 100644 index 0000000..b2a273f --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\272\224\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" Binary files differ diff --git a/src/api/dataManagement/data/device.ts b/src/api/dataManagement/data/device.ts new file mode 100644 index 0000000..2287990 --- /dev/null +++ b/src/api/dataManagement/data/device.ts @@ -0,0 +1,59 @@ +// 实验室设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/equipment/amount', + method: 'post', + data + }) +} +// 设备类型分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/equipment/category', + method: 'post', + data + }) +} +// 近一年部门设备到期趋势 +export function getDeptExpire(data: object) { + return request({ + url: '/data/equipment/expire/trendList', + method: 'post', + data + }) +} +// 设备维护保养情况(分页 +export function getDeviceMaintain(data: object) { + return request({ + url: '/data/equipment/maintainList', + method: 'post', + data + }) +} +// 标准设备种类分析 +export function getStandardDeviceType(data: object) { + return request({ + url: '/data/equipment/name/category', + method: 'post', + data + }) +} +// 设备状态分析 +export function getDeviceStatus(data: object) { + return request({ + url: '/data/equipment/status', + method: 'post', + data + }) +} +// 设备溯源分析 +export function getTraceAnalyse(data: object) { + return request({ + url: '/data/equipment/trace', + method: 'post', + data + }) +} diff --git a/src/api/dataManagement/data/eqptDevice.ts b/src/api/dataManagement/data/eqptDevice.ts new file mode 100644 index 0000000..4efea57 --- /dev/null +++ b/src/api/dataManagement/data/eqptDevice.ts @@ -0,0 +1,83 @@ +// 受检设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/sample/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/sample/category/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析-列表 +export function getDeviceTypeList(data: object) { + return request({ + url: '/data/sample/category/list', + method: 'post', + data + }) +} +// 受检设备已检数量趋势 +export function getAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/measured/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势 +export function getNotAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/noMeasure/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势-列表 +export function getNotAlreadyMeasuredList(data: object) { + return request({ + url: '/data/sample/noMeasure/list', + method: 'post', + data + }) +} +// 受检设备性能趋势(分页) +export function getDevicePerformance(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备应检数量趋势 +export function getShouldMeasured(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备来源分析 +export function getDeviceSource(data: object) { + return request({ + url: '/data/sample/source/amount', + method: 'post', + data + }) +} +// 受检设备来源分析-某单位受检设备列表(分页) +export function getDeviceSourceDept(data: object) { + return request({ + url: '/data/sample/source/list', + method: 'post', + data + }) +} diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..8f3e5a8 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..57f6be6 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" new file mode 100644 index 0000000..b343b44 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\271\264\345\272\246\345\210\260\346\234\237\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\271\264\345\272\246\345\210\260\346\234\237\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..35ff374 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\271\264\345\272\246\345\210\260\346\234\237\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\272\224\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\272\224\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" new file mode 100644 index 0000000..b2a273f --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\272\224\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" Binary files differ diff --git a/src/views/dataManagement/components/data/device.vue b/src/views/dataManagement/components/data/device.vue index f3263c4..ab219ba 100644 --- a/src/views/dataManagement/components/data/device.vue +++ b/src/views/dataManagement/components/data/device.vue @@ -4,17 +4,79 @@ import draggable from 'vuedraggable' import { colors } from '../environment/colors' import { getRangeAllTime } from '@/utils/date' +import { device } from './img' +import { + getBaseInfo, + getDeptExpire, + getDeviceType, + getDeviceStatus, + getTraceAnalyse, + getStandardDeviceType, + getDeviceMaintain +} from '@/api/dataManagement/data/device' const props = defineProps({ lab: { type: String, - default: '', - }, -}) -watch(() => props.lab, (newVal) => { - if (newVal) { - fetchData() + default: '' } }) +// 查询条件 +const searchQueryResult = ref({ + groupCode: '', + labCode: '', + timeStart: '', + timeEnd: '' +}) +const year = ref('') // 年度 +const yearList = ref([]) + +watch( + () => props.lab, + newVal => { + if (newVal) { + searchQueryResult.value.labCode = props.lab + fetchData() + } + } +) +// 基础信息展示数据 +const baseInfo = ref([ + { + name: '在用设备总量', + value: 'equipmentAmount', + data: '', + icon: device['在用设备总量'], + color: '#1AAF8B' + }, + { + name: '在用标准设备总量', + value: 'standardAmount', + data: '', + icon: device['在用标准设备总量'], + color: '#1AAF8B' + }, + { + name: '本年度到期设备总量', + value: 'expireAmount', + data: '', + icon: device['本年度到期设备总量'], + color: '#1AAF8B' + }, + { + name: '应溯源总数量', + value: 'shouldTraceAmount', + data: '', + icon: device['应溯源总数量'], + color: '#1AAF8B' + }, + { + name: '实际溯源总数量', + value: 'tracedAmount', + data: '', + icon: device['实际溯源总数量'], + color: '#1AAF8B' + } +]) const showChart = ref([ { name: '近一年部门设备到期趋势', @@ -23,7 +85,7 @@ xAxisData: [], data: [], smooth: false, - gradient: true, + gradient: true }, { name: '设备类型分析', @@ -32,73 +94,297 @@ center: ['50%', '60%'], labelPosition: 'outside', radius: '70%', + data: [] + }, + { + name: '标准设备种类分析', + type: 'rank-table', + source: 'system', data: [], - + columns: [ + { + text: '标准设备名称', + value: 'name', + align: 'center' + }, + { + text: '数量', + value: 'count', + align: 'center' + } + ] }, { name: '设备状态分析', type: 'bar-vertical', + source: 'system' + }, + { + name: '设备维护保养情况', + type: 'rank-table', source: 'system', + data: [], + columns: [ + { + text: '实验室', + value: 'labCodeName', + align: 'center', + width: '75' + }, + { + text: '组别', + value: 'groupCodeName', + align: 'center' + }, + { + text: '设备名称', + value: 'equipmentName', + align: 'center' + }, + { + text: '规格型号', + value: 'model', + align: 'center' + }, + { + text: '月保养次数', + value: 'monthAmount', + align: 'center', + width: '95' + }, + { + text: '周维护次数', + value: 'weekAmount', + align: 'center', + width: '95' + }, + ] }, { name: '设备溯源分析', type: 'bar-horizontal', - source: 'system', + source: 'system' }, + + ]) -watch(() => showChart.value.length, () => { - setTimeout(() => { - const resize = new Event('resize') - window.dispatchEvent(resize) - }) -}) +watch( + () => showChart.value.length, + () => { + setTimeout(() => { + const resize = new Event('resize') + window.dispatchEvent(resize) + }) + } +) // 模拟数据 const loading = ref(false) function fetchData() { - loading.value = true - // 近一年部门设备到期趋势 - const name1 = ['电学电源组', '热工压力组', '无线脉冲组', '综合管理组'] - const timeList = getRangeAllTime(dayjs().subtract(14, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')) - showChart.value.filter((item: any) => item.name === '近一年部门设备到期趋势')[0].data = name1.map(item => ({ - name: item, - data: timeList.map(item => Math.floor(Math.random() * 100) + 1), - symbol: 'emptyCircle', - })) - showChart.value.filter((item: any) => item.name === '近一年部门设备到期趋势')[0].xAxisData = timeList - // 设备类型分析 - const name2 = ['标准设备', '配套设备', '其他'] - showChart.value.filter((item: any) => item.name === '设备类型分析')[0].data = name2.map(item => ({ - name: item, - value: Math.floor(Math.random() * 100) + 1, - })) - // 设备状态分析 - const name3 = ['在用', '禁用', '报废', '延用', '封存'] - showChart.value.filter((item: any) => item.name === '设备状态分析')[0].data = [{ - name: '数量', - data: name3.map(item => Math.floor(Math.random() * 100) + 1), - }] - showChart.value.filter((item: any) => item.name === '设备状态分析')[0].xAxisData = name3 - // 设备溯源分析 - const name4 = ['校准', '测试', '合格', '限用', '禁用', '停用', '封存'] - showChart.value.filter((item: any) => item.name === '设备溯源分析')[0].data = [{ - name: '数量', - data: name4.map(item => Math.floor(Math.random() * 100) + 1), - }] - showChart.value.filter((item: any) => item.name === '设备溯源分析')[0].xAxisData = name4 - - setTimeout(() => { - const resize = new Event('resize') - window.dispatchEvent(resize) + // 获取基础数据 + getBaseInfo(searchQueryResult.value).then(res => { + baseInfo.value.forEach(item => { + item.data = res.data[item.value] + }) }) - setTimeout(() => { - loading.value = false - }, 3000) + // 近一年部门设备到期趋势 + getDeptExpire(searchQueryResult.value).then(res => { + console.log(res.data, '近一年部门设备到期趋势') + const current = showChart.value.filter( + item => item.name === '近一年部门设备到期趋势' + )[0] + current.xAxisData = res.data.map((item: any) => item.dimension) + const data = [ + { + name: '电学电源组', + value: 'ddAmount' + }, + { + name: '热工压力组', + value: 'rlAmount' + }, + { + name: '无线脉冲组', + value: 'wmAmount' + }, + { + name: '综合管理组', + value: 'glAmount' + } + ] + current.data = data.map((item: any) => ({ + name: item.name, + symbol: 'emptyCircle', + data: res.data.map((citem: any) => String(citem[item.value])) + })) + }) + // 设备类型分析 + getDeviceType(searchQueryResult.value).then(res => { + console.log(res.data, '设备类型分析') + const data = [ + { + name: '标准设备', + value: 'standardAmount', + data: '' + }, + { + name: '配套设备', + value: 'equipmentAmount', + data: '' + }, + { + name: '其他设备', + value: 'otherAmount', + data: '' + } + ] + const current = showChart.value.filter( + item => item.name === '设备类型分析' + )[0] + data.forEach(item => { + item.data = res.data[item.value] + }) + current.data = data.map(item => ({ name: item.name, value: String(item.data) })) + }) + // 设备状态分析 + getDeviceStatus(searchQueryResult.value).then(res => { + console.log(res.data, '设备状态分析') + const current = showChart.value.filter( + item => item.name === '设备状态分析' + )[0] + const data = [ + { + name: '在用', + value: 'onUseAmount', + data: '' + }, + { + name: '禁用', + value: 'disableAmount', + data: '' + }, + { + name: '报废', + value: 'scrapAmount', + data: '' + }, + { + name: '延用', + value: 'delayAmount', + data: '' + }, + { + name: '封存', + value: 'sealAmount', + data: '' + } + ] + data.forEach(item => { + item.data = res.data[item.value] + }) + current.xAxisData = data.map((item: any) => item.name) + current.data = [ + { + name: '数量', + data: data.map((item: any) => String(item.data)) + } + ] + }) + // 设备溯源分析 + getTraceAnalyse(searchQueryResult.value).then(res => { + console.log(res.data, '设备溯源分析') + const current = showChart.value.filter( + item => item.name === '设备溯源分析' + )[0] + const data = [ + { + name: '合格', + value: 'qualifiedAmount', + data: '' + }, + { + name: '限用', + value: 'restrictAmount', + data: '' + }, + { + name: '停用', + value: 'stopAmount', + data: '' + }, + ] + data.forEach(item => { + item.data = res.data[item.value] + }) + current.xAxisData = data.map((item: any) => item.name) + current.data = [ + { + name: '数量', + data: data.map((item: any) => String(item.data)) + } + ] + }) + // 标准设备种类分析 + getStandardDeviceType(searchQueryResult.value).then(res => { + console.log(res.data, '标准设备种类分析') + const current = showChart.value.filter( + item => item.name === '标准设备种类分析' + )[0] + current.data = [] + for(const i in res.data) { + current.data.push({ name: i, count: res.data[i]}) + } + current.data.reverse() + }) + // 设备维护保养情况 + getDeviceMaintain({ ...searchQueryResult.value, offset:1, limit: 9999}).then(res => { + console.log(res.data, '设备维护保养情况') + const current = showChart.value.filter( + item => item.name === '设备维护保养情况' + )[0] + current.data = [] + current.data = res.data.rows + }) + // loading.value = true + // // 近一年部门设备到期趋势 + // const name1 = ['电学电源组', '热工压力组', '无线脉冲组', '综合管理组'] + // const timeList = getRangeAllTime(dayjs().subtract(14, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')) + // showChart.value.filter((item: any) => item.name === '近一年部门设备到期趋势')[0].data = name1.map(item => ({ + // name: item, + // data: timeList.map(item => Math.floor(Math.random() * 100) + 1), + // symbol: 'emptyCircle', + // })) + // showChart.value.filter((item: any) => item.name === '近一年部门设备到期趋势')[0].xAxisData = timeList + // // 设备类型分析 + // const name2 = ['标准设备', '配套设备', '其他'] + // showChart.value.filter((item: any) => item.name === '设备类型分析')[0].data = name2.map(item => ({ + // name: item, + // value: Math.floor(Math.random() * 100) + 1, + // })) + // // 设备状态分析 + // const name3 = ['在用', '禁用', '报废', '延用', '封存'] + // showChart.value.filter((item: any) => item.name === '设备状态分析')[0].data = [{ + // name: '数量', + // data: name3.map(item => Math.floor(Math.random() * 100) + 1), + // }] + // showChart.value.filter((item: any) => item.name === '设备状态分析')[0].xAxisData = name3 + // // 设备溯源分析 + // const name4 = ['校准', '测试', '合格', '限用', '禁用', '停用', '封存'] + // showChart.value.filter((item: any) => item.name === '设备溯源分析')[0].data = [{ + // name: '数量', + // data: name4.map(item => Math.floor(Math.random() * 100) + 1), + // }] + // showChart.value.filter((item: any) => item.name === '设备溯源分析')[0].xAxisData = name4 + + // setTimeout(() => { + // const resize = new Event('resize') + // window.dispatchEvent(resize) + // }) + // setTimeout(() => { + // loading.value = false + // }, 3000) } -setTimeout(() => { - fetchData() -}, 100) defineExpose({ - showChart, + showChart }) // 拖拽结束 const onEnd = () => { @@ -106,58 +392,80 @@ const resize = new Event('resize') window.dispatchEvent(resize) } +// 整理最近五年年度 +const currentYear = new Date().getFullYear() +yearList.value = [] +for (let i = 0; i < 5; i++) { + yearList.value.push(String(currentYear - i)) +} + +watch( + () => year.value, + newVal => { + if (newVal) { + console.log(newVal, '当前年度') + searchQueryResult.value.timeStart = `${newVal}-01-01` + searchQueryResult.value.timeEnd = `${newVal}-12-31` + setTimeout(() => { + fetchData() + }) + } + } +) +onMounted(() => { + year.value = String(currentYear) + if (props.lab) { + searchQueryResult.value.labCode = props.lab + setTimeout(() => { + fetchData() + }) + } +}) @@ -228,7 +668,7 @@ .count { display: flex; - width: 50%; + width: 60%; margin: 0 auto; position: absolute; top: -40px; @@ -266,6 +706,7 @@ font-weight: 700; font-size: 24px; color: #1aaf8b; + text-align: center; } } } @@ -297,4 +738,3 @@ } } - diff --git a/src/api/dataManagement/data/device.ts b/src/api/dataManagement/data/device.ts new file mode 100644 index 0000000..2287990 --- /dev/null +++ b/src/api/dataManagement/data/device.ts @@ -0,0 +1,59 @@ +// 实验室设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/equipment/amount', + method: 'post', + data + }) +} +// 设备类型分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/equipment/category', + method: 'post', + data + }) +} +// 近一年部门设备到期趋势 +export function getDeptExpire(data: object) { + return request({ + url: '/data/equipment/expire/trendList', + method: 'post', + data + }) +} +// 设备维护保养情况(分页 +export function getDeviceMaintain(data: object) { + return request({ + url: '/data/equipment/maintainList', + method: 'post', + data + }) +} +// 标准设备种类分析 +export function getStandardDeviceType(data: object) { + return request({ + url: '/data/equipment/name/category', + method: 'post', + data + }) +} +// 设备状态分析 +export function getDeviceStatus(data: object) { + return request({ + url: '/data/equipment/status', + method: 'post', + data + }) +} +// 设备溯源分析 +export function getTraceAnalyse(data: object) { + return request({ + url: '/data/equipment/trace', + method: 'post', + data + }) +} diff --git a/src/api/dataManagement/data/eqptDevice.ts b/src/api/dataManagement/data/eqptDevice.ts new file mode 100644 index 0000000..4efea57 --- /dev/null +++ b/src/api/dataManagement/data/eqptDevice.ts @@ -0,0 +1,83 @@ +// 受检设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/sample/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/sample/category/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析-列表 +export function getDeviceTypeList(data: object) { + return request({ + url: '/data/sample/category/list', + method: 'post', + data + }) +} +// 受检设备已检数量趋势 +export function getAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/measured/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势 +export function getNotAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/noMeasure/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势-列表 +export function getNotAlreadyMeasuredList(data: object) { + return request({ + url: '/data/sample/noMeasure/list', + method: 'post', + data + }) +} +// 受检设备性能趋势(分页) +export function getDevicePerformance(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备应检数量趋势 +export function getShouldMeasured(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备来源分析 +export function getDeviceSource(data: object) { + return request({ + url: '/data/sample/source/amount', + method: 'post', + data + }) +} +// 受检设备来源分析-某单位受检设备列表(分页) +export function getDeviceSourceDept(data: object) { + return request({ + url: '/data/sample/source/list', + method: 'post', + data + }) +} diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..8f3e5a8 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..57f6be6 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" new file mode 100644 index 0000000..b343b44 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\271\264\345\272\246\345\210\260\346\234\237\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\271\264\345\272\246\345\210\260\346\234\237\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..35ff374 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\271\264\345\272\246\345\210\260\346\234\237\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\272\224\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\272\224\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" new file mode 100644 index 0000000..b2a273f --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\272\224\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" Binary files differ diff --git a/src/views/dataManagement/components/data/device.vue b/src/views/dataManagement/components/data/device.vue index f3263c4..ab219ba 100644 --- a/src/views/dataManagement/components/data/device.vue +++ b/src/views/dataManagement/components/data/device.vue @@ -4,17 +4,79 @@ import draggable from 'vuedraggable' import { colors } from '../environment/colors' import { getRangeAllTime } from '@/utils/date' +import { device } from './img' +import { + getBaseInfo, + getDeptExpire, + getDeviceType, + getDeviceStatus, + getTraceAnalyse, + getStandardDeviceType, + getDeviceMaintain +} from '@/api/dataManagement/data/device' const props = defineProps({ lab: { type: String, - default: '', - }, -}) -watch(() => props.lab, (newVal) => { - if (newVal) { - fetchData() + default: '' } }) +// 查询条件 +const searchQueryResult = ref({ + groupCode: '', + labCode: '', + timeStart: '', + timeEnd: '' +}) +const year = ref('') // 年度 +const yearList = ref([]) + +watch( + () => props.lab, + newVal => { + if (newVal) { + searchQueryResult.value.labCode = props.lab + fetchData() + } + } +) +// 基础信息展示数据 +const baseInfo = ref([ + { + name: '在用设备总量', + value: 'equipmentAmount', + data: '', + icon: device['在用设备总量'], + color: '#1AAF8B' + }, + { + name: '在用标准设备总量', + value: 'standardAmount', + data: '', + icon: device['在用标准设备总量'], + color: '#1AAF8B' + }, + { + name: '本年度到期设备总量', + value: 'expireAmount', + data: '', + icon: device['本年度到期设备总量'], + color: '#1AAF8B' + }, + { + name: '应溯源总数量', + value: 'shouldTraceAmount', + data: '', + icon: device['应溯源总数量'], + color: '#1AAF8B' + }, + { + name: '实际溯源总数量', + value: 'tracedAmount', + data: '', + icon: device['实际溯源总数量'], + color: '#1AAF8B' + } +]) const showChart = ref([ { name: '近一年部门设备到期趋势', @@ -23,7 +85,7 @@ xAxisData: [], data: [], smooth: false, - gradient: true, + gradient: true }, { name: '设备类型分析', @@ -32,73 +94,297 @@ center: ['50%', '60%'], labelPosition: 'outside', radius: '70%', + data: [] + }, + { + name: '标准设备种类分析', + type: 'rank-table', + source: 'system', data: [], - + columns: [ + { + text: '标准设备名称', + value: 'name', + align: 'center' + }, + { + text: '数量', + value: 'count', + align: 'center' + } + ] }, { name: '设备状态分析', type: 'bar-vertical', + source: 'system' + }, + { + name: '设备维护保养情况', + type: 'rank-table', source: 'system', + data: [], + columns: [ + { + text: '实验室', + value: 'labCodeName', + align: 'center', + width: '75' + }, + { + text: '组别', + value: 'groupCodeName', + align: 'center' + }, + { + text: '设备名称', + value: 'equipmentName', + align: 'center' + }, + { + text: '规格型号', + value: 'model', + align: 'center' + }, + { + text: '月保养次数', + value: 'monthAmount', + align: 'center', + width: '95' + }, + { + text: '周维护次数', + value: 'weekAmount', + align: 'center', + width: '95' + }, + ] }, { name: '设备溯源分析', type: 'bar-horizontal', - source: 'system', + source: 'system' }, + + ]) -watch(() => showChart.value.length, () => { - setTimeout(() => { - const resize = new Event('resize') - window.dispatchEvent(resize) - }) -}) +watch( + () => showChart.value.length, + () => { + setTimeout(() => { + const resize = new Event('resize') + window.dispatchEvent(resize) + }) + } +) // 模拟数据 const loading = ref(false) function fetchData() { - loading.value = true - // 近一年部门设备到期趋势 - const name1 = ['电学电源组', '热工压力组', '无线脉冲组', '综合管理组'] - const timeList = getRangeAllTime(dayjs().subtract(14, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')) - showChart.value.filter((item: any) => item.name === '近一年部门设备到期趋势')[0].data = name1.map(item => ({ - name: item, - data: timeList.map(item => Math.floor(Math.random() * 100) + 1), - symbol: 'emptyCircle', - })) - showChart.value.filter((item: any) => item.name === '近一年部门设备到期趋势')[0].xAxisData = timeList - // 设备类型分析 - const name2 = ['标准设备', '配套设备', '其他'] - showChart.value.filter((item: any) => item.name === '设备类型分析')[0].data = name2.map(item => ({ - name: item, - value: Math.floor(Math.random() * 100) + 1, - })) - // 设备状态分析 - const name3 = ['在用', '禁用', '报废', '延用', '封存'] - showChart.value.filter((item: any) => item.name === '设备状态分析')[0].data = [{ - name: '数量', - data: name3.map(item => Math.floor(Math.random() * 100) + 1), - }] - showChart.value.filter((item: any) => item.name === '设备状态分析')[0].xAxisData = name3 - // 设备溯源分析 - const name4 = ['校准', '测试', '合格', '限用', '禁用', '停用', '封存'] - showChart.value.filter((item: any) => item.name === '设备溯源分析')[0].data = [{ - name: '数量', - data: name4.map(item => Math.floor(Math.random() * 100) + 1), - }] - showChart.value.filter((item: any) => item.name === '设备溯源分析')[0].xAxisData = name4 - - setTimeout(() => { - const resize = new Event('resize') - window.dispatchEvent(resize) + // 获取基础数据 + getBaseInfo(searchQueryResult.value).then(res => { + baseInfo.value.forEach(item => { + item.data = res.data[item.value] + }) }) - setTimeout(() => { - loading.value = false - }, 3000) + // 近一年部门设备到期趋势 + getDeptExpire(searchQueryResult.value).then(res => { + console.log(res.data, '近一年部门设备到期趋势') + const current = showChart.value.filter( + item => item.name === '近一年部门设备到期趋势' + )[0] + current.xAxisData = res.data.map((item: any) => item.dimension) + const data = [ + { + name: '电学电源组', + value: 'ddAmount' + }, + { + name: '热工压力组', + value: 'rlAmount' + }, + { + name: '无线脉冲组', + value: 'wmAmount' + }, + { + name: '综合管理组', + value: 'glAmount' + } + ] + current.data = data.map((item: any) => ({ + name: item.name, + symbol: 'emptyCircle', + data: res.data.map((citem: any) => String(citem[item.value])) + })) + }) + // 设备类型分析 + getDeviceType(searchQueryResult.value).then(res => { + console.log(res.data, '设备类型分析') + const data = [ + { + name: '标准设备', + value: 'standardAmount', + data: '' + }, + { + name: '配套设备', + value: 'equipmentAmount', + data: '' + }, + { + name: '其他设备', + value: 'otherAmount', + data: '' + } + ] + const current = showChart.value.filter( + item => item.name === '设备类型分析' + )[0] + data.forEach(item => { + item.data = res.data[item.value] + }) + current.data = data.map(item => ({ name: item.name, value: String(item.data) })) + }) + // 设备状态分析 + getDeviceStatus(searchQueryResult.value).then(res => { + console.log(res.data, '设备状态分析') + const current = showChart.value.filter( + item => item.name === '设备状态分析' + )[0] + const data = [ + { + name: '在用', + value: 'onUseAmount', + data: '' + }, + { + name: '禁用', + value: 'disableAmount', + data: '' + }, + { + name: '报废', + value: 'scrapAmount', + data: '' + }, + { + name: '延用', + value: 'delayAmount', + data: '' + }, + { + name: '封存', + value: 'sealAmount', + data: '' + } + ] + data.forEach(item => { + item.data = res.data[item.value] + }) + current.xAxisData = data.map((item: any) => item.name) + current.data = [ + { + name: '数量', + data: data.map((item: any) => String(item.data)) + } + ] + }) + // 设备溯源分析 + getTraceAnalyse(searchQueryResult.value).then(res => { + console.log(res.data, '设备溯源分析') + const current = showChart.value.filter( + item => item.name === '设备溯源分析' + )[0] + const data = [ + { + name: '合格', + value: 'qualifiedAmount', + data: '' + }, + { + name: '限用', + value: 'restrictAmount', + data: '' + }, + { + name: '停用', + value: 'stopAmount', + data: '' + }, + ] + data.forEach(item => { + item.data = res.data[item.value] + }) + current.xAxisData = data.map((item: any) => item.name) + current.data = [ + { + name: '数量', + data: data.map((item: any) => String(item.data)) + } + ] + }) + // 标准设备种类分析 + getStandardDeviceType(searchQueryResult.value).then(res => { + console.log(res.data, '标准设备种类分析') + const current = showChart.value.filter( + item => item.name === '标准设备种类分析' + )[0] + current.data = [] + for(const i in res.data) { + current.data.push({ name: i, count: res.data[i]}) + } + current.data.reverse() + }) + // 设备维护保养情况 + getDeviceMaintain({ ...searchQueryResult.value, offset:1, limit: 9999}).then(res => { + console.log(res.data, '设备维护保养情况') + const current = showChart.value.filter( + item => item.name === '设备维护保养情况' + )[0] + current.data = [] + current.data = res.data.rows + }) + // loading.value = true + // // 近一年部门设备到期趋势 + // const name1 = ['电学电源组', '热工压力组', '无线脉冲组', '综合管理组'] + // const timeList = getRangeAllTime(dayjs().subtract(14, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')) + // showChart.value.filter((item: any) => item.name === '近一年部门设备到期趋势')[0].data = name1.map(item => ({ + // name: item, + // data: timeList.map(item => Math.floor(Math.random() * 100) + 1), + // symbol: 'emptyCircle', + // })) + // showChart.value.filter((item: any) => item.name === '近一年部门设备到期趋势')[0].xAxisData = timeList + // // 设备类型分析 + // const name2 = ['标准设备', '配套设备', '其他'] + // showChart.value.filter((item: any) => item.name === '设备类型分析')[0].data = name2.map(item => ({ + // name: item, + // value: Math.floor(Math.random() * 100) + 1, + // })) + // // 设备状态分析 + // const name3 = ['在用', '禁用', '报废', '延用', '封存'] + // showChart.value.filter((item: any) => item.name === '设备状态分析')[0].data = [{ + // name: '数量', + // data: name3.map(item => Math.floor(Math.random() * 100) + 1), + // }] + // showChart.value.filter((item: any) => item.name === '设备状态分析')[0].xAxisData = name3 + // // 设备溯源分析 + // const name4 = ['校准', '测试', '合格', '限用', '禁用', '停用', '封存'] + // showChart.value.filter((item: any) => item.name === '设备溯源分析')[0].data = [{ + // name: '数量', + // data: name4.map(item => Math.floor(Math.random() * 100) + 1), + // }] + // showChart.value.filter((item: any) => item.name === '设备溯源分析')[0].xAxisData = name4 + + // setTimeout(() => { + // const resize = new Event('resize') + // window.dispatchEvent(resize) + // }) + // setTimeout(() => { + // loading.value = false + // }, 3000) } -setTimeout(() => { - fetchData() -}, 100) defineExpose({ - showChart, + showChart }) // 拖拽结束 const onEnd = () => { @@ -106,58 +392,80 @@ const resize = new Event('resize') window.dispatchEvent(resize) } +// 整理最近五年年度 +const currentYear = new Date().getFullYear() +yearList.value = [] +for (let i = 0; i < 5; i++) { + yearList.value.push(String(currentYear - i)) +} + +watch( + () => year.value, + newVal => { + if (newVal) { + console.log(newVal, '当前年度') + searchQueryResult.value.timeStart = `${newVal}-01-01` + searchQueryResult.value.timeEnd = `${newVal}-12-31` + setTimeout(() => { + fetchData() + }) + } + } +) +onMounted(() => { + year.value = String(currentYear) + if (props.lab) { + searchQueryResult.value.labCode = props.lab + setTimeout(() => { + fetchData() + }) + } +}) @@ -228,7 +668,7 @@ .count { display: flex; - width: 50%; + width: 60%; margin: 0 auto; position: absolute; top: -40px; @@ -266,6 +706,7 @@ font-weight: 700; font-size: 24px; color: #1aaf8b; + text-align: center; } } } @@ -297,4 +738,3 @@ } } - diff --git a/src/views/dataManagement/components/data/img.ts b/src/views/dataManagement/components/data/img.ts index b0f0768..38994b5 100644 --- a/src/views/dataManagement/components/data/img.ts +++ b/src/views/dataManagement/components/data/img.ts @@ -16,6 +16,11 @@ import menu4 from '@/assets/images/dataManagement/dashboard/设备分析-在用设备总量.png' import menu5 from '@/assets/images/dataManagement/dashboard/检定证书分析-检定证书总量.png' import menu6 from '@/assets/images/dataManagement/dashboard/标准装置分析-标准装置总数.png' +import equipmentAmount from '@/assets/images/dataManagement/device/设备分析-在用设备总量.png' +import standardAmount from '@/assets/images/dataManagement/device/设备分析-在用标准设备总量.png' +import expireAmount from '@/assets/images/dataManagement/device/设备分析-年度到期设备总量.png' +import shouldTraceAmount from '@/assets/images/dataManagement/device/设备分析-应溯源总数量.png' +import tracedAmount from '@/assets/images/dataManagement/device/设备分析-实际溯源总数量.png' export const resourceManage = { 人员总数: staffAmount, 体系文件总数: systemFileAmount, @@ -42,3 +47,11 @@ 检定证书分析: menu5, 标准装置分析: menu6, } + +export const device = { + 在用设备总量: equipmentAmount, + 在用标准设备总量: standardAmount, + 本年度到期设备总量: expireAmount, + 应溯源总数量: shouldTraceAmount, + 实际溯源总数量: tracedAmount, +} diff --git a/src/api/dataManagement/data/device.ts b/src/api/dataManagement/data/device.ts new file mode 100644 index 0000000..2287990 --- /dev/null +++ b/src/api/dataManagement/data/device.ts @@ -0,0 +1,59 @@ +// 实验室设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/equipment/amount', + method: 'post', + data + }) +} +// 设备类型分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/equipment/category', + method: 'post', + data + }) +} +// 近一年部门设备到期趋势 +export function getDeptExpire(data: object) { + return request({ + url: '/data/equipment/expire/trendList', + method: 'post', + data + }) +} +// 设备维护保养情况(分页 +export function getDeviceMaintain(data: object) { + return request({ + url: '/data/equipment/maintainList', + method: 'post', + data + }) +} +// 标准设备种类分析 +export function getStandardDeviceType(data: object) { + return request({ + url: '/data/equipment/name/category', + method: 'post', + data + }) +} +// 设备状态分析 +export function getDeviceStatus(data: object) { + return request({ + url: '/data/equipment/status', + method: 'post', + data + }) +} +// 设备溯源分析 +export function getTraceAnalyse(data: object) { + return request({ + url: '/data/equipment/trace', + method: 'post', + data + }) +} diff --git a/src/api/dataManagement/data/eqptDevice.ts b/src/api/dataManagement/data/eqptDevice.ts new file mode 100644 index 0000000..4efea57 --- /dev/null +++ b/src/api/dataManagement/data/eqptDevice.ts @@ -0,0 +1,83 @@ +// 受检设备分析相关接口 +import request from '@/api/index' + +// 基本信息 +export function getBaseInfo(data: object) { + return request({ + url: '/data/sample/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析 +export function getDeviceType(data: object) { + return request({ + url: '/data/sample/category/amount', + method: 'post', + data + }) +} +// 受检设备种类数量分析-列表 +export function getDeviceTypeList(data: object) { + return request({ + url: '/data/sample/category/list', + method: 'post', + data + }) +} +// 受检设备已检数量趋势 +export function getAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/measured/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势 +export function getNotAlreadyMeasured(data: object) { + return request({ + url: '/data/sample/noMeasure/amount', + method: 'post', + data + }) +} +// 受检设备未检数量趋势-列表 +export function getNotAlreadyMeasuredList(data: object) { + return request({ + url: '/data/sample/noMeasure/list', + method: 'post', + data + }) +} +// 受检设备性能趋势(分页) +export function getDevicePerformance(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备应检数量趋势 +export function getShouldMeasured(data: object) { + return request({ + url: '/data/sample/performance/list', + method: 'post', + data + }) +} +// 受检设备来源分析 +export function getDeviceSource(data: object) { + return request({ + url: '/data/sample/source/amount', + method: 'post', + data + }) +} +// 受检设备来源分析-某单位受检设备列表(分页) +export function getDeviceSourceDept(data: object) { + return request({ + url: '/data/sample/source/list', + method: 'post', + data + }) +} diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..8f3e5a8 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\346\240\207\345\207\206\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..57f6be6 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\234\250\347\224\250\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" new file mode 100644 index 0000000..b343b44 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\256\236\351\231\205\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\271\264\345\272\246\345\210\260\346\234\237\350\256\276\345\244\207\346\200\273\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\271\264\345\272\246\345\210\260\346\234\237\350\256\276\345\244\207\346\200\273\351\207\217.png" new file mode 100644 index 0000000..35ff374 --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\271\264\345\272\246\345\210\260\346\234\237\350\256\276\345\244\207\346\200\273\351\207\217.png" Binary files differ diff --git "a/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\272\224\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\272\224\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" new file mode 100644 index 0000000..b2a273f --- /dev/null +++ "b/src/assets/images/dataManagement/device/\350\256\276\345\244\207\345\210\206\346\236\220-\345\272\224\346\272\257\346\272\220\346\200\273\346\225\260\351\207\217.png" Binary files differ diff --git a/src/views/dataManagement/components/data/device.vue b/src/views/dataManagement/components/data/device.vue index f3263c4..ab219ba 100644 --- a/src/views/dataManagement/components/data/device.vue +++ b/src/views/dataManagement/components/data/device.vue @@ -4,17 +4,79 @@ import draggable from 'vuedraggable' import { colors } from '../environment/colors' import { getRangeAllTime } from '@/utils/date' +import { device } from './img' +import { + getBaseInfo, + getDeptExpire, + getDeviceType, + getDeviceStatus, + getTraceAnalyse, + getStandardDeviceType, + getDeviceMaintain +} from '@/api/dataManagement/data/device' const props = defineProps({ lab: { type: String, - default: '', - }, -}) -watch(() => props.lab, (newVal) => { - if (newVal) { - fetchData() + default: '' } }) +// 查询条件 +const searchQueryResult = ref({ + groupCode: '', + labCode: '', + timeStart: '', + timeEnd: '' +}) +const year = ref('') // 年度 +const yearList = ref([]) + +watch( + () => props.lab, + newVal => { + if (newVal) { + searchQueryResult.value.labCode = props.lab + fetchData() + } + } +) +// 基础信息展示数据 +const baseInfo = ref([ + { + name: '在用设备总量', + value: 'equipmentAmount', + data: '', + icon: device['在用设备总量'], + color: '#1AAF8B' + }, + { + name: '在用标准设备总量', + value: 'standardAmount', + data: '', + icon: device['在用标准设备总量'], + color: '#1AAF8B' + }, + { + name: '本年度到期设备总量', + value: 'expireAmount', + data: '', + icon: device['本年度到期设备总量'], + color: '#1AAF8B' + }, + { + name: '应溯源总数量', + value: 'shouldTraceAmount', + data: '', + icon: device['应溯源总数量'], + color: '#1AAF8B' + }, + { + name: '实际溯源总数量', + value: 'tracedAmount', + data: '', + icon: device['实际溯源总数量'], + color: '#1AAF8B' + } +]) const showChart = ref([ { name: '近一年部门设备到期趋势', @@ -23,7 +85,7 @@ xAxisData: [], data: [], smooth: false, - gradient: true, + gradient: true }, { name: '设备类型分析', @@ -32,73 +94,297 @@ center: ['50%', '60%'], labelPosition: 'outside', radius: '70%', + data: [] + }, + { + name: '标准设备种类分析', + type: 'rank-table', + source: 'system', data: [], - + columns: [ + { + text: '标准设备名称', + value: 'name', + align: 'center' + }, + { + text: '数量', + value: 'count', + align: 'center' + } + ] }, { name: '设备状态分析', type: 'bar-vertical', + source: 'system' + }, + { + name: '设备维护保养情况', + type: 'rank-table', source: 'system', + data: [], + columns: [ + { + text: '实验室', + value: 'labCodeName', + align: 'center', + width: '75' + }, + { + text: '组别', + value: 'groupCodeName', + align: 'center' + }, + { + text: '设备名称', + value: 'equipmentName', + align: 'center' + }, + { + text: '规格型号', + value: 'model', + align: 'center' + }, + { + text: '月保养次数', + value: 'monthAmount', + align: 'center', + width: '95' + }, + { + text: '周维护次数', + value: 'weekAmount', + align: 'center', + width: '95' + }, + ] }, { name: '设备溯源分析', type: 'bar-horizontal', - source: 'system', + source: 'system' }, + + ]) -watch(() => showChart.value.length, () => { - setTimeout(() => { - const resize = new Event('resize') - window.dispatchEvent(resize) - }) -}) +watch( + () => showChart.value.length, + () => { + setTimeout(() => { + const resize = new Event('resize') + window.dispatchEvent(resize) + }) + } +) // 模拟数据 const loading = ref(false) function fetchData() { - loading.value = true - // 近一年部门设备到期趋势 - const name1 = ['电学电源组', '热工压力组', '无线脉冲组', '综合管理组'] - const timeList = getRangeAllTime(dayjs().subtract(14, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')) - showChart.value.filter((item: any) => item.name === '近一年部门设备到期趋势')[0].data = name1.map(item => ({ - name: item, - data: timeList.map(item => Math.floor(Math.random() * 100) + 1), - symbol: 'emptyCircle', - })) - showChart.value.filter((item: any) => item.name === '近一年部门设备到期趋势')[0].xAxisData = timeList - // 设备类型分析 - const name2 = ['标准设备', '配套设备', '其他'] - showChart.value.filter((item: any) => item.name === '设备类型分析')[0].data = name2.map(item => ({ - name: item, - value: Math.floor(Math.random() * 100) + 1, - })) - // 设备状态分析 - const name3 = ['在用', '禁用', '报废', '延用', '封存'] - showChart.value.filter((item: any) => item.name === '设备状态分析')[0].data = [{ - name: '数量', - data: name3.map(item => Math.floor(Math.random() * 100) + 1), - }] - showChart.value.filter((item: any) => item.name === '设备状态分析')[0].xAxisData = name3 - // 设备溯源分析 - const name4 = ['校准', '测试', '合格', '限用', '禁用', '停用', '封存'] - showChart.value.filter((item: any) => item.name === '设备溯源分析')[0].data = [{ - name: '数量', - data: name4.map(item => Math.floor(Math.random() * 100) + 1), - }] - showChart.value.filter((item: any) => item.name === '设备溯源分析')[0].xAxisData = name4 - - setTimeout(() => { - const resize = new Event('resize') - window.dispatchEvent(resize) + // 获取基础数据 + getBaseInfo(searchQueryResult.value).then(res => { + baseInfo.value.forEach(item => { + item.data = res.data[item.value] + }) }) - setTimeout(() => { - loading.value = false - }, 3000) + // 近一年部门设备到期趋势 + getDeptExpire(searchQueryResult.value).then(res => { + console.log(res.data, '近一年部门设备到期趋势') + const current = showChart.value.filter( + item => item.name === '近一年部门设备到期趋势' + )[0] + current.xAxisData = res.data.map((item: any) => item.dimension) + const data = [ + { + name: '电学电源组', + value: 'ddAmount' + }, + { + name: '热工压力组', + value: 'rlAmount' + }, + { + name: '无线脉冲组', + value: 'wmAmount' + }, + { + name: '综合管理组', + value: 'glAmount' + } + ] + current.data = data.map((item: any) => ({ + name: item.name, + symbol: 'emptyCircle', + data: res.data.map((citem: any) => String(citem[item.value])) + })) + }) + // 设备类型分析 + getDeviceType(searchQueryResult.value).then(res => { + console.log(res.data, '设备类型分析') + const data = [ + { + name: '标准设备', + value: 'standardAmount', + data: '' + }, + { + name: '配套设备', + value: 'equipmentAmount', + data: '' + }, + { + name: '其他设备', + value: 'otherAmount', + data: '' + } + ] + const current = showChart.value.filter( + item => item.name === '设备类型分析' + )[0] + data.forEach(item => { + item.data = res.data[item.value] + }) + current.data = data.map(item => ({ name: item.name, value: String(item.data) })) + }) + // 设备状态分析 + getDeviceStatus(searchQueryResult.value).then(res => { + console.log(res.data, '设备状态分析') + const current = showChart.value.filter( + item => item.name === '设备状态分析' + )[0] + const data = [ + { + name: '在用', + value: 'onUseAmount', + data: '' + }, + { + name: '禁用', + value: 'disableAmount', + data: '' + }, + { + name: '报废', + value: 'scrapAmount', + data: '' + }, + { + name: '延用', + value: 'delayAmount', + data: '' + }, + { + name: '封存', + value: 'sealAmount', + data: '' + } + ] + data.forEach(item => { + item.data = res.data[item.value] + }) + current.xAxisData = data.map((item: any) => item.name) + current.data = [ + { + name: '数量', + data: data.map((item: any) => String(item.data)) + } + ] + }) + // 设备溯源分析 + getTraceAnalyse(searchQueryResult.value).then(res => { + console.log(res.data, '设备溯源分析') + const current = showChart.value.filter( + item => item.name === '设备溯源分析' + )[0] + const data = [ + { + name: '合格', + value: 'qualifiedAmount', + data: '' + }, + { + name: '限用', + value: 'restrictAmount', + data: '' + }, + { + name: '停用', + value: 'stopAmount', + data: '' + }, + ] + data.forEach(item => { + item.data = res.data[item.value] + }) + current.xAxisData = data.map((item: any) => item.name) + current.data = [ + { + name: '数量', + data: data.map((item: any) => String(item.data)) + } + ] + }) + // 标准设备种类分析 + getStandardDeviceType(searchQueryResult.value).then(res => { + console.log(res.data, '标准设备种类分析') + const current = showChart.value.filter( + item => item.name === '标准设备种类分析' + )[0] + current.data = [] + for(const i in res.data) { + current.data.push({ name: i, count: res.data[i]}) + } + current.data.reverse() + }) + // 设备维护保养情况 + getDeviceMaintain({ ...searchQueryResult.value, offset:1, limit: 9999}).then(res => { + console.log(res.data, '设备维护保养情况') + const current = showChart.value.filter( + item => item.name === '设备维护保养情况' + )[0] + current.data = [] + current.data = res.data.rows + }) + // loading.value = true + // // 近一年部门设备到期趋势 + // const name1 = ['电学电源组', '热工压力组', '无线脉冲组', '综合管理组'] + // const timeList = getRangeAllTime(dayjs().subtract(14, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')) + // showChart.value.filter((item: any) => item.name === '近一年部门设备到期趋势')[0].data = name1.map(item => ({ + // name: item, + // data: timeList.map(item => Math.floor(Math.random() * 100) + 1), + // symbol: 'emptyCircle', + // })) + // showChart.value.filter((item: any) => item.name === '近一年部门设备到期趋势')[0].xAxisData = timeList + // // 设备类型分析 + // const name2 = ['标准设备', '配套设备', '其他'] + // showChart.value.filter((item: any) => item.name === '设备类型分析')[0].data = name2.map(item => ({ + // name: item, + // value: Math.floor(Math.random() * 100) + 1, + // })) + // // 设备状态分析 + // const name3 = ['在用', '禁用', '报废', '延用', '封存'] + // showChart.value.filter((item: any) => item.name === '设备状态分析')[0].data = [{ + // name: '数量', + // data: name3.map(item => Math.floor(Math.random() * 100) + 1), + // }] + // showChart.value.filter((item: any) => item.name === '设备状态分析')[0].xAxisData = name3 + // // 设备溯源分析 + // const name4 = ['校准', '测试', '合格', '限用', '禁用', '停用', '封存'] + // showChart.value.filter((item: any) => item.name === '设备溯源分析')[0].data = [{ + // name: '数量', + // data: name4.map(item => Math.floor(Math.random() * 100) + 1), + // }] + // showChart.value.filter((item: any) => item.name === '设备溯源分析')[0].xAxisData = name4 + + // setTimeout(() => { + // const resize = new Event('resize') + // window.dispatchEvent(resize) + // }) + // setTimeout(() => { + // loading.value = false + // }, 3000) } -setTimeout(() => { - fetchData() -}, 100) defineExpose({ - showChart, + showChart }) // 拖拽结束 const onEnd = () => { @@ -106,58 +392,80 @@ const resize = new Event('resize') window.dispatchEvent(resize) } +// 整理最近五年年度 +const currentYear = new Date().getFullYear() +yearList.value = [] +for (let i = 0; i < 5; i++) { + yearList.value.push(String(currentYear - i)) +} + +watch( + () => year.value, + newVal => { + if (newVal) { + console.log(newVal, '当前年度') + searchQueryResult.value.timeStart = `${newVal}-01-01` + searchQueryResult.value.timeEnd = `${newVal}-12-31` + setTimeout(() => { + fetchData() + }) + } + } +) +onMounted(() => { + year.value = String(currentYear) + if (props.lab) { + searchQueryResult.value.labCode = props.lab + setTimeout(() => { + fetchData() + }) + } +}) @@ -228,7 +668,7 @@ .count { display: flex; - width: 50%; + width: 60%; margin: 0 auto; position: absolute; top: -40px; @@ -266,6 +706,7 @@ font-weight: 700; font-size: 24px; color: #1aaf8b; + text-align: center; } } } @@ -297,4 +738,3 @@ } } - diff --git a/src/views/dataManagement/components/data/img.ts b/src/views/dataManagement/components/data/img.ts index b0f0768..38994b5 100644 --- a/src/views/dataManagement/components/data/img.ts +++ b/src/views/dataManagement/components/data/img.ts @@ -16,6 +16,11 @@ import menu4 from '@/assets/images/dataManagement/dashboard/设备分析-在用设备总量.png' import menu5 from '@/assets/images/dataManagement/dashboard/检定证书分析-检定证书总量.png' import menu6 from '@/assets/images/dataManagement/dashboard/标准装置分析-标准装置总数.png' +import equipmentAmount from '@/assets/images/dataManagement/device/设备分析-在用设备总量.png' +import standardAmount from '@/assets/images/dataManagement/device/设备分析-在用标准设备总量.png' +import expireAmount from '@/assets/images/dataManagement/device/设备分析-年度到期设备总量.png' +import shouldTraceAmount from '@/assets/images/dataManagement/device/设备分析-应溯源总数量.png' +import tracedAmount from '@/assets/images/dataManagement/device/设备分析-实际溯源总数量.png' export const resourceManage = { 人员总数: staffAmount, 体系文件总数: systemFileAmount, @@ -42,3 +47,11 @@ 检定证书分析: menu5, 标准装置分析: menu6, } + +export const device = { + 在用设备总量: equipmentAmount, + 在用标准设备总量: standardAmount, + 本年度到期设备总量: expireAmount, + 应溯源总数量: shouldTraceAmount, + 实际溯源总数量: tracedAmount, +} diff --git a/src/views/dataManagement/dataBoard.vue b/src/views/dataManagement/dataBoard.vue index 7f6d4df..0025682 100644 --- a/src/views/dataManagement/dataBoard.vue +++ b/src/views/dataManagement/dataBoard.vue @@ -62,7 +62,7 @@ icon: menuImg['资源管理分析'], }, { - name: '设备分析', + name: '实验室设备分析', id: '4', color: '#fff', bj: 'bj4', @@ -181,7 +181,7 @@ - +