feat(bigScreen): 新增大屏展示页面
- 添加 BigWorkShop-tjt 和 BigEqp-tjt 组件用于大屏展示
- 更新路由配置,增加大屏相关路径
- 修改权限守卫,允许免登录访问大屏页面
| | |
| | | export enum PageEnum { |
| | | // basic login path |
| | | BASE_LOGIN = '/login', |
| | | |
| | | BIG_SCREEN = '/bigScreen', |
| | | |
| | | BIG_EQP = '/bigEqp', |
| | | // basic home path |
| | | BASE_HOME = '/dashboard/workshop', |
| | | // error page path |
| | |
| | | import { isOAuth2AppEnv } from '/@/views/sys/login/useLogin'; |
| | | |
| | | const LOGIN_PATH = PageEnum.BASE_LOGIN; |
| | | |
| | | const BIG_SCREEN_PATH = PageEnum.BIG_SCREEN; |
| | | |
| | | const BIG_EQP_PATH = PageEnum.BIG_EQP; |
| | | //auth2ç»å½è·¯ç± |
| | | const OAUTH2_LOGIN_PAGE_PATH = PageEnum.OAUTH2_LOGIN_PAGE_PATH; |
| | | |
| | |
| | | |
| | | //update-begin---author:wangshuai ---date:20220629 forï¼[issues/I5BG1I]vue3䏿¯æauth2ç»å½------------ |
| | | //update-begin---author:wangshuai ---date:20221111 for: [VUEN-2472]å享å
ç»å½------------ |
| | | const whitePathList: PageEnum[] = [LOGIN_PATH, OAUTH2_LOGIN_PAGE_PATH,SYS_FILES_PATH]; |
| | | const whitePathList: PageEnum[] = [LOGIN_PATH, OAUTH2_LOGIN_PAGE_PATH,SYS_FILES_PATH,BIG_SCREEN_PATH, BIG_EQP_PATH]; |
| | | //update-end---author:wangshuai ---date:20221111 for: [VUEN-2472]å享å
ç»å½------------ |
| | | //update-end---author:wangshuai ---date:20220629 forï¼[issues/I5BG1I]vue3䏿¯æauth2ç»å½------------ |
| | | |
| | |
| | | export const BigScreen: AppRouteRecordRaw = { |
| | | path: '/bigScreen', |
| | | name: 'BigScreen', |
| | | component: () => import('/@/views/dry/bigScreen/BigWorkShop.vue'), |
| | | component: () => import('/@/views/dry/bigScreen/BigWorkShop-tjt.vue'), |
| | | meta: { |
| | | title: t('big.screen.workshop'), |
| | | }, |
| | |
| | | export const BigEqp: AppRouteRecordRaw = { |
| | | path: '/bigEqp', |
| | | name: 'BigEqp', |
| | | component: () => import('/@/views/dry/bigScreen/BigEqp.vue'), |
| | | component: () => import('/src/views/dry/bigScreen/BigEqp-tjt.vue'), |
| | | meta: { |
| | | title: t('big.screen.eqp'), |
| | | }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <dv-full-screen-container> |
| | | <div class="eqpBox"> |
| | | <div class="eqpRow"> |
| | | <div class="eqpImage" :style="{ 'background-position': position + 'px' }"> |
| | | <eqp-split :num="eqpNum"></eqp-split> |
| | | <div style="width: 10px"></div> |
| | | <eqp-split :num="eqpNum2"></eqp-split> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </dv-full-screen-container> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { useFullscreen } from '@vueuse/core' |
| | | import { router } from '/@/router' |
| | | import { onMounted, ref, onUnmounted } from 'vue' |
| | | |
| | | import { dryEquipment } from '../dataDefine/DryEquipment.data' |
| | | import EqpSplit from "/@/views/dry/bigScreen/EqpSplit.vue"; |
| | | |
| | | |
| | | const domRef = ref<Nullable<HTMLElement>>(null) |
| | | const { enter, toggle, exit, isFullscreen } = useFullscreen() |
| | | |
| | | const { toggle: toggleDom } = useFullscreen(domRef) |
| | | const position = ref(1) |
| | | const Timer2 = ref() |
| | | |
| | | |
| | | console.log(`output->router.currentRoute.value.params.num `, router.currentRoute.value.query) |
| | | const eqp = ref({} as dryEquipment) |
| | | const eqpNum = ref(router.currentRoute.value.query.num || 0) |
| | | const eqpNum2 = ref(parseInt(router.currentRoute.value.query.num) + 1 || 1) |
| | | |
| | | |
| | | |
| | | var move = true |
| | | function moveImage() { |
| | | if (move) { |
| | | position.value -= 0.3 |
| | | } else { |
| | | position.value += 0.3 |
| | | } |
| | | if (position.value < -240) { |
| | | move = false |
| | | } |
| | | if (position.value > -1) { |
| | | move = true |
| | | } |
| | | } |
| | | |
| | | function back() { |
| | | router.back() |
| | | } |
| | | //queryEqp() |
| | | // DOMæè½½å®æå渲æå¾è¡¨ |
| | | onMounted(() => { |
| | | |
| | | Timer2.value = setInterval(moveImage, 50) |
| | | }) |
| | | |
| | | onUnmounted(() => { |
| | | |
| | | clearInterval(Timer2.value) |
| | | |
| | | Timer2.value = null |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .eqpBox { |
| | | height: 100%; |
| | | } |
| | | .eqpRow { |
| | | } |
| | | .eqpImage { |
| | | height: 1080px; |
| | | width: 1920px; |
| | | background-image: url(/src/assets/images/dry/bg.png); |
| | | background-repeat: no-repeat; |
| | | color: white; |
| | | /*background-position: 160px 280px; */ |
| | | /* background-color: red; */ |
| | | background-size: 120%; |
| | | padding: 10px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | align-content: flex-start; |
| | | } |
| | | |
| | | </style> |
| | |
| | | import 'echarts-liquidfill' |
| | | import { Icon, IconPicker, SvgIcon } from '/@/components/Icon/index' |
| | | import { defHttp } from '/@/utils/http/axios' |
| | | import { queryById, listAll } from '../api/DryEquipment.api' |
| | | import { queryById } from '../api/DryEquipment.api' |
| | | import { dryEquipment } from '../dataDefine/DryEquipment.data' |
| | | import { useUserStore } from '/@/store/modules/user' |
| | | import { getTenantId, getToken } from '/@/utils/auth' |
| | |
| | | } |
| | | |
| | | function listAllEqp() { |
| | | listAll({ enable: 'Y' }) |
| | | let tenantId = getTenantId() |
| | | defHttp.get({ url: '/dry/real/queryAllEqps', params: { tenantId: tenantId,enable: 'Y' } }) |
| | | .then((result) => { |
| | | //console.log(`output->result`, result) |
| | | eqps.value = result |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <dv-full-screen-container> |
| | | <div class="fbg"> |
| | | <div class="bgImage"> |
| | | <div class="head"> |
| | | <div style="width: 600px; height: 50px"> <dv-decoration-8 style="width: 500px; height: 50px" /></div> |
| | | |
| | | <div class="title"> |
| | | <span>{{ title }}</span> |
| | | |
| | | <dv-decoration-5 :dur="20" style="margin-top: -40px; width: 700px; height: 80px" /> |
| | | </div> |
| | | <div style="width: 600px; height: 50px; display: flex; justify-content: end"> |
| | | <dv-decoration-8 :reverse="true" style="width: 500px; height: 50px" |
| | | /></div> |
| | | </div> |
| | | <div class="body"> |
| | | <div class="humiture"> |
| | | <div style="display: flex; width: 120px"> |
| | | <Icon style="color: #ba9853" icon="mdi:home-temperature-outline" :size="28" /> |
| | | |
| | | <div style="font-size: 20px; line-height: 26px"> {{ envTemp }} â </div> |
| | | </div> |
| | | <div style="display: flex"> |
| | | <Icon style="color: #ba9853" icon="wi:humidity" :size="28" /> |
| | | |
| | | <div style="font-size: 20px; line-height: 26px"> {{ envHum }} %rh </div> |
| | | </div> |
| | | </div> |
| | | <div class="feed"> |
| | | <div style="width: 700px; margin-left: 50px; display: flex; flex-direction: column; height: 950px; justify-content: space-between"> |
| | | <div style="display: flex; flex-wrap: wrap; justify-content: space-between"> |
| | | <dv-border-box7 style="width: 210px; height: 100px; padding: 10px"> |
| | | <div class="statistics putincolor"> |
| | | <div class="stat_label font16"> æ»ææé </div> |
| | | <div class="stat_value"> |
| | | {{ originWeight?.toFixed(2) || 0 }} |
| | | <span class="font16"> Kg </span> |
| | | </div> |
| | | <div class="stat_avg"> |
| | | <div> é¢è®¡äº§é </div> |
| | | <div> {{ totalYield?.toFixed(2) || 0 }} kg </div> |
| | | </div> |
| | | </div> |
| | | </dv-border-box7> |
| | | <dv-border-box7 style="width: 210px; height: 100px; padding: 10px"> |
| | | <div class="statistics putincolor"> |
| | | <div class="stat_label font16"> çµéæ¶è </div> |
| | | <div class="stat_value"> |
| | | {{ watt?.toFixed(2) || 0 }} |
| | | <span class="font16"> Kwh </span> |
| | | </div> |
| | | <div class="stat_avg"> |
| | | <div> å¹³åçµè </div> |
| | | <div> {{ wattAvg?.toFixed(2) || 0 }} Kwh/kg </div> |
| | | </div> |
| | | </div> |
| | | </dv-border-box7> |
| | | <dv-border-box7 style="width: 210px; height: 100px; padding: 10px"> |
| | | <div class="statistics putincolor"> |
| | | <div class="stat_label font16"> è¸æ±½æ¶è </div> |
| | | <div class="stat_value"> |
| | | {{ steam?.toFixed(2) || 0 }} |
| | | <span class="font16"> m³ </span> |
| | | </div> |
| | | <div class="stat_avg"> |
| | | <div> 平忱½è </div> |
| | | <div> {{ steamAvg?.toFixed(2) || 0 }} m³/kg </div> |
| | | </div> |
| | | </div> |
| | | </dv-border-box7> |
| | | <!-- <div class="statistics putincolor"> |
| | | <div class="stat_label font16">é¢è®¡äº§é</div> |
| | | <div class="stat_value">3000</div> |
| | | |
| | | <div class="font16"> |
| | | <br/> |
| | | Kg |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | |
| | | <div> |
| | | <!-- <div class="statistics electroncolor"> |
| | | <div class="stat_label font16">çµéæ¶è</div> |
| | | <div class="stat_value">500</div> |
| | | <div class="font16"> |
| | | <br/> |
| | | Kwh |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="statistics steamcolor"> |
| | | <div class="stat_label font16">è¸æ±½æ¶è</div> |
| | | <div class="stat_value">300</div> |
| | | <div class="font16"> |
| | | <br/> |
| | | m³ |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <div class="statistics electroncolor"> |
| | | <div class="stat_label font16">å¹³åçµè</div> |
| | | <div class="stat_value">12</div> |
| | | <div class="font16"> |
| | | <br/> |
| | | Kwh/kg |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="statistics steamcolor"> |
| | | <div class="stat_label font16">平忱½è</div> |
| | | <div class="stat_value">300</div> |
| | | <div class="font16"> |
| | | <br/> |
| | | m³/kg |
| | | </div> |
| | | |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | <!-- <div style="padding-right: 100px;"> |
| | | <div class="statistics"> |
| | | <div class="stat_label font16">å¹²æäº§é</div> |
| | | <div class="stat_value">300</div> |
| | | <div class="font16"> |
| | | <br/> |
| | | kg |
| | | </div> |
| | | |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <div class="up"> |
| | | <div v-for="num in eqpNum" :key="num" :class="{ one: num === 1, two: num === 2, three: num === 3, four: num === 4 }"> |
| | | <div class="eqpInfoup" @click="gotoeqp(num - 1)"> |
| | | <div class="eqp-title"> |
| | | <div class="herb_weight"> |
| | | <div>{{ realTime.get(eqpCodes[num - 1])?.herbName || 'ææ ' }}</div> |
| | | <div>{{ realTime.get(eqpCodes[num - 1])?.originWeight || 0 }} Kg</div> |
| | | </div> |
| | | <!-- <div class="eqp-name">{{ eqpMap.get(eqpCodes[num - 1])?.name || 'é¢ç' }}</div> --> |
| | | <!-- <div class="process"> </div> --> |
| | | <Progress |
| | | :stroke-color="{ |
| | | from: '#108ee9', |
| | | to: '#87d068', |
| | | }" |
| | | :percent="parseFloat(realTime.get(eqpCodes[num - 1])?.percent || '0')" |
| | | status="active" |
| | | trailColor="#2b2b2b2b" |
| | | :show-info="false" |
| | | /> |
| | | <div class="eqp-timer"> |
| | | <div |
| | | ><Icon style="color: #1850b7" icon="ic:twotone-water-drop" :size="20" /> |
| | | {{ realTime.get(eqpCodes[num - 1])?.trendVo?.moisture?.toFixed(1) || '0' }} % |
| | | </div> |
| | | <div |
| | | ><Icon style="color: #873853" icon="fluent:temperature-20-regular" :size="20" /> |
| | | {{ realTime.get(eqpCodes[num - 1])?.trendVo?.bellowsTemp?.toFixed(0) || '0' }} â |
| | | </div> |
| | | <div |
| | | ><Icon style="color: rgb(134 207 106)" icon="gg:sand-clock" :size="20" /> |
| | | {{ realTime.get(eqpCodes[num - 1])?.totalRemain || 0 }} min |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="eqp-info-up"> |
| | | <!-- <div class="herb"> |
| | | <div>{{ realTime.get(eqpCodes[num - 1])?.herbName || 'ææ ' }}</div> |
| | | |
| | | </div> --> |
| | | </div> |
| | | <!-- <div class="weight"><div class="herb">{{ realTime.get(eqpCodes[num - 1])?.originWeight || 0 }} Kg</div></div> --> |
| | | |
| | | <div class="weight" |
| | | ><div class="herb"> |
| | | {{ showInfo(realTime.get(eqpCodes[num - 1])) }} |
| | | </div></div |
| | | > |
| | | <div class="water"> |
| | | <div class="eqp_num">{{ num }}</div> |
| | | <!-- <div class="temp"> |
| | | <div style="line-height: 28px"><Icon style="color: #1850b7" icon="ic:twotone-water-drop" :size="28" /> </div> |
| | | <div class="font"> |
| | | <span class="value"> {{ realTime.get(eqpCodes[num - 1])?.trendVo?.moisture || '0' }}</span> % |
| | | </div> |
| | | </div> |
| | | <div class="temp"> |
| | | <div style="line-height: 28px"><Icon style="color: #873853" icon="fluent:temperature-20-regular" :size="30" /> </div> |
| | | <div class="font"> |
| | | <span class="value">{{ realTime.get(eqpCodes[num - 1])?.trendVo?.bellowsTemp || '0' }} </span> â |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="down"> |
| | | <div v-for="num in eqpNum2" :key="num" :class="{ two: num === 1, three: num === 2, four_down: num === 3 }"> |
| | | <div class="eqpInfodown" @click="gotoeqp(num + 3)"> |
| | | <!-- <div class="eqp-info-down"> |
| | | <div class="herb">{{ realTime.get(eqpCodes[num + 3])?.herbName || 'ææ ' }}</div> |
| | | </div> |
| | | <div class="weight"><div class="herb">{{ realTime.get(eqpCodes[num + 3])?.originWeight || 0 }} Kg </div></div> --> |
| | | <div class="weight" |
| | | ><div class="herb">{{ showInfo(realTime.get(eqpCodes[num + 3])) }}</div></div |
| | | > |
| | | <div class="water"> |
| | | <div class="eqp_num">{{ num - 2 * num + 3 * num + 1 }}</div> |
| | | <!-- <div class="temp"> |
| | | <div style="line-height: 28px"> |
| | | <Icon style="color: #1850b7" icon="ic:twotone-water-drop" :size="28" /> |
| | | </div> |
| | | <div class="font"> |
| | | <span class="value">{{ realTime.get(eqpCodes[num + 3])?.trendVo?.moisture || '0' }}</span> % |
| | | </div> |
| | | </div> |
| | | <div class="temp"> |
| | | <div style="line-height: 28px"><Icon style="color: #873853" icon="fluent:temperature-20-regular" :size="30" /> </div> |
| | | <div class="font"> |
| | | <span class="value">{{ realTime.get(eqpCodes[num + 3])?.trendVo?.bellowsTemp || '0' }}</span> â |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | |
| | | <div style="height: 40px"></div> |
| | | <div class="eqp-title"> |
| | | <div class="herb_weight"> |
| | | <div>{{ realTime.get(eqpCodes[num + 3])?.herbName || 'ææ ' }}</div> |
| | | <div>{{ realTime.get(eqpCodes[num + 3])?.originWeight || 0 }} Kg</div> |
| | | </div> |
| | | |
| | | <Progress |
| | | :stroke-color="{ |
| | | from: '#108ee9', |
| | | to: '#87d068', |
| | | }" |
| | | :percent="parseFloat(realTime.get(eqpCodes[num + 3])?.percent || '0')" |
| | | status="active" |
| | | trailColor="#2b2b2b2b" |
| | | :show-info="false" |
| | | /> |
| | | <!-- <div class="eqp-name">50%</div> --> |
| | | <div class="eqp-timer"> |
| | | <div |
| | | ><Icon style="color: #1850b7" icon="ic:twotone-water-drop" :size="20" /> |
| | | {{ realTime.get(eqpCodes[num + 3])?.trendVo?.moisture?.toFixed(1) || '0' }} % |
| | | </div> |
| | | <div |
| | | ><Icon style="color: #873853" icon="fluent:temperature-20-regular" :size="20" /> |
| | | {{ realTime.get(eqpCodes[num + 3])?.trendVo?.bellowsTemp?.toFixed(0) || '0' }} â |
| | | </div> |
| | | <!-- <div><Icon style="color: rgb(42 154 234)" icon="mdi:clock-outline" :size="20" /> |
| | | {{realTime.get(eqpCodes[num + 3])?.dryTime || 0}} min |
| | | </div> --> |
| | | <div |
| | | ><Icon style="color: rgb(134 207 106)" icon="gg:sand-clock" :size="20" /> |
| | | {{ realTime.get(eqpCodes[num + 3])?.totalRemain || 0 }} min |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="footer"> |
| | | <div>{{ nowDate }}</div> |
| | | <div>{{ nowTime }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="position: absolute; width: 10px; height: 10px; border: 1px red solid; z-index: 1000"> </div> |
| | | </dv-full-screen-container> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { Progress } from 'ant-design-vue' |
| | | import { onMounted, ref, onUnmounted } from 'vue' |
| | | import { Icon, IconPicker, SvgIcon } from '/@/components/Icon/index' |
| | | import { listAll } from '../api/DryEquipment.api' |
| | | import { dryEquipment } from '../dataDefine/DryEquipment.data' |
| | | import { router } from '/@/router' |
| | | import { defHttp } from '/@/utils/http/axios' |
| | | import { useUserStore } from '/@/store/modules/user' |
| | | import { setAuthCache } from '/@/utils/auth' |
| | | import { TENANT_ID } from '/@/enums/cacheEnum' |
| | | const eqpNum = ref(4) |
| | | const eqpNum2 = ref(3) |
| | | const eqpMap = ref(new Map()) |
| | | const eqpCodes = ref(['GM001', 'GM002', 'GM003', 'GM004', 'GM005', 'GM006', 'GM007']) |
| | | const eqps = ref([] as dryEquipment[]) |
| | | const title = ref('æºè½å¹²ç¥è½¦é´') |
| | | |
| | | const userStore = useUserStore() |
| | | const tenantId = ref(router.currentRoute.value.query.tenantId | userStore.getTenant) |
| | | setAuthCache(TENANT_ID, tenantId.value) |
| | | console.log('tenantId1', router.currentRoute.value.query.tenantId) |
| | | console.log('tenantId2', userStore.getTenant) |
| | | const envHum = ref(0) |
| | | const envTemp = ref(0) |
| | | const originWeight = ref(0) |
| | | const totalYield = ref(0) |
| | | const dryReduce = ref(0) |
| | | const steam = ref(0) |
| | | const watt = ref(0) |
| | | |
| | | const steamAvg = ref(0) |
| | | const wattAvg = ref(0) |
| | | console.log(userStore.dictItems.title) |
| | | userStore.dictItems.title?.forEach((element) => { |
| | | if (element.value === 'bigscreentitle') { |
| | | title.value = element.text |
| | | } |
| | | }) |
| | | const Timer = ref() |
| | | |
| | | const realTime = ref(new Map()) |
| | | const nowTime = ref() |
| | | const nowDate = ref() |
| | | |
| | | function listAllEqp() { |
| | | defHttp |
| | | .get({ url: '/dry/real/queryAllEqps', params: { tenantId: tenantId.value, enable: 'Y' } }) |
| | | .then((result) => { |
| | | console.log(`output->result`, result) |
| | | eqps.value = result |
| | | |
| | | result.forEach((item) => { |
| | | eqpMap.value.set(item.code, item) |
| | | }) |
| | | updateRealTime() |
| | | }) |
| | | .catch((err) => { |
| | | console.log(`output->err`, err) |
| | | }) |
| | | } |
| | | |
| | | function updateRealTime() { |
| | | //console.log(`output->宿¶å·æ°æ°æ®`) |
| | | |
| | | queryWorkShopStatistics() |
| | | |
| | | eqps.value.forEach((item) => { |
| | | queryRealTime(item) |
| | | }) |
| | | } |
| | | |
| | | function queryWorkShopStatistics() { |
| | | defHttp.get({ url: '/dry/real/workshopStatistics', params: { tenantid: tenantId.value } }).then((res) => { |
| | | console.log(`output->res`, res) |
| | | steam.value = res.steam |
| | | watt.value = res.watt |
| | | envHum.value = res.envHum |
| | | envTemp.value = res.envTemp |
| | | originWeight.value = res.originWeight |
| | | totalYield.value = res.yield |
| | | dryReduce.value = res.reduce |
| | | if (res.reduce > 0) { |
| | | steamAvg.value = res.steam / res.reduce |
| | | wattAvg.value = res.watt / res.reduce |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function queryRealTime(eqp: dryEquipment) { |
| | | let eqpCode = eqp.code |
| | | let queryRealTimeUrl = '/dry/real/getRealTimeData' |
| | | defHttp.get({ url: queryRealTimeUrl, params: { tenantid: tenantId.value, machineid: eqpCode } }).then((res) => { |
| | | if (res && res.trendVo) { |
| | | res.tempValue = [res.windTemp, 100] |
| | | res.totalRemain = res.remain |
| | | if (res.detailList && res.detailList.length > 0) { |
| | | // å¹²ç¥å©ä½æ¶é´=å·¥åé¢è®¡å©ä½-ï¼å½åå¹²ç¥æ¶é´-æå䏿¬¡è®°å½å¹²ç¥æ¶é´ï¼ |
| | | res.totalRemain = res.remain - (res.dryTime - res.detailList[res.detailList.length - 1].totalTime) |
| | | } else { |
| | | res.totalRemain = res.remain - res.dryTime |
| | | } |
| | | if (res.totalRemain < 0) { |
| | | res.totalRemain = 0 |
| | | } |
| | | |
| | | res.percent = ((res.dryTime / (res.dryTime + res.totalRemain)) * 100).toFixed(2) |
| | | } else { |
| | | res = { |
| | | tempValue: [0, 100], |
| | | percent: 0, |
| | | mois: [], |
| | | } |
| | | } |
| | | |
| | | realTime.value.set(eqp.code, res) |
| | | }) |
| | | } |
| | | function gotoeqp(num) { |
| | | console.log('跳转æºå°', num) |
| | | if (num < eqpCodes.value.length) { |
| | | router.push({ path: '/bigEqp', query: { num: num } }) |
| | | } |
| | | } |
| | | |
| | | function getNowTime() { |
| | | var date = new Date() |
| | | nowDate.value = |
| | | date.getFullYear() + |
| | | '/' + |
| | | (date.getMonth() < 9 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + |
| | | '/' + |
| | | (date.getDay() < 10 ? '0' + date.getDay() : date.getDay()) |
| | | nowTime.value = |
| | | '' + |
| | | (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + |
| | | ':' + |
| | | (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) |
| | | } |
| | | |
| | | function showInfo(data) { |
| | | return data ? (data.fault ? data.fault : data.warning ? data.warning : data.level ? data.level : '空é²') : '空é²' |
| | | } |
| | | |
| | | getNowTime() |
| | | listAllEqp() |
| | | onMounted(() => { |
| | | Timer.value = setInterval(updateRealTime, 3000) |
| | | setInterval(getNowTime, 10000) |
| | | }) |
| | | |
| | | onUnmounted(() => { |
| | | clearInterval(Timer.value) |
| | | Timer.value = null |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .fbg { |
| | | height: 1080px; |
| | | width: 1920px; |
| | | background-image: url(/src/assets/images/dry/bg/bg5.png); |
| | | background-repeat: no-repeat; |
| | | } |
| | | .bgImage { |
| | | height: 1080px; |
| | | width: 1920px; |
| | | background-image: url(/src/assets/images/dry/bg/223.png); |
| | | background-repeat: no-repeat; |
| | | background-size: 104%; |
| | | background-position: 0px 257px; |
| | | } |
| | | |
| | | .head { |
| | | display: flex; |
| | | align-content: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .body { |
| | | height: 980px; |
| | | width: 100%; |
| | | margin-top: -100px; |
| | | font-size: 20px; |
| | | } |
| | | .title { |
| | | height: 200px; |
| | | padding: 20px; |
| | | font-size: 30px; |
| | | font-weight: bold; |
| | | text-align: center; |
| | | color: white; |
| | | } |
| | | |
| | | .humiture { |
| | | height: 0px; |
| | | justify-content: center; |
| | | color: white; |
| | | display: flex; |
| | | } |
| | | |
| | | .feed { |
| | | display: flex; |
| | | height: 0px; |
| | | color: gray; |
| | | padding-top: 20px; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .up { |
| | | display: flex; |
| | | |
| | | align-content: center; |
| | | justify-content: flex-start; |
| | | } |
| | | .down { |
| | | padding-left: 554px; |
| | | margin-top: -760px; |
| | | display: flex; |
| | | |
| | | align-content: center; |
| | | justify-content: flex-start; |
| | | } |
| | | .eqpInfoup { |
| | | width: 304px; |
| | | height: 400px; |
| | | position: relative; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .eqpInfodown { |
| | | width: 300px; |
| | | height: 430px; |
| | | position: relative; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: flex-start; |
| | | } |
| | | |
| | | .one { |
| | | margin: 278px 10px; |
| | | } |
| | | |
| | | .two { |
| | | margin: 208px 23px; |
| | | } |
| | | |
| | | .three { |
| | | margin: 110px 158px; |
| | | } |
| | | |
| | | .four { |
| | | margin: 16px 10px; |
| | | } |
| | | |
| | | .four_down { |
| | | margin: 4px 74px; |
| | | } |
| | | |
| | | .eqp-title { |
| | | height: 125px; |
| | | |
| | | width: 100%; |
| | | |
| | | padding: 10px 20px; |
| | | } |
| | | |
| | | .eqp-name { |
| | | line-height: 30px; |
| | | text-align: center; |
| | | color: white; |
| | | margin-top: -30px; |
| | | } |
| | | |
| | | .eqp-timer { |
| | | line-height: 30px; |
| | | text-align: center; |
| | | color: white; |
| | | margin-top: 6px; |
| | | justify-content: space-between; |
| | | display: flex; |
| | | } |
| | | |
| | | .eqp-name-down { |
| | | line-height: 40px; |
| | | text-align: center; |
| | | color: white; |
| | | } |
| | | |
| | | .process { |
| | | width: 50%; |
| | | height: 100%; |
| | | overflow: hidden; |
| | | border-radius: 20px; |
| | | background: #3f4c6b; |
| | | } |
| | | |
| | | .eqp-info-up { |
| | | flex: 1; |
| | | padding-top: 108px; |
| | | display: flex; |
| | | } |
| | | |
| | | .weight { |
| | | flex: 1; |
| | | display: flex; |
| | | margin-left: 46px; |
| | | font-size: 20px; |
| | | } |
| | | |
| | | .eqp-info-down { |
| | | flex: 1; |
| | | padding-top: 70px; |
| | | display: flex; |
| | | } |
| | | |
| | | .herb { |
| | | height: 32px; |
| | | background: #3f4c6b; |
| | | color: white; |
| | | line-height: 30px; |
| | | padding: 0 10px; |
| | | } |
| | | .water { |
| | | height: 120px; |
| | | width: 110px; |
| | | margin: 58px 158px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .temp { |
| | | display: flex; |
| | | } |
| | | .font { |
| | | line-height: 26px; |
| | | } |
| | | |
| | | .footer { |
| | | height: 160px; |
| | | display: flex; |
| | | padding: 10px 20px; |
| | | font-size: 30px; |
| | | flex-direction: column-reverse; |
| | | align-items: flex-end; |
| | | color: white; |
| | | line-height: 40px; |
| | | margin-top: -150px; |
| | | } |
| | | :deep() .progress { |
| | | padding: 25px 25px; |
| | | |
| | | width: 360px; |
| | | display: flex; |
| | | } |
| | | :deep() .ant-progress-bg { |
| | | height: 25px !important; |
| | | } |
| | | :deep() .ant-progress-inner { |
| | | background-color: rgb(197 197 197 / 84%) !important; |
| | | } |
| | | |
| | | .statistics { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | flex-wrap: wrap; |
| | | } |
| | | .stat_label { |
| | | width: 45px; |
| | | } |
| | | |
| | | .stat_value { |
| | | font-size: 28px; |
| | | } |
| | | |
| | | .herb_weight { |
| | | padding: 0 10px; |
| | | color: white; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | .eqp_num { |
| | | font-weight: bold; |
| | | width: 40px; |
| | | height: 40px; |
| | | background: #a0782e; |
| | | border-radius: 50px; |
| | | /* text-align: center; */ |
| | | font-size: 23px; |
| | | color: white; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | .putincolor { |
| | | color: antiquewhite; |
| | | } |
| | | |
| | | .electroncolor { |
| | | color: aquamarine; |
| | | } |
| | | |
| | | .steamcolor { |
| | | color: sandybrown; |
| | | } |
| | | .font16 { |
| | | font-size: 16px; |
| | | } |
| | | .stat_avg { |
| | | width: 100%; |
| | | font-size: 16px; |
| | | display: flex; |
| | | color: rgb(176, 176, 176); |
| | | justify-content: space-between; |
| | | border-top: 1px solid; |
| | | margin-top: 6px; |
| | | } |
| | | @keyframes flowLight { |
| | | 0% { background-position: 200% 0; } |
| | | 100% { background-position: -200% 0; } |
| | | } |
| | | @keyframes flowLightUp { |
| | | 0% { background-position: -200% 0; } |
| | | 100% { background-position: 200% 0; } |
| | | } |
| | | .up .eqp-title::after { |
| | | content: ""; |
| | | position: absolute; |
| | | left: 90px; |
| | | top: 34%; |
| | | width: 65px; |
| | | height: 6px; |
| | | background: repeating-linear-gradient(90deg, #5596c7 0 5px, transparent 5px 10px); |
| | | transform: rotate(105deg) translateY(-107%); |
| | | |
| | | background-size: 200% 100%; |
| | | animation: flowLightUp 10s infinite linear; |
| | | |
| | | } |
| | | |
| | | .down .eqp-title::after { |
| | | content: ""; |
| | | position: absolute; |
| | | left: 99px; |
| | | top: 57%; |
| | | width: 128px; |
| | | height: 6px; |
| | | background: repeating-linear-gradient(90deg, #5596c7 0 5px, transparent 5px 10px); |
| | | transform: rotate(105deg) translateY(-107%); |
| | | background-size: 200% 100%; |
| | | animation: flowLight 15s infinite linear; |
| | | } |
| | | |
| | | </style> |
| | |
| | | import { router } from '/@/router' |
| | | import { defHttp } from '/@/utils/http/axios' |
| | | import { useUserStore } from '/@/store/modules/user' |
| | | import {setAuthCache} from "/@/utils/auth"; |
| | | import {TENANT_ID} from "/@/enums/cacheEnum"; |
| | | const eqpNum = ref(4) |
| | | const eqpMap = ref(new Map()) |
| | | const eqpCodes = ref(['GM001', 'GM002', 'GM003', 'GM004', 'GM005', 'GM006', 'GM007', 'GM008']) |
| | | const eqps = ref([] as dryEquipment[]) |
| | | const title = ref('æºè½å¹²ç¥è½¦é´') |
| | | |
| | | const userStore = useUserStore() |
| | | const tenantId = ref(router.currentRoute.value.query.tenantId | userStore.getTenant) |
| | | setAuthCache(TENANT_ID, tenantId.value) |
| | | console.log('tenantId1', router.currentRoute.value.query.tenantId) |
| | | console.log('tenantId2', userStore.getTenant) |
| | | const envHum = ref(0) |
| | | const envTemp = ref(0) |
| | | const originWeight = ref(0) |
| | |
| | | const nowDate = ref() |
| | | |
| | | function listAllEqp() { |
| | | listAll({ enable: 'Y' }) |
| | | defHttp.get({ url: '/dry/real/queryAllEqps', params: { tenantId: tenantId.value,enable: 'Y' } }) |
| | | .then((result) => { |
| | | console.log(`output->result`, result) |
| | | eqps.value = result |
| | |
| | | } |
| | | |
| | | function queryWorkShopStatistics() { |
| | | let tenantId = userStore.getTenant |
| | | defHttp.get({ url: '/dry/real/workshopStatistics', params: { tenantid: tenantId } }).then((res) => { |
| | | |
| | | defHttp.get({ url: '/dry/real/workshopStatistics', params: { tenantid: tenantId.value } }).then((res) => { |
| | | console.log(`output->res`, res) |
| | | steam.value = res.steam |
| | | watt.value = res.watt |
| | |
| | | } |
| | | |
| | | function queryRealTime(eqp: dryEquipment) { |
| | | let tenantId = userStore.getTenant |
| | | |
| | | let eqpCode = eqp.code |
| | | let queryRealTimeUrl = '/dry/real/getRealTimeData' |
| | | defHttp.get({ url: queryRealTimeUrl, params: { tenantid: tenantId, machineid: eqpCode } }).then((res) => { |
| | | defHttp.get({ url: queryRealTimeUrl, params: { tenantid: tenantId.value, machineid: eqpCode } }).then((res) => { |
| | | if (res && res.trendVo) { |
| | | res.tempValue = [res.windTemp, 100] |
| | | res.totalRemain = res.remain |
| | | if (res.detailList) { |
| | | if (res.detailList && res.detailList.length > 0) { |
| | | // å¹²ç¥å©ä½æ¶é´=å·¥åé¢è®¡å©ä½-ï¼å½åå¹²ç¥æ¶é´-æå䏿¬¡è®°å½å¹²ç¥æ¶é´ï¼ |
| | | res.totalRemain = res.remain - (res.dryTime - res.detailList[res.detailList.length - 1].totalTime) |
| | | } |
| | | } else { |
| | | res.totalRemain = res.remain - res.dryTime |
| | | } |
| | | if (res.totalRemain < 0) { |
| | | res.totalRemain = 0 |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="leftEqp"> |
| | | <div class="leftTop"> |
| | | <dv-border-box-7 > |
| | | <div style="display:flex;justify-content: center;flex-wrap: wrap;align-content: flex-start;"> |
| | | <div style="display: flex;"> |
| | | <div class="leftTop0"> |
| | | |
| | | <div> |
| | | <div class="mainInfo" style="padding-top: 20px;padding-left:80px;font-size: 26px">{{ eqp?.name }}</div> |
| | | <dv-decoration-8 style="width:300px;height:50px;padding-top: 0px" /> |
| | | |
| | | </div> |
| | | <div style="display: flex; width: 500px; justify-content: space-between"> |
| | | <div style="padding-top: 20px; width: 150px; height: 160px"> |
| | | <dv-border-box-7 style="padding: 10px"> |
| | | <div style="display: flex; flex-direction: column;justify-content: space-between; height: 100%"> |
| | | <div style="font-size: 20px">嫿°´ç</div> |
| | | |
| | | <div style="font-size: 35px; text-align: center"> {{ realData?.trendVo?.moisture || 0 }} <span style="font-size: 20px">%</span></div> |
| | | <div style="font-size: 16px; display: flex;justify-content: space-between"> <div>{{ realData?.initial || 0 }} %</div> <div> -> </div> <div>{{ realData?.target || 0 }} %</div></div> |
| | | </div> |
| | | </dv-border-box-7> |
| | | </div> |
| | | <div style="padding-top: 20px; width: 150px; height: 160px"> |
| | | <dv-border-box-7 style="padding: 10px; "> |
| | | <div style="display: flex; flex-direction: column;justify-content: space-between; height: 100%"> |
| | | <div style="font-size: 20px">éé</div> |
| | | <div style="font-size: 35px; text-align: center"> {{ realData?.trendVo?.weight || 0 }} <span style="font-size: 20px">kg</span></div> |
| | | <div style="font-size: 16px"> åå§ {{ realData?.originWeight }} kg</div> |
| | | </div> |
| | | </dv-border-box-7> |
| | | </div> |
| | | <div style="padding-top: 20px; width: 150px; height: 160px"> |
| | | <dv-border-box-7 style="padding: 10px"> |
| | | <div style="display: flex; flex-direction: column;justify-content: space-between; height: 100%"> |
| | | <div style="font-size: 20px">çé£</div> |
| | | <div style="font-size: 35px; text-align: center"> {{ realData?.trendVo?.bellowsTemp || 0 }} <span style="font-size: 20px">°C</span></div> |
| | | <div style="font-size: 16px"> 设置 {{ realData?.windTemp || 0 }} °C</div> |
| | | </div> |
| | | </dv-border-box-7> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="eqp-title" style="width:500px; font-size: 24px;padding-top: 20px"> |
| | | <div style="position: absolute; z-index: 999;font-size: 22px; padding-left: 26px; padding-top: 7px" > å¹²ç¥ {{ realData?.dryTime }} Min</div> |
| | | |
| | | <Progress |
| | | :stroke-color="{ |
| | | from: '#108ee9', |
| | | to: '#87d068', |
| | | }" |
| | | :percent="parseFloat((realData?.dryTime/realData?.totalTime)*100 || '0')" |
| | | status="active" |
| | | trailColor="#2b2b2b2b" |
| | | :show-info="false" |
| | | /> |
| | | <div class="eqp-timer" style="display: flex; justify-content: space-between"> |
| | | <div> |
| | | é¢è®¡ {{ realData?.totalTime }} Min |
| | | </div> |
| | | <div> |
| | | å©ä½ {{ realData?.totalRemain | 0 }} Min |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="outDiv eqpStatus"> |
| | | <div |
| | | style=" |
| | | font-size: 26px; |
| | | color: white; |
| | | background-color: #1595ea; |
| | | width: 180px; |
| | | line-height: 60px; |
| | | text-align: center; |
| | | border-radius: 10px; |
| | | font-weight: bold; |
| | | " |
| | | > |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="width:420px; height: 400px; padding-top: 20px;padding-left: 20px"> |
| | | <div :id="'moisChart'+props.num" style="width: 420px; height: 380px"></div> |
| | | </div> |
| | | </div> |
| | | <dv-decoration-11 style="width:360px;height:70px;font-size: 26px;">{{ realData?.herbName || 'ææ ' }}</dv-decoration-11> |
| | | <div style="width: 100%; height: 440px"> |
| | | <div class="ganzaoji" @click="showFault" :style="{ 'background-image': 'url(' + getStatusImageUrl(statusGif) + ')' }"> |
| | | <div v-show="zuoqianjiting" class="error-div" style=" top:309px; left:418px"> |
| | | <div class="blingbling error-marker" ></div> |
| | | <div class="error-msg" style="width: 70px;"> |
| | | 左忥å |
| | | </div> |
| | | </div> |
| | | <div v-show="shebeijiting" class="error-div" style=" top:111px; left:484px"> |
| | | <div class="blingbling error-marker" ></div> |
| | | <div class="error-msg" style=" width: 106px;"> |
| | | è®¾å¤æ¥åï¼æ»ï¼ |
| | | </div> |
| | | </div> |
| | | <div v-show="chuliaojiting" class="error-div" style=" top:300px; left:129px"> |
| | | <div class="blingbling error-marker" ></div> |
| | | <div class="error-msg" style=" width: 70px;"> |
| | | åºææ¥å |
| | | </div> |
| | | </div> |
| | | <div v-show="mianbanjiting" class="error-div" style=" top:258px; left:659px"> |
| | | <div class="blingbling error-marker" ></div> |
| | | <div class="error-msg" style=" width: 70px;"> |
| | | 颿¿æ¥å |
| | | </div> |
| | | </div> |
| | | <div v-show="fengxiangsheng" class="error-div" style=" top:294px; left:517px"> |
| | | <div class="blingbling error-marker" ></div> |
| | | <div class="error-msg" style=" width: 86px;"> |
| | | é£ç®±åå¼å¸¸ |
| | | </div> |
| | | </div> |
| | | <div v-show="fengxiangjiang" class="error-div" style=" top:319px; left:517px"> |
| | | <div class="blingbling error-marker" ></div> |
| | | <div class="error-msg" style=" width: 86px;"> |
| | | é£ç®±éå¼å¸¸ |
| | | </div> |
| | | </div> |
| | | <div v-show="fengjiguoliu" class="error-div" style=" top:335px; left:655px"> |
| | | <div class="blingbling error-marker" ></div> |
| | | <div class="error-msg" style=" width: 70px;"> |
| | | 飿ºè¿æµ |
| | | </div> |
| | | </div> |
| | | <div v-show="guntongsheng" class="error-div" style=" top:198px; left:517px"> |
| | | <div class="blingbling error-marker" ></div> |
| | | <div class="error-msg" style=" width: 86px;"> |
| | | æ»çåå¼å¸¸ |
| | | </div> |
| | | </div> |
| | | <div v-show="guntongjiang" class="error-div" style=" top:223px; left:517px"> |
| | | <div class="blingbling error-marker" ></div> |
| | | <div class="error-msg" style=" width: 86px;"> |
| | | æ»çéå¼å¸¸ |
| | | </div> |
| | | </div> |
| | | <div v-show="guntongguoliu" class="error-div" style=" top:209px; left:642px"> |
| | | <div class="blingbling error-marker" ></div> |
| | | <div class="error-msg" style=" width: 70px;"> |
| | | æ»çè¿æµ |
| | | </div> |
| | | </div> |
| | | <div v-show="wendubaojing" class="error-div" style=" top:234px; left:659px"> |
| | | <div class="blingbling error-marker" ></div> |
| | | <div class="error-msg" style=" width: 70px;"> |
| | | 温度æ¥è¦ |
| | | </div> |
| | | </div> |
| | | |
| | | <div v-show="zuoqianmen" class="error-div" style=" top:388px; left:415px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 80px;"> |
| | | å·¦å鍿¥è¦ |
| | | </div> |
| | | </div> |
| | | <div v-show="zuohoumen" class="error-div" style=" top:367px; left:587px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 80px;"> |
| | | å·¦å鍿¥è¦ |
| | | </div> |
| | | </div> |
| | | <div v-show="youqianmen" class="error-div" style=" top:388px; left:284px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 80px;"> |
| | | å³å鍿¥è¦ |
| | | </div> |
| | | </div> |
| | | <div v-show="youhoumen" class="error-div" style=" top:367px; left:478px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 80px;"> |
| | | å³å鍿¥è¦ |
| | | </div> |
| | | </div> |
| | | |
| | | <div v-show="guntongbuzaigaowei" class="error-div" style=" top:173px; left:517px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 100px;"> |
| | | æ»çä¸å¨é«ä½ |
| | | </div> |
| | | </div> |
| | | <div v-show="fengxiangbuzaigaowei" class="error-div" style=" top:269px; left:517px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 100px;"> |
| | | é£ç®±ä¸å¨é«ä½ |
| | | </div> |
| | | </div> |
| | | <div v-show="fengxiangbuzaidiwei" class="error-div" style=" top:343px; left:517px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 100px;"> |
| | | é£ç®±ä¸å¨ä½ä½ |
| | | </div> |
| | | </div> |
| | | <div v-show="jiareweichuanganqi" class="error-div" style=" top:283px; left:642px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 126px;"> |
| | | å çä½ä¼ æå¨æ¥è¦ |
| | | </div> |
| | | </div> |
| | | <div v-show="zuoqianfengxianggaowei" class="error-div" style=" top:334px; left:362px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 126px;"> |
| | | å·¦åé£ç®±ä¸å¨é«ä½ |
| | | </div> |
| | | </div> |
| | | <div v-show="zuoqianfengxiangdiwei" class="error-div" style=" top:334px; left:362px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 126px;"> |
| | | å·¦åé£ç®±ä¸å¨ä½ä½ |
| | | </div> |
| | | </div> |
| | | <div v-show="zuohoufengxianggaowei" class="error-div" style=" top:309px; left:642px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 126px;"> |
| | | å·¦åé£ç®±ä¸å¨é«ä½ |
| | | </div> |
| | | </div> |
| | | <div v-show="zuohoufengxiangdiwei" class="error-div" style=" top:309px; left:642px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 126px;"> |
| | | å·¦åé£ç®±ä¸å¨ä½ä½ |
| | | </div> |
| | | </div> |
| | | <div v-show="youqianfengxianggaowei" class="error-div" style=" top:272px; left:300px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 126px;"> |
| | | å³åé£ç®±ä¸å¨é«ä½ |
| | | </div> |
| | | </div> |
| | | <div v-show="youqianfengxiangdiwei" class="error-div" style=" top:272px; left:300px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 126px;"> |
| | | å³åé£ç®±ä¸å¨ä½ä½ |
| | | </div> |
| | | </div> |
| | | <div v-show="youhoufengxianggaowei" class="error-div" style=" top:246px; left:506px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 126px;"> |
| | | å³åé£ç®±ä¸å¨é«ä½ |
| | | </div> |
| | | </div> |
| | | <div v-show="youhoufengxiangdiwei" class="error-div" style=" top:246px; left:506px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 126px;"> |
| | | å³åé£ç®±ä¸å¨ä½ä½ |
| | | </div> |
| | | </div> |
| | | <div v-show="zuoqianguntongdiwei" class="error-div" style=" top:175px; left:358px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 126px;"> |
| | | 左忻çä¸å¨ä½ä½ |
| | | </div> |
| | | </div> |
| | | <div v-show="zuohouguntongdiwei" class="error-div" style=" top:158px; left:643px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 126px;"> |
| | | 左忻çä¸å¨ä½ä½ |
| | | </div> |
| | | </div> |
| | | <div v-show="youqianguntongdiwei" class="error-div" style=" top:150px; left:268px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 126px;"> |
| | | å³åæ»çä¸å¨ä½ä½ |
| | | </div> |
| | | </div> |
| | | <div v-show="youhouguntongdiwei" class="error-div" style=" top:135px; left:506px"> |
| | | <div class="blingbling warn-marker" ></div> |
| | | <div class="warn-msg" style=" width: 126px;"> |
| | | å³åæ»çä¸å¨ä½ä½ |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div style="display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 0 20px; font-size: 20px;"> |
| | | <div>çµè½æ¶èï¼ {{realData?.watt | 0}} Kwh</div> |
| | | <dv-decoration-7 style="width:300px;height:80px;font-size: 26px;">{{ statusTxt }}</dv-decoration-7> |
| | | <div>è¸æ±½æ¶èï¼ {{realData?.steam | 0}} m³</div> |
| | | </div> |
| | | </div> |
| | | </dv-border-box-7> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | |
| | | |
| | | import { useFullscreen } from '@vueuse/core' |
| | | import { BorderBox7 as DvBorderBox7 } from '@kjgl77/datav-vue3' |
| | | import { router } from '/@/router' |
| | | import { onMounted, ref, onUnmounted } from 'vue' |
| | | import { Progress } from 'ant-design-vue' |
| | | import * as echarts from 'echarts' |
| | | import 'echarts-liquidfill' |
| | | import { Icon, IconPicker, SvgIcon } from '/@/components/Icon/index' |
| | | import { defHttp } from '/@/utils/http/axios' |
| | | import { queryById, listAll } from '../api/DryEquipment.api' |
| | | import { dryEquipment } from '../dataDefine/DryEquipment.data' |
| | | import { useUserStore } from '/@/store/modules/user' |
| | | import { getTenantId, getToken } from '/@/utils/auth' |
| | | |
| | | // 声åä»ä¸çº§ä¼ éçåæ° |
| | | const props = defineProps({ |
| | | num: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | }) |
| | | |
| | | const domRef = ref<Nullable<HTMLElement>>(null) |
| | | const { enter, toggle, exit, isFullscreen } = useFullscreen() |
| | | |
| | | const { toggle: toggleDom } = useFullscreen(domRef) |
| | | const Timer = ref() |
| | | |
| | | const isError = ref(false) |
| | | const isWarning = ref(false) |
| | | const eqps = ref([] as dryEquipment[]) |
| | | |
| | | const eqp = ref({} as dryEquipment) |
| | | console.log('props.num', props.num) |
| | | const eqpNum = ref(props.num || 0) |
| | | |
| | | const userStore = useUserStore() |
| | | const realData = ref({}) |
| | | const standard = ref({ |
| | | xiaolv: 220, |
| | | xlMin: 200, |
| | | zhengqi: 50, |
| | | zqMin: 45, |
| | | dian: 8, |
| | | dMin: 7.5, |
| | | }) |
| | | |
| | | const position = ref(1) |
| | | //realData.value.tempValue = [0, 100] |
| | | realData.value.mois = [0.5, 0.35, 0.2] |
| | | statusGif = 'tmrefeng2' |
| | | realData.value.herbImage = 'yaocai1.png' |
| | | var moisChart: echarts.ECharts |
| | | |
| | | //----------------error---------------- |
| | | const shebeijiting = ref(false) |
| | | const chuliaojiting = ref(false) |
| | | const zuoqianjiting = ref(false) |
| | | const mianbanjiting = ref(false) |
| | | const fengxiangsheng = ref(false) |
| | | const fengxiangjiang = ref(false) |
| | | const fengjiguoliu = ref(false) |
| | | const guntongsheng = ref(false) |
| | | const guntongjiang = ref(false) |
| | | const guntongguoliu = ref(false) |
| | | const wendubaojing = ref(false) |
| | | //--------------warning------------ |
| | | const zuoqianmen = ref(false) |
| | | const zuohoumen = ref(false) |
| | | const youqianmen = ref(false) |
| | | const youhoumen = ref(false) |
| | | const guntongbuzaigaowei = ref(false) |
| | | const fengxiangbuzaigaowei = ref(false) |
| | | const fengxiangbuzaidiwei = ref(false) |
| | | const jiareweichuanganqi = ref(false) |
| | | const zuoqianfengxianggaowei = ref(false) |
| | | const zuohoufengxianggaowei = ref(false) |
| | | const youqianfengxianggaowei = ref(false) |
| | | const youhoufengxianggaowei = ref(false) |
| | | const zuoqianfengxiangdiwei = ref(false) |
| | | const zuohoufengxiangdiwei = ref(false) |
| | | const youqianfengxiangdiwei = ref(false) |
| | | const youhoufengxiangdiwei = ref(false) |
| | | const zuoqianguntongdiwei = ref(false) |
| | | const zuohouguntongdiwei = ref(false) |
| | | const youqianguntongdiwei = ref(false) |
| | | const youhouguntongdiwei = ref(false) |
| | | |
| | | function initCharts() { |
| | | let domId = 'moisChart'+props.num |
| | | |
| | | let chartDom: HTMLElement = document.getElementById(domId) as HTMLElement |
| | | |
| | | moisChart = echarts.init(chartDom) |
| | | |
| | | |
| | | const option = { |
| | | color: ['green', 'red'], |
| | | title: { |
| | | text: '嫿°´ç/温度è¶å¿', |
| | | textStyle: { |
| | | color: '#fff', |
| | | fontSize: 20, |
| | | }, |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | }, |
| | | grid: { |
| | | left: 50, |
| | | right: 70, |
| | | top: 50, |
| | | bottom: 60, |
| | | }, |
| | | legend: { |
| | | right: 60, |
| | | textStyle: { |
| | | color: '#fff', |
| | | fontSize: 20, |
| | | }, |
| | | }, |
| | | // toolbox: { |
| | | // show: true, |
| | | // feature: { |
| | | // dataZoom: { |
| | | // yAxisIndex: 'none', |
| | | // }, |
| | | // dataView: { readOnly: false }, |
| | | // magicType: { type: ['line', 'bar'] }, |
| | | // restore: {}, |
| | | // saveAsImage: {}, |
| | | // }, |
| | | // }, |
| | | xAxis: { |
| | | type: 'value', |
| | | axisLabel: { |
| | | color: '#fff', |
| | | fontSize: 17, |
| | | }, |
| | | //boundaryGap: false, |
| | | // data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], |
| | | min: 0, |
| | | max: function (value) { |
| | | if (value.max < 100) { |
| | | return 100 |
| | | } else { |
| | | return value.max |
| | | } |
| | | }, |
| | | splitLine: { |
| | | lineStyle: { |
| | | type: 'dashed', |
| | | color: ['#8d8d8d'], |
| | | }, |
| | | }, |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | boundaryGap: ['10%', '10%'], |
| | | axisLabel: { |
| | | color: '#fff', |
| | | fontSize: 17, |
| | | }, |
| | | splitLine: { |
| | | lineStyle: { |
| | | type: 'dashed', |
| | | color: ['#8d8d8d'], |
| | | }, |
| | | }, |
| | | // min: 0, |
| | | // max: function (value) { |
| | | // if (value.max < 100) { |
| | | // return 100 |
| | | // } else { |
| | | // return value.max |
| | | // } |
| | | // }, |
| | | }, |
| | | // yAxis: { |
| | | // type: 'value', |
| | | // axisLabel: { |
| | | // formatter: '{value} °C', |
| | | // }, |
| | | // }, |
| | | series: [ |
| | | { |
| | | name: '嫿°´ç', |
| | | type: 'line', |
| | | smooth: true, |
| | | symbol: 'none', |
| | | data: [ |
| | | |
| | | ], |
| | | lineStyle: { |
| | | width: 1, |
| | | }, |
| | | markLine: { |
| | | data: [{ type: 'average', name: 'Avg' }], |
| | | }, |
| | | areaStyle: { |
| | | opacity: 0.2, |
| | | color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
| | | { |
| | | offset: 0, |
| | | color: 'rgb(128, 255, 165)', |
| | | }, |
| | | { |
| | | offset: 1, |
| | | color: 'rgb(1, 191, 236)', |
| | | }, |
| | | ]), |
| | | }, |
| | | }, |
| | | { |
| | | name: '温度', |
| | | type: 'line', |
| | | smooth: true, |
| | | symbol: 'none', |
| | | data: [ |
| | | |
| | | ], |
| | | lineStyle: { |
| | | width: 1, |
| | | }, |
| | | areaStyle: { |
| | | opacity: 0.2, |
| | | color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
| | | { |
| | | offset: 0, |
| | | color: 'rgb(255, 0, 135)', |
| | | }, |
| | | { |
| | | offset: 1, |
| | | color: 'rgb(135, 0, 157)', |
| | | }, |
| | | ]), |
| | | }, |
| | | // markLine: { |
| | | // data: [ |
| | | // { type: 'average', name: 'Avg' }, |
| | | // [ |
| | | // { |
| | | // symbol: 'none', |
| | | // x: '90%', |
| | | // yAxis: 'max', |
| | | // }, |
| | | // { |
| | | // symbol: 'circle', |
| | | // label: { |
| | | // position: 'start', |
| | | // formatter: 'Max', |
| | | // }, |
| | | // type: 'max', |
| | | // name: 'æé«ç¹', |
| | | // }, |
| | | // ], |
| | | // ], |
| | | // }, |
| | | }, |
| | | ], |
| | | } |
| | | |
| | | option && moisChart.setOption(option) |
| | | |
| | | } |
| | | |
| | | // å¨æè¯»åå¾ç |
| | | function getStatusImageUrl(name: string) { |
| | | // |
| | | if (isWarning.value || isError.value) { |
| | | return new URL(`/src/assets/images/dry/ganzaoji-x.png`, import.meta.url).href |
| | | } else if (name =='zanting') { |
| | | return new URL(`/src/assets/images/dry/${name}.png`, import.meta.url).href |
| | | } else { |
| | | return new URL(`/src/assets/images/dry/${name}.gif`, import.meta.url).href |
| | | } |
| | | |
| | | } |
| | | |
| | | function listAllEqp() { |
| | | let tenantId = getTenantId() |
| | | defHttp.get({ url: '/dry/real/queryAllEqps', params: { tenantId: tenantId,enable: 'Y' } }) |
| | | .then((result) => { |
| | | //console.log(`output->result`, result) |
| | | eqps.value = result |
| | | // result.forEach((item) => { |
| | | // eqpCodes.push(item.code) |
| | | // }) |
| | | queryRealTime() |
| | | setTimeout(initCharts, 500) |
| | | }) |
| | | .catch((err) => { |
| | | //console.log(`output->err`, err) |
| | | }) |
| | | } |
| | | |
| | | var num = eqpNum.value |
| | | |
| | | function changeEqp() { |
| | | //console.log("changeEqp::",eqps.value.length); |
| | | num++ |
| | | if (eqps.value.length > 0) { |
| | | var i = num % eqps.value.length |
| | | //eqp.value = eqps.value[i] |
| | | // console.log("777",i); |
| | | eqpNum.value = i |
| | | //console.log("888",eqp.value); |
| | | queryRealTime() |
| | | //setTimeout(initCharts, 500) |
| | | } |
| | | } |
| | | |
| | | // function queryEqpsReal() { |
| | | |
| | | // if (eqps.value.length > 0) { |
| | | // var i = num%eqps.value.length |
| | | // eqp.value = eqps[i] |
| | | // console.log("777",i); |
| | | // console.log("888",eqp.value); |
| | | // queryRealTime() |
| | | // //setTimeout(initCharts, 500) |
| | | // } |
| | | // num ++; |
| | | // } |
| | | |
| | | var shangliaoFlag = false |
| | | var statusGif = 'tmrefeng2' |
| | | var statusTxt = 'æ£å¨å¹²ç¥' |
| | | |
| | | function chaiwangban() { |
| | | statusGif = 'chaiwangban-1' |
| | | setTimeout(shangliao, 7000) |
| | | } |
| | | function showFault () { |
| | | console.log('showFault') |
| | | router.push({ path: '/bigFault', query: { num: num } }) |
| | | |
| | | } |
| | | function shangliao() { |
| | | statusGif = 'shangliao-N' |
| | | setTimeout(() => { |
| | | statusGif = 'zhuangwangban' |
| | | setTimeout(() => { |
| | | statusGif = 'guanmen1' |
| | | setTimeout(() => { |
| | | shangliaoFlag = false |
| | | }, 4000) |
| | | }, 7000) |
| | | }, 15000) |
| | | } |
| | | |
| | | function queryRealTime() { |
| | | if (eqp.value) { |
| | | eqp.value = eqps.value[eqpNum.value] |
| | | // console.log("888",eqp.value); |
| | | let tenantId = getTenantId() |
| | | let eqpCode = eqp.value.code |
| | | let queryRealTimeUrl = '/dry/real/getRealTimeData' |
| | | defHttp.get({ url: queryRealTimeUrl, params: { tenantid: tenantId, machineid: eqpCode } }).then((res) => { |
| | | if (res && res.trendVo) { |
| | | //console.log(`output->re11s`, res) |
| | | // res.tempValue = [res.windTemp, 100] |
| | | //res.percent = ((res.dryTime / res.et) * 100).toFixed(2) |
| | | /**æ°´æ»´å¾å«æ°´é */ |
| | | res.mois = [ |
| | | (res.trendVo.moisture / 100).toFixed(2), |
| | | (res.trendVo.moisture / 100 / 1.5).toFixed(2), |
| | | (res.trendVo.moisture / 100 / 3).toFixed(2), |
| | | ] |
| | | |
| | | /**温度ç¯å½¢å¾ */ |
| | | |
| | | /**飿ºé¢çç¯å½¢å¾ */ |
| | | // if (fanFreqChart) { |
| | | // fanFreqChart.setOption({ |
| | | // series: [ |
| | | // { |
| | | // data: [ |
| | | // { |
| | | // value: res.trendVo.fanFrequency, |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // ], |
| | | // }) |
| | | // } |
| | | /**å¹²ç¥è¿åº¦ãèµ°å¿ä¸é¶æ®µæçåé¶æ®µæ¶è */ |
| | | if (res && res.detailList) { |
| | | var progressSeries = [] |
| | | |
| | | var zhengQiXiaoHao = [] |
| | | var dianNengXiaoHao = [] |
| | | var ganZaoXiaoLv = [] |
| | | var totalTime = 0 |
| | | var beforeWeight = 0 |
| | | res.moisList = [] |
| | | beforeWeight = res.originWeight |
| | | //console.log(`output->res`, res) |
| | | res.detailList.forEach((item) => { |
| | | //console.log(`output->bef`, beforeWeight) |
| | | //console.log(`output->cur`, item.weight) |
| | | res.moisList.push([item.totalTime, item.moisture]) |
| | | // console.log(`output->totalTime,item.totalTime`, totalTime, item.totalTime) |
| | | var curDryTime = item.totalTime - totalTime |
| | | |
| | | if (curDryTime > 0) { |
| | | progressSeries.push({ |
| | | name: item.moisture, |
| | | type: 'bar', |
| | | stack: 'total', |
| | | label: { |
| | | show: true, |
| | | }, |
| | | emphasis: { |
| | | focus: 'series', |
| | | }, |
| | | data: [item.totalTime - totalTime], |
| | | }) |
| | | ganZaoXiaoLv.push([curDryTime / 2 + totalTime, (((beforeWeight - item.weight) / curDryTime) * 60).toFixed(1)]) |
| | | |
| | | totalTime = item.totalTime |
| | | } |
| | | beforeWeight = item.weight |
| | | }) |
| | | |
| | | if (res.remain) { |
| | | if (res.dryTime - totalTime > 0) { |
| | | progressSeries.push({ |
| | | name: 'å½å', |
| | | type: 'bar', |
| | | stack: 'total', |
| | | label: { |
| | | show: true, |
| | | }, |
| | | emphasis: { |
| | | focus: 'series', |
| | | }, |
| | | data: [ |
| | | { |
| | | value: res.dryTime - totalTime, |
| | | }, |
| | | ], |
| | | }) |
| | | } |
| | | |
| | | // ganZaoXiaoLv.push([totalTime + res.remain,eqp.value.dryEfficiency]) |
| | | // console.log(`output->res.remain`, res.remain) |
| | | // console.log(`output->res.dryTime`, res.dryTime) |
| | | // console.log(`output->totalTime`, totalTime) |
| | | // å¹²ç¥å©ä½æ¶é´=å·¥åé¢è®¡å©ä½-ï¼å½åå¹²ç¥æ¶é´-æå䏿¬¡è®°å½å¹²ç¥æ¶é´ï¼ |
| | | res.totalRemain = res.remain - (res.dryTime - totalTime) > 0 ? res.remain - (res.dryTime - totalTime) : 0 |
| | | progressSeries.push({ |
| | | name: 'å©ä½', |
| | | type: 'bar', |
| | | stack: 'total', |
| | | label: { |
| | | show: true, |
| | | }, |
| | | emphasis: { |
| | | focus: 'series', |
| | | }, |
| | | data: [ |
| | | { |
| | | value: res.remain - (res.dryTime - totalTime), |
| | | itemStyle: { |
| | | color: '#c0c0c0', |
| | | }, |
| | | }, |
| | | ], |
| | | }) |
| | | } |
| | | |
| | | /**å¹²ç¥è¿åº¦ */ |
| | | |
| | | |
| | | res.totalTime = totalTime + res.remain |
| | | console.log("efficAvg::",res.efficAvg); |
| | | /**å¹²ç¥æçãæ¶è */ |
| | | |
| | | |
| | | res.moisList.push([res.dryTime, res.trendVo.moisture]) |
| | | } |
| | | |
| | | /**温度è¶å¿ */ |
| | | if (res && res.bellowsTemp) { |
| | | Array.from(Object.entries(res.bellowsTemp)) |
| | | var arr = Object.keys(res.bellowsTemp) |
| | | var temArr = [] |
| | | arr.forEach((item) => { |
| | | temArr.push([item * 1, res.bellowsTemp[item]]) |
| | | }) |
| | | |
| | | //console.log(`output->arr` + JSON.stringify(temArr)) |
| | | res.tempArr = temArr |
| | | } |
| | | |
| | | /**å¹²ç¥è¿ç¨è¶å¿ */ |
| | | if (moisChart) { |
| | | //console.log(`output->æ´æ°chart`) |
| | | moisChart.setOption({ |
| | | series: [ |
| | | { |
| | | data: res.moisList, |
| | | markLine: { |
| | | symbol: 'none', |
| | | data: [ |
| | | { |
| | | name: 'ç®æ ', |
| | | yAxis: res.target, |
| | | }, |
| | | ], |
| | | label: { |
| | | formatter: '{b}\n{c}%', |
| | | color: '#fff', |
| | | fontSize: 20, |
| | | }, |
| | | }, |
| | | }, |
| | | { |
| | | data: res.tempArr, |
| | | }, |
| | | ], |
| | | }) |
| | | } |
| | | |
| | | let lastTrend = res.detailList[res.detailList.length-1] |
| | | /**æç对æ¯å¾ */ |
| | | if (res.originWeight - lastTrend.weight <= 0) { |
| | | res.xiaolv = 0 |
| | | } else { |
| | | res.xiaolv = ((res.originWeight - lastTrend.weight) / lastTrend.totalTime) * 60 |
| | | } |
| | | res.xiaolv = Number(res.xiaolv) |
| | | //eqp.value.dryEfficiency = Number(eqp.value.dryEfficiency) |
| | | if (res.xiaolv > res.efficAvg) { |
| | | console.log("xiaolv:",res , eqp); |
| | | res.xlgood = true |
| | | res.xlsHeight = (res.efficAvg / res.xiaolv) * 100 + '%' |
| | | res.xlrHeight = '100%' |
| | | } else if (res.xiaolv < res.efficAvg * 0.9) { |
| | | res.xlbad = true |
| | | res.xlsHeight = '100%' |
| | | res.xlrHeight = (res.xiaolv / res.efficAvg) * 100 + '%' |
| | | } else { |
| | | res.xlsHeight = '100%' |
| | | res.xlrHeight = (res.xiaolv / res.efficAvg) * 100 + '%' |
| | | } |
| | | |
| | | /** è¸æ±½æ¶è */ |
| | | if (res.originWeight - lastTrend.weight <= 0) { |
| | | res.zhengqi = 0 |
| | | } else { |
| | | res.zhengqi = lastTrend.steam / (res.originWeight - lastTrend.weight) |
| | | } |
| | | res.zhengqi = Number(res.zhengqi) |
| | | //eqp.value.steamConsumption = Number(eqp.value.steamConsumption) |
| | | // res.zhengqi = eqp.value.steamConsumption - 3 |
| | | // console.log(res); |
| | | // console.log('zhengqi:', res.zhengqi); |
| | | if (res.zhengqi > res.steamAvg) { |
| | | res.zqbad = true |
| | | res.zqsHeight = (res.steamAvg / res.zhengqi) * 100 + '%' |
| | | res.zqrHeight = '100%' |
| | | } else if (res.zhengqi < res.steamAvg * 0.9) { |
| | | res.zqgood = true |
| | | res.zqsHeight = '100%' |
| | | res.zqrHeight = (res.zhengqi / res.steamAvg) * 100 + '%' |
| | | } else { |
| | | res.zqsHeight = '100%' |
| | | res.zqrHeight = (res.zhengqi / res.steamAvg) * 100 + '%' |
| | | } |
| | | |
| | | /** çµè½æ¶è */ |
| | | if (res.originWeight - lastTrend.weight <= 0) { |
| | | res.dian = 0 |
| | | } else { |
| | | res.dian = lastTrend.watt / (res.originWeight - lastTrend.weight) |
| | | } |
| | | // res.dian = eqp.value.powerConsumption - 1.5 |
| | | res.dian = Number(res.dian) |
| | | //eqp.value.powerConsumption = Number(eqp.value.powerConsumption) |
| | | if (res.dian > res.wattAvg) { |
| | | console.log("dian::", res.dian,res.wattAvg ) |
| | | res.dnbad = true |
| | | res.dnsHeight = (res.wattAvg / res.dian) * 100 + '%' |
| | | res.dnrHeight = '100%' |
| | | } else if (res.dian < res.wattAvg * 0.9) { |
| | | res.dngood = true |
| | | res.dnsHeight = '100%' |
| | | res.dnrHeight = (res.dian / res.wattAvg) * 100 + '%' |
| | | } else { |
| | | res.dnsHeight = '100%' |
| | | res.dnrHeight = (res.dian / res.wattAvg) * 100 + '%' |
| | | } |
| | | |
| | | //console.log('state:::fan::', res.state_fan, 'roller::', res.state_roller, 'windbox::', res.state_windbox) |
| | | //console.log('===========================') |
| | | //console.log("state:::state_windbox::", res.state_windbox); |
| | | |
| | | /**ç¶æ/gifå¨å¾ */ |
| | | if (!shangliaoFlag) { |
| | | if (res.orderStatus == 0) { |
| | | statusGif = 'zanting' |
| | | statusTxt = 'åå¤' |
| | | } else if (res.orderStatus == 1) { |
| | | //todo å®é
ç产ç¹å»ä¸é®å¹²ç¥åæä¼æå·¥åç¶æå䏿¥ï¼é£æ¶å·²ç»ä¸å®æï¼éè¦ç¡®è®¤å·¥åç¶æ |
| | | shangliaoFlag = true |
| | | statusGif = 'kaimen1' |
| | | statusTxt = '䏿' |
| | | setTimeout(chaiwangban, 4000) |
| | | } else if (res.orderStatus == 2) { |
| | | statusTxt = res.level |
| | | statusGif = 'zanting' |
| | | if (res.level === 'åå¤é¶æ®µ') { |
| | | console.log("åå¤é¶æ®µ" + statusGif); |
| | | statusGif = 'zanting' |
| | | } else if (res.level === 'å¹²ç¥é¶æ®µ' || res.level === 'æ£å¨å¹²ç¥') { |
| | | statusGif = 'tmrefeng2' |
| | | } else if (res.level === 'ç¿»æé¶æ®µ') { |
| | | statusGif = 'fanliao-N' |
| | | } else if (res.level === 'åºæé¶æ®µ') { |
| | | statusGif = 'chuliao-N' |
| | | } |
| | | // if (res.state_fan == 1) { |
| | | // statusGif = 'tmrefeng2' |
| | | // statusTxt = 'æ£å¨å¹²ç¥' |
| | | // } |
| | | |
| | | // if (res.state_roller == 4) { |
| | | // statusGif = 'fanliao-N' |
| | | // statusTxt = 'æ£å¨ç¿»æ' |
| | | // } |
| | | |
| | | // if (res.state_roller == 5) { |
| | | // statusGif = 'chuliao-N' |
| | | // statusTxt = 'æ£å¨åºæ' |
| | | // } |
| | | |
| | | // if (res.state_windbox == 2 || res.state_windbox == 3) { |
| | | // statusGif = 'fengxiangsheng-1' |
| | | // statusTxt = 'æ£å¨å¹²ç¥' |
| | | // } |
| | | } else if (res.orderStatus == 3) { |
| | | statusGif = 'zanting' |
| | | statusTxt = 'æå' |
| | | } else if (res.orderStatus == 4) { |
| | | statusGif = 'zanting' |
| | | statusTxt = 'å¹²ç¥å®æ' |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | res.herbImage = 'yaocai1.png' |
| | | |
| | | if (res.herbName == 'ç½è±èèè') { |
| | | res.herbImage = 'baihuasheshecao.png' |
| | | } else if (res.herbName == 'ç³¥ç¨»æ ¹') { |
| | | res.herbImage = 'nuodaogen.png' |
| | | } else if (res.herbName == 'æ·«ç¾è¿') { |
| | | res.herbImage = 'yinyanghuo.png' |
| | | } else if (res.herbName == '马齿è') { |
| | | res.herbImage = 'machixian.png' |
| | | } else if (res.herbName == '墨æ±è²') { |
| | | res.herbImage = 'mohanlian.png' |
| | | } else if (res.herbName == 'æ¡ç½ç®') { |
| | | res.herbImage = 'sangbaipi.png' |
| | | } |
| | | |
| | | |
| | | if (res.fault) { |
| | | res.isError = true |
| | | res.errorMsg = res.fault; |
| | | const faults = res.fault; |
| | | console.log('errorMsg:', res.fault) |
| | | if (faults.includes('æ¥åæ¥è¦')) { |
| | | shebeijiting.value = true; |
| | | } else { |
| | | shebeijiting.value = false; |
| | | } |
| | | if (faults.includes('左忥å')) { |
| | | zuoqianjiting.value = true; |
| | | } else { |
| | | zuoqianjiting.value = false; |
| | | } |
| | | if (faults.includes('颿¿æ¥å')) { |
| | | mianbanjiting.value = true; |
| | | } else { |
| | | mianbanjiting.value = false; |
| | | } |
| | | if (faults.includes('åºææ¥å')) { |
| | | chuliaojiting.value = true; |
| | | } else { |
| | | chuliaojiting.value = false; |
| | | } |
| | | if (faults.includes('温度失æ§')) { |
| | | wendubaojing.value = true; |
| | | } else { |
| | | wendubaojing.value = false; |
| | | } |
| | | if (faults.includes('æ»çå')) { |
| | | guntongsheng.value = true; |
| | | } else { |
| | | guntongjiang.value = false; |
| | | } |
| | | if (faults.includes('æ»çé')) { |
| | | guntongjiang.value = true; |
| | | } else { |
| | | guntongjiang.value = false; |
| | | } |
| | | if (faults.includes('æ»ççµæºè¿æµ')) { |
| | | guntongguoliu.value = true; |
| | | } else { |
| | | guntongguoliu.value = false; |
| | | } |
| | | if (faults.includes('é£ç®±å')) { |
| | | fengxiangsheng.value = true; |
| | | } else { |
| | | fengxiangsheng.value = false; |
| | | } |
| | | if (faults.includes('é£ç®±é')) { |
| | | fengxiangjiang.value = true; |
| | | } else { |
| | | fengxiangjiang.value = false; |
| | | } |
| | | if (faults.includes('é£ç®±é£æºè¿æµ')) { |
| | | fengjiguoliu.value = true; |
| | | } else { |
| | | fengjiguoliu.value = false; |
| | | } |
| | | } |
| | | else { |
| | | res.isError = false |
| | | shebeijiting.value = false |
| | | chuliaojiting.value = false |
| | | zuoqianjiting.value = false |
| | | mianbanjiting.value = false |
| | | fengxiangsheng.value = false |
| | | fengxiangjiang.value = false |
| | | fengjiguoliu.value = false |
| | | guntongsheng.value = false |
| | | guntongjiang.value = false |
| | | guntongguoliu.value = false |
| | | wendubaojing.value = false |
| | | } |
| | | |
| | | if (res.warning) { |
| | | res.isWarning = true |
| | | res.warnMsg = res.warning |
| | | const warnings = res.warning; |
| | | console.log('warnMsg:', res.warning) |
| | | if (warnings.includes('å·¦åé¨')) { |
| | | zuoqianmen.value = true; |
| | | } else { |
| | | zuoqianmen.value = false; |
| | | } |
| | | if (warnings.includes('å³åé¨')) { |
| | | youqianmen.value = true; |
| | | } else { |
| | | youqianmen.value = false; |
| | | } |
| | | if (warnings.includes('å·¦åé¨')) { |
| | | zuohoumen.value = true; |
| | | } else { |
| | | zuohoumen.value = false; |
| | | } |
| | | if (warnings.includes('å³åé¨')) { |
| | | youhoumen.value = true; |
| | | } else { |
| | | youhoumen.value = false; |
| | | } |
| | | if (warnings.includes('æ»çä¸å¨é«ä½')) { |
| | | guntongbuzaigaowei.value = true; |
| | | } else { |
| | | guntongbuzaigaowei.value = false; |
| | | } |
| | | if (warnings.includes('é£ç®±ä¸å¨ä½ä½')) { |
| | | fengxiangbuzaidiwei.value = true; |
| | | } else { |
| | | fengxiangbuzaidiwei.value = false; |
| | | } |
| | | if (warnings.includes('é£ç®±ä¸å¨é«ä½')) { |
| | | fengxiangbuzaigaowei.value = true; |
| | | } else { |
| | | fengxiangbuzaigaowei.value = false; |
| | | } |
| | | if (warnings.includes('å çä½ä¼ æå¨')) { |
| | | jiareweichuanganqi.value = true; |
| | | } else { |
| | | jiareweichuanganqi.value = false; |
| | | } |
| | | if (warnings.includes('å·¦åé£ç®±é«ä½ä¼ æå¨')) { |
| | | zuoqianfengxianggaowei.value = true; |
| | | } else { |
| | | zuoqianfengxianggaowei.value = false; |
| | | } |
| | | if (warnings.includes('å³åé£ç®±é«ä½ä¼ æå¨')) { |
| | | youqianfengxianggaowei.value = true; |
| | | } else { |
| | | youqianfengxianggaowei.value = false; |
| | | } |
| | | if (warnings.includes('å·¦åé£ç®±é«ä½ä¼ æå¨')) { |
| | | zuohoufengxianggaowei.value = true; |
| | | } else { |
| | | zuohoufengxianggaowei.value = false; |
| | | } |
| | | if (warnings.includes('å³åé£ç®±é«ä½ä¼ æå¨')) { |
| | | youhoufengxianggaowei.value = true; |
| | | } else { |
| | | youhoufengxianggaowei.value = false; |
| | | } |
| | | if (warnings.includes('å·¦åé£ç®±ä½ä½ä¼ æå¨')) { |
| | | zuoqianfengxiangdiwei.value = true; |
| | | } else { |
| | | zuoqianfengxiangdiwei.value = false; |
| | | } |
| | | if (warnings.includes('å³åé£ç®±ä½ä½ä¼ æå¨')) { |
| | | youqianfengxiangdiwei.value = true; |
| | | } else { |
| | | youqianfengxiangdiwei.value = false; |
| | | } |
| | | if (warnings.includes('å·¦åé£ç®±ä½ä½ä¼ æå¨')) { |
| | | zuohoufengxiangdiwei.value = true; |
| | | } else { |
| | | zuohoufengxiangdiwei.value = false; |
| | | } |
| | | if (warnings.includes('å³åé£ç®±ä½ä½ä¼ æå¨')) { |
| | | youhoufengxiangdiwei.value = true; |
| | | } else { |
| | | youhoufengxiangdiwei.value = false; |
| | | } |
| | | if (warnings.includes('左忻çä½ä½ä¼ æå¨')) { |
| | | zuoqianguntongdiwei.value = true; |
| | | } else { |
| | | zuoqianguntongdiwei.value = false; |
| | | } |
| | | if (warnings.includes('å³åæ»çä½ä½ä¼ æå¨')) { |
| | | youqianguntongdiwei.value = true; |
| | | } else { |
| | | youqianguntongdiwei.value = false; |
| | | } |
| | | if (warnings.includes('左忻çä½ä½ä¼ æå¨')) { |
| | | zuohouguntongdiwei.value = true; |
| | | } else { |
| | | zuohouguntongdiwei.value = false; |
| | | } |
| | | if (warnings.includes('å³åæ»çä½ä½ä¼ æå¨')) { |
| | | youhouguntongdiwei.value = true; |
| | | } else { |
| | | youhouguntongdiwei.value = false; |
| | | } |
| | | } |
| | | else { |
| | | res.isWarning = false |
| | | zuoqianmen.value = false; |
| | | zuohoumen.value = false; |
| | | youqianmen.value = false; |
| | | youhoumen.value = false; |
| | | guntongbuzaigaowei.value = false; |
| | | fengxiangbuzaigaowei.value = false; |
| | | fengxiangbuzaidiwei.value = false; |
| | | jiareweichuanganqi.value = false; |
| | | zuoqianfengxianggaowei.value = false; |
| | | zuohoufengxianggaowei.value = false; |
| | | youqianfengxianggaowei.value = false; |
| | | youhoufengxianggaowei.value = false; |
| | | zuoqianfengxiangdiwei.value = false; |
| | | zuohoufengxiangdiwei.value = false; |
| | | youqianfengxiangdiwei.value = false; |
| | | youhoufengxiangdiwei.value = false; |
| | | zuoqianguntongdiwei.value = false; |
| | | zuohouguntongdiwei.value = false; |
| | | youqianguntongdiwei.value = false; |
| | | youhouguntongdiwei.value = false; |
| | | } |
| | | isError.value = res.isError |
| | | isWarning.value = res.isWarning |
| | | } else { |
| | | res = { |
| | | mois: [], |
| | | gif: 'tmrefeng2', |
| | | herbImage: 'yaocai1.png', |
| | | } |
| | | } |
| | | |
| | | // console.log(`output->res`, res.detailList[res.detailList.length-1]) |
| | | realData.value = res |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | function back() { |
| | | router.back() |
| | | } |
| | | |
| | | listAllEqp() |
| | | //queryEqp() |
| | | // DOMæè½½å®æå渲æå¾è¡¨ |
| | | onMounted(() => { |
| | | Timer.value = setInterval(queryRealTime, 3000) |
| | | |
| | | }) |
| | | |
| | | onUnmounted(() => { |
| | | clearInterval(Timer.value) |
| | | |
| | | Timer.value = null |
| | | |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .eqpBox { |
| | | height: 100%; |
| | | } |
| | | .eqpRow { |
| | | } |
| | | .eqpImage { |
| | | height: 1080px; |
| | | width: 1920px; |
| | | background-image: url(/src/assets/images/dry/bg.png); |
| | | background-repeat: no-repeat; |
| | | color: white; |
| | | /*background-position: 160px 280px; */ |
| | | /* background-color: red; */ |
| | | background-size: 120%; |
| | | padding: 10px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | align-content: flex-start; |
| | | } |
| | | |
| | | .leftEqp { |
| | | height: 1080px; |
| | | width: 945px; |
| | | border: 1px solid black; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | align-content: flex-start; |
| | | |
| | | /* background-color: white; |
| | | background-image: url(/src/assets/images/dry/shebei1.png); |
| | | background-repeat: no-repeat; |
| | | background-size: 125%; |
| | | border-radius: 10px; |
| | | background-position: -119px 293px; */ |
| | | } |
| | | |
| | | .leftTop { |
| | | height: 990px; |
| | | width: 945px; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-content: flex-start; |
| | | //background-image: url(/src/assets/images/dry/ganzaoji-x.png); |
| | | background-repeat: no-repeat; |
| | | background-size: 79%; |
| | | border-radius: 10px; |
| | | flex-wrap: wrap; |
| | | background-position: 85px 279px; |
| | | } |
| | | .leftMid { |
| | | width: 850px; |
| | | height: 300px; |
| | | /* border: 1px solid; */ |
| | | margin-top: 10px; |
| | | border-radius: 10px; |
| | | /* background: white; */ |
| | | } |
| | | .mainInfo { |
| | | line-height: 33px; |
| | | padding-left: 10px; |
| | | font-size: 30px; |
| | | color: white; |
| | | } |
| | | .subhead { |
| | | color: #a19f9c; |
| | | font-size: 16px; |
| | | padding-left: 10px; |
| | | } |
| | | |
| | | .mainInfo2 { |
| | | line-height: 20px; |
| | | padding-left: 0px; |
| | | font-size: 16px; |
| | | } |
| | | .subhead2 { |
| | | color: #a19f9c; |
| | | font-size: 10px; |
| | | padding-left: 0px; |
| | | } |
| | | .zhengqi { |
| | | height: 180px; |
| | | width: 200px; |
| | | background-image: url(/src/assets/images/dry/liuliangji.png); |
| | | background-repeat: no-repeat; |
| | | background-size: 160px; |
| | | /* border-radius: 10px; */ |
| | | background-position: 17px -6px; |
| | | } |
| | | |
| | | .liuliangji { |
| | | } |
| | | .leftData { |
| | | height: 250px; |
| | | width: 120px; |
| | | } |
| | | .rightChart { |
| | | height: 270px; |
| | | width: 170px; |
| | | margin-top: -30px; |
| | | } |
| | | .leftTop0 { |
| | | height: 400px; |
| | | width: 500px; |
| | | padding-left: 10px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-content: flex-start; |
| | | flex-wrap: wrap; |
| | | } |
| | | .leftTop1 { |
| | | width: 250px; |
| | | height: 200px; |
| | | text-align: center; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 30px; |
| | | color: #727272; |
| | | } |
| | | .leftTop2 { |
| | | width: 250px; |
| | | height: 200px; |
| | | text-align: center; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 30px; |
| | | color: #727272; |
| | | } |
| | | .leftTop3 { |
| | | width: 340px; |
| | | height: 200px; |
| | | /* background-image: url(/src/assets/images/dry/fanliao.gif); */ |
| | | background-repeat: no-repeat; |
| | | background-position: 0px 20px; |
| | | background-size: 300px; |
| | | border-radius: 50px; |
| | | } |
| | | |
| | | .ganzaoji { |
| | | background-repeat: no-repeat; |
| | | background-position: 110px 15px; |
| | | background-size: 685px; |
| | | width: 960px; |
| | | height: 440px; |
| | | position: absolute; |
| | | } |
| | | |
| | | .eqpStatus { |
| | | width: 960px; |
| | | |
| | | } |
| | | .rightInfo { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | align-content: flex-start; |
| | | height: 1060px; |
| | | width: 700px; |
| | | } |
| | | |
| | | .rightTop { |
| | | display: flex; |
| | | height: 300px; |
| | | padding-left: 10px; |
| | | } |
| | | .rightTwo { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .infoChart { |
| | | width: 340px; |
| | | height: 300px; |
| | | /* background: white; */ |
| | | margin-left: 10px; |
| | | margin-top: 10px; |
| | | border-radius: 10px; |
| | | } |
| | | .chartTittle { |
| | | width: 340px; |
| | | height: 30px; |
| | | font-size: 16px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 15px 15px; |
| | | } |
| | | .chartInfo { |
| | | width: 60px; |
| | | height: 180px; |
| | | } |
| | | |
| | | .compareBar { |
| | | width: 55px; |
| | | height: 140px; |
| | | } |
| | | .margintop-30 { |
| | | margin-top: -30px; |
| | | } |
| | | |
| | | .barTop { |
| | | width: 55px; |
| | | height: 30px; |
| | | } |
| | | .barBack { |
| | | width: 30px; |
| | | height: 100px; |
| | | /* border: 1px solid black; */ |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | align-content: flex-end; |
| | | } |
| | | .barDiv { |
| | | width: 100%; |
| | | |
| | | background-color: #1595ea; |
| | | } |
| | | .bad { |
| | | background-color: #973535; |
| | | } |
| | | .rightLabel { |
| | | width: 110px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | .label { |
| | | color: white; |
| | | text-align: center; |
| | | width: 50px; |
| | | border-radius: 4px; |
| | | height: 20px; |
| | | font-size: 10px; |
| | | line-height: 21px; |
| | | } |
| | | .good { |
| | | background-color: #0d6e24; |
| | | } |
| | | |
| | | .mainInfo3 { |
| | | font-size: 24px; |
| | | } |
| | | .herbInfo { |
| | | width: 340px; |
| | | height: 440px; |
| | | color: #727272; |
| | | } |
| | | |
| | | .curEqp { |
| | | width: 340px; |
| | | height: 170px; |
| | | |
| | | /* background: white; |
| | | border-radius: 10px; */ |
| | | } |
| | | .curHerb { |
| | | margin-top: 10px; |
| | | width: 340px; |
| | | height: 260px; |
| | | /* background: white; |
| | | border-radius: 10px; */ |
| | | |
| | | background-repeat: no-repeat; |
| | | background-size: 200px; |
| | | background-position: 0px 10px; |
| | | } |
| | | .tempMoisChart { |
| | | width: 500px; |
| | | height: 300px; |
| | | /* background: white; */ |
| | | |
| | | padding: 20px; |
| | | border-radius: 10px; |
| | | } |
| | | .topLeft { |
| | | margin: 20px 40px 60px 20px; |
| | | padding: 15px; |
| | | /* background: white; */ |
| | | border-radius: 10px; |
| | | height: 325px; |
| | | width: 440px; |
| | | /* background-image: url(/src/assets/images/dry/yaocai.jpg); */ |
| | | background-repeat: no-repeat; |
| | | background-size: 164px 132px; |
| | | background-position: 239px 65px; |
| | | display: flex; |
| | | } |
| | | .topMid { |
| | | margin: 20px 20px 60px 40px; |
| | | /* background: white; */ |
| | | border-radius: 10px; |
| | | background-image: url(/src/assets/images/dry/fanliao.gif); |
| | | background-repeat: no-repeat; |
| | | background-position: 0px 20px; |
| | | background-size: 400px; |
| | | width: 400px; |
| | | |
| | | padding: 20px; |
| | | } |
| | | .topRight { |
| | | margin: 20px 20px 60px 20px; |
| | | /* background: white; */ |
| | | border-radius: 10px; |
| | | width: 700px; |
| | | padding: 20px; |
| | | } |
| | | .midLeft { |
| | | height: 450px; |
| | | width: 600px; |
| | | display: flex; |
| | | padding: 0 20px 20px 20px; |
| | | } |
| | | .midMid { |
| | | width: 500px; |
| | | padding-top: 50px; |
| | | } |
| | | |
| | | .midRight { |
| | | background-image: url(/src/assets/images/dry/fengjixz.gif); |
| | | background-repeat: no-repeat; |
| | | background-position: 150px 260px; |
| | | background-size: 120px 120px; |
| | | width: 600px; |
| | | } |
| | | |
| | | .shangJianTou { |
| | | margin-left: 140px; |
| | | width: 70px; |
| | | height: 100px; |
| | | background-image: url(/src/assets/images/dry/shangjiantoutou.gif); |
| | | background-repeat: no-repeat; |
| | | background-position: 0px 0px; |
| | | background-size: 70px 100px; |
| | | } |
| | | |
| | | .zoujiantou { |
| | | margin-left: 225px; |
| | | margin-top: 30px; |
| | | width: 100px; |
| | | height: 70px; |
| | | background-image: url(/src/assets/images/dry/zuojiantou.gif); |
| | | background-repeat: no-repeat; |
| | | background-position: 0px 0px; |
| | | background-size: 100px 70px; |
| | | } |
| | | .fault { |
| | | padding: 10px; |
| | | height: 60px; |
| | | font-size: 26px; |
| | | width: 100%; |
| | | text-align: right; |
| | | color: red; |
| | | } |
| | | .eqpName { |
| | | padding: 20px; |
| | | |
| | | height: 160px; |
| | | } |
| | | |
| | | .formula { |
| | | display: flex; |
| | | width: 340px; |
| | | height: 40px; |
| | | padding: 0 20px; |
| | | justify-content: space-around; |
| | | justify-items: center; |
| | | } |
| | | |
| | | .formulaItem { |
| | | display: flex; |
| | | justify-content: center; |
| | | width: 85px; |
| | | height: 40px; |
| | | } |
| | | |
| | | .eqpInfoText { |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | :deep() .ant-slider-mark-text { |
| | | padding-left: 15px; |
| | | font-size: 10px; |
| | | } |
| | | :deep() .ant-slider-mark-text::before { |
| | | content: ''; |
| | | display: block; |
| | | width: 6px; |
| | | height: 1px; |
| | | background-color: #1890ff; |
| | | |
| | | position: absolute; |
| | | top: 10px; |
| | | left: 0px; |
| | | } |
| | | :deep() .ant-slider-rail { |
| | | width: 10px !important; |
| | | border-radius: 6px 6px 0 0; |
| | | background: linear-gradient(to top, #ce0000 0%, #ce0000 40%, #ce0000 75%, rgb(160, 160, 160) 100%); |
| | | } |
| | | :deep() .ant-slider-track { |
| | | background: rgb(216, 216, 216); |
| | | |
| | | height: 20px; |
| | | width: 10px !important; |
| | | border-radius: 6px 6px 0 0; |
| | | } |
| | | :deep() .ant-slider-track:hover { |
| | | } |
| | | :deep() .ant-slider-handle { |
| | | display: none; |
| | | } |
| | | :deep() .ant-slider-dot { |
| | | display: none; |
| | | } |
| | | :deep() .ant-slider-step { |
| | | width: 10px !important; |
| | | } |
| | | :deep() .ant-slider-step > :first-child { |
| | | display: block !important; |
| | | width: 30px !important; |
| | | height: 30px !important; |
| | | bottom: -26px !important; |
| | | left: -6px; |
| | | border: none; |
| | | background: #ce0000; |
| | | } |
| | | :deep() .progress { |
| | | padding: 25px 25px; |
| | | |
| | | width: 360px; |
| | | display: flex; |
| | | } |
| | | :deep() .ant-progress-bg { |
| | | height: 25px !important; |
| | | } |
| | | .outDiv { |
| | | display: flex; |
| | | justify-content: center; |
| | | justify-items: center; |
| | | } |
| | | .blingbling { |
| | | -webkit-animation: scaleout 1.5s infinite ease-in-out; |
| | | animation: scaleout 1.5s infinite ease-in-out; |
| | | } |
| | | .center { |
| | | display: flex; |
| | | justify-content: center; |
| | | justify-items: center; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | text-align: center; |
| | | } |
| | | |
| | | .centerText { |
| | | width: 100%; |
| | | text-align: center; |
| | | } |
| | | |
| | | @-webkit-keyframes scaleout { |
| | | 0% { |
| | | -webkit-transform: scale(1); |
| | | } |
| | | |
| | | 100% { |
| | | -webkit-transform: scale(1.1); |
| | | opacity: 0; |
| | | } |
| | | } |
| | | |
| | | @keyframes scaleout { |
| | | 0% { |
| | | transform: scale(1); |
| | | -webkit-transform: scale(1); |
| | | } |
| | | |
| | | 100% { |
| | | transform: scale(1.1); |
| | | -webkit-transform: scale(1.1); |
| | | opacity: 0; |
| | | } |
| | | } |
| | | |
| | | .error-div { |
| | | position: absolute; display: flex; align-items: center; |
| | | } |
| | | .error-marker { |
| | | width: 18px; height: 18px; background: red; border-radius: 50%; |
| | | } |
| | | .error-msg { |
| | | margin-left: 6px; |
| | | height: 24px; |
| | | background: gray; border-radius: 5px; font-weight: bold; color: red |
| | | } |
| | | .warn-marker { |
| | | width: 18px; height: 18px; background: orange; border-radius: 50%; |
| | | } |
| | | .warn-msg { |
| | | margin-left: 6px; |
| | | height: 24px; |
| | | background: gray; border-radius: 5px; font-weight: bold; color: orange; |
| | | } |
| | | |
| | | :deep() .progress { |
| | | padding: 25px 25px; |
| | | |
| | | width: 360px; |
| | | display: flex; |
| | | } |
| | | :deep() .ant-progress-bg { |
| | | height: 36px !important; |
| | | } |
| | | :deep() .ant-progress-inner { |
| | | background-color: rgb(197 197 197 / 84%) !important; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import {defHttp} from '/src/utils/http/axios'; |
| | | import { useMessage } from "/src/hooks/web/useMessage"; |
| | | |
| | | const { createConfirm } = useMessage(); |
| | | |
| | | enum Api { |
| | | list = '/dry/dryRepairRecords/list', |
| | | save='/dry/dryRepairRecords/add', |
| | | edit='/dry/dryRepairRecords/edit', |
| | | deleteOne = '/dry/dryRepairRecords/delete', |
| | | deleteBatch = '/dry/dryRepairRecords/deleteBatch', |
| | | importExcel = '/dry/dryRepairRecords/importExcel', |
| | | exportXls = '/dry/dryRepairRecords/exportXls', |
| | | generateRepairNo = '/dry/dryRepairRecords/generateRepairNo', |
| | | } |
| | | /** |
| | | * 导åºapi |
| | | * @param params |
| | | */ |
| | | export const getExportUrl = Api.exportXls; |
| | | /** |
| | | * 导å
¥api |
| | | */ |
| | | export const getImportUrl = Api.importExcel; |
| | | /** |
| | | * å表æ¥å£ |
| | | * @param params |
| | | */ |
| | | export const list = (params) => |
| | | defHttp.get({url: Api.list, params}); |
| | | |
| | | /** |
| | | * å é¤å个 |
| | | */ |
| | | export const deleteOne = (params,handleSuccess) => { |
| | | return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { |
| | | handleSuccess(); |
| | | }); |
| | | } |
| | | /** |
| | | * æ¹éå é¤ |
| | | * @param params |
| | | */ |
| | | export const batchDelete = (params, handleSuccess) => { |
| | | createConfirm({ |
| | | iconType: 'warning', |
| | | title: '确认å é¤', |
| | | content: 'æ¯å¦å é¤é䏿°æ®', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk: () => { |
| | | return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { |
| | | handleSuccess(); |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | /** |
| | | * ä¿åæè
æ´æ° |
| | | * @param params |
| | | */ |
| | | export const saveOrUpdate = (params, isUpdate) => { |
| | | let url = isUpdate ? Api.edit : Api.save; |
| | | return defHttp.post({url: url, params}); |
| | | } |
| | | |
| | | /** |
| | | * çæç»´ä¿®åå· |
| | | */ |
| | | export const generateRepairNo = () => defHttp.get({url: Api.generateRepairNo}, { successMessageMode: 'none' }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import {BasicColumn} from '/@/components/Table'; |
| | | import {FormSchema} from '/@/components/Table'; |
| | | import { rules} from '/@/utils/helper/validator'; |
| | | import { render } from '/@/utils/common/renderUtils'; |
| | | import { rule } from 'postcss'; |
| | | //åè¡¨æ°æ® |
| | | export const columns: BasicColumn[] = [ |
| | | { |
| | | title: 'ç»´ä¿®åå·', |
| | | align:"center", |
| | | dataIndex: 'orderNumber' |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | align:"center", |
| | | dataIndex: 'equId_dictText' |
| | | }, |
| | | { |
| | | title: 'æ
éæ¶é´', |
| | | align:"center", |
| | | dataIndex: 'faultTime', |
| | | |
| | | }, |
| | | { |
| | | title: 'æ¥ä¿®äºº', |
| | | align:"center", |
| | | dataIndex: 'reporter' |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®å¼å§æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'startTime', |
| | | |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®ç»ææ¶é´', |
| | | align:"center", |
| | | dataIndex: 'endTime', |
| | | |
| | | }, |
| | | { |
| | | title: '维修人å', |
| | | align:"center", |
| | | dataIndex: 'technician' |
| | | }, |
| | | { |
| | | title: 'æ
éç±»å', |
| | | align:"center", |
| | | dataIndex: 'faultType', |
| | | customRender: ({text}) => { |
| | | const options = { |
| | | '0': 'æºæ¢°æ
é', |
| | | '1': 'çµæ°æ
é', |
| | | '2': 'å
¶ä»æ
é' |
| | | }; |
| | | return options[text] || text; |
| | | } |
| | | }, |
| | | { |
| | | title: 'æ
éæè¿°', |
| | | align:"center", |
| | | dataIndex: 'description' |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®æªæ½', |
| | | align:"center", |
| | | dataIndex: 'solution' |
| | | }, |
| | | { |
| | | title: 'æ´æ¢é
ä»¶', |
| | | align:"center", |
| | | dataIndex: 'parts' |
| | | }, |
| | | { |
| | | title: '维修费ç¨', |
| | | align:"center", |
| | | dataIndex: 'cost' |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®ç¶æ', |
| | | align:"center", |
| | | dataIndex: 'status', |
| | | customRender: ({text}) => { |
| | | const options = { |
| | | '0': 'å¾
ç»´ä¿®', |
| | | '1': 'ç»´ä¿®ä¸', |
| | | '2': '已宿' |
| | | }; |
| | | return options[text] || text; |
| | | } |
| | | }, |
| | | ]; |
| | | //æ¥è¯¢æ°æ® |
| | | export const searchFormSchema: FormSchema[] = [ |
| | | { |
| | | label: "设å¤ç¼å·", |
| | | field: 'equId', |
| | | component: 'JDictSelectTag', |
| | | componentProps:{ |
| | | dictCode:"dry_equipment,name,id" |
| | | }, |
| | | colProps: {span: 6}, |
| | | }, |
| | | { |
| | | label: 'æ
éæ¶é´', |
| | | field: 'faultTime', |
| | | component: 'DatePicker', |
| | | componentProps: { |
| | | showTime: true, |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss' |
| | | }, |
| | | }, |
| | | { |
| | | label: "æ¥ä¿®äºº", |
| | | field: 'reporter', |
| | | component: 'Input', |
| | | colProps: {span: 6}, |
| | | }, |
| | | { |
| | | label: "维修人å", |
| | | field: 'technician', |
| | | component: 'Input', |
| | | colProps: {span: 6}, |
| | | }, |
| | | { |
| | | label: "æ
éç±»å", |
| | | field: 'faultType', |
| | | component: 'Select', |
| | | componentProps:{ |
| | | options: [ |
| | | { label: 'æºæ¢°æ
é', value: '0' }, |
| | | { label: 'çµæ°æ
é', value: '1' }, |
| | | { label: 'å
¶ä»æ
é', value: '2' } |
| | | ] |
| | | }, |
| | | colProps: {span: 6}, |
| | | }, |
| | | { |
| | | label: "ç»´ä¿®ç¶æ", |
| | | field: 'status', |
| | | component: 'Select', |
| | | componentProps:{ |
| | | options: [ |
| | | { label: 'å¾
ç»´ä¿®', value: '0' }, |
| | | { label: 'ç»´ä¿®ä¸', value: '1' }, |
| | | { label: '已宿', value: '2' } |
| | | ] |
| | | }, |
| | | colProps: {span: 6}, |
| | | }, |
| | | ]; |
| | | //è¡¨åæ°æ® |
| | | export const formSchema: FormSchema[] = [ |
| | | { |
| | | label: 'ç»´ä¿®åå·', |
| | | field: 'orderNumber', |
| | | component: 'Input', |
| | | dynamicDisabled:true |
| | | }, |
| | | { |
| | | label: '设å¤ç¼å·', |
| | | field: 'equId', |
| | | component: 'JDictSelectTag', |
| | | componentProps:{ |
| | | dictCode:"dry_equipment,name,id" |
| | | }, |
| | | rules: [{ required: true, message: 'è¯·éæ©è®¾å¤ç¼å·' }], |
| | | }, |
| | | { |
| | | label: 'æ
éæ¶é´', |
| | | field: 'faultTime', |
| | | component: 'DatePicker', |
| | | componentProps: { |
| | | showTime: true, |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss' |
| | | }, |
| | | rules: [{ required: true, message: 'è¯·éæ©æ
éæ¶é´' }], |
| | | }, |
| | | { |
| | | label: 'æ¥ä¿®äºº', |
| | | field: 'reporter', |
| | | component: 'Input', |
| | | }, |
| | | { |
| | | label: 'ç»´ä¿®æ¶é´', |
| | | field: 'startTime', |
| | | component: 'DatePicker', |
| | | componentProps: { |
| | | showTime: true, |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss' |
| | | }, |
| | | dynamicRules: ({values}) => { |
| | | return [ |
| | | { required: true, |
| | | validator: (_, value) => { |
| | | const faultTime = values.faultTime; |
| | | if (faultTime && value && new Date(value).getTime() < new Date(faultTime).getTime()) { |
| | | return Promise.reject('ç»´ä¿®å¼å§æ¶é´ä¸è½æ©äºæ
éæ¶é´'); |
| | | } |
| | | return Promise.resolve(); |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | |
| | | }, |
| | | { |
| | | label: 'ç»ææ¶é´', |
| | | field: 'endTime', |
| | | component: 'DatePicker', |
| | | componentProps: { |
| | | showTime: true, |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss' |
| | | }, |
| | | dynamicRules: ({values}) => { |
| | | return [ |
| | | { required: true, |
| | | validator: (_, value) => { |
| | | const startTime = values.startTime; |
| | | if (startTime && value && new Date(value).getTime() < new Date(startTime).getTime()) { |
| | | return Promise.reject('ç»´ä¿®ç»ææ¶é´ä¸è½æ©äºç»´ä¿®å¼å§æ¶é´'); |
| | | } |
| | | return Promise.resolve(); |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | |
| | | }, |
| | | |
| | | { |
| | | label: '维修人å', |
| | | field: 'technician', |
| | | component: 'Input', |
| | | rules: [{ required: true, message: '请è¾å
¥ç»´ä¿®äººå' }], |
| | | }, |
| | | { |
| | | label: 'æ
éç±»å', |
| | | field: 'faultType', |
| | | component: 'Select', |
| | | componentProps:{ |
| | | options: [ |
| | | { label: 'æºæ¢°æ
é', value: '0' }, |
| | | { label: 'çµæ°æ
é', value: '1' }, |
| | | { label: 'å
¶ä»æ
é', value: '2' } |
| | | ] |
| | | }, |
| | | rules: [{ required: true, message: 'è¯·éæ©æ
éç±»å' }], |
| | | }, |
| | | { |
| | | label: 'æ
éæè¿°', |
| | | field: 'description', |
| | | component: 'InputTextArea', |
| | | }, |
| | | { |
| | | label: 'ç»´ä¿®æªæ½', |
| | | field: 'solution', |
| | | component: 'InputTextArea', |
| | | }, |
| | | { |
| | | label: 'æ´æ¢é
ä»¶', |
| | | field: 'parts', |
| | | component: 'InputTextArea', |
| | | }, |
| | | { |
| | | label: '维修费ç¨', |
| | | field: 'cost', |
| | | component: 'Input', |
| | | rules: [{ |
| | | pattern: /^\d+(\.\d+)?$/, |
| | | message: '请è¾å
¥æ°å', |
| | | trigger: 'blur' |
| | | }], |
| | | }, |
| | | { |
| | | label: 'ç»´ä¿®ç¶æ', |
| | | field: 'status', |
| | | component: 'Select', |
| | | componentProps:{ |
| | | options: [ |
| | | { label: 'å¾
ç»´ä¿®', value: '0' }, |
| | | { label: 'ç»´ä¿®ä¸', value: '1' }, |
| | | { label: '已宿', value: '2' } |
| | | ] |
| | | }, |
| | | }, |
| | | // TODO 主é®éèåæ®µï¼ç®ååæ»ä¸ºID |
| | | { |
| | | label: '', |
| | | field: 'id', |
| | | component: 'Input', |
| | | show: false |
| | | }, |
| | | ]; |
| | | |
| | | |
| | | |
| | | /** |
| | | * æµç¨è¡¨åè°ç¨è¿ä¸ªæ¹æ³è·åformSchema |
| | | * @param param |
| | | */ |
| | | export function getBpmFormSchema(_formData): FormSchema[]{ |
| | | // é»è®¤ååå§è¡¨åä¿æä¸è´ 妿æµç¨ä¸é
ç½®äºæéæ°æ®ï¼è¿ééè¦åç¬å¤çformSchema |
| | | return formSchema; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <!--å¼ç¨è¡¨æ ¼--> |
| | | <BasicTable @register="registerTable" :rowSelection="rowSelection"> |
| | | <!--ææ§½:tableæ é¢--> |
| | | <template #tableTitle> |
| | | <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> æ°å¢</a-button> |
| | | <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导åº</a-button> |
| | | <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导å
¥</j-upload-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <template #overlay> |
| | | <a-menu> |
| | | <a-menu-item key="1" @click="batchHandleDelete"> |
| | | <Icon icon="ant-design:delete-outlined"></Icon> |
| | | å é¤ |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </template> |
| | | <a-button>æ¹éæä½ |
| | | <Icon icon="mdi:chevron-down"></Icon> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </template> |
| | | <!--æä½æ --> |
| | | <template #action="{ record }"> |
| | | <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/> |
| | | </template> |
| | | <!--åæ®µåæ¾ææ§½--> |
| | | <template #htmlSlot="{text}"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | |
| | | <template #fileSlot="{text}"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span> |
| | | <a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">ä¸è½½</a-button> |
| | | </template> |
| | | </BasicTable> |
| | | <!-- 表ååºå --> |
| | | <DryRepairRecordsModal @register="registerModal" @success="handleSuccess"></DryRepairRecordsModal> |
| | | </div> |
| | | <!--åè¡¨è¡¨æ ¼tab--> |
| | | <a-tabs defaultActiveKey="1" style="margin: 10px"> |
| | | <a-tab-pane tab="使ç¨å¤ä»¶å表" key="1" forceRender> |
| | | <DrySpareStockLogListRepair /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <!-- 表ååºå --> |
| | | <DryRepairRecordsModal @register="registerModal" @success="handleSuccess"></DryRepairRecordsModal> |
| | | </template> |
| | | |
| | | <script lang="ts" name="dry-dryRepairRecords" setup> |
| | | import {ref, computed, unref, provide} from 'vue'; |
| | | import {BasicTable, useTable, TableAction} from '/@/components/Table'; |
| | | import {useModal} from '/@/components/Modal'; |
| | | import { useListPage } from '/@/hooks/system/useListPage' |
| | | import DryRepairRecordsModal from './components/DryRepairRecordsModal.vue' |
| | | import DrySpareStockLogListRepair from './DrySpareStockLogListRepair.vue'; |
| | | import {columns, searchFormSchema} from './DryRepairRecords.data'; |
| | | import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './DryRepairRecords.api'; |
| | | import { downloadFile } from '/@/utils/common/renderUtils'; |
| | | const checkedKeys = ref<Array<string | number>>([]); |
| | | const selectedRows = ref<Array<any>>([]); // æ°å¢ï¼ç¨äºåå¨éä¸çè¡æ°æ® |
| | | //注åmodel |
| | | const [registerModal, {openModal}] = useModal(); |
| | | //注åtableæ°æ® |
| | | const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ |
| | | tableProps:{ |
| | | title: '维修记å½', |
| | | api: list, |
| | | columns, |
| | | canResize:false, |
| | | formConfig: { |
| | | //labelWidth: 120, |
| | | schemas: searchFormSchema, |
| | | autoSubmitOnEnter:true, |
| | | showAdvancedButton:true, |
| | | fieldMapToNumber: [ |
| | | ], |
| | | fieldMapToTime: [ |
| | | ], |
| | | }, |
| | | actionColumn: { |
| | | width: 120, |
| | | fixed:'right' |
| | | }, |
| | | rowSelection: { |
| | | type: 'radio', |
| | | onChange: (selectedRowKeyList: (string | number)[], selectedRowList: any[]) => { |
| | | selectedRowKeys.value = selectedRowKeyList; |
| | | selectedRows.value = selectedRowList; // æ´æ°éä¸çè¡æ°æ® |
| | | }, |
| | | }, |
| | | customRow: (record) => { |
| | | return { |
| | | onClick: () => { |
| | | if (selectedRowKeys.value.includes(record.id)) { |
| | | selectedRowKeys.value = []; |
| | | selectedRows.value = []; |
| | | |
| | | } else { |
| | | selectedRowKeys.value = [record.id]; |
| | | selectedRows.value = [record]; |
| | | } |
| | | }, |
| | | }; |
| | | }, // ç¡®ä¿ä¸»è¡¨æ¯åé |
| | | }, |
| | | exportConfig: { |
| | | name:"维修记å½", |
| | | url: getExportUrl, |
| | | }, |
| | | importConfig: { |
| | | url: getImportUrl, |
| | | success: handleSuccess |
| | | }, |
| | | }) |
| | | |
| | | const [registerTable, {reload, updateTableDataRecord},{ rowSelection, selectedRowKeys }] = tableContext |
| | | |
| | | const orderNumber = computed(() => ( |
| | | unref(selectedRows).length > 0 ? unref(selectedRows)[0].orderNumber : '1')) // ä¿®æ¹ï¼ä¼ éorderNumberï¼å¦æä¸ºç©ºåä¼ é空å符串 |
| | | ; |
| | | //ä¸å orderNumber,åç»ä»¶æ¥æ¶ |
| | | provide('orderNumber', orderNumber); |
| | | |
| | | /** |
| | | * æ°å¢äºä»¶ |
| | | */ |
| | | function handleAdd() { |
| | | openModal(true, { |
| | | isUpdate: false, |
| | | showFooter: true, |
| | | }); |
| | | } |
| | | /** |
| | | * ç¼è¾äºä»¶ |
| | | */ |
| | | function handleEdit(record: Recordable) { |
| | | openModal(true, { |
| | | record, |
| | | isUpdate: true, |
| | | showFooter: true, |
| | | }); |
| | | } |
| | | /** |
| | | * 详æ
|
| | | */ |
| | | function handleDetail(record: Recordable) { |
| | | openModal(true, { |
| | | record, |
| | | isUpdate: true, |
| | | showFooter: false, |
| | | }); |
| | | } |
| | | /** |
| | | * å é¤äºä»¶ |
| | | */ |
| | | async function handleDelete(record) { |
| | | await deleteOne({id: record.id}, handleSuccess); |
| | | } |
| | | /** |
| | | * æ¹éå é¤äºä»¶ |
| | | */ |
| | | async function batchHandleDelete() { |
| | | await batchDelete({ids: selectedRowKeys.value}, () => { |
| | | selectedRowKeys.value = []; |
| | | reload(); |
| | | }); |
| | | } |
| | | /** |
| | | * æååè° |
| | | */ |
| | | function handleSuccess() { |
| | | (selectedRowKeys.value = []) && reload(); |
| | | } |
| | | /** |
| | | * æä½æ |
| | | */ |
| | | function getTableAction(record){ |
| | | return [ |
| | | { |
| | | label: 'ç¼è¾', |
| | | onClick: handleEdit.bind(null, record), |
| | | }, |
| | | { |
| | | label: 'å é¤', |
| | | popConfirm: { |
| | | title: 'æ¯å¦ç¡®è®¤å é¤', |
| | | confirm: handleDelete.bind(null, record), |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | /** |
| | | * 䏿æä½æ |
| | | */ |
| | | function getDropDownAction(record){ |
| | | return [ |
| | | { |
| | | label: '详æ
', |
| | | onClick: handleDetail.bind(null, record), |
| | | } |
| | | ] |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | -- 注æï¼è¯¥é¡µé¢å¯¹åºçåå°ç®å½ä¸ºviews/dryæä»¶å¤¹ä¸ |
| | | -- å¦æä½ æ³æ´æ¹å°å
¶ä»ç®å½ï¼è¯·ä¿®æ¹sqlä¸componentåæ®µå¯¹åºçå¼ |
| | | |
| | | |
| | | INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) |
| | | VALUES ('2025072104372230580', NULL, '维修记å½', '/dry/dryRepairRecordsList', 'dry/maint/DryRepairRecordsList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2025-07-21 16:37:58', NULL, NULL, 0); |
| | | |
| | | -- æéæ§å¶sql |
| | | -- æ°å¢ |
| | | INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) |
| | | VALUES ('2025072104372230581', '2025072104372230580', 'æ·»å 维修记å½', NULL, NULL, 0, NULL, NULL, 2, 'dry:dry_repair_records:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-07-21 16:37:58', NULL, NULL, 0, 0, '1', 0); |
| | | -- ç¼è¾ |
| | | INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) |
| | | VALUES ('2025072104372230582', '2025072104372230580', 'ç¼è¾ç»´ä¿®è®°å½', NULL, NULL, 0, NULL, NULL, 2, 'dry:dry_repair_records:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-07-21 16:37:58', NULL, NULL, 0, 0, '1', 0); |
| | | -- å é¤ |
| | | INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) |
| | | VALUES ('2025072104372230583', '2025072104372230580', 'å é¤ç»´ä¿®è®°å½', NULL, NULL, 0, NULL, NULL, 2, 'dry:dry_repair_records:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-07-21 16:37:58', NULL, NULL, 0, 0, '1', 0); |
| | | -- æ¹éå é¤ |
| | | INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) |
| | | VALUES ('2025072104372230584', '2025072104372230580', 'æ¹éå é¤ç»´ä¿®è®°å½', NULL, NULL, 0, NULL, NULL, 2, 'dry:dry_repair_records:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-07-21 16:37:58', NULL, NULL, 0, 0, '1', 0); |
| | | -- 导åºexcel |
| | | INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) |
| | | VALUES ('2025072104372230585', '2025072104372230580', '导åºexcel_维修记å½', NULL, NULL, 0, NULL, NULL, 2, 'dry:dry_repair_records:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-07-21 16:37:58', NULL, NULL, 0, 0, '1', 0); |
| | | -- 导å
¥excel |
| | | INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) |
| | | VALUES ('2025072104372230586', '2025072104372230580', '导å
¥excel_维修记å½', NULL, NULL, 0, NULL, NULL, 2, 'dry:dry_repair_records:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-07-21 16:37:58', NULL, NULL, 0, 0, '1', 0); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="min-height: 400px"> |
| | | <BasicForm @register="registerForm"></BasicForm> |
| | | <div style="width: 100%;text-align: center" v-if="!formDisabled"> |
| | | <a-button @click="submitForm" pre-icon="ant-design:check" type="primary">æ 交</a-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import {BasicForm, useForm} from '/@/components/Form/index'; |
| | | import {computed, defineComponent} from 'vue'; |
| | | import {defHttp} from '/@/utils/http/axios'; |
| | | import { propTypes } from '/@/utils/propTypes'; |
| | | import {getBpmFormSchema} from '../DryRepairRecords.data'; |
| | | import {saveOrUpdate} from '../DryRepairRecords.api'; |
| | | |
| | | export default defineComponent({ |
| | | name: "DryRepairRecordsForm", |
| | | components:{ |
| | | BasicForm |
| | | }, |
| | | props:{ |
| | | formData: propTypes.object.def({}), |
| | | formBpm: propTypes.bool.def(true), |
| | | }, |
| | | setup(props){ |
| | | const [registerForm, { setFieldsValue, setProps, getFieldsValue }] = useForm({ |
| | | labelWidth: 150, |
| | | schemas: getBpmFormSchema(props.formData), |
| | | showActionButtonGroup: false, |
| | | baseColProps: {span: 12} |
| | | }); |
| | | |
| | | const formDisabled = computed(()=>{ |
| | | if(props.formData.disabled === false){ |
| | | return false; |
| | | } |
| | | return true; |
| | | }); |
| | | |
| | | let formData = {}; |
| | | const queryByIdUrl = '/dry/dryRepairRecords/queryById'; |
| | | async function initFormData(){ |
| | | let params = {id: props.formData.dataId}; |
| | | const data = await defHttp.get({url: queryByIdUrl, params}); |
| | | formData = {...data} |
| | | //设置表åçå¼ |
| | | await setFieldsValue(formData); |
| | | //é»è®¤æ¯ç¦ç¨ |
| | | await setProps({disabled: formDisabled.value}) |
| | | } |
| | | |
| | | async function submitForm() { |
| | | let data = getFieldsValue(); |
| | | let params = Object.assign({}, formData, data); |
| | | console.log('è¡¨åæ°æ®', params) |
| | | await saveOrUpdate(params, true) |
| | | } |
| | | |
| | | initFormData(); |
| | | |
| | | return { |
| | | registerForm, |
| | | formDisabled, |
| | | submitForm, |
| | | } |
| | | } |
| | | }); |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="896" @ok="handleSubmit"> |
| | | <BasicForm @register="registerForm"/> |
| | | </BasicModal> |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import {ref, computed, unref} from 'vue'; |
| | | import {BasicModal, useModalInner} from '/@/components/Modal'; |
| | | import {BasicForm, useForm} from '/@/components/Form/index'; |
| | | import {formSchema} from '../DryRepairRecords.data'; |
| | | import {saveOrUpdate, generateRepairNo} from '../DryRepairRecords.api'; |
| | | // Emits声æ |
| | | const emit = defineEmits(['register','success']); |
| | | const isUpdate = ref(true); |
| | | //表åé
ç½® |
| | | const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({ |
| | | //labelWidth: 150, |
| | | schemas: formSchema, |
| | | showActionButtonGroup: false, |
| | | baseColProps: {span: 12} |
| | | }); |
| | | //表åèµå¼ |
| | | const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => { |
| | | //é置表å |
| | | await resetFields(); |
| | | console.log("registerModal:::","repair") |
| | | setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter}); |
| | | isUpdate.value = !!data?.isUpdate; |
| | | if (unref(isUpdate)) { |
| | | //表åèµå¼ |
| | | await setFieldsValue({ |
| | | ...data.record, |
| | | }); |
| | | } else { |
| | | // æ°å¢æ¨¡å¼ä¸èªå¨çæç»´ä¿®åå· |
| | | const res = await generateRepairNo(); |
| | | console.log("è·åç»´ä¿®åå·resï¼ï¼",res); |
| | | await setFieldsValue({ |
| | | orderNumber: res |
| | | }); |
| | | } |
| | | // éèåºé¨æ¶ç¦ç¨æ´ä¸ªè¡¨å |
| | | setProps({ disabled: !data?.showFooter }) |
| | | }); |
| | | //设置æ é¢ |
| | | const title = computed(() => (!unref(isUpdate) ? 'æ°å¢' : 'ç¼è¾')); |
| | | //表åæäº¤äºä»¶ |
| | | async function handleSubmit(v) { |
| | | try { |
| | | let values = await validate(); |
| | | setModalProps({confirmLoading: true}); |
| | | //æäº¤è¡¨å |
| | | await saveOrUpdate(values, isUpdate.value); |
| | | //å
³éå¼¹çª |
| | | closeModal(); |
| | | //å·æ°å表 |
| | | emit('success'); |
| | | } finally { |
| | | setModalProps({confirmLoading: false}); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | /** æ¶é´åæ°åè¾å
¥æ¡æ ·å¼ */ |
| | | :deep(.ant-input-number){ |
| | | width: 100% |
| | | } |
| | | |
| | | :deep(.ant-calendar-picker){ |
| | | width: 100% |
| | | } |
| | | </style> |