修改军团 设备列表显示 和设备类型图表
BIN
public/img/icons/android-chrome-192x192.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
public/img/icons/android-chrome-512x512.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
public/img/icons/android-chrome-maskable-192x192.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
public/img/icons/android-chrome-maskable-512x512.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
public/img/icons/apple-touch-icon-120x120.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
public/img/icons/apple-touch-icon-152x152.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
public/img/icons/apple-touch-icon-180x180.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
public/img/icons/apple-touch-icon-60x60.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
public/img/icons/apple-touch-icon-76x76.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
public/img/icons/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
public/img/icons/favicon-16x16.png
Normal file
After Width: | Height: | Size: 799 B |
BIN
public/img/icons/favicon-32x32.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
public/img/icons/msapplication-icon-144x144.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
public/img/icons/mstile-150x150.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
3
public/img/icons/safari-pinned-tab.svg
Normal 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 |
@ -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">
|
||||||
|
@ -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()
|
||||||
})
|
})
|
||||||
|
@ -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>
|
||||||
|
|
||||||
@ -45,7 +46,7 @@
|
|||||||
<el-row style="width: 100%;height: 65%;box">
|
<el-row style="width: 100%;height: 65%;box">
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<border13>
|
<border13>
|
||||||
<scrollBoard :config="scrollBoardConfig" :severdata = "severdata"></scrollBoard>
|
<scrollBoard :config="scrollBoardConfig" :severdata="severdata"></scrollBoard>
|
||||||
</border13>
|
</border13>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -65,20 +66,21 @@ import ringChart from './chart/ringChart.vue'
|
|||||||
import devStatus from './chart/devStatus.vue'
|
import devStatus from './chart/devStatus.vue'
|
||||||
import percentageVue from "@/components/charts/percentage.vue"
|
import percentageVue from "@/components/charts/percentage.vue"
|
||||||
import scrollBoard from './chart/scrollBoard.vue'
|
import scrollBoard from './chart/scrollBoard.vue'
|
||||||
import { getDeviceInPlantList,getDeviceStatus } from '@/http/legionProducts'
|
import { getDeviceInPlantList, getDeviceStatus } from '@/http/legionProducts'
|
||||||
import { getprogressOfCorps,gatewayOfCorps } from "@/http/InPlantProducts";
|
import { getprogressOfCorps, gatewayOfCorps } from "@/http/InPlantProducts";
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
let {t} = useI18n();
|
let { t } = useI18n();
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
let severdata = reactive([])
|
let severdata = reactive([])
|
||||||
let percentage = ref(0)
|
let percentage = ref(0)
|
||||||
//军团id
|
//军团id
|
||||||
const deptId:any = route.params.deptId
|
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 legion:any = {
|
let ringData = ref([])
|
||||||
|
let legion: any = {
|
||||||
'5': '汽车军团',
|
'5': '汽车军团',
|
||||||
'3': '服装军团',
|
'3': '服装军团',
|
||||||
'4': '家纺军团',
|
'4': '家纺军团',
|
||||||
@ -89,22 +91,35 @@ let scrollBoardConfig = reactive({
|
|||||||
headerBGC: 'rgb(52, 105, 243)',
|
headerBGC: 'rgb(52, 105, 243)',
|
||||||
oddRowBGC: '#100c2a',
|
oddRowBGC: '#100c2a',
|
||||||
evenRowBGC: '#100c2a',
|
evenRowBGC: '#100c2a',
|
||||||
rowNum:10,
|
rowNum: 10,
|
||||||
columnWidth:[80,170,120,120,120,120,120,120,120,100,130],
|
columnWidth: [80, 170, 120, 120, 120, 120, 120, 120, 120, 100, 130],
|
||||||
align:['center','center','center','center','center','center','center','center','center','center','center'],
|
align: ['center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center'],
|
||||||
data: []
|
data: []
|
||||||
})
|
})
|
||||||
//获取设备列表
|
//获取设备列表
|
||||||
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)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -116,14 +131,14 @@ const getprogressOfCorpsfun = () => {
|
|||||||
|
|
||||||
res.data.forEach((item: any) => {
|
res.data.forEach((item: any) => {
|
||||||
if (item.deptId == deptId) {
|
if (item.deptId == deptId) {
|
||||||
percentage.value = Math.floor((item.accomplish/item.counts)*100)
|
percentage.value = Math.floor((item.accomplish / item.counts) * 100)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//获取网关状态
|
//获取网关状态
|
||||||
const getWayStatus = ()=>{
|
const getWayStatus = () => {
|
||||||
gatewayOfCorps().then((res: any) => {
|
gatewayOfCorps().then((res: any) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|
||||||
@ -138,8 +153,8 @@ const getWayStatus = ()=>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
//获取设备状态
|
//获取设备状态
|
||||||
const getDevStatus = ()=>{
|
const getDevStatus = () => {
|
||||||
getDeviceStatus({deptId}).then((res: any) => {
|
getDeviceStatus({ deptId }).then((res: any) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
deviceStatus.value = res.data
|
deviceStatus.value = res.data
|
||||||
|
|
||||||
@ -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%;
|
||||||
|