Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop
| | |
| | | "vue-area-linkage": "^5.1.0", |
| | | "vue-calendar-component": "^2.8.2", |
| | | "vue-cropper": "^0.5.4", |
| | | "vue-drag-resize": "^1.5.4", |
| | | "vue-i18n": "^8.7.0", |
| | | "vue-loader": "^15.7.0", |
| | | "vue-ls": "^3.2.0", |
| | |
| | | import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | // -------------------------------------驱å¨åæ°ç®¡ç页é¢---------------------------------------- |
| | | // è·åæ§å¶ç³»ç»ç±»å |
| | | getDriveTypeApi:()=>getAction('/mdc/mdcDriveTypeParamConfig/getDriveParamOptions') |
| | | // -------------------------------------驱å¨åæ°ç®¡ç页é¢---------------------------------------- |
| | | // è·åæ§å¶ç³»ç»ç±»å |
| | | getDriveTypeApi: () => getAction('/mdc/mdcDriveTypeParamConfig/getDriveParamOptions'), |
| | | // -------------------------------------车é´çæ¿é¡µé¢---------------------------------------- |
| | | // é¦é¡µè·å大å±å
¥å£è½¦é´å表 |
| | | getWorkshopListInHomePageApi: () => getAction('/mdc/mdcWorkshopInfo/getWorkshopList'), |
| | | // æ ¹æ®è½¦é´idæ¥è¯¢è®¾å¤å表 |
| | | getDeviceListByWorkshopIdApi: params => getAction('/mdc/mdcWorkshopInfo/workshopEquipmentList', params), |
| | | // æ ¹æ®è½¦é´idæ¥è¯¢è½¦é´è¯¦ç»ä¿¡æ¯ |
| | | getWorkshopDetailByWorkshopIdApi: id => getAction('/mdc/mdcWorkshopInfo/queryById', { id }), |
| | | // æ ¹æ®è½¦é´idæ¥è¯¢å¤§å±ä¿¡æ¯ |
| | | getDeviceListInWorkshopSignagePageApi: workshopId => getAction('/mdc/mdcWorkshopInfo/getBigScreenInfo', { workshopId }), |
| | | // ä¿å大å±è½¦é´è®¾å¤åæ 大å°ä¿¡æ¯ |
| | | saveDevicePositionAndSizeApi: params => putAction('/mdc/mdcWorkshopInfo/saveEquipmentCoordinate', params), |
| | | // æ¥è¯¢è½¦é´å表 |
| | | getWorkshopListApi: params => getAction('/mdc/mdcWorkshopInfo/list', params), |
| | | // æ°å¢è½¦é´ä¿¡æ¯ |
| | | addWorkshopApi: params => postAction('/mdc/mdcWorkshopInfo/add', params), |
| | | // ç¼è¾è½¦é´ä¿¡æ¯ |
| | | editWorkshopApi: params => putAction('/mdc/mdcWorkshopInfo/edit', params), |
| | | // å é¤å个车é´ä¿¡æ¯ |
| | | deleteSingleWorkshopApi: id => deleteAction('/mdc/mdcWorkshopInfo/delete', { id }), |
| | | // æ¹éå é¤è½¦é´ä¿¡æ¯ |
| | | deleteBatchWorkshopApi: ids => deleteAction('/mdc/mdcWorkshopInfo/deleteBatch', { ids }), |
| | | // æ°å¢å¤§å±è½¦é´å设å¤å
³ç³» |
| | | addDeviceInWorkshopApi: params => postAction('/mdc/mdcWorkshopInfo/addWorkshopEquipment', params), |
| | | // å é¤å个大å±è½¦é´å设å¤å
³ç³» |
| | | deleteSingleDeviceInWorkshopApi: params => deleteAction('/mdc/mdcWorkshopInfo/deleteWorkshopEquipment', params), |
| | | // æ¹éå é¤å¤§å±è½¦é´å设å¤å
³ç³» |
| | | deleteBatchDeviceInWorkshopApi: params => deleteAction('/mdc/mdcWorkshopInfo/deleteWorkshopEquipmentBatch', params) |
| | | } |
| | |
| | | meta: { title: 'é¦é¡µ' }, |
| | | redirect: '/dashboard/analysis', |
| | | children: [ |
| | | |
| | | // // dashboard |
| | | // { |
| | | // path: '/dashboard', |
| | |
| | | ] |
| | | }, |
| | | { |
| | | path:'/testWorkshop', |
| | | component:()=>import('@/views/TestWorkshop.vue') |
| | | path:'/workshopSignage/:id', |
| | | component:()=>import('@/views/WorkshopSignage.vue') |
| | | }, |
| | | { |
| | | path: '/404', |
| | |
| | | import dataV from '@jiaminghi/data-view' |
| | | Vue.use(dataV) |
| | | |
| | | import VueDragResize from "vue-drag-resize" |
| | | Vue.component('vue-drag-resize', VueDragResize) |
| | | |
| | | // import 'echarts-liquidfill' |
| | | Vue.prototype.$echarts = echarts |
| | | Vue.prototype.$qs = qs |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <dv-full-screen-container class="full-screen-container"> |
| | | <header class="page-header"> |
| | | {{ workshopDetails.workshopName }} |
| | | <div class="header-right" v-has="'home:saveDevicePositionAndSize'"> |
| | | <a-space> |
| | | <span v-if="!isSwitchChecked">å¼å¯åè½</span> |
| | | <span v-else>å
³éåè½</span> |
| | | <a-switch |
| | | checked-children="å¼" |
| | | un-checked-children="å
³" |
| | | @change="handleSwitchChange" |
| | | v-model="isSwitchChecked" |
| | | :disabled="isSwitchChecked" |
| | | /> |
| | | </a-space> |
| | | <a-button type="primary" icon="save" size="large" @click="saveDevicePositionAndSizeByApi">ä¿åä½ç½® </a-button> |
| | | </div> |
| | | </header> |
| | | |
| | | <dv-border-box-8> |
| | | <div class="content-container" ref="deviceContainerRef"> |
| | | <VueDragResize |
| | | v-for="(item, index) in deviceList" |
| | | :key="item.equipmentId" |
| | | :w="item.vw" |
| | | :h="item.vh" |
| | | :x="item.coordinateLeft" |
| | | :y="item.coordinateTop" |
| | | v-on:resizing="resize($event, index)" |
| | | v-on:dragging="resize($event, index)" |
| | | :parentLimitation="true" |
| | | :minw="100" |
| | | :minh="100" |
| | | :isDraggable="isDraggable" |
| | | :isResizable="isResizable" |
| | | :stickSize="6" |
| | | > |
| | | <div class="single-device" :style="{ width: item.vw + 'px', height: item.vh + 'px' }"> |
| | | <div class="device-status"> |
| | | <div |
| | | v-if="item.equipmentStatus == 2 || item.equipmentStatus == 1" |
| | | :style="{ backgroundImage: `url(${require('@/assets/yellow.png')})` }" |
| | | class="status-image" |
| | | ></div> |
| | | <div |
| | | v-if="item.equipmentStatus == 22" |
| | | :style="{ backgroundImage: `url(${require('@/assets/red.png')})` }" |
| | | class="status-image" |
| | | ></div> |
| | | <div |
| | | v-if="item.equipmentStatus == 0" |
| | | :style="{ backgroundImage: `url(${require('@/assets/gray.png')})` }" |
| | | class="status-image" |
| | | ></div> |
| | | <div |
| | | v-if="item.equipmentStatus == 3" |
| | | :style="{ backgroundImage: `url(${require('@/assets/green.png')})` }" |
| | | class="status-image" |
| | | ></div> |
| | | <div |
| | | :style="{ backgroundImage: `url(${getImgView(item.equipmentImage) || require('@/assets/8.png')})` }" |
| | | class="device-image" |
| | | ></div> |
| | | </div> |
| | | <div class="device-id" :style="{ fontSize: item.fontSize + 'px' }"> |
| | | {{ item.equipmentId }} |
| | | </div> |
| | | </div> |
| | | </VueDragResize> |
| | | <div class="device-status-info"> |
| | | <div v-for="item in deviceStatusList" :key="item.value" class="single-status-info"> |
| | | <div>{{ item.label }}</div> |
| | | <div class="status-square" :style="{ backgroundColor: item.color }"></div> |
| | | <div>{{ getDeviceNumberByStatus(item.value) }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </dv-border-box-8> |
| | | </dv-full-screen-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import VueDragResize from 'vue-drag-resize' |
| | | import api from '@/api/mdc' |
| | | import { getFileAccessHttpUrl } from '@/api/manage' |
| | | |
| | | export default { |
| | | components: { |
| | | VueDragResize, |
| | | }, |
| | | data() { |
| | | return { |
| | | workshopDetails: {}, // 车é´è¯¦ç»ä¿¡æ¯, |
| | | isDraggable: false, // æ¯å¦å¼å¯ææ½ |
| | | isResizable: false, // æ¯å¦å¼å¯ç¼©æ¾ |
| | | isSwitchChecked: false, // æ¯å¦å¼å¯åè½ |
| | | timingAcquisition: null, // 宿¶å·æ°æ¯å¦å¼å¯ |
| | | deviceList: [ |
| | | // { |
| | | // equipmentId: '123213213123232',// 设å¤ID |
| | | // equipmentImage: require('@/assets/8.png'), // 设å¤å¾ç |
| | | // coordinateTop: 200, // ææ½å
ç´ è·çåé¡¶è·ç¦» |
| | | // coordinateLeft: 100, // ææ½å
ç´ è·çå左侧è·ç¦» |
| | | // vw: 100, // 缩æ¾å
ç´ å®½åº¦ |
| | | // vh: 100, // 缩æ¾å
ç´ é«åº¦ |
| | | // fontSize: 12, // 缩æ¾å
ç´ åä½å¤§å° |
| | | // equipmentStatus: 1 // 设å¤ç¶æ 0:å
³æº 22:æ¥è¦ 2:å¾
æº 3:è¿è¡ 弿º:1ï¼æ²¡æåè²ç¯æ è¯å½ä¸ºå¾
æºï¼ |
| | | // } |
| | | ], // 设å¤ä¿¡æ¯å表 |
| | | deviceStatusList: [ |
| | | { |
| | | label: 'å
³æº', |
| | | value: 0, |
| | | color: '#A8A8A8', |
| | | }, |
| | | { |
| | | label: 'å¾
æº', |
| | | value: 2, |
| | | color: '#FFFF00', |
| | | }, |
| | | { |
| | | label: 'è¿è¡', |
| | | value: 3, |
| | | color: '#00EE00', |
| | | }, |
| | | { |
| | | label: 'æ¥è¦', |
| | | value: 22, |
| | | color: '#FF0000', |
| | | }, |
| | | ], // 设å¤ç¶ææç¤ºç¯å表 |
| | | } |
| | | }, |
| | | watch: { |
| | | isSwitchChecked: { |
| | | handler(newVal) { |
| | | if (!newVal) { |
| | | console.log('宿¶å¨å¼å¯ä¸') |
| | | this.timingAcquisition = setInterval(() => { |
| | | this.getDeviceListByApi(this.$route.params.id) |
| | | }, 2000) |
| | | } else { |
| | | console.log('å
³é宿¶å¨') |
| | | clearInterval(this.timingAcquisition) |
| | | this.timingAcquisition = null |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | }, |
| | | methods: { |
| | | /** |
| | | * éè¿è½¦é´Idè°ç¨æ¥å£è·å设å¤ä¿¡æ¯å表 |
| | | * @param id 车é´Id |
| | | */ |
| | | getDeviceListByApi(id) { |
| | | console.log('éæ°å·æ°') |
| | | api.getDeviceListInWorkshopSignagePageApi(id).then((res) => { |
| | | if (res.result && res.result.length > 0) { |
| | | this.deviceList = res.result |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * éè¿è½¦é´Idè°ç¨æ¥å£è·å车é´è¯¦ç»ä¿¡æ¯ |
| | | * @param id 车é´Id |
| | | */ |
| | | getWorkshopDetailsByApi(id) { |
| | | api.getWorkshopDetailByWorkshopIdApi(id).then((res) => { |
| | | this.workshopDetails = res.result |
| | | this.$refs.deviceContainerRef.style.backgroundImage = `url(${this.getImgView( |
| | | this.workshopDetails.backgroundImage |
| | | )})` |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * å¾çé¢è§ |
| | | * @param text å¾çå°å |
| | | */ |
| | | getImgView(text) { |
| | | if (text && text.indexOf(',') > 0) { |
| | | text = text.substring(0, text.indexOf(',')) |
| | | } |
| | | return getFileAccessHttpUrl(text) |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»ä¿åæé®è°ç¨æ¥å£ä¿åææ½åçä½ç½®ä¸è®¾å¤å¾æ 尺寸 |
| | | */ |
| | | saveDevicePositionAndSizeByApi() { |
| | | console.log('触åä¿å') |
| | | if (this.isOperatingDevice) { |
| | | api.saveDevicePositionAndSizeApi(this.deviceList).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message, |
| | | }) |
| | | this.isOperatingDevice = false |
| | | if (this.isSwitchChecked) { |
| | | this.isSwitchChecked = false |
| | | this.isResizable = !this.isResizable |
| | | this.isDraggable = !this.isDraggable |
| | | } |
| | | this.getDeviceListByApi(this.$route.params.id) |
| | | } |
| | | }) |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: '请å¼å¯åè½ååè¿è¡ä¿å', |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * è®¾å¤ææ½æç¼©æ¾æ¶è§¦åäºä»¶ |
| | | * @param newRect ææ½æç¼©æ¾åç尺寸åè·ç¦» |
| | | * @param index ææ½è®¾å¤å¨æ°ç»ä¸ç䏿 |
| | | */ |
| | | resize(newRect, index) { |
| | | // if (newRect.width > 100) { |
| | | // if (newRect.width / newRect.height < 2) { |
| | | // this.deviceList[index].fontSize = newRect.width / 10 |
| | | // } else { |
| | | // this.deviceList[index].fontSize = newRect.height / 5 |
| | | // } |
| | | // } else { |
| | | // this.deviceList[index].fontSize = 12 |
| | | // } |
| | | this.deviceList[index].vw = newRect.width |
| | | this.deviceList[index].vh = newRect.height |
| | | this.deviceList[index].coordinateTop = newRect.top |
| | | this.deviceList[index].coordinateLeft = newRect.left |
| | | }, |
| | | |
| | | /** |
| | | * æ ¹æ®è®¾å¤ç¶æå¼è·å对åºè®¾å¤æ°é |
| | | * @param value 设å¤ç¶æå¼ |
| | | * @returns {number} è®¾å¤æ°é |
| | | */ |
| | | getDeviceNumberByStatus(value) { |
| | | return this.deviceList.filter((item) => item.equipmentStatus === value).length |
| | | }, |
| | | |
| | | /** |
| | | * å¼å¯åè½è§¦åäºä»¶ |
| | | * @param checked å½åswitchç¶æï¼æ¯å¦å¼å¯ï¼åå§ä¸ºfalse |
| | | */ |
| | | handleSwitchChange(checked) { |
| | | this.isOperatingDevice = true |
| | | this.isResizable = !this.isResizable |
| | | this.isDraggable = !this.isDraggable |
| | | }, |
| | | }, |
| | | created() { |
| | | if (this.$route.params.id) { |
| | | this.getDeviceListByApi(this.$route.params.id) |
| | | this.getWorkshopDetailsByApi(this.$route.params.id) |
| | | } |
| | | }, |
| | | mounted() { |
| | | // ç¦æ¢ç¨æ·éä¸å
容 |
| | | document.onselectstart = () => false |
| | | }, |
| | | beforeDestroy() { |
| | | // ç¡®ä¿éæ¯å®æ¶å¨ååæ¶èµæº |
| | | clearInterval(this.timingAcquisition) |
| | | this.timingAcquisition = null |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | .full-screen-container { |
| | | background-image: url('../assets/Bj.jpg'); |
| | | background-size: 100% 100%; |
| | | color: #fff; |
| | | |
| | | .page-header { |
| | | height: 80px; |
| | | font-size: 50px; |
| | | text-align: center; |
| | | position: relative; |
| | | |
| | | .header-right { |
| | | width: 450px; |
| | | position: absolute; |
| | | right: 0px; |
| | | top: 35px; |
| | | display: flex; |
| | | justify-content: space-evenly; |
| | | align-items: center; |
| | | font-size: 16px; |
| | | } |
| | | } |
| | | |
| | | .content-container { |
| | | position: relative; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-repeat: no-repeat; |
| | | background-size: 100% 100%; |
| | | |
| | | .device-status-info { |
| | | width: 400px; |
| | | position: absolute; |
| | | top: 5px; |
| | | right: 5px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | |
| | | .single-status-info { |
| | | width: 60px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | |
| | | .status-square { |
| | | width: 14px; |
| | | height: 14px; |
| | | border: 1px solid #fff; |
| | | border-radius: 2px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .single-device { |
| | | position: absolute; |
| | | border: 1px solid transparent; |
| | | padding: 10px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | cursor: default; |
| | | |
| | | &:active { |
| | | border: 1px solid #1890ff; |
| | | } |
| | | |
| | | .device-status { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .status-image { |
| | | background-size: 100% 100%; |
| | | background-repeat: no-repeat; |
| | | width: 45px; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .device-image { |
| | | background-size: 100% 100%; |
| | | background-repeat: no-repeat; |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <!--<index-bdc v-if="indexStyle==2"></index-bdc>--> |
| | | <!--<index-task v-if="indexStyle==3"></index-task>--> |
| | | <!--<div style="width: 100%;text-align: right;margin-top: 20px">--> |
| | | <!--è¯·éæ©é¦é¡µæ ·å¼ï¼--> |
| | | <!--<!–<a-radio-group v-model="indexStyle">–>--> |
| | | <!--<!–<a-radio :value="1">ç»è®¡å¾è¡¨</a-radio>–>--> |
| | | <!--<!–<a-radio :value="2">ç»è®¡å¾è¡¨2</a-radio>–>--> |
| | | <!--<!–<a-radio :value="3">ä»»å¡è¡¨æ ¼</a-radio>–>--> |
| | | <!--<!–</a-radio-group>–>--> |
| | | <!--è¯·éæ©é¦é¡µæ ·å¼ï¼--> |
| | | <!--<!–<a-radio-group v-model="indexStyle">–>--> |
| | | <!--<!–<a-radio :value="1">ç»è®¡å¾è¡¨</a-radio>–>--> |
| | | <!--<!–<a-radio :value="2">ç»è®¡å¾è¡¨2</a-radio>–>--> |
| | | <!--<!–<a-radio :value="3">ä»»å¡è¡¨æ ¼</a-radio>–>--> |
| | | <!--<!–</a-radio-group>–>--> |
| | | <!--</div>--> |
| | | <a-button type="primary" @click="navigateToTestWorkshop">è·³è½¬è³æµè¯è½¦é´</a-button> |
| | | <a-button type="primary" size="large" v-for="item in workshopList" :key="item.workshopId" |
| | | @click="navigateToWorkshopSignage(item.id)">{{item.workshopName}} |
| | | </a-button> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import IndexChart from './IndexChart' |
| | | import IndexTask from "./IndexTask" |
| | | import IndexTask from './IndexTask' |
| | | import IndexBdc from './IndexBdc' |
| | | import api from '@/api/mdc' |
| | | |
| | | export default { |
| | | name: "Analysis", |
| | | name: 'Analysis', |
| | | components: { |
| | | IndexChart, |
| | | IndexTask, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | indexStyle:1 |
| | | indexStyle: 1, |
| | | workshopList: [ |
| | | { |
| | | workshopName: 'é¿æ²è½¦é´', |
| | | id: '5321' |
| | | }, |
| | | { |
| | | workshopName: '天津车é´', |
| | | id: '6312' |
| | | }, |
| | | { |
| | | workshopName: 'æ¦æ±è½¦é´', |
| | | id: '3463' |
| | | }, |
| | | { |
| | | workshopName: 'å京车é´', |
| | | id: '8421' |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | this.getWorkshopListByApi() |
| | | }, |
| | | methods: { |
| | | navigateToTestWorkshop(){ |
| | | const url=this.$router.resolve('/testWorkshop').href |
| | | window.open(url,'_blank') |
| | | /** |
| | | * éè¿è½¦é´Id跳转è³ç¸åºè½¦é´å¤§å±çæ¿ |
| | | * @param id 车é´Id |
| | | */ |
| | | navigateToWorkshopSignage(id) { |
| | | const url = this.$router.resolve(`/workshopSignage/${id}`).href |
| | | window.open(url, '_blank') |
| | | }, |
| | | /** |
| | | * è·å车é´å表 |
| | | */ |
| | | getWorkshopListByApi() { |
| | | api.getWorkshopListInHomePageApi().then(res => { |
| | | console.log('res', res) |
| | | if (res.result && res.result.length > 0) { |
| | | this.workshopList = res.result |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <a-card :bordered="false" class="device_list"> |
| | | <div :bordered="false" class="device_list"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | |
| | | <holiday-management-modal ref="modalForm" @ok="modalFormOk"></holiday-management-modal> |
| | | <holiday-management-modal-edit ref="modalFormedit" @ok="modalFormOk"></holiday-management-modal-edit> |
| | | |
| | | </a-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | <template> |
| | | <a-card :bordered="false" class="device_list"> |
| | | <div :bordered="false" class="device_list"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | |
| | | <!--<device-repair-model-add ref="modalFormadd" @ok="modalFormOk"></device-repair-model-add>--> |
| | | <!--<device-repair-model-edit ref="modalFormedit" @ok="modalFormOk"></device-repair-model-edit>--> |
| | | <!--<repair-model ref="repairModelFrom" @ok="modalFormOk"></repair-model>--> |
| | | |
| | | </a-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | name: 'è¿è¡æç', |
| | | type: 'pie', |
| | | radius: '70%', |
| | | center: ['55%', '55%'], |
| | | itemStyle: { |
| | | normal: { |
| | | color: function (params) { |
| | |
| | | <template> |
| | | <a-card :bordered="false" class="device_list"> |
| | | <div :bordered="false" class="device_list"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | |
| | | <!--<device-repair-model-edit ref="modalFormedit" @ok="modalFormOk"></device-repair-model-edit>--> |
| | | <!--<repair-model ref="repairModelFrom" @ok="modalFormOk"></repair-model>--> |
| | | |
| | | </a-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | <template> |
| | | <a-card :bordered="false" class="device_list"> |
| | | <div :bordered="false" class="device_list"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | |
| | | <plan-downtime-maintenance-modal ref="modalForm" @ok="modalFormOk"></plan-downtime-maintenance-modal> |
| | | <plan-downtime-maintenance-modal-edit ref="modalFormedit" @ok="modalFormOk"></plan-downtime-maintenance-modal-edit> |
| | | |
| | | </a-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | |
| | | <template> |
| | | <div class="efficiency_list" style="width: 100%;height: 100%;"> |
| | | <a-card :bordered="false"> |
| | | <div :bordered="false" style="height: 100%"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates"/> |
| | | <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" |
| | | v-model="dates"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :lg="2" :md="3" :sm="3" :xs="3"> |
| | |
| | | <div class="openRateTrendDg"> |
| | | <div id="Efficiency" class="container" style="margin-top: 20px;"> |
| | | <div class="table2"> |
| | | <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap;text-align: left;"> |
| | | <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" |
| | | style="white-space: nowrap;text-align: left;"> |
| | | <thead> |
| | | <tr class="thead fixed equipname"> |
| | | <th class="thgu dong1 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">æ¥è¦å·</th> |
| | | <th class="thgu dong2 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">åºç°æ¬¡æ°</th> |
| | | <th class="thgu dong3 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">å计æç»æ¶é´ï¼ç§ï¼</th> |
| | | <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">æ¥è¦ä¿¡æ¯</th> |
| | | <th class="thgu dong1 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">æ¥è¦å· |
| | | </th> |
| | | <th class="thgu dong2 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;"> |
| | | åºç°æ¬¡æ° |
| | | </th> |
| | | <th class="thgu dong3 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;"> |
| | | å计æç»æ¶é´ï¼ç§ï¼ |
| | | </th> |
| | | <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;"> |
| | | æ¥è¦ä¿¡æ¯ |
| | | </th> |
| | | <!--<template v-for="(tableHead, index) in tableHeads">--> |
| | | <!--<th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>--> |
| | | <!--<th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>--> |
| | | <!--</template>--> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr class="mathData" v-for="(item, index) in dataList" @click="TableDraw(index,item)"> |
| | | <td class="tdgu kaitou">{{item.alarmCode}}</td> |
| | | <td class="tdgu1 kaitou">{{item.count}}</td> |
| | | <td class="tdgu2 kaitou">{{item.timeCount}}</td> |
| | | <td class="tdgu3 kaitou">{{item.alarmContent}}</td> |
| | | <td class="tdgu kaitou">{{item.alarmCode}}</td> |
| | | <td class="tdgu1 kaitou">{{item.count}}</td> |
| | | <td class="tdgu2 kaitou">{{item.timeCount}}</td> |
| | | <td class="tdgu3 kaitou">{{item.alarmContent}}</td> |
| | | <!--<template v-for="(tableHead, index) in item.dataList">--> |
| | | <!--<td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td>--> |
| | | <!--<td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td>--> |
| | | <!--</template>--> |
| | | </tr> |
| | | </tbody> |
| | |
| | | <div id="MdcEquipmentWarningLine" style="height: 100%;width: 65%;"></div> |
| | | </div> |
| | | </div> |
| | | </a-card> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | JeecgListMixin |
| | | } from '@/mixins/JeecgListMixin' |
| | | |
| | | export default { |
| | | // mixins: [JeecgListMixin], |
| | | name: 'alarmAnalysisMain', |
| | |
| | | dataSource: [], |
| | | /* tableå è½½ç¶æ */ |
| | | loading: false, |
| | | typeTree: "", |
| | | typeTree: '', |
| | | typeParent: 1, |
| | | typeEquipment: 1, |
| | | TreeIDOne: 1, |
| | |
| | | alarmTrend: '/mdc/alarmAnalyze/alarmTrend' |
| | | }, |
| | | tableHeads: [], |
| | | pieDate:[0], |
| | | XData:[0], |
| | | YData:[0], |
| | | pieDate: [0], |
| | | XData: [0], |
| | | YData: [0] |
| | | } |
| | | }, |
| | | props: { nodeTree: '', Type: '', nodePeople: '' }, |
| | |
| | | this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)] |
| | | this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.queryParam.typeTree = "1" |
| | | this.queryParam.typeTree = '1' |
| | | this.loadData1() |
| | | |
| | | }, |
| | | mounted(){ |
| | | mounted() { |
| | | this.drawWrin() |
| | | }, |
| | | watch: { |
| | | Type(valmath) { |
| | | this.dataList = []; |
| | | this.dataList = [] |
| | | this.queryParam.typeTree = valmath |
| | | }, |
| | | nodeTree(val) { //çå¬currSelected ååï¼å°åååçæ°å¼ä¼ éç» getCurrSelected äºä»¶ |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | numBerTwo(value){ |
| | | numBerTwo(value) { |
| | | if (value) { |
| | | return parseFloat((value * 100).toFixed(2)) |
| | | } else { |
| | | return '0' |
| | | } |
| | | }, |
| | | TableDraw(key,val) { |
| | | TableDraw(key, val) { |
| | | let that = this |
| | | that.queryParam.alarmCode = val.alarmCode |
| | | console.log(this.queryParam) |
| | |
| | | that.YData = [] |
| | | getAction(that.url.alarmTrend, that.queryParam).then(res => { |
| | | if (res.success) { |
| | | for (var i = 0;i<res.result.equipmentCountList.length;i++){ |
| | | that.pieDate.push({name:res.result.equipmentCountList[i].key,value:res.result.equipmentCountList[i].count}) |
| | | for (var i = 0; i < res.result.equipmentCountList.length; i++) { |
| | | that.pieDate.push({ |
| | | name: res.result.equipmentCountList[i].key, |
| | | value: res.result.equipmentCountList[i].count |
| | | }) |
| | | } |
| | | for (var j = 0;j<res.result.dateCountList.length;j++){ |
| | | for (var j = 0; j < res.result.dateCountList.length; j++) { |
| | | that.XData.push(res.result.dateCountList[j].key) |
| | | that.YData.push(res.result.dateCountList[j].count) |
| | | } |
| | |
| | | }, |
| | | disabledDate(current) { |
| | | //Can not slect days before today and today |
| | | return current && current > moment().subtract('days', 1); |
| | | return current && current > moment().subtract('days', 1) |
| | | }, |
| | | initDeviceType(deviceList) { |
| | | let dictCode = 'mdc_equipmentType' |
| | |
| | | this.queryParam.endDate = v2[1] |
| | | }, |
| | | searchQuery() { |
| | | if (this.dates&&this.dates.length>0){ |
| | | if (this.queryParam.typeTree == "1") { |
| | | if (this.dates && this.dates.length > 0) { |
| | | if (this.queryParam.typeTree == '1') { |
| | | this.queryParam.parentId = this.queryParamEquip.parentId |
| | | this.queryParam.equipmentId = this.queryParamEquip.equipmentId |
| | | } else { |
| | | this.queryParam.parentId = this.queryParamPeople.parentId |
| | | this.queryParam.equipmentId = "" |
| | | this.queryParam.equipmentId = '' |
| | | } |
| | | this.loadData1() |
| | | } else{ |
| | | } else { |
| | | this.$notification.warning({ |
| | | message:'æç¤º', |
| | | description:'è¯·éæ©æ¶é´' |
| | | message: 'æç¤º', |
| | | description: 'è¯·éæ©æ¶é´' |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | }) |
| | | }, |
| | | drawWrin(){ |
| | | let equipmentWarningPie = this.$echarts.init(document.getElementById('MdcEquipmentWarningPie'), 'macarons'); |
| | | drawWrin() { |
| | | let equipmentWarningPie = this.$echarts.init(document.getElementById('MdcEquipmentWarningPie'), 'macarons') |
| | | let equipmentWarningPieOption = { |
| | | title: { |
| | | text: 'å设å¤åºç°æ¤æ¥è¦çæ¯ä¾', |
| | |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: "<br/>{b} : {c} ({d}%)" |
| | | formatter: '<br/>{b} : {c} ({d}%)' |
| | | }, |
| | | calculable: true, |
| | | series: [{ |
| | | type: 'pie', |
| | | radius: '60%', |
| | | center: ['55%', '55%'], |
| | | itemStyle: { |
| | | normal: { |
| | | /*color: function (params) { |
| | |
| | | } |
| | | } |
| | | }, |
| | | data:this.pieDate |
| | | data: this.pieDate |
| | | // data:[{name:'jjjjjjj',value:'2'}] |
| | | }] |
| | | }; |
| | | equipmentWarningPie.setOption(equipmentWarningPieOption,true); |
| | | let equipmentWarningLine = this.$echarts.init(document.getElementById('MdcEquipmentWarningLine'), 'macarons'); |
| | | } |
| | | equipmentWarningPie.setOption(equipmentWarningPieOption, true) |
| | | let equipmentWarningLine = this.$echarts.init(document.getElementById('MdcEquipmentWarningLine'), 'macarons') |
| | | let equipmentWarningLineOption = { |
| | | title : { |
| | | title: { |
| | | text: 'æ¯å¤©åºç°æ¤æ¥è¦çæ°éèµ°å¿', |
| | | x: 'center', |
| | | y: 'bottom' |
| | | }, |
| | | tooltip:{ |
| | | trigger: 'item' |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | calculable: true, |
| | | xAxis: [ |
| | | { |
| | | type: 'category', |
| | | show: true, |
| | | data:this.XData |
| | | data: this.XData |
| | | /*axisLabel :{ |
| | | interval:0 |
| | | }*/ |
| | |
| | | name: 'æ¥è¦æ°é', |
| | | type: 'line', |
| | | data: this.YData, |
| | | markPoint : { |
| | | data : [ |
| | | {type : 'max', name: 'æå¤§å¼'}, |
| | | {type : 'min', name: 'æå°å¼'} |
| | | markPoint: { |
| | | data: [ |
| | | { type: 'max', name: 'æå¤§å¼' }, |
| | | { type: 'min', name: 'æå°å¼' } |
| | | ] |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | equipmentWarningLine.setOption(equipmentWarningLineOption,true); |
| | | } |
| | | equipmentWarningLine.setOption(equipmentWarningLineOption, true) |
| | | } |
| | | } |
| | | } |
| | |
| | | .dataContent tr td { |
| | | height: 35px; |
| | | } |
| | | .dataContent .mathData:hover td{ |
| | | |
| | | .dataContent .mathData:hover td { |
| | | background-color: #e6f7ff; |
| | | } |
| | | |
| | | .dataContent .mathData td { |
| | | padding: 10px; |
| | | /*display: none;*/ |
| | | } |
| | | |
| | | .dataContent .mathData .td { |
| | | .dataContent .mathData td { |
| | | /*background-color: #ff9bd2;*/ |
| | | display: inline-block; |
| | | padding: 10px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .dataContent .mathData .tdd { |
| | | /*display: none;*/ |
| | | } |
| | | .table2{ |
| | | |
| | | .table2 { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: auto; |
| | | } |
| | | |
| | | /*tr th {*/ |
| | | /*height: 50px!important;*/ |
| | | /*}*/ |
| | |
| | | /*height: 50px!important;*/ |
| | | /*}*/ |
| | | .table2 thead tr th:first-child, |
| | | .table tbody tr .tdgu{ |
| | | .table tbody tr .tdgu { |
| | | position: sticky; |
| | | left: 0; |
| | | z-index: 1; |
| | | } |
| | | .table tbody tr .kaitou{ |
| | | |
| | | .table tbody tr .kaitou { |
| | | z-index: 1; |
| | | background-color: white; |
| | | } |
| | | .table tbody tr .tdgu1{ |
| | | |
| | | .table tbody tr .tdgu1 { |
| | | position: sticky; |
| | | left: 150px; |
| | | z-index: 2; |
| | | } |
| | | .table tbody tr .tdgu2{ |
| | | |
| | | .table tbody tr .tdgu2 { |
| | | position: sticky; |
| | | left: 300px; |
| | | z-index: 2; |
| | | } |
| | | .table tbody tr .tdgu3{ |
| | | |
| | | .table tbody tr .tdgu3 { |
| | | position: sticky; |
| | | left: 450px; |
| | | z-index: 2; |
| | | } |
| | | .table tbody tr .tdgu4{ |
| | | |
| | | .table tbody tr .tdgu4 { |
| | | position: sticky; |
| | | left: 550px; |
| | | z-index: 2; |
| | | } |
| | | .table tbody tr .tdgu5{ |
| | | |
| | | .table tbody tr .tdgu5 { |
| | | position: sticky; |
| | | left: 700px; |
| | | z-index: 2; |
| | | } |
| | | |
| | | .table2 thead tr .timeth, |
| | | .table2 thead tr .thgu { |
| | | .table2 thead tr .thgu { |
| | | position: sticky; |
| | | top:0; |
| | | top: 0; |
| | | z-index: 3; |
| | | } |
| | | .table2 thead .gudingth th{ |
| | | |
| | | .table2 thead .gudingth th { |
| | | position: sticky; |
| | | top: 32px; |
| | | z-index: 6!important; |
| | | z-index: 6 !important; |
| | | } |
| | | .table2 thead .equipname .name{ |
| | | |
| | | .table2 thead .equipname .name { |
| | | z-index: 3; |
| | | } |
| | | .table2 thead .equipname .dong1{ |
| | | |
| | | .table2 thead .equipname .dong1 { |
| | | z-index: 4; |
| | | left: 0; |
| | | /*border: 1px solid #000;*/ |
| | | } |
| | | .table2 thead .equipname .dong2{ |
| | | |
| | | .table2 thead .equipname .dong2 { |
| | | z-index: 5; |
| | | left: 150px; |
| | | } |
| | | .table2 thead .equipname .dong3{ |
| | | |
| | | .table2 thead .equipname .dong3 { |
| | | z-index: 5; |
| | | left: 300px; |
| | | } |
| | | .table2 thead .equipname .dong4{ |
| | | |
| | | .table2 thead .equipname .dong4 { |
| | | z-index: 5; |
| | | left: 450px; |
| | | } |
| | | .table2 thead .equipname .dong5{ |
| | | |
| | | .table2 thead .equipname .dong5 { |
| | | z-index: 5; |
| | | left: 550px; |
| | | } |
| | | .table2 thead .equipname .dong6{ |
| | | |
| | | .table2 thead .equipname .dong6 { |
| | | z-index: 5; |
| | | left: 700px; |
| | | } |
| | | |
| | | @media screen and (min-width: 1920px){ |
| | | #Efficiency{ |
| | | height: 337px!important; |
| | | @media screen and (min-width: 1920px) { |
| | | #Efficiency { |
| | | height: 337px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px){ |
| | | #Efficiency{ |
| | | height: 337px!important; |
| | | |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px) { |
| | | #Efficiency { |
| | | height: 337px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px){ |
| | | #Efficiency{ |
| | | height: 190px!important; |
| | | |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px) { |
| | | #Efficiency { |
| | | height: 190px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px){ |
| | | #Efficiency{ |
| | | height: 90px!important; |
| | | |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px) { |
| | | #Efficiency { |
| | | height: 90px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (max-width: 1280px){ |
| | | #Efficiency{ |
| | | height: 90px!important; |
| | | |
| | | @media screen and (max-width: 1280px) { |
| | | #Efficiency { |
| | | height: 90px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | #Efficiency .table_guding1{ |
| | | |
| | | #Efficiency .table_guding1 { |
| | | position: absolute; |
| | | overflow: hidden; |
| | | width: 500px; |
| | | } |
| | | #Efficiency .table_guding2{ |
| | | |
| | | #Efficiency .table_guding2 { |
| | | overflow-x: scroll; |
| | | width: 500px; |
| | | } |
| | | /deep/ .ant-card{ |
| | | height: 100%!important; |
| | | |
| | | /deep/ .ant-card { |
| | | height: 100% !important; |
| | | } |
| | | /deep/ .ant-card .ant-card-body{ |
| | | height: 100%!important; |
| | | |
| | | /deep/ .ant-card .ant-card-body { |
| | | height: 100% !important; |
| | | } |
| | | .efficiency_list #DeviceList{ |
| | | height: 90%!important; |
| | | |
| | | .efficiency_list #DeviceList { |
| | | height: 90% !important; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <a-card :bordered="false" class="device_list"> |
| | | <div :bordered="false" class="device_list"> |
| | | <div class="com_box"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper"> |
| | |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | </div> |
| | | </a-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | <template> |
| | | <div class="deviceCalendar_list"> |
| | | <a-card :bordered="false"> |
| | | <div :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | |
| | | <div> |
| | |
| | | </a-table> |
| | | </div> |
| | | <device-calendar-model ref="modalForm" @ok="modalFormOk"></device-calendar-model> |
| | | </a-card> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | </a-col> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="æ¥æ"> |
| | | <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" @change="dataChange" format='YYYY-MM-DD'/> |
| | | <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" @change="dataChange" |
| | | format='YYYY-MM-DD'/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="3" :sm="3"> |
| | |
| | | <span v-if="item.status == 23" |
| | | :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#19FE01",position:"absolute",bottom:"0"}'></span> |
| | | </div> |
| | | <div v-if="item.status == 22" style="z-index: 999;" |
| | | :style='{display: "inline-block",left:item.left,width:item.dateProportion, height: "100%",position:"absolute"}' |
| | | v-for="item in waring"> |
| | | <div v-if="item.status == 22" style="z-index: 999;" |
| | | :style='{display: "inline-block",left:item.left,width:item.dateProportion, height: "100%",position:"absolute"}' |
| | | v-for="item in waring"> |
| | | <span |
| | | :style='{display: "inline-block",width:"100%", left:0, height: "68%", background: "#FD0008",position:"absolute",bottom:"0"}'></span> |
| | | </div> |
| | |
| | | </a-tabs> |
| | | </div> |
| | | </div> |
| | | <work-chart-model ref="workChartModel"></work-chart-model> |
| | | <work-chart-model ref="workChartModel" :collectTime="this.queryParams.collectTime" |
| | | :equipment="this.equipment"></work-chart-model> |
| | | <work-history-model ref="workHistoryModel"></work-history-model> |
| | | </div> |
| | | </template> |
| | |
| | | props: { equement: {} }, |
| | | data() { |
| | | return { |
| | | readOnly:true, |
| | | readOnly: true, |
| | | defaultId: '', |
| | | defaultName: '', |
| | | middleTime: '', |
| | | queryParam:{}, |
| | | queryParam: {}, |
| | | queryParams: { |
| | | collectTime:undefined, |
| | | collectTime: undefined |
| | | }, |
| | | loadingstayus:false, |
| | | loadingrunStatus:false, |
| | | loadingwarnStatus:false, |
| | | loadingstayus: false, |
| | | loadingrunStatus: false, |
| | | loadingwarnStatus: false, |
| | | normal: [], |
| | | waring: [], |
| | | normalList: [], |
| | |
| | | getEquipmentByPid: '/mdc/mdcEquipment/getEquipmentByPid', |
| | | list: '/mdc/mdcEquipmentRunningSection/logList' |
| | | }, |
| | | ProStartId:'' |
| | | ProStartId: '' |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | tabChange(val) { |
| | | this.activeKey = val |
| | | }, |
| | | disabledDate(current){ |
| | | disabledDate(current) { |
| | | //Can not slect days before today and today |
| | | return current && current > moment().subtract('days', 0); |
| | | return current && current > moment().subtract('days', 0) |
| | | }, |
| | | queryChart() { |
| | | // this.normal = [] |
| | | // this.waring = [] |
| | | this.loadingstayus = true; |
| | | this.loadingrunStatus = true; |
| | | this.loadingstayus = true |
| | | this.loadingrunStatus = true |
| | | this.loadingwarnStatus = true |
| | | getAction(this.url.list, this.queryParams).then((res) => { |
| | | this.normalList = [] |
| | | this.waringList = [] |
| | | this.runList = [] |
| | | this.loadingstayus = false; |
| | | this.loadingrunStatus = false; |
| | | this.loadingstayus = false |
| | | this.loadingrunStatus = false |
| | | this.loadingwarnStatus = false |
| | | this.normal = [] |
| | | this.waring = [] |
| | | if (res.success) { |
| | | if(res.result != null){ |
| | | if (res.result != null) { |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | this.normalList.push(res.result[i]) |
| | | if ('22' == res.result[i].status) { |
| | |
| | | res.result[i].left = leftTmp / 86400 * 100 + '%' |
| | | this.waring.push(res.result[i]) |
| | | |
| | | }else if('3' == res.result[i].status){ |
| | | } else if ('3' == res.result[i].status) { |
| | | this.runList.push(res.result[i]) |
| | | res.result[i].dateProportion = res.result[i].duration / 86400 * 100 + '%' |
| | | this.normal.push(res.result[i]) |
| | | }else{ |
| | | } else { |
| | | res.result[i].dateProportion = res.result[i].duration / 86400 * 100 + '%' |
| | | this.normal.push(res.result[i]) |
| | | // console.log(this.normal) |
| | |
| | | }, |
| | | searchQuery() { |
| | | // console.log(this.queryParams.collectTime) |
| | | if(this.queryParams.collectTime != undefined){ |
| | | if (this.queryParams.collectTime != undefined) { |
| | | this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD') |
| | | if(!this.queryParams.equipmentId||!this.queryParams.equipmentName){ |
| | | if (!this.queryParams.equipmentId || !this.queryParams.equipmentName) { |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"è¯·éæ©è®¾å¤" |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©è®¾å¤' |
| | | }) |
| | | return false |
| | | } |
| | | this.queryChart() |
| | | }else{ |
| | | } else { |
| | | // this.$message.warning("è¯·éæ©æ¶é´") |
| | | console.log('触åæç¤º') |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"è¯·éæ©æ¶é´" |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©æ¶é´' |
| | | }) |
| | | } |
| | | // this.queryList() |
| | | }, |
| | |
| | | // this.onClearSelected() |
| | | }, |
| | | openWorkChart() { |
| | | if(!this.equipment.equipmentId){ |
| | | if (!this.equipment.equipmentId) { |
| | | // this.$message.warning("è¯·éæ©è®¾å¤è¿è¡æ¥è¯¢") |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"è¯·éæ©è®¾å¤è¿è¡æ¥è¯¢" |
| | | }); |
| | | }else{ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©è®¾å¤è¿è¡æ¥è¯¢' |
| | | }) |
| | | } else { |
| | | // 夿æ¯å¦ç¹å»è®¾å¤æ¥å¿è¡¨æ ¼è¡çæ°æ®ï¼æ¤æ¶ä¸ºç¹å»è¡¨æ ¼æ°æ®ä¸ºfalse |
| | | this.$refs.workChartModel.isClicklogListRow = false |
| | | this.$refs.workChartModel.add(this.equipment) |
| | | this.$refs.workChartModel.title = '工使²çº¿' |
| | | } |
| | | |
| | | }, |
| | | openHistoryChart() { |
| | | // console.log(this.equipment); |
| | | if(!this.equipment.equipmentId){ |
| | | if (!this.equipment.equipmentId) { |
| | | // this.$message.warning("è¯·éæ©è®¾å¤è¿è¡æ¥è¯¢") |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"è¯·éæ©è®¾å¤è¿è¡æ¥è¯¢" |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©è®¾å¤è¿è¡æ¥è¯¢' |
| | | }) |
| | | // console.log(1111) |
| | | } else{ |
| | | } else { |
| | | this.$refs.workHistoryModel.add(this.equipment) |
| | | this.$refs.workHistoryModel.title = 'å岿¥å¿' |
| | | } |
| | |
| | | this.searchQuery() |
| | | }, |
| | | dataAfter() { |
| | | if((this.queryParams.collectTime).format('YYYY-MM-DD') == moment().format('YYYY-MM-DD')){ |
| | | if ((this.queryParams.collectTime).format('YYYY-MM-DD') == moment().format('YYYY-MM-DD')) { |
| | | // this.$message.warning("è¯·éæ©ä»å¤©ä»¥åä»å¤©ä¹åçæ¥æï¼ï¼") |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:'è¯·éæ©ä»å¤©ä»¥åä»å¤©ä¹åçæ¥æï¼ï¼' |
| | | }); |
| | | }else{ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©ä»å¤©ä»¥åä»å¤©ä¹åçæ¥æï¼ï¼' |
| | | }) |
| | | } else { |
| | | this.queryParams.collectTime = moment(this.queryParams.collectTime.add(1, 'd'), 'YYYY-MM-DD') |
| | | this.searchQuery() |
| | | } |
| | |
| | | this.equipment = {} |
| | | // _this.$message.warning('请è系管çåï¼å¼æ¾è®¾å¤æéï¼') |
| | | _this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:'请è系管çåï¼å¼æ¾è®¾å¤æéï¼' |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: '请è系管çåï¼å¼æ¾è®¾å¤æéï¼' |
| | | }) |
| | | } |
| | | }else{ |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | _this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | |
| | | } |
| | | }) |
| | |
| | | created() { |
| | | this.queryParams.collectTime = moment() |
| | | this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD') |
| | | this.initEquipment(); |
| | | this.initEquipment() |
| | | // this.queryTreeData(); |
| | | }, |
| | | watch: { |
| | | equement(val) { |
| | | console.log('éè¿watch触å') |
| | | |
| | | if (val && val.equipmentId) { |
| | | this.$set(this.queryParams, 'equipmentName', val.equipmentName) |
| | | this.$set(this.queryParams, 'equipmentId', val.equipmentId) |
| | |
| | | #mdcLogShow > div { |
| | | flex: 1; |
| | | } |
| | | |
| | | /*.mdcLogShowOne{*/ |
| | | /*position: absolute;*/ |
| | | /*position: absolute;*/ |
| | | /*}*/ |
| | | </style> |
| | |
| | | <!-- tableåºå-begin --> |
| | | <div class="table_logList"> |
| | | <a-table ref="table" bordered size="middle" :rowKey="(record,index)=>{return index}" :columns="columns" |
| | | :dataSource="dataList" :pagination="ipagination" :loading="loadingequip" @change="handleTableChange"> |
| | | :dataSource="dataList" :pagination="ipagination" :loading="loadingequip" @change="handleTableChange" :customRow="rowClick"> |
| | | <template slot="status" slot-scope="status"> |
| | | <div v-if="status == '3' || status == '23'" style="color: #00ee00;width: 100%; height: 100%;">è¿è¡</div> |
| | | <div v-else-if="status == '1' || status == '2'" style="color: #ffea91;width: 100%; height: 100%;">å¾
æº</div> |
| | |
| | | import { |
| | | JeecgListMixin |
| | | } from '@/mixins/JeecgListMixin' |
| | | import moment from 'moment' |
| | | export default { |
| | | name: 'LogList', |
| | | mixins: [JeecgListMixin], |
| | |
| | | this.ipagination = pagination; |
| | | // this.loadData(); |
| | | }, |
| | | /** |
| | | * ç»è®¾å¤æ¥å¿è¡¨æ ¼ä¸çè¡æ·»å ç¹å»äºä»¶ |
| | | * @param record ç¹å»çå½åè¡æ°æ® |
| | | * @returns {{on: {click: on.click}}} æ·»å äºä»¶å¯¹è±¡ |
| | | */ |
| | | rowClick(record){ |
| | | return { |
| | | on:{ |
| | | click:()=>{ |
| | | const timeObj={ |
| | | start:moment(record.startTime), |
| | | end:moment(record.endTime) |
| | | } |
| | | this.$bus.$emit('tableRowRecord',timeObj) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | } |
| | |
| | | <template> |
| | | <div ref="workChart"> |
| | | <a-modal :title="title" :getContainer="() => this.$refs.workChart" width="80%" wrap-class-name="full-modal" :footer="null" :visible="visible" |
| | | <a-modal :title="title" :getContainer="() => this.$refs.workChart" width="80%" wrap-class-name="full-modal" |
| | | :footer="null" :visible="visible" |
| | | @cancel="handleCancel" cancelText="å
³é"> |
| | | <div> |
| | | <div> |
| | |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-item label="æ¥æ" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-date-picker v-model="queryParams.paramDate" :disabledDate="disabledDate" format='YYYY-MM-DD'/> |
| | | <a-date-picker v-model="queryParams.paramDate" :disabledDate="disabledDate" format='YYYY-MM-DD'/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import moment from 'moment' |
| | | import * as echarts from 'echarts' |
| | | import { |
| | | getAction, |
| | | postAction |
| | | } from '@/api/manage' |
| | | import { |
| | | duplicateCheck |
| | | } from '@/api/api' |
| | | import moment from 'moment' |
| | | import * as echarts from 'echarts' |
| | | import { |
| | | getAction, |
| | | postAction |
| | | } from '@/api/manage' |
| | | import { |
| | | duplicateCheck |
| | | } from '@/api/api' |
| | | |
| | | export default { |
| | | name: 'WorkChartModel', |
| | | components: {}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | spinning:false, |
| | | labelCol: { |
| | | xs: { |
| | | span: 24 |
| | | }, |
| | | sm: { |
| | | span: 6 |
| | | } |
| | | export default { |
| | | name: 'WorkChartModel', |
| | | components: {}, |
| | | props: { |
| | | collectTime: { |
| | | type: Object |
| | | }, |
| | | wrapperCol: { |
| | | xs: { |
| | | span: 24 |
| | | equipment: { |
| | | type: Object |
| | | } |
| | | }, |
| | | watch: { |
| | | // çæ§ç¶ç»ä»¶ç¹å»å·¦å³ç®å¤´åæ¢çæ¶é´å¼å°å
¶èµç»ç¹å»å·¥ä½æ²çº¿åçæ¶é´éæ©å¨çå¼ |
| | | collectTime: { |
| | | handler(newVal) { |
| | | this.currentToggledTime = newVal |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | spinning: false, |
| | | labelCol: { |
| | | xs: { |
| | | span: 24 |
| | | }, |
| | | sm: { |
| | | span: 6 |
| | | } |
| | | }, |
| | | sm: { |
| | | span: 18 |
| | | } |
| | | wrapperCol: { |
| | | xs: { |
| | | span: 24 |
| | | }, |
| | | sm: { |
| | | span: 18 |
| | | } |
| | | }, |
| | | readOnly: true, |
| | | title: '', |
| | | plainOptions: [], |
| | | option: [], |
| | | workChart: '', |
| | | node: {}, |
| | | stratOpen: false, |
| | | endOpen: false, |
| | | visible: false, |
| | | show: false, |
| | | queryParams: {}, |
| | | panduanResult: [], |
| | | url: { |
| | | initPlainOptions: '/mdc/mdcDriveTypeParamConfig/findWorkCurveParamList', |
| | | workChart: '/mdc/mdcEquipmentRunningSection/workChart' |
| | | }, |
| | | currentToggledTime: '', |
| | | isClicklogListRow: false |
| | | } |
| | | }, |
| | | created() { |
| | | this.$bus.$on('tableRowRecord', this.getLogListRowRecord) |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | methods: { |
| | | disabledDate(current) { |
| | | //Can not slect days before today and today |
| | | return current && current > moment().endOf('day') |
| | | }, |
| | | readOnly:true, |
| | | title: '', |
| | | plainOptions: [], |
| | | option: [], |
| | | workChart: '', |
| | | node: {}, |
| | | stratOpen: false, |
| | | endOpen: false, |
| | | visible: false, |
| | | show: false, |
| | | queryParams: {}, |
| | | panduanResult:[], |
| | | url: { |
| | | initPlainOptions: '/mdc/mdcDriveTypeParamConfig/findWorkCurveParamList', |
| | | workChart: '/mdc/mdcEquipmentRunningSection/workChart' |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | }, |
| | | methods: { |
| | | disabledDate(current){ |
| | | //Can not slect days before today and today |
| | | return current && current > moment().endOf("day"); |
| | | }, |
| | | initPlainOptions(param) { |
| | | let that = this |
| | | let equipment = param.equipmentId |
| | | getAction(this.url.initPlainOptions,{equipmentId:equipment}).then((res) => { |
| | | if (res.success) { |
| | | let temp = [] |
| | | // debugger |
| | | for (var item of res.result) { |
| | | temp.push({ label: item.chineseName, value: item.id, englishName: item.englishName }) |
| | | initPlainOptions(param) { |
| | | let that = this |
| | | let equipment = param.equipmentId |
| | | getAction(this.url.initPlainOptions, { equipmentId: equipment }).then((res) => { |
| | | if (res.success) { |
| | | let temp = [] |
| | | // debugger |
| | | for (var item of res.result) { |
| | | temp.push({ label: item.chineseName, value: item.id, englishName: item.englishName }) |
| | | } |
| | | that.plainOptions = temp |
| | | |
| | | if (temp.length > 0) { |
| | | that.option = [temp[0].value] |
| | | let param = { |
| | | driveType: that.node.driveType, |
| | | equipmentId: that.node.equipmentId, |
| | | date: that.queryParams.paramDateStr, |
| | | start: that.queryParams.startStr, |
| | | end: that.queryParams.endStr, |
| | | interval: that.queryParams.period, |
| | | codeTypeId: that.option.join(',') |
| | | } |
| | | that.initChart(param) |
| | | } |
| | | } |
| | | that.plainOptions = temp |
| | | if(temp.length>0){ |
| | | that.option = [temp[0].value] |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | searchQuery() { |
| | | this.queryParams.paramDateStr = this.queryParams.paramDate.format('yyyy-MM-DD') |
| | | this.queryParams.startStr = this.queryParams.start.format('HH:mm') |
| | | this.queryParams.endStr = this.queryParams.end.format('HH:mm') |
| | | let param = { |
| | | driveType: this.node.driveType, equipmentId: this.node.equipmentId, |
| | | date: this.queryParams.paramDateStr, start: this.queryParams.startStr, |
| | | end: this.queryParams.endStr, interval: this.queryParams.period, |
| | | codeTypeId: this.option.join(',') |
| | | } |
| | | this.initChart(param); |
| | | this.spinning = true; |
| | | }, |
| | | timeHandleChange(val) { |
| | | if (val == 'start') { |
| | | this.stratOpen = true |
| | | } else { |
| | | this.endOpen = true |
| | | } |
| | | }, |
| | | timeHandleClose(val) { |
| | | if (val == 'start') { |
| | | this.stratOpen = false |
| | | this.endOpen = true |
| | | } else { |
| | | this.endOpen = false |
| | | } |
| | | }, |
| | | add(node) { |
| | | let _this = this |
| | | this.visible = true |
| | | this.node = node |
| | | let paramDate = moment() |
| | | let start = moment('0:0', 'HH:mm') |
| | | let end = moment(moment().format('HH:mm'), 'HH:mm') |
| | | this.queryParams = { |
| | | equipmentId: node.equipmentId, |
| | | equipmentName: node.equipmentName, |
| | | period: 1000, |
| | | paramDate: paramDate, |
| | | paramDateStr: paramDate.format('yyyy-MM-DD'), |
| | | start: start, |
| | | startStr: start.format('HH:mm'), |
| | | end: end, |
| | | endStr: end.format('HH:mm') |
| | | } |
| | | this.$nextTick(() => { |
| | | _this.initPlainOptions(node) |
| | | }) |
| | | }, |
| | | searchQuery() { |
| | | this.queryParams.paramDateStr = this.queryParams.paramDate.format('yyyy-MM-DD') |
| | | this.queryParams.startStr = this.queryParams.start.format('HH:mm') |
| | | this.queryParams.endStr = this.queryParams.end.format('HH:mm') |
| | | let param = { |
| | | driveType: node.driveType, equipmentId: node.equipmentId, |
| | | date: _this.queryParams.paramDateStr, start: _this.queryParams.startStr, |
| | | end: _this.queryParams.endStr, interval: _this.queryParams.period, |
| | | codeTypeId: _this.option.join(',') |
| | | driveType: this.node.driveType, equipmentId: this.node.equipmentId, |
| | | date: this.queryParams.paramDateStr, start: this.queryParams.startStr, |
| | | end: this.queryParams.endStr, interval: this.queryParams.period, |
| | | codeTypeId: this.option.join(',') |
| | | } |
| | | _this.initChart(param) |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.visible = false; |
| | | this.stratOpen = false; |
| | | this.endOpen = false; |
| | | }, |
| | | checkboxOnChange(e) { |
| | | if (e.length <= 3) { |
| | | this.option = e |
| | | } else { |
| | | // this.$message.warn('æå¤åªè½éæ©3个') |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:'æå¤åªè½éæ©ä¸ä¸ª' |
| | | }); |
| | | return false |
| | | } |
| | | }, |
| | | close() { |
| | | this.visible = false |
| | | this.show = false |
| | | }, |
| | | getYAxisOffset(index) { |
| | | return index * 50 + 10; |
| | | }, |
| | | initChart(param) { |
| | | if (!this.workChart) { |
| | | this.workChart = echarts.init(document.getElementById('workChart')) |
| | | } |
| | | this.initChart(param) |
| | | this.spinning = true |
| | | }, |
| | | timeHandleChange(val) { |
| | | if (val == 'start') { |
| | | this.stratOpen = true |
| | | } else { |
| | | this.endOpen = true |
| | | } |
| | | }, |
| | | timeHandleClose(val) { |
| | | if (val == 'start') { |
| | | this.stratOpen = false |
| | | this.endOpen = true |
| | | } else { |
| | | this.endOpen = false |
| | | } |
| | | }, |
| | | add(node) { |
| | | let _this = this |
| | | this.visible = true |
| | | this.node = node |
| | | this.spinning = true |
| | | let paramDate |
| | | let start |
| | | let end |
| | | // 彿²¡æåæ¢è¿æ¶é´currentToggledTimeçå¼ä¸ºç©ºå¼ï¼å¦æç±äºç¹å»å·¦å³ç®å¤´åæ¢è¿æ¶é´ï¼åcurrentToggledTimeä¸ºåæ¢åçæ¶é´ |
| | | if (!this.currentToggledTime) { |
| | | paramDate = moment() |
| | | } else { |
| | | paramDate = this.currentToggledTime |
| | | } |
| | | // 夿æ¯å¦ç¹å»è®¾å¤æ¥å¿è¡¨æ ¼è¡çæ°æ®ï¼è¥ç¹å»è¡¨æ ¼æ°æ®åæ¾ç¤ºè¡¨æ ¼æ°æ®ä¸çæ¶é´ï¼è¥ç¹å»å·¥ä½æ²çº¿å¾çåæ¾ç¤º0ç¹è³å½åæ¶é´æ°æ® |
| | | if (this.isClicklogListRow) { |
| | | start = node.start |
| | | end = node.end |
| | | } else { |
| | | start = moment('0:0', 'HH:mm') |
| | | end = moment(moment().format('HH:mm'), 'HH:mm') |
| | | } |
| | | this.queryParams = { |
| | | equipmentId: node.equipmentId, |
| | | equipmentName: node.equipmentName, |
| | | period: 1000, |
| | | paramDate: paramDate, |
| | | paramDateStr: paramDate.format('yyyy-MM-DD'), |
| | | start: start, |
| | | startStr: start.format('HH:mm'), |
| | | end: end, |
| | | endStr: end.format('HH:mm') |
| | | } |
| | | this.$nextTick(() => { |
| | | _this.initPlainOptions(node) |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.visible = false |
| | | this.stratOpen = false |
| | | this.endOpen = false |
| | | }, |
| | | checkboxOnChange(e) { |
| | | if (e.length <= 3) { |
| | | this.option = e |
| | | } else { |
| | | // this.$message.warn('æå¤åªè½éæ©3个') |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'æå¤åªè½éæ©ä¸ä¸ª' |
| | | }) |
| | | return false |
| | | } |
| | | }, |
| | | close() { |
| | | this.visible = false |
| | | this.show = false |
| | | }, |
| | | getYAxisOffset(index) { |
| | | return index * 50 + 10 |
| | | }, |
| | | initChart(param) { |
| | | if (!this.workChart) { |
| | | this.workChart = echarts.init(document.getElementById('workChart')) |
| | | } |
| | | let option = { |
| | | tooltip: { |
| | | trigger: 'axis', |
| | |
| | | } |
| | | }, |
| | | legend: { |
| | | data:[], |
| | | data: [] |
| | | }, |
| | | title: { |
| | | left: 'center', |
| | |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | grid:{ |
| | | left:'8%', |
| | | top:'10%', |
| | | right:'2%', |
| | | bottom:'14%', |
| | | containLabel:true |
| | | grid: { |
| | | left: '8%', |
| | | top: '10%', |
| | | right: '2%', |
| | | bottom: '14%', |
| | | containLabel: true |
| | | }, |
| | | xAxis: { |
| | | type: 'time', |
| | |
| | | }, |
| | | yAxis: [ |
| | | { |
| | | yAxisIndex:0, |
| | | type: 'value', |
| | | offset:0, |
| | | position:'left', |
| | | boundaryGap: [0, '15%'], |
| | | axisLine:{ |
| | | show:true, |
| | | // lineStyle:{ |
| | | // color:'#000000' |
| | | // } |
| | | } |
| | | }, |
| | | { |
| | | yAxisIndex:1, |
| | | yAxisIndex: 0, |
| | | type: 'value', |
| | | offset:60, |
| | | position:'left', |
| | | offset: 0, |
| | | position: 'left', |
| | | boundaryGap: [0, '15%'], |
| | | axisLine:{ |
| | | show:true, |
| | | axisLine: { |
| | | show: true |
| | | // lineStyle:{ |
| | | // color:'#000000' |
| | | // } |
| | | } |
| | | }, |
| | | { |
| | | yAxisIndex:2, |
| | | yAxisIndex: 1, |
| | | type: 'value', |
| | | offset:120, |
| | | position:'left', |
| | | offset: 60, |
| | | position: 'left', |
| | | boundaryGap: [0, '15%'], |
| | | axisLine:{ |
| | | show:true, |
| | | axisLine: { |
| | | show: true |
| | | // lineStyle:{ |
| | | // color:'#000000' |
| | | // } |
| | | } |
| | | }, |
| | | { |
| | | yAxisIndex: 2, |
| | | type: 'value', |
| | | offset: 120, |
| | | position: 'left', |
| | | boundaryGap: [0, '15%'], |
| | | axisLine: { |
| | | show: true |
| | | // lineStyle:{ |
| | | // color:'#000000' |
| | | // } |
| | | } |
| | | } |
| | | ], |
| | | dataZoom: [ |
| | | { |
| | |
| | | end: 20 |
| | | } |
| | | ], |
| | | series:[ |
| | | series: [ |
| | | { |
| | | showSymbol:true, |
| | | symbolSize:20, |
| | | label:'show', |
| | | name:'', |
| | | type:'line', |
| | | data:[], |
| | | smooth:true, |
| | | symbol:'none', |
| | | showSymbol: true, |
| | | symbolSize: 20, |
| | | label: 'show', |
| | | name: '', |
| | | type: 'line', |
| | | data: [], |
| | | smooth: true, |
| | | symbol: 'none' |
| | | } |
| | | ] |
| | | } |
| | | let _this = this |
| | | let temp = [] |
| | | for (let i = 0; i < this.plainOptions.length; i++) { |
| | | let item = this.plainOptions[i] |
| | | if (this.option.indexOf(item.value) > -1) { |
| | | temp.push(item) |
| | | } |
| | | } |
| | | getAction(this.url.workChart, param).then((res) => { |
| | | if(JSON.stringify(res.result) == '[]' || res.result == null){ |
| | | // this.$message.warning('æ æ°æ®ï¼') |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:'æ æ°æ®!' |
| | | }); |
| | | this.spinning = false; |
| | | _this.workChart.setOption(option,true) |
| | | }else{ |
| | | this.spinning = false; |
| | | // debugger |
| | | let result = [] |
| | | let itemLine = [] |
| | | //yè½´æ°ç» |
| | | var Yarr = [] |
| | | var lengenddata = []; |
| | | for (let i = 0; i < temp.length; i++) { |
| | | let item = temp[i] |
| | | itemLine = [] |
| | | for (let m = 0; m < res.result.length; m++) { |
| | | let d = [] |
| | | d.push(res.result[m].collectTime) |
| | | // debugger |
| | | d.push(res.result[m][item.englishName]) |
| | | itemLine.push(d) |
| | | } |
| | | var lll = { |
| | | name:item.label |
| | | } |
| | | lengenddata.push(lll) |
| | | var Yline ={ |
| | | name:item.label, |
| | | type:'value', |
| | | yAxisIndex:i, |
| | | boundaryGap: [0,'100%'] |
| | | } |
| | | Yarr.push(Yline); |
| | | var line ={ |
| | | name:item.label, |
| | | type:'line', |
| | | // areaStyle:{}, |
| | | smooth:true, |
| | | symbol:'circle', |
| | | symbolSize:10, |
| | | yAxisIndex:i, |
| | | |
| | | data:itemLine |
| | | } |
| | | result.push(line); |
| | | |
| | | let _this = this |
| | | let temp = [] |
| | | for (let i = 0; i < this.plainOptions.length; i++) { |
| | | let item = this.plainOptions[i] |
| | | if (this.option.indexOf(item.value) > -1) { |
| | | temp.push(item) |
| | | } |
| | | // option.yAxis = Yarr; |
| | | option.series = result; |
| | | option.legend = lengenddata; |
| | | // console.log(option); |
| | | _this.workChart.setOption(option,true) |
| | | window.addEventListener('resize', function() { |
| | | _this.workChart.resize() |
| | | }) |
| | | } |
| | | getAction(this.url.workChart, param).then((res) => { |
| | | if (JSON.stringify(res.result) == '[]' || res.result == null) { |
| | | // this.$message.warning('æ æ°æ®ï¼') |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'æ æ°æ®!' |
| | | }) |
| | | this.spinning = false |
| | | _this.workChart.setOption(option, true) |
| | | } else { |
| | | this.spinning = false |
| | | // debugger |
| | | let result = [] |
| | | let itemLine = [] |
| | | //yè½´æ°ç» |
| | | var Yarr = [] |
| | | var lengenddata = [] |
| | | for (let i = 0; i < temp.length; i++) { |
| | | let item = temp[i] |
| | | itemLine = [] |
| | | for (let m = 0; m < res.result.length; m++) { |
| | | let d = [] |
| | | d.push(res.result[m].collectTime) |
| | | // debugger |
| | | d.push(res.result[m][item.englishName]) |
| | | itemLine.push(d) |
| | | } |
| | | var lll = { |
| | | name: item.label |
| | | } |
| | | lengenddata.push(lll) |
| | | var Yline = { |
| | | name: item.label, |
| | | type: 'value', |
| | | yAxisIndex: i, |
| | | boundaryGap: [0, '100%'] |
| | | } |
| | | Yarr.push(Yline) |
| | | var line = { |
| | | name: item.label, |
| | | type: 'line', |
| | | // areaStyle:{}, |
| | | smooth: true, |
| | | symbol: 'circle', |
| | | symbolSize: 10, |
| | | yAxisIndex: i, |
| | | |
| | | }) |
| | | data: itemLine |
| | | } |
| | | result.push(line) |
| | | |
| | | } |
| | | // option.yAxis = Yarr; |
| | | option.series = result |
| | | option.legend = lengenddata |
| | | // console.log(option); |
| | | _this.workChart.setOption(option, true) |
| | | window.addEventListener('resize', function() { |
| | | _this.workChart.resize() |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | /** |
| | | * è·åç¹å»è®¾å¤æ¥å¿è¡¨æ ¼è¡åä»å
å¼ç»ä»¶ä¼ æ¥çæ¶é´å¯¹è±¡ |
| | | * @param timeObj å½åè¡çå¼å§æ¶é´ä¸ç»ææ¶é´ç»æç对象 |
| | | */ |
| | | getLogListRowRecord(timeObj) { |
| | | // 夿æ¯å¦ç¹å»è®¾å¤æ¥å¿è¡¨æ ¼è¡çæ°æ®ï¼æ¤æ¶ä¸ºç¹å»è¡¨æ ¼æ°æ®ä¸ºtrue |
| | | this.isClicklogListRow = true |
| | | // åå¹¶ç¶ç»ä»¶ä¼ æ¥çå½å设å¤ä¿¡æ¯å¯¹è±¡ä¸å
å¼ç»ä»¶ä¼ æ¥çå½åè¡çæ¶é´å¯¹è±¡ |
| | | const newQueryParams = Object.assign(this.equipment, timeObj) |
| | | this.add(newQueryParams) |
| | | this.title = '工使²çº¿' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | .full-modal { |
| | | .ant-modal { |
| | | max-width: 100%; |
| | | top: 0; |
| | | padding-bottom: 0; |
| | | margin: 0; |
| | | .full-modal { |
| | | .ant-modal { |
| | | max-width: 100%; |
| | | top: 0; |
| | | padding-bottom: 0; |
| | | margin: 0; |
| | | } |
| | | .ant-modal-content { |
| | | display: flex; |
| | | flex-direction: column; |
| | | height: calc(100vh); |
| | | } |
| | | .ant-modal-body { |
| | | flex: 1; |
| | | } |
| | | } |
| | | .ant-modal-content { |
| | | |
| | | /deep/ .ant-modal { |
| | | /*background-color: #000;*/ |
| | | /*color: #fff;*/ |
| | | } |
| | | |
| | | /deep/ .ant-modal-header { |
| | | /*background-color: #000;*/ |
| | | } |
| | | |
| | | /deep/ .ant-modal-title { |
| | | /*color: #fff;*/ |
| | | } |
| | | |
| | | /deep/ .ant-modal-close { |
| | | color: #1191b0; |
| | | font-size: 24px; |
| | | } |
| | | |
| | | /deep/ .ant-modal-content { |
| | | /*background: -moz-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.27) 100%);*/ |
| | | /*background: -webkit-gradient(linear, left left, right right, color-stop(0%, rgba(0, 0, 0, 0.66)), color-stop(100%, rgba(0, 0, 0, 0.4)));*/ |
| | | /*background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ |
| | | /*background: -o-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ |
| | | /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ |
| | | /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ |
| | | /*background-color: #000;*/ |
| | | /*color: #fff;*/ |
| | | position: relative; |
| | | } |
| | | |
| | | /deep/ .ant-modal-header { |
| | | /*border-bottom: none!important;*/ |
| | | } |
| | | |
| | | /deep/ .ant-checkbox-wrapper { |
| | | /*color: #fff;*/ |
| | | } |
| | | |
| | | /deep/ .ant-form-item-label label { |
| | | /*color: #fff;*/ |
| | | } |
| | | |
| | | /deep/ .ant-btn { |
| | | /*position: absolute;*/ |
| | | |
| | | } |
| | | |
| | | .checkboxgroup { |
| | | position: absolute; |
| | | right: 5%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | /deep/ .ant-checkbox-group { |
| | | display: flex; |
| | | flex-direction: column; |
| | | height: calc(100vh); |
| | | } |
| | | .ant-modal-body { |
| | | flex: 1; |
| | | |
| | | /deep/ .ant-checkbox-group .ant-checkbox-wrapper { |
| | | padding: 10px; |
| | | } |
| | | } |
| | | /deep/ .ant-modal{ |
| | | /*background-color: #000;*/ |
| | | /*color: #fff;*/ |
| | | } |
| | | /deep/ .ant-modal-header{ |
| | | /*background-color: #000;*/ |
| | | } |
| | | /deep/ .ant-modal-title{ |
| | | /*color: #fff;*/ |
| | | } |
| | | /deep/ .ant-modal-close{ |
| | | color: #1191b0; |
| | | font-size: 24px; |
| | | } |
| | | /deep/ .ant-modal-content{ |
| | | /*background: -moz-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.27) 100%);*/ |
| | | /*background: -webkit-gradient(linear, left left, right right, color-stop(0%, rgba(0, 0, 0, 0.66)), color-stop(100%, rgba(0, 0, 0, 0.4)));*/ |
| | | /*background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ |
| | | /*background: -o-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ |
| | | /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ |
| | | /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ |
| | | /*background-color: #000;*/ |
| | | /*color: #fff;*/ |
| | | position: relative; |
| | | } |
| | | /deep/ .ant-modal-header{ |
| | | /*border-bottom: none!important;*/ |
| | | } |
| | | /deep/ .ant-checkbox-wrapper{ |
| | | /*color: #fff;*/ |
| | | } |
| | | /deep/ .ant-form-item-label label{ |
| | | /*color: #fff;*/ |
| | | } |
| | | /deep/ .ant-btn{ |
| | | /*position: absolute;*/ |
| | | |
| | | } |
| | | .checkboxgroup{ |
| | | position: absolute; |
| | | right: 5%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | } |
| | | /deep/ .ant-checkbox-group{ |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | /deep/ .ant-checkbox-group .ant-checkbox-wrapper{ |
| | | padding: 10px; |
| | | } |
| | | .con_btn { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .con_btn{ |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .workChart_params{ |
| | | display: flex; |
| | | /*align-items: center;*/ |
| | | flex-direction: column; |
| | | float: left; |
| | | } |
| | | .workChart_params .params_one{ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | .workChart_params .params_two{ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | /deep/ .workChart_params .ant-form-item{ |
| | | display: flex; |
| | | } |
| | | /deep/ .workChart_params .ant-form-item .ant-form-item-control-wrapper{ |
| | | margin: 0 10px; |
| | | } |
| | | .workChart_params { |
| | | display: flex; |
| | | /*align-items: center;*/ |
| | | flex-direction: column; |
| | | float: left; |
| | | } |
| | | |
| | | .workChart_params .params_one { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .workChart_params .params_two { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | /deep/ .workChart_params .ant-form-item { |
| | | display: flex; |
| | | } |
| | | |
| | | /deep/ .workChart_params .ant-form-item .ant-form-item-control-wrapper { |
| | | margin: 0 10px; |
| | | } |
| | | |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | } |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <a-card :bordered="false" class="device_list"> |
| | | <div :bordered="false" class="device_list"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | |
| | | <!--<device-repair-model-add ref="modalFormadd" @ok="modalFormOk"></device-repair-model-add>--> |
| | | <device-repair-model-edit ref="modalFormedit" @ok="modalFormOk"></device-repair-model-edit> |
| | | <!--<repair-model ref="repairModelFrom" @ok="modalFormOk">0</repair-model>--> |
| | | </a-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | <template> |
| | | <div style="width: 100%;"> |
| | | <a-card :bordered="false"> |
| | | <div :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div style="width: 530px;position: absolute;top: 20px; right:1.5%;"> |
| | | <div style="width: 530px;position: absolute;top: 0; right:1.5%;"> |
| | | <table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;"> |
| | | <tr> |
| | | <td v-for="(item, index) in identifying">{{item.title}}</td> |
| | |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </a-card> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | <template> |
| | | <div class="efficiency_list" style="width: 100%"> |
| | | <a-card :bordered="false"> |
| | | <div :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div> |
| | | <div class="table-page-search-wrapper"> |
| | |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div style="width: 530px;position: absolute;top: 20px; right: 1.5%;"> |
| | | <div style="width: 530px;position: absolute;top: 0; right: 1.5%;"> |
| | | <table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;"> |
| | | <tr> |
| | | <td v-for="(item, index) in identifying">{{item.title}}</td> |
| | |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </a-card> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | <template> |
| | | <div style="width: 100%;"> |
| | | <a-card :bordered="false"> |
| | | <div :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="seach-content"> |
| | | <div class="table-page-search-wrapper"> |
| | |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div style="width: 530px;top: 20px; right: 0px;"> |
| | | <div style="width: 530px;top: 0; right: 0px;"> |
| | | <table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;"> |
| | | <tr> |
| | | <td v-for="(item, index) in identifying">{{item.title}}</td> |
| | |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </a-card> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | <template> |
| | | <a-spin :spinning="loading"> |
| | | <a-card :bordered="false" class="device_list"> |
| | | <div :bordered="false" class="device_list"> |
| | | <div class="com_box"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper"> |
| | |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | </div> |
| | | </a-card> |
| | | </div> |
| | | </a-spin> |
| | | </template> |
| | | |
| | |
| | | <template> |
| | | <a-card :bordered="false" class="device_list"> |
| | | <div class="com_box"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="4" :sm="4"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <a-input placeholder="è¾å
¥è®¾å¤ç¼å·æ¥è¯¢" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4"> |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-input placeholder="è¾å
¥è®¾å¤åç§°æ¥è¯¢" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-form-item label="æ¥æ"> |
| | | <a-date-picker v-model="queryParam.dateTime" :disabledDate="disabledDate" format='YYYYMMDD' @change="dataChange"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-form-item label="é´é"> |
| | | <a-select default-value="2" style="width: 80px" v-model="queryParam.timeType"> |
| | | <a-select-option :value="2"> |
| | | 2 |
| | | </a-select-option> |
| | | <a-select-option :value="3"> |
| | | 3 |
| | | </a-select-option> |
| | | <a-select-option :value="4"> |
| | | 4 |
| | | </a-select-option> |
| | | <a-select-option :value="6"> |
| | | 6 |
| | | </a-select-option> |
| | | </a-select>å°æ¶ |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="3" :sm="3" :xs="3"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | </a-col> |
| | | <!--<a-col :md="2" :sm="2" :xs="2">--> |
| | | <a-spin :spinning="loading"> |
| | | <div :bordered="false" class="device_list"> |
| | | <div class="com_box"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="4" :sm="4"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <a-input placeholder="è¾å
¥è®¾å¤ç¼å·æ¥è¯¢" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4"> |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-input placeholder="è¾å
¥è®¾å¤åç§°æ¥è¯¢" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-form-item label="æ¥æ"> |
| | | <a-date-picker v-model="queryParam.dateTime" :disabledDate="disabledDate" format='YYYYMMDD' |
| | | @change="dataChange"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-form-item label="é´é"> |
| | | <a-select default-value="2" style="width: 80px" v-model="queryParam.timeType"> |
| | | <a-select-option :value="2"> |
| | | 2 |
| | | </a-select-option> |
| | | <a-select-option :value="3"> |
| | | 3 |
| | | </a-select-option> |
| | | <a-select-option :value="4"> |
| | | 4 |
| | | </a-select-option> |
| | | <a-select-option :value="6"> |
| | | 6 |
| | | </a-select-option> |
| | | </a-select> |
| | | å°æ¶ |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="3" :sm="3" :xs="3"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | </a-col> |
| | | <!--<a-col :md="2" :sm="2" :xs="2">--> |
| | | <!--<a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button>--> |
| | | <!--</a-col>--> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- tableåºå-begin --> |
| | | <div id="DeviceList"> |
| | | |
| | | <div style="padding: 5px;width: 100%;height: 100%"> |
| | | <div style="width: 100%;height: 100%" id="dayAvailBar"></div> |
| | | <!--<div id="dayAvailLine"></div>--> |
| | | <!--</a-col>--> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- tableåºå-begin --> |
| | | <div id="DeviceList"> |
| | | |
| | | <div style="padding: 5px;width: 100%;height: 100%"> |
| | | <div style="width: 100%;height: 100%" id="dayAvailBar"></div> |
| | | <!--<div id="dayAvailLine"></div>--> |
| | | </div> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | </div> |
| | | </a-card> |
| | | </a-spin> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | | name: 'equipmentDayAvailMain', |
| | | // mixins: [JeecgListMixin], |
| | |
| | | JDate, |
| | | JEllipsis |
| | | }, |
| | | props: { nodeTree: '', Type:'',nodePeople: '' }, |
| | | props: { nodeTree: '', Type: '', nodePeople: '' }, |
| | | data() { |
| | | return { |
| | | activeKey: '1', |
| | | typeTree:"", |
| | | typeParent:1, |
| | | typeEquipment:1, |
| | | spaceTime:[], |
| | | useingRates:[], |
| | | typeTree: '', |
| | | typeParent: 1, |
| | | typeEquipment: 1, |
| | | spaceTime: [], |
| | | useingRates: [], |
| | | dates: [], |
| | | xianshi:"", |
| | | readOnly:true, |
| | | xianshi: '', |
| | | readOnly: true, |
| | | queryParam: { |
| | | dateTime:undefined, |
| | | timeType:'2' |
| | | dateTime: undefined, |
| | | timeType: '2' |
| | | }, |
| | | queryParams:{}, |
| | | queryParamEquip:{}, |
| | | queryParamPeople:{}, |
| | | dataStartsoucre:[], |
| | | queryParams: {}, |
| | | queryParamEquip: {}, |
| | | queryParamPeople: {}, |
| | | dataStartsoucre: [], |
| | | url: { |
| | | comparativeAnalysis:'/mdc/efficiencyReport/comparativeAnalysis', |
| | | dayUtilizationRate:'/mdc/efficiencyReport/dayUtilizationRate', |
| | | comparativeAnalysis: '/mdc/efficiencyReport/comparativeAnalysis', |
| | | dayUtilizationRate: '/mdc/efficiencyReport/dayUtilizationRate', |
| | | getEquipmentByPid: '/mdc/mdcEquipment/getEquipmentByPid', |
| | | getEquipmentByDepPid:'/mdc/mdcEquipment/getEquipmentByDepPid' |
| | | getEquipmentByDepPid: '/mdc/mdcEquipment/getEquipmentByDepPid' |
| | | }, |
| | | AnalysisList:{} |
| | | AnalysisList: {}, |
| | | loading: false |
| | | } |
| | | }, |
| | | watch:{ |
| | | Type(valmath){ |
| | | this.dataList = []; |
| | | watch: { |
| | | Type(valmath) { |
| | | this.dataList = [] |
| | | this.queryParams.typeTree = valmath |
| | | // console.log(this.queryParams.typeTree) |
| | | }, |
| | |
| | | if (JSON.stringify(val) != '{}') { |
| | | if (val.equipmentId) { |
| | | // this.$set(this.queryParam, 'tierName', val.title) |
| | | this.queryParamEquip.parentId = "" |
| | | this.queryParamEquip.parentId = '' |
| | | this.queryParams.equipmentId = val.equipmentId |
| | | this.queryParamEquip.equipmentId = val.equipmentId |
| | | this.searchQuery() |
| | |
| | | this.initEquipment(val.key) |
| | | } |
| | | |
| | | |
| | | } |
| | | }, |
| | | nodePeople(val){ |
| | | nodePeople(val) { |
| | | if (JSON.stringify(val) != '{}') { |
| | | if (val.equipmentId) { |
| | | // this.$set(this.queryParam, 'tierName', val.title) |
| | | this.queryParamEquip.parentId = "" |
| | | this.queryParamEquip.parentId = '' |
| | | this.queryParams.equipmentId = val.equipmentId |
| | | this.queryParamEquip.equipmentId = val.equipmentId |
| | | this.searchQuery() |
| | |
| | | }, |
| | | methods: { |
| | | moment, |
| | | drawTu(){ |
| | | let dayAvailBar = this.$echarts.init(document.getElementById('dayAvailBar'), 'macarons'); |
| | | drawTu() { |
| | | let dayAvailBar = this.$echarts.init(document.getElementById('dayAvailBar'), 'macarons') |
| | | //dayAvailLine = echarts.init(document.getElementById('dayAvailLine')); |
| | | let dayAvailBarOption = { |
| | | title: { |
| | |
| | | textStyle: { |
| | | fontSize: 18, |
| | | fontWeight: 'bolder', |
| | | color: "#151414" |
| | | color: '#151414' |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | formatter: "{a} <br/>{b} :({c}%)" |
| | | formatter: '{a} <br/>{b} :({c}%)' |
| | | }, |
| | | toolbox: { |
| | | show: true, |
| | | feature: { |
| | | mark: {show: true}, |
| | | dataView: {show: true, readOnly: false}, |
| | | magicType: {show: true, type: ['line', 'bar']}, |
| | | restore: {show: true}, |
| | | saveAsImage: {show: true} |
| | | mark: { show: true }, |
| | | dataView: { show: true, readOnly: false }, |
| | | magicType: { show: true, type: ['line', 'bar'] }, |
| | | restore: { show: true }, |
| | | saveAsImage: { show: true } |
| | | } |
| | | }, |
| | | calculable: true, //æ¯å¦å¯ç¨ææ½é计ç®ç¹æ§ |
| | |
| | | data: this.useingRates, |
| | | markPoint: { |
| | | data: [ |
| | | {type: 'max', name: 'æå¤§å¼', symbolSize: 70}, |
| | | {type: 'min', name: 'æå°å¼', symbolSize: 70} |
| | | { type: 'max', name: 'æå¤§å¼', symbolSize: 70 }, |
| | | { type: 'min', name: 'æå°å¼', symbolSize: 70 } |
| | | ] |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | dayAvailBar.setOption(dayAvailBarOption); |
| | | } |
| | | dayAvailBar.setOption(dayAvailBarOption) |
| | | }, |
| | | disabledDate(current){ |
| | | disabledDate(current) { |
| | | //Can not slect days before today and today |
| | | return current && current > moment().subtract('days', 1); |
| | | return current && current > moment().subtract('days', 1) |
| | | }, |
| | | dataChange(val) { |
| | | this.queryParam.dateTime = val.format('YYYYMMDD') |
| | |
| | | this.queryParam.endTime = v2[1] |
| | | // console.log(v2[0],v2[1]) |
| | | }, |
| | | loadAnalysis(){ |
| | | getAction(this.url.dayUtilizationRate,this.queryParam).then(res => { |
| | | loadAnalysis() { |
| | | this.loading = true |
| | | getAction(this.url.dayUtilizationRate, this.queryParam).then(res => { |
| | | if (res.success) { |
| | | this.spaceTime.push(res.result.dataList) |
| | | for(var i = 0;i<res.result.dayRateDto.length;i++){ |
| | | for (var i = 0; i < res.result.dayRateDto.length; i++) { |
| | | this.useingRates.push(res.result.dayRateDto[i].utilizationRate) |
| | | } |
| | | // console.log(this,spaceTime) |
| | |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | return '0' |
| | | } |
| | | }, |
| | | searchQuery(){ |
| | | if(this.queryParam.dateTime){ |
| | | searchQuery() { |
| | | if (this.queryParam.dateTime) { |
| | | this.loading = true |
| | | this.spaceTime = [] |
| | | this.useingRates = [] |
| | | if(this.queryParams.typeTree == "1"){ |
| | | this.queryParams.parentId = this.queryParamEquip.parentId |
| | | // this.queryParams.equipmentId = this.queryParamEquip.equipmentId |
| | | |
| | | }else{ |
| | | if (this.queryParams.typeTree == '1') { |
| | | this.queryParams.parentId = this.queryParamEquip.parentId |
| | | |
| | | // this.queryParams.equipmentId = this.queryParamEquip.equipmentId |
| | | } else { |
| | | this.queryParams.parentId = this.queryParamEquip.parentId |
| | | // this.queryParams.equipmentId = "" |
| | | } |
| | | this.AnalysisList = []; |
| | | this.AnalysisList = [] |
| | | //è·åæ¥è¯¢æ¡ä»¶ |
| | | this.queryParam.parentId = this.queryParams.parentId; |
| | | this.queryParam.equipmentId = this.queryParams.equipmentId; |
| | | this.queryParam.parentId = this.queryParams.parentId |
| | | this.queryParam.equipmentId = this.queryParams.equipmentId |
| | | this.queryParam.typeTree = this.queryParams.typeTree |
| | | getAction(this.url.dayUtilizationRate,this.queryParam).then((res) => { |
| | | if(res.success){ |
| | | this.spaceTime=res.result.dateList |
| | | for(var i = 0;i<res.result.dayRateDto.length;i++){ |
| | | getAction(this.url.dayUtilizationRate, this.queryParam).then((res) => { |
| | | if (res.success) { |
| | | this.spaceTime = res.result.dateList |
| | | for (var i = 0; i < res.result.dayRateDto.length; i++) { |
| | | this.useingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate)) |
| | | } |
| | | this.drawTu() |
| | | }else{ |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }else{ |
| | | } else { |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:'è¯·éæ©æ¶é´' |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©æ¶é´' |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | searchReset() { |
| | | this.spaceTime = [] |
| | | this.useingRates = [] |
| | | if(this.queryParams.typeTree == "1"){ |
| | | if (this.queryParams.typeTree == '1') { |
| | | this.typeTree = this.queryParams.typeTree |
| | | this.typeParent = this.queryParams.parentId |
| | | this.typeParent = this.queryParams.parentId |
| | | this.typeEquipment = this.queryParams.equipmentId |
| | | this.queryParams = {} |
| | | this.queryParam = {} |
| | | this.queryParams.typeTree = this.typeTree |
| | | this.queryParams.parentId = this.typeParent |
| | | if(this.queryParams.parentId != ""){ |
| | | this.queryParams.equipmentId = "" |
| | | if (this.queryParams.parentId != '') { |
| | | this.queryParams.equipmentId = '' |
| | | this.initEquipment() |
| | | }else{ |
| | | if(this.queryParams.equipmentId == this.queryParamEquip.equipmentId){ |
| | | this.queryParams.equipmentId = this.typeEquipment |
| | | }else{ |
| | | } else { |
| | | if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) { |
| | | this.queryParams.equipmentId = this.typeEquipment |
| | | } else { |
| | | this.queryParams.equipmentId = this.queryParamEquip.equipmentId |
| | | } |
| | | } |
| | | getAction(this.url.dayUtilizationRate,this.queryParams).then((res) => { |
| | | if(res.success){ |
| | | this.spaceTime=res.result.dateList |
| | | for(var i = 0;i<res.result.dayRateDto.length;i++){ |
| | | getAction(this.url.dayUtilizationRate, this.queryParams).then((res) => { |
| | | if (res.success) { |
| | | this.spaceTime = res.result.dateList |
| | | for (var i = 0; i < res.result.dayRateDto.length; i++) { |
| | | this.useingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate)) |
| | | } |
| | | this.drawTu() |
| | | }else{ |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }else{ |
| | | } else { |
| | | this.typeTree = this.queryParams.typeTree |
| | | this.typeParent = this.queryParams.parentId |
| | | this.typeParent = this.queryParams.parentId |
| | | this.typeEquipment = this.queryParams.equipmentId |
| | | this.queryParams = {} |
| | | this.queryParam = {} |
| | | this.dates = [] |
| | | this.queryParams.typeTree = this.typeTree |
| | | this.queryParams.parentId = this.typeParent |
| | | if(this.queryParams.parentId != ""){ |
| | | this.queryParams.equipmentId = "" |
| | | if (this.queryParams.parentId != '') { |
| | | this.queryParams.equipmentId = '' |
| | | this.initEquipment() |
| | | }else{ |
| | | if(this.queryParams.equipmentId == this.queryParamEquip.equipmentId){ |
| | | this.queryParams.equipmentId = this.typeEquipment |
| | | }else{ |
| | | } else { |
| | | if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) { |
| | | this.queryParams.equipmentId = this.typeEquipment |
| | | } else { |
| | | this.queryParams.equipmentId = this.queryParamEquip.equipmentId |
| | | } |
| | | } |
| | | getAction(this.url.dayUtilizationRate,this.queryParams).then((res) => { |
| | | if(res.success){ |
| | | this.spaceTime=res.result.dateList |
| | | for(var i = 0;i<res.result.dayRateDto.length;i++){ |
| | | getAction(this.url.dayUtilizationRate, this.queryParams).then((res) => { |
| | | if (res.success) { |
| | | this.spaceTime = res.result.dateList |
| | | for (var i = 0; i < res.result.dayRateDto.length; i++) { |
| | | this.useingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate)) |
| | | } |
| | | this.drawTu() |
| | | }else{ |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.equipment = {} |
| | | // _this.$message.warning('请è系管çåï¼å¼æ¾è®¾å¤æéï¼') |
| | | _this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:'请è系管çåï¼å¼æ¾è®¾å¤æéï¼' |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: '请è系管çåï¼å¼æ¾è®¾å¤æéï¼' |
| | | }) |
| | | } |
| | | }else{ |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | _this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | |
| | | } |
| | | }) |
| | |
| | | this.equipment = {} |
| | | // _this.$message.warning('请è系管çåï¼å¼æ¾è®¾å¤æéï¼') |
| | | _this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:'请è系管çåï¼å¼æ¾è®¾å¤æéï¼' |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: '请è系管çåï¼å¼æ¾è®¾å¤æéï¼' |
| | | }) |
| | | } |
| | | }else{ |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | _this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | created() { |
| | | let collectTime = moment(moment().add(-1,'d'),'YYYY-MM-DD'); |
| | | let collectTime = moment(moment().add(-1, 'd'), 'YYYY-MM-DD') |
| | | |
| | | |
| | | this.queryParams.collectTime = collectTime; |
| | | this.queryParams.collectTime = collectTime |
| | | |
| | | this.queryParam.dateTime = this.queryParams.collectTime.format('YYYYMMDD') |
| | | this.queryParams.typeTree = '1' |
| | | this.initEquipment() |
| | | |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | /*@import '~@assets/less/common.less';*/ |
| | | |
| | | @media screen and (min-width: 1920px){ |
| | | .device_list{ |
| | | height: 811px!important; |
| | | @media screen and (min-width: 1920px) { |
| | | .device_list { |
| | | height: 811px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px){ |
| | | .device_list{ |
| | | height: 811px!important; |
| | | |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px) { |
| | | .device_list { |
| | | height: 811px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px){ |
| | | .device_list{ |
| | | height: 663px!important; |
| | | |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px) { |
| | | .device_list { |
| | | height: 663px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px){ |
| | | .device_list{ |
| | | height: 564px!important; |
| | | |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px) { |
| | | .device_list { |
| | | height: 564px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (max-width: 1280px){ |
| | | .device_list{ |
| | | height: 564px!important; |
| | | |
| | | @media screen and (max-width: 1280px) { |
| | | .device_list { |
| | | height: 564px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | /*.device_list{*/ |
| | | /*display: flex;*/ |
| | | /*}*/ |
| | | /*.device_list .table-page-search-wrapper{*/ |
| | | /**/ |
| | | /*}*/ |
| | | /deep/ .ant-card-body{ |
| | | height: 100%!important; |
| | | /deep/ .ant-card-body { |
| | | height: 100% !important; |
| | | } |
| | | .device_list .com_box{ |
| | | display: flex!important; |
| | | height: 100%!important; |
| | | flex-direction: column!important; |
| | | |
| | | .device_list .com_box { |
| | | display: flex !important; |
| | | height: 100% !important; |
| | | flex-direction: column !important; |
| | | } |
| | | .device_list .table-page-search-wrapper{ |
| | | height: 6%!important; |
| | | |
| | | .device_list .table-page-search-wrapper { |
| | | height: 6% !important; |
| | | } |
| | | .device_list #DeviceList{ |
| | | height: 90%!important; |
| | | |
| | | .device_list #DeviceList { |
| | | height: 90% !important; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <a-card :bordered="false" class="device_list"> |
| | | <div :bordered="false" class="device_list"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | |
| | | <!--<device-repair-model></device-repair-model>--> |
| | | <mdc-pass-rate-modal ref="modalForm" @ok="modalFormOk"></mdc-pass-rate-modal> |
| | | <mdc-pass-rate-edit ref="modalFormedit" @ok="modalFormOk"></mdc-pass-rate-edit> |
| | | </a-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | <template> |
| | | <a-card :bordered="false" class="device_list"> |
| | | <div :bordered="false" class="device_list"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | |
| | | <mdc-process-quantity-modal ref="modalForm" @ok="modalFormOk"></mdc-process-quantity-modal> |
| | | <mdc-process-quantity-edit ref="modalFormedit" @ok="modalFormOk"></mdc-process-quantity-edit> |
| | | |
| | | </a-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | <template> |
| | | <a-card :bordered="false" class="device_list"> |
| | | <div :bordered="false" class="device_list"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | |
| | | <mdc-standard-process-duration-modal ref="modalForm" @ok="modalFormOk"></mdc-standard-process-duration-modal> |
| | | <mdc-standard-process-duration-edit ref="modalFormedit" @ok="modalFormOk"></mdc-standard-process-duration-edit> |
| | | |
| | | </a-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | <template> |
| | | <div class="efficiency_list" style="width: 100%;height: 100%;"> |
| | | <a-card :bordered="false"> |
| | | <div :bordered="false" style="height: 100%"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | |
| | | </div> |
| | | <div id="openRateTrendChart" style="width: 100%;height: 60%"></div> |
| | | </div> |
| | | </a-card> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | let openRateTrendAnalysisChart = this.$echarts.init(document.getElementById('openRateTrendChart'), 'macarons') |
| | | let openRateTrendChartOptions = { |
| | | title: { |
| | | text: 'å©ç¨çèµ°å¿åæ', |
| | | text: 'å©ç¨çåæ®µåæ', |
| | | x: 'center', |
| | | textStyle: { |
| | | fontSize: 18, |
| | |
| | | .dataContent .mathData td { |
| | | padding: 10px; |
| | | /*display: none;*/ |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .dataContent .mathData:hover td { |
| | |
| | | <template> |
| | | <div class="efficiency_list" style="width: 100%;height: 100%;"> |
| | | <a-card :bordered="false"> |
| | | <div :bordered="false" style="height: 100%"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | |
| | | </div> |
| | | <div id="openRateTrendChart" style="width: 100%;height: 60%"></div> |
| | | </div> |
| | | </a-card> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | .dataContent .mathData td { |
| | | padding: 10px; |
| | | /*display: none;*/ |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .dataContent .mathData:hover td { |
| | |
| | | <template> |
| | | <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" |
| | | @ok="handleOk" @cancel="handleCancel" cancelText="å
³é"> |
| | | @ok="handleOk" @cancel="handleCancel" cancelText="å
³é"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-row :gutter="24"> |
| | |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item label="çæ¬¡åç§°" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input allow-clear placeholder="请è¾å
¥çå¶åç§°" v-decorator="['shiftSubName',validatorRules.shiftSubName]"/> |
| | | <a-input allow-clear placeholder="请è¾å
¥ç次åç§°" v-decorator="['shiftSubName',validatorRules.shiftSubName]"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | JeecgListMixin |
| | | } from '@/mixins/JeecgListMixin' |
| | | |
| | | |
| | | export default { |
| | | name: 'ShiftInfoModel', |
| | | mixins: [JeecgListMixin], |
| | |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | shiftSubName:[ |
| | | { |
| | | required:true, |
| | | message:'请è¾å
¥å段é¿åº¦', |
| | | },{ |
| | | validator:this.checkshiftSuName, |
| | | trigger:'blur' |
| | | } |
| | | ] |
| | | shiftSubName: { |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请è¾å
¥ç次åç§°' |
| | | } |
| | | ] |
| | | }, |
| | | startDate: { |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©å¼å§æ¶é´' |
| | | } |
| | | ] |
| | | }, |
| | | endDate: { |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©ç»ææ¶é´' |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | url: { |
| | | add: '/mdc/mdcShiftSub/addShiftSub', |
| | | edit: '/mdc/mdcShiftSub/editMdcShiftSub', |
| | | list: '/mdc/mdcMdcShift/queryPageList', |
| | | list: '/mdc/mdcMdcShift/queryPageList' |
| | | }, |
| | | disableSubmit: true |
| | | } |
| | |
| | | |
| | | methods: { |
| | | //èªå®ä¹æ ¡éªå½æ°ï¼è¦æ±ååä¸è½éå¤ valueæ¯è¡¨åçå¼ï¼callbackæ¯åè°å½æ° å¿
é¡»è°ç¨æå¯éªè¯ |
| | | checkshiftSuName(rule,value,callback){ |
| | | if(!value){ |
| | | alert("ä¸è½ä¸ºç©ºï¼") |
| | | checkshiftSuName(rule, value, callback) { |
| | | if (!value) { |
| | | alert('ä¸è½ä¸ºç©ºï¼') |
| | | return |
| | | } |
| | | // debugger |
| | | // let NameSelf = value; |
| | | this.loadData() |
| | | this.loadData() |
| | | // console.log(dataSource); |
| | | callback(); |
| | | callback() |
| | | }, |
| | | loadData() { |
| | | if(!this.url.list){ |
| | | this.$message.error("请设置url.list屿§!") |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list屿§!') |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | // if (arg === 1) { |
| | | // this.ipagination.current = 1; |
| | | // } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | // |
| | | // if(!params){ |
| | | // return false; |
| | |
| | | if (res.success) { |
| | | // console.log(res) |
| | | //update-begin---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | this.dataSource = res.result.records||res.result; |
| | | this.dataSource = res.result.records || res.result |
| | | // if(res.result.total) |
| | | // { |
| | | // this.ipagination.total = res.result.total; |
| | |
| | | // this.ipagination.total = 0; |
| | | // } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | }else{ |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | that.confirmLoading = true |
| | | let formData = Object.assign(this.model, values) |
| | | formData.isDaySpan = that.isDaySpan |
| | | console.log(formData.isDaySpan); |
| | | if(formData.isDaySpan == false){ |
| | | formData.startDate = moment(formData.startDate).format('HH:mm:ss'); |
| | | formData.endDate = moment(formData.endDate).format('HH:mm:ss'); |
| | | formData.sleepStartDate = moment(formData.sleepStartDate).format('HH:mm:ss'); |
| | | formData.sleepEndDate = moment(formData.sleepEndDate).format('HH:mm:ss'); |
| | | let startTimeOne = formData.startDate.replace(/:/g,''); |
| | | let endTimeOne = formData.endDate.replace(/:/g,''); |
| | | if(startTimeOne > endTimeOne){ |
| | | console.log(formData.isDaySpan) |
| | | formData.startDate = moment(formData.startDate).format('HH:mm:ss') |
| | | formData.endDate = moment(formData.endDate).format('HH:mm:ss') |
| | | if (formData.sleepStartDate) formData.sleepStartDate = moment(formData.sleepStartDate).format('HH:mm:ss') |
| | | if (formData.sleepEndDate) formData.sleepEndDate = moment(formData.sleepEndDate).format('HH:mm:ss') |
| | | if (formData.isDaySpan == false) { |
| | | let startTimeOne = formData.startDate.replace(/:/g, '') |
| | | let endTimeOne = formData.endDate.replace(/:/g, '') |
| | | if (startTimeOne > endTimeOne) { |
| | | // that.$message.warning("éè·¨å¤©çæ¬¡ç»ææ¶é´ä¸è½å°äºçäºå¼å§æ¶é´ï¼") |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"éè·¨å¤©çæ¬¡ç»ææ¶é´ä¸è½å°äºçäºå¼å§æ¶é´ï¼" |
| | | }); |
| | | // that.$message.success("ä¿å失败") |
| | | that.$notification.error({ |
| | | message:'æ¶æ¯', |
| | | description:"ä¿å失败ï¼" |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: 'éè·¨å¤©çæ¬¡ç»ææ¶é´ä¸è½å°äºçäºå¼å§æ¶é´ï¼' |
| | | }) |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }else{ |
| | | } else { |
| | | formData.shiftSubStatus = 1 |
| | | let obj |
| | | if (!this.model.id) { |
| | |
| | | if (res.success) { |
| | | // that.$message.success("ä¿åæå") |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:"ä¿åæå" |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: 'ä¿åæå' |
| | | }) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | } |
| | | }else{ |
| | | } else { |
| | | formData.shiftSubStatus = 1 |
| | | let obj |
| | | if (!this.model.id) { |
| | |
| | | if (res.success) { |
| | | // that.$message.success |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:"ä¿åæå" |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: 'ä¿åæå' |
| | | }) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-row :gutter="10"> |
| | | <a-col :md="leftColMd" :sm="24" style="margin-bottom: 20px"> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <!-- æç´¢åºå --> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="12" :sm="8"> |
| | | <a-form-item label="车é´åç§°" :labelCol="{ span: 5 }" :wrapperCol="{ span: 18, offset: 1 }"> |
| | | <a-input placeholder="" v-model="queryParam.workshopName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <span style="float: left; overflow: hidden" class="table-page-search-submitButtons"> |
| | | <a-col :md="12" :sm="24"> |
| | | <a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </a-col> |
| | | </span> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" style="margin: 5px 0 10px 2px"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å»ºè½¦é´</a-button> |
| | | </div> |
| | | |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"> </i> 已鿩 |
| | | <a |
| | | ><b>{{ selectedRowKeys1.length }}</b></a |
| | | >项 |
| | | <a style="margin-left: 24px" @click="onClearSelected1">æ¸
空</a> |
| | | </div> |
| | | |
| | | <div style="margin-top: 15px"> |
| | | <a-table |
| | | style="height: 500px" |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{ selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type: 'radio' }" |
| | | @change="handleTableChange" |
| | | > |
| | | <template slot="backgroundImage" slot-scope="text, record"> |
| | | <img :src="getImgView(record.backgroundImage)" width="50" height="50" /> |
| | | </template> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleOpen(record)">设å¤</a> |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link"> æ´å¤ <a-icon type="down" /> </a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete1(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | </a-card> |
| | | </a-col> |
| | | <a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1"> |
| | | <a-card :bordered="false"> |
| | | <div style="text-align: right"> |
| | | <a-icon type="close-circle" @click="hideUserList" /> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="12" :sm="12"> |
| | | <a-form-item label="设å¤ç¼ç "> |
| | | <a-input placeholder="" v-model="queryParam2.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <span style="float: left; overflow: hidden" class="table-page-search-submitButtons"> |
| | | <a-col :md="9" :sm="24"> |
| | | <a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </a-col> |
| | | </span> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" :md="24" :sm="24"> |
| | | <a-button @click="handleAddDeviceInWorkshop" type="primary" icon="plus" style="margin-top: 16px" |
| | | >å·²æè®¾å¤ |
| | | </a-button> |
| | | |
| | | <a-dropdown v-if="selectedRowKeys2.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel2"> |
| | | <a-icon type="delete" /> |
| | | å é¤ |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> |
| | | æ¹éæä½ |
| | | <a-icon type="down" /> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 |
| | | <a style="font-weight: 600">{{ selectedRowKeys2.length }}</a |
| | | >项 |
| | | <a style="margin-left: 24px" @click="onClearSelected2">æ¸
空</a> |
| | | </div> |
| | | <a-table |
| | | style="height: 500px" |
| | | ref="table2" |
| | | bordered |
| | | size="middle" |
| | | rowKey="equipmentId" |
| | | :columns="columns2" |
| | | :dataSource="dataSource2" |
| | | :pagination="ipagination2" |
| | | :loading="loading2" |
| | | :rowSelection="{ selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2 }" |
| | | @change="handleTableChange2" |
| | | > |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete2(record.equipmentId)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | </a-card> |
| | | </a-col> |
| | | <!-- 表ååºå --> |
| | | <workshop-modal ref="modalForm" @ok="modalFormOk"></workshop-modal> |
| | | <!--æ°å¢è½¦é´--> |
| | | <select-device-modal ref="selectUserModal" @selectFinished="selectOK"></select-device-modal> |
| | | <!--å·²æè®¾å¤--> |
| | | </a-row> |
| | | </template> |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { deleteAction, postAction, getAction } from '@/api/manage' |
| | | import SelectDeviceModal from './modules/SelectDeviceModal' |
| | | import WorkshopModal from './modules/WorkshopModal' |
| | | import { filterObj } from '@/utils/util' |
| | | import moment from 'moment' |
| | | |
| | | export default { |
| | | name: 'WorkshopSignageManagement', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | SelectDeviceModal, |
| | | WorkshopModal, |
| | | moment, |
| | | }, |
| | | data() { |
| | | return { |
| | | model1: {}, |
| | | model2: {}, |
| | | currentRoleId: '', |
| | | currentWorkshopId: '', |
| | | queryParam1: {}, |
| | | queryParam2: {}, |
| | | dataSource1: [], |
| | | dataSource2: [], |
| | | ipagination1: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0, |
| | | }, |
| | | ipagination2: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0, |
| | | }, |
| | | isorter1: { |
| | | column: 'createTime', |
| | | order: 'desc', |
| | | }, |
| | | isorter2: { |
| | | column: 'createTime', |
| | | order: 'desc', |
| | | }, |
| | | filters1: {}, |
| | | filters2: {}, |
| | | loading1: false, |
| | | loading2: false, |
| | | selectedRowKeys1: [], |
| | | selectedRowKeys2: [], |
| | | selectionRows1: [], |
| | | selectionRows2: [], |
| | | test: {}, |
| | | rightcolval: 0, |
| | | columns: [ |
| | | { |
| | | title: '车é´åç§°', |
| | | align: 'center', |
| | | dataIndex: 'workshopName', |
| | | }, |
| | | { |
| | | title: '车é´èæ¯å¾', |
| | | dataIndex: 'backgroundImage', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'backgroundImage' }, |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | ], |
| | | columns2: [ |
| | | { |
| | | title: '设å¤ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'equipmentId', |
| | | width: 120, |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'equipmentName', |
| | | }, |
| | | { |
| | | title: '设å¤ç±»å', |
| | | align: 'center', |
| | | width: 80, |
| | | dataIndex: 'equipmentType', |
| | | }, |
| | | |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 120, |
| | | }, |
| | | ], |
| | | // é«çº§æ¥è¯¢åæ° |
| | | superQueryParams2: '', |
| | | // é«çº§æ¥è¯¢æ¼æ¥æ¡ä»¶ |
| | | superQueryMatchType2: 'and', |
| | | url: { |
| | | list: '/mdc/mdcWorkshopInfo/list', |
| | | delete: '/mdc/mdcWorkshopInfo/delete', |
| | | list2: '/mdc/mdcWorkshopInfo/workshopEquipmentList', |
| | | addDeviceInWorkshop: '/mdc/mdcWorkshopInfo/addWorkshopEquipment', |
| | | delete2: '/mdc/mdcWorkshopInfo/deleteWorkshopEquipment', |
| | | deleteBatch2: '/mdc/mdcWorkshopInfo/deleteWorkshopEquipmentBatch', |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | leftColMd() { |
| | | return this.selectedRowKeys1.length === 0 ? 24 : 12 |
| | | }, |
| | | rightColMd() { |
| | | return this.selectedRowKeys1.length === 0 ? 0 : 12 |
| | | }, |
| | | }, |
| | | methods: { |
| | | onSelectChange2(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys2 = selectedRowKeys |
| | | this.selectionRows2 = selectionRows |
| | | }, |
| | | onClearSelected2() { |
| | | this.selectedRowKeys2 = [] |
| | | this.selectionRows2 = [] |
| | | }, |
| | | onClearSelected1() { |
| | | this.selectedRowKeys1 = [] |
| | | this.selectionRows1 = [] |
| | | }, |
| | | onSelectChange1(selectedRowKeys, selectionRows) { |
| | | this.rightcolval = 1 |
| | | this.selectedRowKeys1 = selectedRowKeys |
| | | this.selectionRows1 = selectionRows |
| | | this.model1 = Object.assign({}, selectionRows[0]) |
| | | this.currentWorkshopId = selectedRowKeys[0] |
| | | this.loadData2() |
| | | }, |
| | | getQueryParams2() { |
| | | //è·åæ¥è¯¢æ¡ä»¶ |
| | | let sqp = {} |
| | | if (this.superQueryParams2) { |
| | | sqp['superQueryParams'] = encodeURI(this.superQueryParams2) |
| | | sqp['superQueryMatchType'] = this.superQueryMatchType2 |
| | | } |
| | | var param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2) |
| | | param.field = this.getQueryField2() |
| | | param.pageNo = this.ipagination2.current |
| | | param.pageSize = this.ipagination2.pageSize |
| | | return filterObj(param) |
| | | }, |
| | | getQueryField2() { |
| | | //TODO åæ®µæéæ§å¶ |
| | | var str = 'id,' |
| | | this.columns2.forEach(function (value) { |
| | | str += ',' + value.dataIndex |
| | | }) |
| | | return str |
| | | }, |
| | | modalFormOk2() { |
| | | // æ°å¢/ä¿®æ¹ æåæ¶ï¼éè½½å表 |
| | | this.loadData2() |
| | | }, |
| | | loadData2(arg) { |
| | | if (!this.url.list2) { |
| | | this.$message.error('请设置url.list2屿§!') |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination2.current = 1 |
| | | } |
| | | if (this.currentWorkshopId === '') return |
| | | let params = this.getQueryParams2() //æ¥è¯¢æ¡ä»¶ |
| | | params.workshopId = this.currentWorkshopId |
| | | this.loading2 = true |
| | | getAction(this.url.list2, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource2 = res.result.records |
| | | this.ipagination2.total = res.result.total |
| | | } |
| | | this.loading2 = false |
| | | }) |
| | | }, |
| | | handleDelete1: function (id) { |
| | | this.handleDelete(id) |
| | | this.dataSource2 = [] |
| | | this.currentRoleId = '' |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»è®¾å¤è¡¨æ ¼ä¸çå 餿é®å触åå é¤å个车é´ä¸è®¾å¤çå
³ç³» |
| | | * @param equipmentId å½åè¡ç设å¤ç¼å· |
| | | */ |
| | | handleDelete2: function (equipmentId) { |
| | | if (!this.url.delete2) { |
| | | this.$message.error('请设置url.delete2屿§!') |
| | | return |
| | | } |
| | | var that = this |
| | | deleteAction(that.url.delete2, { workshopId: this.currentWorkshopId, equipmentId }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.loadData2() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * æ¹éå é¤è½¦é´ä¸è®¾å¤çå
³ç³» |
| | | */ |
| | | batchDel2: function () { |
| | | if (!this.url.deleteBatch2) { |
| | | this.$message.error('请设置url.deleteBatch2屿§!') |
| | | return |
| | | } |
| | | if (this.selectedRowKeys2.length <= 0) { |
| | | // this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼') |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©ä¸æ¡è®°å½', |
| | | }) |
| | | return |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys2.length; a++) { |
| | | ids += this.selectedRowKeys2[a] + ',' |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认å é¤', |
| | | content: 'æ¯å¦å é¤é䏿°æ®?', |
| | | onOk: function () { |
| | | deleteAction(that.url.deleteBatch2, { |
| | | workshopId: that.currentWorkshopId, |
| | | equipmentIds: ids, |
| | | }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.loadData2() |
| | | that.onClearSelected() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 鿩已æè®¾å¤åç¹å»ç¡®å®æ¶è§¦å |
| | | * @param data 已鿩çè®¾å¤ |
| | | */ |
| | | selectOK(data) { |
| | | let params = {} |
| | | params.workshopId = this.currentWorkshopId |
| | | params.equipmentIdList = [] |
| | | for (var a = 0; a < data.length; a++) { |
| | | params.equipmentIdList.push(data[a]) |
| | | } |
| | | console.log(params) |
| | | postAction(this.url.addDeviceInWorkshop, params).then((res) => { |
| | | if (res.success) { |
| | | this.loadData2() |
| | | this.$message.success(res.message) |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»å·²æè®¾å¤æé®è§¦å |
| | | */ |
| | | handleAddDeviceInWorkshop() { |
| | | if (this.currentWorkshopId == '') { |
| | | this.$message.error('è¯·éæ©ä¸ä¸ªè½¦é´!') |
| | | } else { |
| | | this.$refs.selectUserModal.visible = true |
| | | this.$refs.selectUserModal.selectedRowKeys = [] |
| | | this.$refs.selectUserModal.selectedRows = [] |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»å½åè¡è½¦é´é项å触åäºä»¶ |
| | | * @param record å½åè¡æ°æ® |
| | | */ |
| | | handleOpen(record) { |
| | | this.rightcolval = 1 |
| | | this.selectedRowKeys1 = [record.id] |
| | | this.model1 = Object.assign({}, record) |
| | | this.currentWorkshopId = record.id |
| | | this.onClearSelected2() |
| | | this.loadData2() |
| | | }, |
| | | |
| | | searchQuery2() { |
| | | this.loadData2(1) |
| | | }, |
| | | searchReset2() { |
| | | this.queryParam2 = {} |
| | | this.loadData2(1) |
| | | }, |
| | | handleTableChange2(pagination, filters, sorter) { |
| | | //å页ãæåºãçéååæ¶è§¦å |
| | | //TODO çé |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter2.column = sorter.field |
| | | this.isorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc' |
| | | } |
| | | this.ipagination2 = pagination |
| | | this.loadData2() |
| | | }, |
| | | hideUserList() { |
| | | //this.rightcolval = 0 |
| | | this.selectedRowKeys1 = [] |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | /** Buttonæé®é´è· */ |
| | | .ant-btn { |
| | | margin-left: 8px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <a-modal |
| | | centered |
| | | :title="title" |
| | | :width="1000" |
| | | :visible="visible" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | |
| | | <a-col :span="10"> |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-input placeholder="请è¾å
¥è®¾å¤åç§°" v-model="queryParam.equipmentName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <a-table |
| | | size="small" |
| | | bordered |
| | | rowKey="equipmentId" |
| | | :columns="columns1" |
| | | :dataSource="dataSource1" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :scroll="{ y: 240 }" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys,onSelectAll:onSelectAll,onSelect:onSelect,onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | </a-modal> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { filterObj } from '@/utils/util' |
| | | import { getAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'SelectDeviceModal', |
| | | data() { |
| | | return { |
| | | title: 'æ·»å å·²æè®¾å¤', |
| | | names: [], |
| | | visible: false, |
| | | placement: 'right', |
| | | description: '', |
| | | // æ¥è¯¢æ¡ä»¶ |
| | | queryParam: {}, |
| | | // 表头 |
| | | columns1: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 50, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'equipmentId' |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '设å¤ç±»å', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'equipmentType' |
| | | }, |
| | | { |
| | | title: '驱å¨ç±»å', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'driveType' |
| | | } |
| | | ], |
| | | //æ°æ®é |
| | | dataSource1: [], |
| | | dataSource2: [], |
| | | // å页忰 |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | loading: false, |
| | | selectedRowKeys: [], |
| | | selectedRows: [], |
| | | url: { |
| | | list: '/mdc/mdcEquipment/list' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.loadData() |
| | | }, |
| | | methods: { |
| | | searchQuery() { |
| | | this.loadData(1) |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.loadData(1) |
| | | }, |
| | | handleCancel() { |
| | | this.visible = false |
| | | }, |
| | | handleOk() { |
| | | this.dataSource2 = this.selectedRowKeys |
| | | console.log('data---------' + this.dataSource2) |
| | | if (this.dataSource2.length > 0) { |
| | | this.$emit('selectFinished', this.dataSource2) |
| | | } |
| | | this.visible = false |
| | | }, |
| | | add() { |
| | | this.visible = true |
| | | }, |
| | | loadData(arg) { |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource1 = res.result.records |
| | | this.ipagination.total = res.result.total |
| | | } |
| | | }) |
| | | }, |
| | | getQueryParams() { |
| | | var param = Object.assign({}, this.queryParam, this.isorter) |
| | | param.field = this.getQueryField() |
| | | param.pageNo = this.ipagination.current |
| | | param.pageSize = this.ipagination.pageSize |
| | | return filterObj(param) |
| | | }, |
| | | getQueryField() { |
| | | //TODO åæ®µæéæ§å¶ |
| | | }, |
| | | onSelectAll(selected, selectedRows, changeRows) { |
| | | if (selected === true) { |
| | | for (var a = 0; a < changeRows.length; a++) { |
| | | this.dataSource2.push(changeRows[a]) |
| | | } |
| | | } else { |
| | | for (var b = 0; b < changeRows.length; b++) { |
| | | this.dataSource2.splice(this.dataSource2.indexOf(changeRows[b]), 1) |
| | | } |
| | | } |
| | | // console.log(selected, selectedRows, changeRows); |
| | | }, |
| | | onSelect(record, selected) { |
| | | console.log(this.selectedRowKeys) |
| | | if (selected === true) { |
| | | this.dataSource2.push(record) |
| | | } else { |
| | | var index = this.dataSource2.indexOf(record) |
| | | //console.log(); |
| | | if (index >= 0) { |
| | | this.dataSource2.splice(this.dataSource2.indexOf(record), 1) |
| | | } |
| | | } |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectedRows) { |
| | | console.log('selectedRowKeys', selectedRowKeys) |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.selectionRows = selectedRows |
| | | }, |
| | | onClearSelected() { |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | }, |
| | | handleDelete: function(record) { |
| | | this.dataSource2.splice(this.dataSource2.indexOf(record), 1) |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | //å页ãæåºãçéååæ¶è§¦å |
| | | console.log(sorter) |
| | | //TODO çé |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc' |
| | | } |
| | | this.ipagination = pagination |
| | | this.loadData() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | | .ant-card-body .table-operator { |
| | | margin-bottom: 18px; |
| | | } |
| | | |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 15px; |
| | | padding-bottom: 15px; |
| | | } |
| | | |
| | | .anty-row-operator button { |
| | | margin: 0 5px |
| | | } |
| | | |
| | | .ant-btn-danger { |
| | | background-color: #ffffff |
| | | } |
| | | |
| | | .ant-modal-cust-warp { |
| | | height: 100% |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-body { |
| | | height: calc(100% - 110px) !important; |
| | | overflow-y: auto |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-content { |
| | | height: 90% !important; |
| | | overflow-y: hidden |
| | | } |
| | | </style> |
| | |
| | | //æ ¹æ®å±å¹å®½åº¦èªéåºæ½å±å®½åº¦ |
| | | this.resetScreenSize(); |
| | | that.userId = record.id; |
| | | |
| | | that.model = Object.assign({},{selectedroles:'',selecteddeparts:''}, record); |
| | | that.model = Object.assign({},{selectedroles:'',selectedProduction:''}, record); |
| | | |
| | | //身份为ä¸çº§æ¾ç¤ºè´è´£é¨é¨ï¼å¦å䏿¾ç¤º |
| | | if(this.model.userIdentity==2){ |
| | | this.departIdShow=true; |
| | |
| | | that.getUserRoles(record.id); |
| | | that.getUserDeparts(record.id); |
| | | } |
| | | console.log('that.model=',that.model) |
| | | console.log('that.model',that.model) |
| | | }, |
| | | isDisabledAuth(code){ |
| | | return disabledAuthFilter(code); |
| | |
| | | return c; |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | refresh () { |
| | | this.userId="" |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="800" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é" |
| | | wrapClassName="ant-modal-cust-warp" |
| | | style="top:5%;height: 85%;overflow-y: hidden"> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" v-bind="layout" :model="model" :rules="validatorRules"> |
| | | <a-form-model-item label="车é´ç¼å·" required prop="id"> |
| | | <a-input v-model="model.id" :disabled="isEdit" placeholder="请è¾å
¥è½¦é´ç¼å·"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="车é´åç§°" required prop="workshopName"> |
| | | <a-input v-model="model.workshopName" placeholder="请è¾å
¥è½¦é´åç§°"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="车é´èæ¯å¾" required prop="backgroundImage"> |
| | | <j-image-upload class="avatar-uploader" text="ä¸ä¼ " v-model="model.backgroundImage"></j-image-upload> |
| | | </a-form-model-item> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import api from '@/api/mdc' |
| | | |
| | | export default { |
| | | name: 'WorkshopModal', |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | isEdit: false, |
| | | model: {}, |
| | | layout: { |
| | | labelCol: { span: 3 }, |
| | | wrapperCol: { span: 14 } |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | workshopName: [ |
| | | { required: true, message: '请è¾å
¥è½¦é´åç§°!' }, |
| | | { min: 2, max: 30, message: 'é¿åº¦å¨ 2 å° 30 个å符', trigger: 'blur' } |
| | | ], |
| | | id: [ |
| | | { required: true, message: '请è¾å
¥è½¦é´ç¼å·!' }, |
| | | { min: 0, max: 64, message: 'é¿åº¦ä¸è¶
è¿ 64 个å符', trigger: 'blur' }, |
| | | { validator: this.validateRoleCode } |
| | | ], |
| | | backgroundImage:[ |
| | | { required: true, message: '请ä¸ä¼ 车é´èæ¯å¾!' } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)) |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.edit(this.modelDefault) |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | //ç¼è¾é¡µé¢ç¦æ¢ä¿®æ¹è§è²ç¼ç |
| | | if (this.model.id) { |
| | | this.isEdit = true |
| | | } else { |
| | | this.isEdit = false |
| | | } |
| | | }, |
| | | close() { |
| | | this.$refs.form.clearValidate() |
| | | this.$emit('close') |
| | | this.visible = false |
| | | }, |
| | | handleOk() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | console.log('触å') |
| | | that.confirmLoading = true |
| | | let obj |
| | | if (!this.isEdit) { |
| | | console.log('è§¦åæ°å¢') |
| | | obj = api.addWorkshopApi(this.model) |
| | | } else { |
| | | console.log('触åä¿®æ¹') |
| | | obj = api.editWorkshopApi(this.model) |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | validateRoleCode(rule, value, callback) { |
| | | if (/[\u4E00-\u9FA5]/g.test(value)) { |
| | | callback('车é´ç¼å·ä¸å¯è¾å
¥æ±å!') |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .avatar-uploader > .ant-upload { |
| | | width: 104px; |
| | | height: 104px; |
| | | } |
| | | </style> |