修改军团 设备列表显示 和设备类型图表

This commit is contained in:
hzz 2023-05-27 17:15:57 +08:00
parent 50253a443f
commit fef4593391
18 changed files with 63 additions and 48 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.00251 14.9297L0 1.07422H6.14651L8.00251 4.27503L9.84583 1.07422H16L8.00251 14.9297Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 215 B

View File

@ -12,7 +12,7 @@
<div class="header"> <div class="header">
<div class="title"> <div class="title">
<header2 ref="headerref" :width="'100%'" :height="'100px'" :title="t('messages.electronicControl')" :titleTip="[]" <header2 ref="headerref" :width="'100%'" :height="'100px'" :title="t('messages.electronicControl')" :titleTip="[]"
:typeFun="['comback', 'time']" :alarmType="[]"></header2> :typeFun="['time']" :alarmType="[]"></header2>
</div> </div>
</div> </div>
<div class="content" ref="Acontent"> <div class="content" ref="Acontent">

View File

@ -12,12 +12,15 @@
</template> </template>
<script setup lang='ts'> <script setup lang='ts'>
import { ref, onMounted, onUnmounted, getCurrentInstance } from 'vue' import { ref, onMounted, onUnmounted, getCurrentInstance,defineProps,watch,onUpdated } from 'vue'
const { proxy } = getCurrentInstance() as any; const { proxy } = getCurrentInstance() as any;
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
let {t} = useI18n(); let {t} = useI18n();
let ringRef = ref(); let ringRef = ref();
let ringChart = null; let ringChart = null;
const prop = defineProps({
data: []
})
const init = () => { const init = () => {
ringChart = proxy.$echarts.init(ringRef.value, 'dark') ringChart = proxy.$echarts.init(ringRef.value, 'dark')
let option = { let option = {
@ -57,29 +60,22 @@ const init = () => {
labelLine: { labelLine: {
show: true, show: true,
}, },
data: [ data: prop.data,
{
"value": 7,
"name": "老化架",
"id": "aging_rack"
},
{
"value": 4,
"name": "绘图仪",
"id": "graph_plotter"
},
{
"value": 6,
"name": "老化台",
"id": "aging_table"
}
],
}, },
], ],
} }
ringChart.setOption(option) ringChart.setOption(option)
} }
onUpdated(() => {
ringChart.setOption({
series: [
{
data: prop.data
}
]
})
})
onMounted(() => { onMounted(() => {
init() init()
}) })

View File

@ -1,8 +1,8 @@
<template> <template>
<div class="container"> <div class="container">
<header> <header>
<header2 ref="headerref" :width="'100%'" :height="'100px'" :title="`${title}${t('messages.IoT_System')}`" :titleTip="[]" <header2 ref="headerref" :width="'100%'" :height="'100px'" :title="`${title}${t('messages.IoT_System')}`"
:typeFun="['time']" :alarmType="[]"></header2> :titleTip="[]" :typeFun="['time']" :alarmType="[]"></header2>
</header> </header>
<main class="content"> <main class="content">
<el-row class="layout"> <el-row class="layout">
@ -15,7 +15,8 @@
</div> </div>
<div style="height: 48%;width: 100%;"> <div style="height: 48%;width: 100%;">
<border13> <border13>
<percentageVue :title="`${title} ${t('messages.finishSchedule')}`" :color="['#ee6666', '#a14646']" :percentage="percentage"> <percentageVue :title="`${title} ${t('messages.finishSchedule')}`"
:color="['#ee6666', '#a14646']" :percentage="percentage">
</percentageVue> </percentageVue>
</border13> </border13>
</div> </div>
@ -36,7 +37,7 @@
<el-col :span="12"> <el-col :span="12">
<div class="p40"> <div class="p40">
<border13> <border13>
<ringChart></ringChart> <ringChart :data="ringData"></ringChart>
</border13> </border13>
</div> </div>
@ -78,6 +79,7 @@ const deptId:any = route.params.deptId
const title = route.query.title const title = route.query.title
const gatwayList = ref([]) const gatwayList = ref([])
const deviceStatus = ref([]) const deviceStatus = ref([])
let ringData = ref([])
let legion: any = { let legion: any = {
'5': '汽车军团', '5': '汽车军团',
'3': '服装军团', '3': '服装军团',
@ -98,13 +100,26 @@ let scrollBoardConfig = reactive({
const getList = (deptId) => { const getList = (deptId) => {
getDeviceInPlantList({ deptId }).then((res: any) => { getDeviceInPlantList({ deptId }).then((res: any) => {
if (res.code == 200) { if (res.code == 200) {
let ringObj = {}
res.data.forEach((item: any, index: number) => { res.data.forEach((item: any, index: number) => {
let status = JSON.parse(item.deviceStatus) == true ? '在线' : '离线' let status = JSON.parse(item.deviceStatus) == true ? '在线' : '离线'
let temp = [index + 1, item.name, t('messages.model'), item.label, t('messages.type'), t('messages.InstallPhase'), status, t('messages.AssemblyGroup'), t('messages.electronicGroup'), t('messages.inspector'), item.deliveryDate] let temp = [index + 1, item.name, item.model, item.label, item.typeName, item.status, status, item.assemblyGroup, item.electricGroup, item.inspector, item.deliveryDate]
scrollBoardConfig.data.push(temp) scrollBoardConfig.data.push(temp)
item.index = index + 1 item.index = index + 1
severdata.push(item) severdata.push(item)
if (ringObj[item.type]) {
ringObj[item.type].value++;
} else {
ringObj[item.type] = {
"value": 1,
"name": item.typeName,
"id": item.type
};
}
}) })
console.log(ringObj);
ringData.value = Object.values(ringObj)
} }
}) })
@ -179,6 +194,7 @@ getList(deptId)
padding: 0 40px; padding: 0 40px;
font-size: 16px; font-size: 16px;
} }
.p40 { .p40 {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;