update
This commit is contained in:
parent
7356ed773e
commit
665334d756
@ -26,12 +26,14 @@
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer-left">
|
||||
<button class="btn" :class="[isOn ? 'green' : 'gray']" :disabled="!isOn||(isOn&&loading)" :loading="isOn&&loading" @click="openDevice">
|
||||
<button class="btn" :class="[isOn ? 'green' : 'gray']" :disabled="!isOn || (isOn && loading)"
|
||||
:loading="isOn && loading" @click="openDevice">
|
||||
<img class="image" src="./images/on.svg" alt=""> 开机
|
||||
</button>
|
||||
</div>
|
||||
<div class="footer-right">
|
||||
<button class="btn" :class="[isOff ? 'red' : 'gray']" :disabled="!isOff||(isOff&&loading)" :loading="isOff&&loading" @click="closeDevice">
|
||||
<button class="btn" :class="[isOff ? 'red' : 'gray']" :disabled="!isOff || (isOff && loading)"
|
||||
:loading="isOff && loading" @click="closeDevice">
|
||||
<img class="image" src="./images/off.svg" alt=""> 关机
|
||||
</button>
|
||||
</div>
|
||||
@ -77,6 +79,9 @@ async function getDeviceStatus(query) {
|
||||
isShow ? ElMessage({ message: '此机器未连接到物联系统!', type: 'warning' }) : ''
|
||||
isShow = false
|
||||
}
|
||||
} else if (result.code == 400) {
|
||||
clearInterval(timer)
|
||||
ElMessage({ message: result.msg, type: 'error' })
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="ScrollBoard-container">
|
||||
<ZdScrollBoard ref="devList" class="dev-list" :config="config" />
|
||||
<ZdScrollBoard ref="devList" @click="ZdClick" class="dev-list" :config="config" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -19,6 +19,11 @@ const prop = defineProps({
|
||||
}
|
||||
})
|
||||
const devList = ref(null);
|
||||
const emit = defineEmits(['zdclick'])
|
||||
function ZdClick(value) {
|
||||
|
||||
emit('zdclick', value)
|
||||
}
|
||||
let config = reactive({
|
||||
header: [
|
||||
'<span style="color:#AEEEFAFE;font-size:18px;">'+t('default.序号')+'</span>',
|
||||
@ -56,8 +61,6 @@ const handleData = () => {
|
||||
return item
|
||||
})
|
||||
})
|
||||
console.log(updateList);
|
||||
|
||||
devList.value.updateRows(updateList,config)
|
||||
}
|
||||
watch(()=>prop.data, (newVal, oldVal) => {
|
||||
|
@ -24,7 +24,8 @@
|
||||
<ScrollBoard :data="cjdata"></ScrollBoard>
|
||||
</div>
|
||||
<div class="ltbottom">
|
||||
<BarChart :xData="xData" style="width: 100%;height: 100%;" :seriesData="seriesData"></BarChart>
|
||||
<BarChart :xData="xData" style="width: 100%;height: 100%;" :seriesData="seriesData">
|
||||
</BarChart>
|
||||
</div>
|
||||
</BoardVue>
|
||||
</div>
|
||||
@ -48,7 +49,7 @@
|
||||
</div>
|
||||
<div class="rtright">
|
||||
<BoardVue :title="t('MicroExhibition.缝中设备')">
|
||||
<ScrollBoard :data="fzdata"></ScrollBoard>
|
||||
<ScrollBoard :data="fzdata" @zdclick="zdclick"></ScrollBoard>
|
||||
</BoardVue>
|
||||
</div>
|
||||
</div>
|
||||
@ -68,16 +69,19 @@ import StepItem from './component/StepItem.vue'
|
||||
import BottomBorder from './component/BottomBorder.vue'
|
||||
import ScrollBoard from './component/ScrollBoard.vue'
|
||||
import BarChart from './component/BarChart.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
|
||||
import { getmDeviceList, getmDeviceProduction } from '@/http/MicroExhibition'
|
||||
import { ref, onMounted, onUnmounted, getCurrentInstance, watch, onUpdated, computed, reactive } from 'vue'
|
||||
import { useMicroExhibitionStore } from '@/store/module/MicroExhibition'
|
||||
import { connectWebsocket, closeWebsocket } from "@/utils/websocket"
|
||||
import { getStoredLanguage, saveStoredLanguage, languageHash } from "@/utils/languageStorage";
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { id } from 'element-plus/es/locale'
|
||||
let { t } = useI18n();
|
||||
let route = useRoute()
|
||||
let router = useRouter()
|
||||
const store = useMicroExhibitionStore()
|
||||
let lang = route.query.lang as string
|
||||
let videoUrl = ref('https://d.tufting222.cn/video/yzy/a.mp4')
|
||||
@ -171,7 +175,7 @@ function getmDevList() {
|
||||
temp = '0'
|
||||
}
|
||||
let devname = thisLang && thisLang != "简体中文" ? item.ename : item.name
|
||||
return [i + 1, {devname,label:item.label}, item.num, temp, item.ratio, item.workTime]
|
||||
return [i + 1, { devname, label: item.label, id: item.id }, item.num, temp, item.ratio, item.workTime]
|
||||
})
|
||||
stepList[statusObj[key]].online = online;
|
||||
stepList[statusObj[key]].total = devObj[key].list.length;
|
||||
@ -206,6 +210,43 @@ function getmDevList() {
|
||||
})
|
||||
}
|
||||
|
||||
//缝纫设备点击事件
|
||||
function zdclick(value) {
|
||||
if (value.row) {
|
||||
console.log(value, fzdata.value.list);
|
||||
let row = value.row
|
||||
let num = row[2]
|
||||
let index = fzdata.value.list.findIndex((item, index) => {
|
||||
return item[2] == num
|
||||
})
|
||||
|
||||
if (index !== -1) {
|
||||
ElMessageBox.confirm(
|
||||
'是否进入缝纫机控制界面?',
|
||||
'通知',
|
||||
{
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'info',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
router.push({
|
||||
path: '/ExhibitionStation_' + fzdata.value.list[index][1].id
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// ElMessage({
|
||||
// type: 'info',
|
||||
// message: 'Delete canceled',
|
||||
// })
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
改变设备状态
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user