diff --git a/ui/dasadmin/src/api/backend/deviceModel/request.ts b/ui/dasadmin/src/api/backend/deviceModel/request.ts
index 207c1993..6f1683b4 100644
--- a/ui/dasadmin/src/api/backend/deviceModel/request.ts
+++ b/ui/dasadmin/src/api/backend/deviceModel/request.ts
@@ -178,4 +178,11 @@ export function queryfaultCodeDict(params: object = {}) {
{
showErrorMessage: false
})
+}
+
+export function getAllSubSystemReq() {
+ return createAxios({
+ url: '/api/equipment/model/attribute/getAllSubsystem',
+ method: 'post'
+ })
}
\ No newline at end of file
diff --git a/ui/dasadmin/src/views/backend/auth/model/index.vue b/ui/dasadmin/src/views/backend/auth/model/index.vue
index 4d9325f4..3a3bb745 100644
--- a/ui/dasadmin/src/views/backend/auth/model/index.vue
+++ b/ui/dasadmin/src/views/backend/auth/model/index.vue
@@ -277,6 +277,9 @@
+
+
+
保存
@@ -692,6 +695,7 @@ const getAttributeList = ({
: item.attributeType!,
highSpeed: item.highSpeed === 1,
visible: item.visible === 1,
+ confidential: item.confidential === 1,
}
})
pageTotal.value = res.total
@@ -807,6 +811,7 @@ const originAttributeForm: AddModelAttributeType & UpdateModelAttributeType = {
unit: '',
stateDesc: '',
level: undefined,
+ confidential: false,
revision: 1,
createdBy: undefined,
createdTime: undefined,
@@ -835,6 +840,7 @@ const submitAttributeForm = () => {
const copyFormData = JSON.parse(JSON.stringify(attributeForm.value))
copyFormData.highSpeed = copyFormData.highSpeed ? 1 : 0
copyFormData.visible = copyFormData.visible ? 1 : 0
+ copyFormData.confidential = copyFormData.confidential ? 1 : 0
if (copyFormData.stateDesc0 || copyFormData.stateDesc1) {
copyFormData.stateDesc = (copyFormData?.stateDesc0 ?? '') + '|' + (copyFormData?.stateDesc1 ?? '')
}
diff --git a/ui/dasadmin/src/views/backend/auth/model/type.ts b/ui/dasadmin/src/views/backend/auth/model/type.ts
index 1b46b6e6..126ccfae 100644
--- a/ui/dasadmin/src/views/backend/auth/model/type.ts
+++ b/ui/dasadmin/src/views/backend/auth/model/type.ts
@@ -73,7 +73,8 @@ export enum ModelAttributeFieldsEnums {
'createdTime' = '创建时间',
'updatedBy' = '更新人',
'updatedTime' = '更新时间',
- 'stateDesc' = '状态描述'
+ 'stateDesc' = '状态描述',
+ 'confidential'='敏感数据'
}
export enum ModelServiceFieldsEnums {
@@ -115,6 +116,7 @@ export type AddModelAttributeType = {
unit: string
level?: 0 | 1 | 2
visible: 0 | 1 | boolean
+ confidential:0 | 1 | boolean
stateDesc:string
stateDesc0?:string
stateDesc1?:string
diff --git a/ui/dasadmin/src/views/backend/equipment/airBlower/index.vue b/ui/dasadmin/src/views/backend/equipment/airBlower/index.vue
index e2f12e65..9a3eef35 100644
--- a/ui/dasadmin/src/views/backend/equipment/airBlower/index.vue
+++ b/ui/dasadmin/src/views/backend/equipment/airBlower/index.vue
@@ -192,7 +192,7 @@
-
+
-
+
{
})
return []
}
+const selectPointNum = ref(10)
let realDataXAxis: any = []
let realDataSeries: any = []
+let realDataYAxis: any = []
const getRandomDarkColor = () => {
let r = Math.floor(Math.random() * 200) // 限制在0到127之间,以生成较深的颜色
let g = Math.floor(Math.random() * 200)
@@ -171,8 +173,9 @@ const createChartData = (data: { [k: string]: number }, time: string) => {
let clearState = null
lastSeriesId.forEach((item: any) => {
if (!attrCode.includes(item)) {
- const cur = realDataSeries.find((val: any) => val.id === item)
- delete cur.id
+ const cur = realDataSeries.findIndex((val: any) => val.id === item)
+ // delete cur.id
+ realDataSeries.splice(cur, 1)
clearState = true
}
})
@@ -201,7 +204,7 @@ const createChartData = (data: { [k: string]: number }, time: string) => {
fillData.push(curVal)
return {
id: item,
- name: info.name + info.unit,
+ name: info.name +' '+ (info?.unit ?? ''),
type: 'line',
barWidth: 20,
itemStyle: {
@@ -221,19 +224,82 @@ const createChart = () => {
const chart = chartInstance ?? echarts.init(chartRef.value)
let option = null
if (chartInstance && realDataXAxis.length > 1) {
+ const nameMap: any = {}
+ realDataSeries.forEach((item: any) => {
+ const yAxisName = item.name.split(' ')[1]
+ if (nameMap[yAxisName] || nameMap[yAxisName]===0) {
+ item.yAxisIndex = nameMap[yAxisName]
+ } else {
+ const len = Object.keys(nameMap).length
+ item.yAxisIndex = len
+ nameMap[yAxisName] = len
+ }
+ })
+
+ const nameMapKeys = Object.keys(nameMap)
+ if (realDataSeries.length >= 4 && nameMapKeys.length === 4) {
+ selectPointNum.value = realDataSeries.length
+ }
+ const yAxisData = nameMapKeys.map((item, index) => {
+ const offset = Math.floor(index / 2) * 50
+ const position = index % 2 == 0 ? 'left' : 'right'
+ const yAxisName = item
+ const cacheYAxis = realDataYAxis.find((item: any) => item.name === yAxisName)
+ if (cacheYAxis) {
+ return {
+ ...cacheYAxis,
+ offset,
+ position,
+ }
+ } else {
+ return {
+ type: 'value',
+ name: item,
+ nameTextStyle: {
+ color: '#4E5969',
+ },
+ axisLine: {
+ show: false,
+ onZero: false,
+ lineStyle: {
+ color: '#dadada',
+ width: 0,
+ type: 'solid',
+ },
+ },
+ axisLabel: {
+ //x轴文字的配置
+ show: true,
+ color: '#4E5969',
+ },
+ axisTick: { show: false },
+ splitLine: {
+ interval: 50,
+ lineStyle: {
+ type: 'dashed',
+ color: '#dadada',
+ },
+ },
+ offset,
+ position,
+ }
+ }
+ })
+ realDataYAxis = yAxisData
option = {
xAxis: {
data: realDataXAxis,
},
+ yAxis: realDataYAxis,
series: realDataSeries,
}
} else {
option = {
grid: {
top: 50,
- right: 23,
+ right: 60,
bottom: 50,
- left: 18,
+ left: 60,
containLabel: true,
},
tooltip: {
@@ -280,6 +346,7 @@ const createChart = () => {
},
axisLine: {
show: false,
+ onZero: false,
lineStyle: {
color: '#dadada',
width: 0,
@@ -321,7 +388,7 @@ const createChart = () => {
series: realDataSeries,
}
}
- chart.setOption(option, { replaceMerge: 'series' })
+ chart.setOption(option, { replaceMerge: ['series', 'yAxis'] })
chartInstance = chart
}
@@ -338,6 +405,19 @@ const selectPointAttr = computed(() => {
const addPoint = () => {
selectPointVisible.value = true
}
+const checkShowChart = (data: any) => {
+ console.log(realDataSeries)
+
+ const curCode = data.map((item: any) => item.prop)
+ console.log(curCode, 'curCode')
+ for (let i = selectList.value.length - 1; i >= 0; i--) {
+ if (!curCode.includes(selectList.value[i])) {
+ selectList.value.splice(i, 1)
+ realDataSeries.splice(i, 1)
+ changeCheck()
+ }
+ }
+}
const saveSelectPoint = () => {
const data = selectPointRef.value?.getSelectList()
if (data) {
@@ -348,9 +428,10 @@ const saveSelectPoint = () => {
unit: item.unit,
}
})
+ checkShowChart(selectList)
realDataList.value = selectList
selectPointVisible.value = false
- ElMessage.success('添加成功')
+ ElMessage.success('修改成功')
}
}
let timer: any = null
@@ -364,6 +445,7 @@ const clearTimer = () => {
timer = null
realDataSeries = []
realDataXAxis = []
+ realDataYAxis = []
pauseState.value = false
emits('clearChart')
}
diff --git a/ui/dasadmin/src/views/backend/equipment/airBlower/selectPoint.vue b/ui/dasadmin/src/views/backend/equipment/airBlower/selectPoint.vue
index e60d9778..46f41cd2 100644
--- a/ui/dasadmin/src/views/backend/equipment/airBlower/selectPoint.vue
+++ b/ui/dasadmin/src/views/backend/equipment/airBlower/selectPoint.vue
@@ -4,12 +4,23 @@