Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop
| | |
| | | if( rc.flag.length > 0 ) { |
| | | tempRows += "<td> </td>"; // exclude it!! |
| | | } else { |
| | | tempRows += "<td"; |
| | | // å¹é
æ ¼å¼ä¸º'yyyy-mm'çæ¥æåç¬¦ä¸²æ°æ®ï¼è¥æå
¶ä»éæ±åæåå¢å |
| | | var regexPattern = /^\d{4}-\d{2}$/; |
| | | if($(q).html().match(regexPattern)){ |
| | | tempRows += "<td style=\"mso-number-format:'yyyy-mm';\""; |
| | | }else{ |
| | | tempRows += "<td"; |
| | | if(additionalStyles){ |
| | | tempRows += " style='" + additionalStyles + "'"; |
| | | } |
| | | } |
| | | if( rc.rows > 0) { |
| | | tempRows += " rowspan='" + rc.rows + "' "; |
| | | } |
| | | if( rc.cols > 0) { |
| | | tempRows += " colspan='" + rc.cols + "' "; |
| | | } |
| | | if(additionalStyles){ |
| | | tempRows += " style='" + additionalStyles + "'"; |
| | | } |
| | | tempRows += ">" + $(q).html() + "</td>"; |
| | | } |
| | |
| | | return that.Logout({}).then(() => { |
| | | // update-begin author:wangshuai date:20200601 for: éåºç»å½è·³è½¬ç»å½é¡µé¢ |
| | | that.$router.push({ path: '/user/login' }); |
| | | window.location.reload() |
| | | // window.location.reload() |
| | | // update-end author:wangshuai date:20200601 for: éåºç»å½è·³è½¬ç»å½é¡µé¢ |
| | | }).catch(err => { |
| | | that.$message.error({ |
| | |
| | | if (token) { |
| | | store.dispatch('Logout').then(() => { |
| | | setTimeout(() => { |
| | | window.location.reload() |
| | | router.push({ path: '/user/login' }); |
| | | // window.location.reload() |
| | | }, 1500) |
| | | }) |
| | | } |
| | |
| | | onOk: () => { |
| | | store.dispatch('Logout').then(() => { |
| | | Vue.ls.remove(ACCESS_TOKEN) |
| | | window.location.reload() |
| | | setTimeout(() => { |
| | | router.push({ path: '/user/login' }); |
| | | // window.location.reload() |
| | | }, 1500) |
| | | }) |
| | | } |
| | | }) |
| | |
| | | <template> |
| | | <dv-full-screen-container class="full-screen-container"> |
| | | <header class="page-header" :style="{height: pageHeaderHeight+'px'}"> |
| | | {{ workshopDetails.workshopName }} |
| | | <div class="header-left" v-has="'home:saveDevicePositionAndSize'" v-if="!isFullScreen"> |
| | | <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> |
| | | <div class="device-status-info"> |
| | | <a-space 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> |
| | | </a-space> |
| | | </div> |
| | | </header> |
| | | <div> |
| | | <!--页头åºå--> |
| | | <header class="page-header" :style="{height: pageHeaderHeight+'px'}"> |
| | | <a-row style="height: 100%"> |
| | | <a-col :span="7" class="header-left"> |
| | | <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-button type="primary" icon="save" size="large" @click="saveDevicePositionAndSizeByApi">ä¿åä½ç½®</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | |
| | | <dv-border-box-8> |
| | | <div class="content-container" ref="deviceContainerRef"> |
| | | <a-col :span="10" class="workshop-name">{{ workshopDetails.workshopName }}</a-col> |
| | | |
| | | <a-col :span="7" class="device-status-info"> |
| | | <!--<a-space v-for="item in deviceStatusList" :key="item.value" class="single-status-info"--> |
| | | <!--@click="handleScreenDevive(item)">--> |
| | | <!--<div :style="{color:item.checked?'#1890FF':'#fff'}">{{ item.label }}</div>--> |
| | | <!--<div class="status-square" :style="{ backgroundColor: item.color }"></div>--> |
| | | <!--<!–<a-checkbox :checked="item.checked" @change="checkboxChange(item)"></a-checkbox>–>--> |
| | | <!--<div>{{getDeviceNumberByStatus(item.value) }}</div>--> |
| | | <!--</a-space>--> |
| | | <a-space v-for="item in deviceStatusList" :key="item.value" class="single-status-info"> |
| | | <div :style="{color:item.checked?'#1890FF':'#fff'}">{{ item.label }}</div> |
| | | <div class="status-square" :style="{ backgroundColor: item.color }"></div> |
| | | <!--<a-checkbox :checked="item.checked" @change="checkboxChange(item)"></a-checkbox>--> |
| | | <div>{{getDeviceNumberByStatus(item.value) }}</div> |
| | | </a-space> |
| | | </a-col> |
| | | </a-row> |
| | | </header> |
| | | |
| | | <!--ææ½è®¾å¤åºå--> |
| | | <div class="content-container" ref="deviceContainerRef" style="overflow: auto"> |
| | | <img :src="imgSrc" width="1920" height="900"> |
| | | <div class="guideline guidelineX" :style="{top:guidelineXTop+'px',display:showGuideline}"></div> |
| | | <div class="guideline guidelineY" :style="{left:guidelineYLeft+'px',display:showGuideline}"></div> |
| | | <VueDragResize |
| | | v-for="(item, index) in deviceList" |
| | | :key="item.equipmentId" |
| | |
| | | v-on:dragging="resize($event, index)" |
| | | :parentLimitation="parentLimitation" |
| | | :parentH="parentH" |
| | | :parentW="parentW" |
| | | :minw="70" |
| | | :minh="70" |
| | | :isDraggable="isDraggable" |
| | | :isResizable="isResizable" |
| | | :stickSize="6" |
| | | @deactivated="showGuideline = 'none'" |
| | | > |
| | | <div class="single-device" :style="{ width: item.vw + 'px', height: item.vh + 'px' }" |
| | | @click="openDetail(item)"> |
| | |
| | | ></div> |
| | | </div> |
| | | <div class="device-id" id="deviceId" |
| | | :style="{ fontSize: item.fontSize + 'px',color:workshopDetails.equipmentIdColor }"> |
| | | :style="{ color:workshopDetails.equipmentIdColor }"> |
| | | {{ item.equipmentId }} |
| | | </div> |
| | | </div> |
| | | </VueDragResize> |
| | | </div> |
| | | </dv-border-box-8> |
| | | |
| | | <EquipmentDetailModal ref="EquipmentDetailModal"></EquipmentDetailModal> |
| | | <EquipmentDetailModal ref="EquipmentDetailModal"></EquipmentDetailModal> |
| | | </div> |
| | | </dv-full-screen-container> |
| | | </template> |
| | | |
| | |
| | | isSwitchChecked: false, // æ¯å¦å¼å¯åè½ |
| | | timingAcquisition: null, // 宿¶å·æ°æ¯å¦å¼å¯ |
| | | parentH: 5000,//ç¶çº§é«åº¦ |
| | | parentW: 1920,//ç¶çº§å®½åº¦ |
| | | showGuideline: 'none', |
| | | guidelineXTop: 0, |
| | | guidelineYLeft: 0, |
| | | deviceList: [ |
| | | // { |
| | | // equipmentId: '123213213123232',// 设å¤ID |
| | |
| | | // coordinateLeft: 100, // ææ½å
ç´ è·çå左侧è·ç¦» |
| | | // vw: 100, // 缩æ¾å
ç´ å®½åº¦ |
| | | // vh: 100, // 缩æ¾å
ç´ é«åº¦ |
| | | // fontSize: 12, // 缩æ¾å
ç´ åä½å¤§å° |
| | | // equipmentStatus: 1 // 设å¤ç¶æ 0:å
³æº 22:æ¥è¦ 2:å¾
æº 3:è¿è¡ 弿º:1ï¼æ²¡æåè²ç¯æ è¯å½ä¸ºå¾
æºï¼ |
| | | // } |
| | | ], // 设å¤ä¿¡æ¯å表 |
| | | deviceList_copy: [], |
| | | deviceStatusList: [ |
| | | // { |
| | | // label: 'å
¨é¨', |
| | | // value: 99, |
| | | // color: '#fff', |
| | | // checked: true |
| | | // }, |
| | | { |
| | | label: 'å
³æº', |
| | | value: 0, |
| | | color: '#A8A8A8' |
| | | color: '#A8A8A8', |
| | | checked: false |
| | | }, |
| | | { |
| | | label: 'å¾
æº', |
| | | value: 2, |
| | | color: '#FFFF00' |
| | | color: '#FFFF00', |
| | | checked: false |
| | | }, |
| | | { |
| | | label: 'è¿è¡', |
| | | value: 3, |
| | | color: '#00EE00' |
| | | color: '#00EE00', |
| | | checked: false |
| | | }, |
| | | { |
| | | label: 'æ¥è¦', |
| | | value: 22, |
| | | color: '#FF0000' |
| | | color: '#FF0000', |
| | | checked: false |
| | | } |
| | | ],// 设å¤ç¶ææç¤ºç¯åè¡¨ï¼ |
| | | windowHeight: null,// å½åæµè§å¨å¯è§åºåé«åº¦ï¼ï¼ä¸å
æ¬å·¥å
·æ ã书ç¾ãåºé¨ä»»å¡æ ï¼ï¼è¿å
¥é¡µé¢æ¶è®¡ç®ä¸æ¬¡ï¼é¤ééæ°å 载页é¢å¦åæµè§å¨å¯è§åºåé«åº¦åä¸åçæ¹å |
| | | windowHeight: null,// å½åæµè§å¨å¯è§åºåé«åº¦ï¼ï¼ä¸å
æ¬å·¥å
·æ ã书ç¾ãåºé¨ä»»å¡æ ï¼ |
| | | isFullScreen: false,// è¿å
¥çæ¿é¡µé¢æ¶æ¯å¦ä¸ºå
¨å±æ¨¡å¼ï¼ä¸å
æ¬æ£å¸¸æ¨¡å¼è¿å
¥ååæ¢ä¸ºå
¨å±æ¨¡å¼ |
| | | parentLimitation: false// ææ½åºåæ¯å¦éå¶å¨ç¶å
ç´ åºåå
|
| | | parentLimitation: false,// ææ½åºåæ¯å¦éå¶å¨ç¶å
ç´ åºåå
, |
| | | checkedStatusCount: null,// å·²å¾éçéç¶æä¸ªæ° |
| | | imgSrc: ''// 车é´å¾çº¸å°å |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | api.getDeviceListInWorkshopSignagePageApi(id).then((res) => { |
| | | if (res.result && res.result.length > 0) { |
| | | this.deviceList = res.result |
| | | this.deviceList_copy = res.result |
| | | } |
| | | }) |
| | | }, |
| | |
| | | getWorkshopDetailsByApi(id) { |
| | | api.getWorkshopDetailByWorkshopIdApi(id).then((res) => { |
| | | this.workshopDetails = res.result |
| | | this.$refs.deviceContainerRef.style.backgroundImage = `url(${this.getImgView( |
| | | this.workshopDetails.backgroundImage |
| | | )})` |
| | | |
| | | // this.$refs.deviceContainerRef.style.backgroundImage = `url(${this.getImgView( |
| | | // this.workshopDetails.backgroundImage |
| | | // )})` |
| | | this.imgSrc = this.getImgView(this.workshopDetails.backgroundImage) |
| | | this.$refs.deviceContainerRef.style.height = (this.windowHeight - this.pageHeaderHeight) + 'px' |
| | | this.parentH = this.windowHeight - this.pageHeaderHeight |
| | | // this.parentH = this.windowHeight - this.pageHeaderHeight |
| | | this.parentH = 900 |
| | | this.parentLimitation = true // å¨ç¶å
ç´ é«åº¦è®¾ç½®åå设置éå¶ææ½åºåï¼ä¸è¿æ ·ææ¦ç导è´ç¶å
ç´ é«åº¦æªè®¾ç½®å°±éå¶ææ½ |
| | | }) |
| | | }, |
| | |
| | | // } else { |
| | | // this.deviceList[index].fontSize = 12 |
| | | // } |
| | | this.showGuideline = 'block' |
| | | this.deviceList[index].vw = newRect.width |
| | | this.deviceList[index].vh = newRect.height |
| | | this.deviceList[index].coordinateTop = newRect.top |
| | | this.deviceList[index].coordinateLeft = newRect.left |
| | | this.guidelineXTop = newRect.top + newRect.height / 2 |
| | | this.guidelineYLeft = newRect.left + newRect.width / 2 |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @returns {number} è®¾å¤æ°é |
| | | */ |
| | | getDeviceNumberByStatus(value) { |
| | | return this.deviceList.filter((item) => item.equipmentStatus === value).length |
| | | if (value === 99) return this.deviceList_copy.length |
| | | return this.deviceList_copy.filter((item) => item.equipmentStatus === value).length |
| | | }, |
| | | |
| | | /** |
| | |
| | | * æµè§å¨å°ºå¯¸åçæ¹åæ¶è§¦å |
| | | */ |
| | | handleWindowSizeChange() { |
| | | this.isFullScreen = !this.isFullScreen |
| | | if (!this.isFullScreen) location.reload() // å¦æä¸ºå
¨å±æ¨¡å¼ï¼åå¨åæ¢æ¨¡å¼æ¶éæ°å 载页é¢ä»¥éæ°è·åæµè§å¨å¯è§åºåé«åº¦ |
| | | // this.isFullScreen = !this.isFullScreen |
| | | // if (!this.isFullScreen) location.reload() // å¦æä¸ºå
¨å±æ¨¡å¼ï¼åå¨åæ¢æ¨¡å¼æ¶éæ°å 载页é¢ä»¥éæ°è·åæµè§å¨å¯è§åºåé«åº¦ |
| | | const windowHeight = |
| | | window.innerHeight || |
| | | document.documentElement.clientHeight || |
| | | document.body.clientHeight |
| | | // this.parentH = 99999 |
| | | // const scaleRate = windowHeight / this.windowHeight |
| | | // this.windowHeight = windowHeight |
| | | this.$refs.deviceContainerRef.style.height = (windowHeight - this.pageHeaderHeight) + 'px' |
| | | // const timer = setTimeout(() => { |
| | | // this.deviceList.forEach(item => { |
| | | // item.coordinateTop = item.coordinateTop * scaleRate |
| | | // item.vh = item.vh * scaleRate |
| | | // console.log('vh', item.vh) |
| | | // }) |
| | | // this.parentH = windowHeight - this.pageHeaderHeight |
| | | // console.log('changeDeviceList', this.deviceList) |
| | | // }, 500) |
| | | // console.log('scaleRate', scaleRate) |
| | | }, |
| | | |
| | | checkboxChange(obj) { |
| | | //éè¦å¤ææ¯å¦å¼å¯åè½ï¼ç®çæ¯ä¸ºäºå
³é宿¶å¨é¿å
çéå设å¤è¢«å®æ¶å·æ°çæ°è®¾å¤è¦ç |
| | | if (this.isOperatingDevice) { |
| | | obj.checked = !obj.checked |
| | | if (obj.value !== 99) { |
| | | if (obj.checked) this.checkedStatusCount++ |
| | | else this.checkedStatusCount-- |
| | | } |
| | | |
| | | if (obj.value == 99) { |
| | | this.deviceStatusList.forEach(item => { |
| | | if (item.value !== obj.value) item.checked = obj.checked |
| | | }) |
| | | if (obj.checked) { |
| | | this.deviceList = this.deviceList_copy |
| | | this.checkedStatusCount = this.deviceStatusList.length - 1 |
| | | } else { |
| | | this.deviceList = [] |
| | | this.checkedStatusCount = 0 |
| | | } |
| | | } else { |
| | | this.deviceStatusList.forEach(item => { |
| | | if (item.value === 99) { |
| | | if (this.checkedStatusCount !== this.deviceStatusList.length - 1 || this.checkedStatusCount === 0) item.checked = false |
| | | if (this.checkedStatusCount === this.deviceStatusList.length - 1) item.checked = true |
| | | } |
| | | }) |
| | | if (obj.checked) { |
| | | this.deviceList.push(...this.deviceList_copy.filter(item => item.equipmentStatus === obj.value)) |
| | | } else { |
| | | this.deviceList = this.deviceList.filter(item => item.equipmentStatus !== obj.value) |
| | | } |
| | | } |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: '请å¼å¯åè½ååè¿è¡çé' |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | handleScreenDevive(obj) { |
| | | //éè¦å¤ææ¯å¦å¼å¯åè½ï¼ç®çæ¯ä¸ºäºå
³é宿¶å¨é¿å
çéå设å¤è¢«å®æ¶å·æ°çæ°è®¾å¤è¦ç |
| | | if (this.isOperatingDevice) { |
| | | obj.checked = true |
| | | this.deviceList = this.deviceList_copy |
| | | this.deviceStatusList.forEach(item => { |
| | | if (item.value !== obj.value) item.checked = false |
| | | }) |
| | | |
| | | if (obj.value == 99) this.deviceList = this.deviceList_copy |
| | | else this.deviceList = this.deviceList.filter(item => item.equipmentStatus === obj.value) |
| | | |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: '请å¼å¯åè½ååè¿è¡çé' |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.getDeviceListByApi(this.$route.params.id) |
| | | this.getWorkshopDetailsByApi(this.$route.params.id) |
| | | } |
| | | this.checkedStatusCount = this.deviceStatusList.length - 1 |
| | | }, |
| | | mounted() { |
| | | // ç¦æ¢ç¨æ·éä¸å
容 |
| | |
| | | document.body.clientHeight |
| | | |
| | | // 夿æµè§å¨å¯è§åºåé«åº¦æ¯å¦çäºå辨çï¼è¥ç¸çå表示è¿å
¥æ¶æµè§å¨ä¸ºå
¨å±æ¨¡å¼ |
| | | if (this.windowHeight === screen.height) this.isFullScreen = true |
| | | // if (this.windowHeight === screen.height) this.isFullScreen = true |
| | | |
| | | window.addEventListener('resize', this.handleWindowSizeChange) |
| | | }, |
| | |
| | | color: #fff; |
| | | |
| | | .page-header { |
| | | font-size: 50px; |
| | | text-align: center; |
| | | position: relative; |
| | | /*font-size: 50px;*/ |
| | | /*text-align: center;*/ |
| | | /*position: relative;*/ |
| | | |
| | | .header-left { |
| | | width: 450px; |
| | | position: absolute; |
| | | left: 0; |
| | | top: 35px; |
| | | height: 100%; |
| | | display: flex; |
| | | justify-content: space-evenly; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 16px; |
| | | padding-top: 20px; |
| | | } |
| | | |
| | | .workshop-name { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 50px; |
| | | } |
| | | |
| | | .device-status-info { |
| | | font-size: 16px; |
| | | width: 400px; |
| | | position: absolute; |
| | | top: 40px; |
| | | right: 40px; |
| | | height: 100%; |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding-top: 20px; |
| | | |
| | | .single-status-info { |
| | | margin: 10px; |
| | | cursor: pointer; |
| | | |
| | | .status-square { |
| | | width: 14px; |
| | | height: 14px; |
| | | border: 1px solid #fff; |
| | | border-radius: 2px; |
| | | border-radius: 3px; |
| | | } |
| | | } |
| | | } |
| | |
| | | width: 100%; |
| | | background-repeat: no-repeat; |
| | | background-size: 100% 100%; |
| | | position: relative; |
| | | |
| | | .guideline{ |
| | | position: absolute; |
| | | border: 1px dashed #ccc; |
| | | } |
| | | |
| | | .guidelineX { |
| | | width: 1920px; |
| | | left: 0; |
| | | } |
| | | |
| | | .guidelineY { |
| | | top: 0; |
| | | height: 900px; |
| | | } |
| | | |
| | | .single-device { |
| | | position: absolute; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /deep/ .ant-checkbox-inner { |
| | | background-color: transparent; |
| | | border-color: #fff; |
| | | } |
| | | </style> |
| | |
| | | // }, |
| | | { |
| | | dataIndex:'isUse_dictText', |
| | | title: 'æ¯å¦è¿æ»¤', |
| | | title: 'æ¯å¦å¯ç¨', |
| | | align: "center", |
| | | width:380 |
| | | // dictCode:'alarm_is_use' |
| | |
| | | fieldList.push({ type: 'string', value: 'alarmCode', text: 'æ¥è¦å·', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'alarmDescription', text: 'æ¥è¦å
容', dictCode: '' }) |
| | | fieldList.push({ type: 'int', value: 'driveType', text: '设å¤é©±å¨ç±»å', dictCode: '' }) |
| | | fieldList.push({ type: 'switch', value: 'isUse', text: 'æ¯å¦è¿æ»¤' }) |
| | | fieldList.push({ type: 'switch', value: 'isUse', text: 'æ¯å¦å¯ç¨' }) |
| | | this.superFieldList = fieldList |
| | | }, |
| | | |
| | |
| | | <base-tree @sendSelectBaseTree="changeSelection" @getCurrSelected="changeSelectionNode"></base-tree> |
| | | </a-col> |
| | | <a-col :md="24-5" :sm="24"> |
| | | <div class="equipMessage"> |
| | | <table> |
| | | <tr> |
| | | <td>å
³æº |
| | | <span class="equipShutdown"></span> |
| | | </td> |
| | | <td>{{offNumber}}</td> |
| | | <td>å¾
æº |
| | | <span class="standbyNumber"></span> |
| | | </td> |
| | | <td>{{standbyNumber}}</td> |
| | | <td>è¿è¡ |
| | | <span class="equipRun"></span> |
| | | </td> |
| | | <td>{{workNumber}}</td> |
| | | <td>æ¥è¦ |
| | | <span class="equipAlarm"></span> |
| | | </td> |
| | | <td>{{warningNumber}}</td> |
| | | <td>æ»æ°</td> |
| | | <td>{{allNumber}}</td> |
| | | </tr> |
| | | </table> |
| | | <!--<div class="equipMessage">--> |
| | | <!--<table>--> |
| | | <!--<tr>--> |
| | | <!--<td>å
³æº--> |
| | | <!--<span class="equipShutdown"></span>--> |
| | | <!--</td>--> |
| | | <!--<td>{{offNumber}}</td>--> |
| | | <!--<td>å¾
æº--> |
| | | <!--<span class="standbyNumber"></span>--> |
| | | <!--</td>--> |
| | | <!--<td>{{standbyNumber}}</td>--> |
| | | <!--<td>è¿è¡--> |
| | | <!--<span class="equipRun"></span>--> |
| | | <!--</td>--> |
| | | <!--<td>{{workNumber}}</td>--> |
| | | <!--<td>æ¥è¦--> |
| | | <!--<span class="equipAlarm"></span>--> |
| | | <!--</td>--> |
| | | <!--<td>{{warningNumber}}</td>--> |
| | | <!--<td>æ»æ°</td>--> |
| | | <!--<td>{{allNumber}}</td>--> |
| | | <!--</tr>--> |
| | | <!--</table>--> |
| | | |
| | | <!--</div>--> |
| | | <div class="device-status-info"> |
| | | <a-space v-for="item in deviceStatusList" :key="item.value" class="single-status-info"> |
| | | <template v-if="item.value!=99"> |
| | | <div>{{ item.label }}</div> |
| | | <div class="status-square" :style="{ backgroundColor: item.color }"></div> |
| | | <div>{{getDeviceNumberByStatus(item.value) }}</div> |
| | | </template> |
| | | <template v-else> |
| | | <div>{{ item.label }}</div> |
| | | <div>{{getDeviceNumberByStatus(item.value) }}</div> |
| | | </template> |
| | | </a-space> |
| | | </div> |
| | | |
| | | <div> |
| | | <a-tabs default-active-key="1"> |
| | | <a-tab-pane key="1" tab="å¸å±å¾"> |
| | |
| | | }, |
| | | param:{}, |
| | | timer:null, |
| | | timerzhun:null |
| | | timerzhun:null, |
| | | deviceStatusList: [ |
| | | { |
| | | label: 'å
³æº', |
| | | value: 0, |
| | | color: '#A8A8A8' |
| | | }, |
| | | { |
| | | label: 'å¾
æº', |
| | | value: 2, |
| | | color: '#FFFF00' |
| | | }, |
| | | { |
| | | label: 'è¿è¡', |
| | | value: 3, |
| | | color: '#00EE00' |
| | | }, |
| | | { |
| | | label: 'æ¥è¦', |
| | | value: 22, |
| | | color: '#FF0000' |
| | | }, |
| | | { |
| | | label: 'æ»æ°', |
| | | value: 99, |
| | | color: '#fff' |
| | | } |
| | | ],// 设å¤ç¶ææç¤ºç¯åè¡¨ï¼ |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | description:err.message |
| | | }); |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * æ ¹æ®è®¾å¤ç¶æå¼è·å对åºè®¾å¤æ°é |
| | | * @param value 设å¤ç¶æå¼ |
| | | * @returns {number} è®¾å¤æ°é |
| | | */ |
| | | getDeviceNumberByStatus(value) { |
| | | if (value === 99) return this.dataList.length |
| | | return this.dataList.filter((item) => item.oporation === 1 && value === 2 || item.oporation === value).length |
| | | }, |
| | | }, |
| | | mounted(){ |
| | | this.equipmentStatistics() |
| | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | <style scoped lang="less"> |
| | | @import '~@assets/less/common.less'; |
| | | |
| | | .equipMessage { |
| | |
| | | .equipMessage table td .equipAlarm { |
| | | background-color: #FD0008; |
| | | } |
| | | |
| | | .device-status-info { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | align-items: center; |
| | | |
| | | .single-status-info { |
| | | margin: 10px; |
| | | .status-square { |
| | | width: 20px; |
| | | height: 20px; |
| | | border: 1px solid #ddd; |
| | | border-radius: 3px; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | |
| | | <a-col :md="6" :sm="12"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <!--<a-input placeholder="请è¾å
¥è´¦å·æ¥è¯¢" v-model="queryParam.username"></a-input>--> |
| | | <a-input placeholder="请è¾å
¥è®¾å¤ç¼å·" v-model="queryParam.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="6" :sm="8"> |
| | | <a-form-item label="设å¤åç§°"> |
| | | <!--<a-input placeholder="请è¾å
¥è´¦å·æ¥è¯¢" v-model="queryParam.username"></a-input>--> |
| | | <a-input placeholder="请è¾å
¥è®¾å¤åç§°" v-model="queryParam.equipmentName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | <a-col :md="6" :sm="8"> |
| | | <a-form-item label="车é´åç§°"> |
| | | <!--<a-input placeholder="请è¾å
¥è½¦é´åç§°" v-model="queryParam.productionName"></a-input>--> |
| | | <a-tree-select v-model="queryParam.productionName" :treeData="workshopTreeData" placeholder="è¯·éæ©è½¦é´" tree-default-expand-all></a-tree-select> |
| | | <a-tree-select v-model="queryParam.productionName" :treeData="workshopTreeData" placeholder="è¯·éæ©è½¦é´" |
| | | :treeDefaultExpandedKeys="treeDefaultExpandedKeys"></a-tree-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" style="border-top: 5px"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus" >æ·»å 设å¤</a-button> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ·»å 设å¤</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('设å¤ä¿¡æ¯')">导åº</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay" @click="handleMenuClick"> |
| | |
| | | <!-- 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">{{ selectedRowKeys.length }}</a>项 |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i>已鿩 <a style="font-weight: 600">{{ |
| | | selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | |
| | | <template slot="avatarslot" slot-scope="text, record, index"> |
| | | <div class="anty-img-wrap"> |
| | | <a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)" >ç¼è¾</a> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link"> |
| | |
| | | <a href="javascript:;" @click="handleDetail(record)">详æ
</a> |
| | | </a-menu-item> |
| | | |
| | | <!--<a-menu-item>--> |
| | | <!--<a href="javascript:;" @click="handleChangePassword(record.username)">å¯ç </a>--> |
| | | <!--</a-menu-item>--> |
| | | |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | |
| | | <!--<a-menu-item v-if="record.status==1">--> |
| | | <!--<a-popconfirm title="ç¡®å®å»ç»å?" @confirm="() => handleFrozen(record.id,2,record.username)">--> |
| | | <!--<a>å»ç»</a>--> |
| | | <!--</a-popconfirm>--> |
| | | <!--</a-menu-item>--> |
| | | |
| | | <!--<a-menu-item v-if="record.status==2">--> |
| | | <!--<a-popconfirm title="ç¡®å®è§£å»å?" @confirm="() => handleFrozen(record.id,1,record.username)">--> |
| | | <!--<a>è§£å»</a>--> |
| | | <!--</a-popconfirm>--> |
| | | <!--</a-menu-item>--> |
| | | |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | |
| | | <!-- tableåºå-end --> |
| | | |
| | | <user-modal ref="modalForm" @ok="modalFormOk"></user-modal> |
| | | |
| | | <password-modal ref="passwordmodal" @ok="passwordModalOk"></password-modal> |
| | | |
| | | <sys-user-agent-modal ref="sysUserAgentModal"></sys-user-agent-modal> |
| | | |
| | | <!-- ç¨æ·åæ¶ç« --> |
| | | <user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk"/> |
| | | |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import UserModal from './modules/EquipmentList/UserModal' |
| | | import PasswordModal from './modules/EquipmentList/PasswordModal' |
| | | import {putAction,getFileAccessHttpUrl} from '@/api/manage'; |
| | | import {frozenBatch} from '@/api/api' |
| | | import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
| | | import SysUserAgentModal from "./modules/EquipmentList/SysUserAgentModal"; |
| | | import JInput from '@/components/jeecg/JInput' |
| | | import UserRecycleBinModal from './modules/EquipmentList/UserRecycleBinModal' |
| | | import JSuperQuery from '@/components/jeecg/JSuperQuery' |
| | | import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { queryProductionTreeList } from '@/api/api' |
| | | import {mapActions} from 'vuex' |
| | | import { mapActions } from 'vuex' |
| | | |
| | | export default { |
| | | name: "EquipmentList", |
| | | name: 'EquipmentList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | JThirdAppButton, |
| | | SysUserAgentModal, |
| | | UserModal, |
| | | PasswordModal, |
| | | JInput, |
| | | UserRecycleBinModal, |
| | | JSuperQuery |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | align: "center", |
| | | align: 'center', |
| | | dataIndex: 'equipmentId', |
| | | width: 200, |
| | | // sorter: true |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'equipmentName', |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '车é´', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'productionName' |
| | | }, |
| | | { |
| | | title: '设å¤ç±»å', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'equipmentType', |
| | | // scopedSlots: {customRender: "avatarslot"} |
| | | dataIndex: 'equipmentType' |
| | | }, |
| | | |
| | | { |
| | | title: '驱å¨ç±»å', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'driveType', |
| | | // sorter: true |
| | | dataIndex: 'driveType' |
| | | }, |
| | | { |
| | | title: 'æºåºIP', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'equipmentIp' |
| | | }, |
| | | { |
| | | title: '设å¤åç', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'devicePower' |
| | | }, |
| | | { |
| | | title: 'é¨é¨', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'orgCodeTxt' |
| | | }, |
| | | |
| | | { |
| | | title: 'ç³»ç»çæ¬', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'systemVersion' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: {customRender: 'action'}, |
| | | align: "center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 150, |
| | | fixed:'right' |
| | | fixed: 'right' |
| | | } |
| | | |
| | | ], |
| | | // superQueryFieldList: [ |
| | | // { type: 'input', value: 'username', text: 'ç¨æ·è´¦å·', }, |
| | | // { type: 'input', value: 'realname', text: 'ç¨æ·å§å', }, |
| | | // { type: 'select', value: 'sex', dbType: 'int', text: 'æ§å«', dictCode: 'sex' }, |
| | | // ], |
| | | url: { |
| | | syncUser: "/act/process/extActProcess/doSyncUser", |
| | | list: "/mdc/mdcEquipment/list", |
| | | delete: "/mdc/mdcEquipment/delete", |
| | | deleteBatch: "/mdc/mdcEquipment/deleteBatch", |
| | | exportXlsUrl: "/mdc/mdcEquipment/exportXls", |
| | | // importExcelUrl: "sys/user/importExcel", |
| | | list: '/mdc/mdcEquipment/list', |
| | | delete: '/mdc/mdcEquipment/delete', |
| | | deleteBatch: '/mdc/mdcEquipment/deleteBatch', |
| | | exportXlsUrl: '/mdc/mdcEquipment/exportXls' |
| | | }, |
| | | isDepartType:'', |
| | | workshopTreeData:[] |
| | | isDepartType: '', |
| | | workshopTreeData: [], |
| | | treeDefaultExpandedKeys: [] |
| | | } |
| | | }, |
| | | computed: { |
| | | // importExcelUrl: function(){ |
| | | // return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | // } |
| | | }, |
| | | created() { |
| | | this.queryTreeData() |
| | |
| | | this.QueryDepartTree().then(res => { |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | if(this.isDepartType == -1){ |
| | | this.columns=[ |
| | | if (this.isDepartType == -1) { |
| | | this.columns = [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | align: "center", |
| | | align: 'center', |
| | | dataIndex: 'equipmentId', |
| | | width: 200, |
| | | width: 200 |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'equipmentName', |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '车é´', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'productionName' |
| | | }, |
| | | { |
| | | title: '设å¤ç±»å', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'equipmentType', |
| | | // scopedSlots: {customRender: "avatarslot"} |
| | | dataIndex: 'equipmentType' |
| | | }, |
| | | |
| | | { |
| | | title: '驱å¨ç±»å', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'driveType', |
| | | dataIndex: 'driveType' |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: 'æºåºIP', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'equipmentIp' |
| | | }, |
| | | { |
| | | title: '设å¤åç', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'devicePower' |
| | | }, |
| | |
| | | |
| | | { |
| | | title: 'ç³»ç»çæ¬', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'systemVersion' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: {customRender: 'action'}, |
| | | align: "center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 150, |
| | | fixed:'right' |
| | | fixed: 'right' |
| | | } |
| | | |
| | | ] |
| | | }else{ |
| | | this.columns=[ |
| | | } else { |
| | | this.columns = [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | align: "center", |
| | | align: 'center', |
| | | dataIndex: 'equipmentId', |
| | | width: 200, |
| | | width: 200 |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'equipmentName', |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '车é´', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'productionName' |
| | | }, |
| | | { |
| | | title: '设å¤ç±»å', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'equipmentType', |
| | | // scopedSlots: {customRender: "avatarslot"} |
| | | dataIndex: 'equipmentType' |
| | | }, |
| | | |
| | | { |
| | | title: '驱å¨ç±»å', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'driveType', |
| | | dataIndex: 'driveType' |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: 'æºåºIP', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'equipmentIp' |
| | | }, |
| | | { |
| | | title: '设å¤åç', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'devicePower' |
| | | }, |
| | | { |
| | | title: 'é¨é¨', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'orgCodeTxt' |
| | | }, |
| | | |
| | | { |
| | | title: 'ç³»ç»çæ¬', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'systemVersion' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: {customRender: 'action'}, |
| | | align: "center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 150, |
| | | fixed:'right' |
| | | fixed: 'right' |
| | | } |
| | | |
| | | ] |
| | |
| | | } else { |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() =>{ |
| | | }).finally(() => { |
| | | }) |
| | | }, |
| | | handleEdit: function (record) { |
| | | this.$refs.modalForm.edit(record); |
| | | this.$refs.modalForm.title = "ç¼è¾"; |
| | | this.$refs.modalForm.disableSubmit = false; |
| | | this.$refs.modalForm.disSeach = true; |
| | | /** |
| | | * è°ç¨æ¥å£è·åæ¥è¯¢åºåè½¦é´æ å表 |
| | | */ |
| | | getWorkshopListByApi() { |
| | | queryProductionTreeList().then(res => { |
| | | if (res.success) { |
| | | this.workshopTreeData = res.result |
| | | this.treeDefaultExpandedKeys = [...res.result].map(item => item.key) |
| | | } |
| | | }) |
| | | }, |
| | | handleEdit: function(record) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = 'ç¼è¾' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | this.$refs.modalForm.disSeach = true |
| | | // è°ç¨æ½å±è¡¨åç»ä»¶ä¸çæ¸
é¤è¡¨åéªè¯æ¹æ³ |
| | | this.$refs.modalForm.removeValidate() |
| | | }, |
| | | handleAdd: function () { |
| | | this.$refs.modalForm.add(); |
| | | this.$refs.modalForm.title = "æ°å¢"; |
| | | this.$refs.modalForm.disableSubmit = false; |
| | | this.$refs.modalForm.disSeach = false; |
| | | }, |
| | | getAvatarView: function (avatar) { |
| | | return getFileAccessHttpUrl(avatar) |
| | | }, |
| | | batchFrozen: function (status) { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | // this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼'); |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"è¯·éæ©ä¸æ¡è®°å½" |
| | | }); |
| | | return false; |
| | | } else { |
| | | let ids = ""; |
| | | let that = this; |
| | | let isAdmin = false; |
| | | that.selectionRows.forEach(function (row) { |
| | | if (row.username == 'admin') { |
| | | isAdmin = true; |
| | | } |
| | | }); |
| | | if (isAdmin) { |
| | | that.$message.warning('管çåè´¦å·ä¸å
è®¸æ¤æä½,è¯·éæ°éæ©ï¼'); |
| | | return; |
| | | } |
| | | that.selectedRowKeys.forEach(function (val) { |
| | | ids += val + ","; |
| | | }); |
| | | that.$confirm({ |
| | | title: "确认æä½", |
| | | content: "æ¯å¦" + (status == 1 ? "è§£å»" : "å»ç»") + "éä¸è´¦å·?", |
| | | onOk: function () { |
| | | frozenBatch({ids: ids, status: status}).then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | handleAdd: function() { |
| | | this.$refs.modalForm.add() |
| | | this.$refs.modalForm.title = 'æ°å¢' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | this.$refs.modalForm.disSeach = false |
| | | }, |
| | | handleMenuClick(e) { |
| | | if (e.key == 1) { |
| | | this.batchDel(); |
| | | } else if (e.key == 2) { |
| | | this.batchFrozen(2); |
| | | } else if (e.key == 3) { |
| | | this.batchFrozen(1); |
| | | this.batchDel() |
| | | } |
| | | }, |
| | | // handleFrozen: function (id, status, username) { |
| | | // let that = this; |
| | | // //TODO åå°æ ¡éªç®¡çåè§è² |
| | | // if ('admin' == username) { |
| | | // that.$message.warning('管çåè´¦å·ä¸å
è®¸æ¤æä½ï¼'); |
| | | // return; |
| | | // } |
| | | // frozenBatch({ids: id, status: status}).then((res) => { |
| | | // if (res.success) { |
| | | // that.$message.success(res.message); |
| | | // that.loadData(); |
| | | // } else { |
| | | // that.$message.warning(res.message); |
| | | // } |
| | | // }); |
| | | // }, |
| | | // handleChangePassword(username) { |
| | | // this.$refs.passwordmodal.show(username); |
| | | // }, |
| | | passwordModalOk() { |
| | | //TODO å¯ç ä¿®æ¹å®æ ä¸éè¦å·æ°é¡µé¢ï¼å¯ä»¥ædatasourceä¸çæ°æ®æ´æ°ä¸ä¸ |
| | | }, |
| | | onSyncFinally({isToLocal}) { |
| | | // 忥尿¬å°æ¶å·æ°ä¸æ°æ® |
| | | if (isToLocal) { |
| | | this.loadData() |
| | | } |
| | | }, |
| | | |
| | | getWorkshopListByApi(){ |
| | | queryProductionTreeList().then(res=>{ |
| | | if(res.success) this.workshopTreeData=res.result |
| | | }) |
| | | } |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | <style scoped> |
| | |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="6" :sm="12"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <a-input placeholder="请è¾å
¥è®¾å¤ç¼å·" v-model="queryParam.equipmentid"></a-input> |
| | | <a-input placeholder="请è¾å
¥è®¾å¤ç¼å·" v-model="queryParam.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="6" :sm="8"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="设å¤ç±»å"> |
| | | <a-select placeholder="è¯·éæ©è®¾å¤ç±»å" :triggerChange="true" v-model="queryParam.equipmentType" |
| | | :allowClear="true"> |
| | | <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> |
| | | {{item.equipmentTypeName}} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="驱å¨ç±»å"> |
| | | <a-auto-complete |
| | | v-model="queryParam.driveType" |
| | | :data-source="driveTypeList" |
| | | placeholder="è¯·éæ©é©±å¨ç±»å" |
| | | :filter-option="filterOption" |
| | | :allowClear="true" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="6" :sm="6"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </a-col> |
| | |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading"></a-table> |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | ></a-table> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import api from '@/api/mdc' |
| | | import { putAction, getAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'EquipmentOperationParamsAlarm', |
| | | mixins: [JeecgListMixin], |
| | | created(){ |
| | | this.getDriveTypeByApi() |
| | | this.queryGroup() |
| | | }, |
| | | data() { |
| | | return { |
| | | name: 'EquipmentOperationParamsAlarm', |
| | | description: 'è¿æ¯è®¾å¤è¿è¡åæ°æ¥è¦é¡µé¢', |
| | | queryParam: {}, |
| | | driveTypeList:[], |
| | | selectList: [], |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'equipmentid', |
| | | dataIndex: 'equipmentId', |
| | | width: 250 |
| | | }, |
| | | { |
| | | title: 'æ¥è¦æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'collecttime', |
| | | dataIndex: 'createTime', |
| | | width: 250 |
| | | }, |
| | | { |
| | | title: '设å®å¼', |
| | | align: 'center', |
| | | width: 250, |
| | | dataIndex: 'setvalue' |
| | | dataIndex: 'setValue' |
| | | }, |
| | | { |
| | | title: 'å®é
å¼', |
| | | align: 'center', |
| | | width: 250, |
| | | dataIndex: 'realvalue' |
| | | dataIndex: 'realValue' |
| | | }, |
| | | { |
| | | title: 'æ¥è¦å·', |
| | | align: 'center', |
| | | width: 250, |
| | | dataIndex: 'alarmno' |
| | | }, |
| | | // { |
| | | // title: 'æ¥è¦å·', |
| | | // align: 'center', |
| | | // width: 250, |
| | | // dataIndex: 'alarmno' |
| | | // }, |
| | | { |
| | | title: 'æ¥è¦å
容', |
| | | align: 'center', |
| | | width: 250, |
| | | dataIndex: 'alarmcontent' |
| | | dataIndex: 'alarmContent' |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/mdc/equipmentBeilvAlarm/list' |
| | | list: '/mdc/mdcOverrunAlarm/list', |
| | | queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType' |
| | | }, |
| | | ipagination:{ |
| | | current: 1, |
| | | pageSize: 30, |
| | | pageSizeOptions: ['30', '50', '100'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | /* æåºåæ° */ |
| | | isorter: { |
| | | column: 'collecttime', |
| | | column: 'createTime', |
| | | order: 'desc' |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | /** |
| | | * è°ç¨æ¥å£è·åæ§å¶ç³»ç»ç±»å |
| | | */ |
| | | getDriveTypeByApi(){ |
| | | api.getDriveTypeApi().then((res)=>{ |
| | | this.driveTypeList=res.result.map(item=>item.value) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * èæ³è¾å
¥æ¡çéåè½ |
| | | * @param input è¾å
¥çå
容 |
| | | * @param option é
ç½® |
| | | * @returns {boolean} 夿æ¯å¦çé |
| | | */ |
| | | filterOption(input, option) { |
| | | return ( |
| | | option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0 |
| | | ); |
| | | }, |
| | | |
| | | queryGroup() { |
| | | getAction(this.url.queryEquipmentType).then(res => { |
| | | if (res.success) { |
| | | this.selectList = res.result |
| | | // this.selectList = res.result.map((item, index, arr) => { |
| | | // return { label: item.id, value: item.equipmentTypeName + '' } |
| | | // }) |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | |
| | | <a-col :span="6"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <a-input placeholder="请è¾å
¥è®¾å¤ç¼å·" v-model="queryParam.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-item label="æ¶æ¯ç¶æ"> |
| | | <a-select v-model='queryParam.msgStatus' placeholder="è¯·éæ©æ¶æ¯ç¶æ"> |
| | | <a-select-option v-for="item in msgStatusOptionList" :key="item.value" :value="item.value"> |
| | | {{item.title}} |
| | | </a-select-option> |
| | | </a-select> |
| | | </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> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="default" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange"> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="showModal(record,0)">æ¥ç</a> |
| | | <a-divider type="vertical" v-if="record.hasProcess||record.hasConfirm"></a-divider> |
| | | <a @click="showModal(record,1)" v-if="record.hasProcess">䏿¥</a> |
| | | <a-divider type="vertical" v-if="record.hasConfirm&&record.hasProcess"></a-divider> |
| | | <a @click="showModal(record,2)" v-if="record.hasConfirm">确认</a> |
| | | <!--<a @click="showModal(record,0)">æ¥ç</a>--> |
| | | <!--<a-divider type="vertical"></a-divider>--> |
| | | <!--<a @click="showModal(record,1)">䏿¥</a>--> |
| | | <!--<a-divider type="vertical"></a-divider>--> |
| | | <!--<a @click="showModal(record,2)">确认</a>--> |
| | | </span> |
| | | </a-table> |
| | | <mdc-message-approval-modal ref="modalRef" :title="modalTitle" :visible="modalVisible" :buttonId="buttonId" |
| | | @closeModal="modalVisible = false" @formHasSubmitted="loadData"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, putAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
| | | import MdcMessageApprovalModal from './modules/MdcMessageApproval/MdcMessageApprovalModal' |
| | | |
| | | export default { |
| | | name: 'MdcMessageApproval', |
| | | mixins: [JeecgListMixin], |
| | | components: { MdcMessageApprovalModal }, |
| | | data() { |
| | | return { |
| | | description: 'mdcæ¶æ¯ç¡®è®¤é¡µé¢', |
| | | queryParam: {}, |
| | | columns: [ |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'equipmentId' |
| | | }, |
| | | { |
| | | title: 'æ é¢', |
| | | align: 'center', |
| | | dataIndex: 'titile' |
| | | }, { |
| | | title: 'å
容', |
| | | align: 'center', |
| | | dataIndex: 'msgContent', |
| | | width: 450 |
| | | }, { |
| | | title: 'åå ', |
| | | align: 'center', |
| | | dataIndex: 'reportContent', |
| | | width: 450 |
| | | }, { |
| | | title: 'å¤ç人', |
| | | align: 'center', |
| | | dataIndex: 'senderNames' |
| | | }, { |
| | | title: '确认人', |
| | | align: 'center', |
| | | dataIndex: 'approverNames' |
| | | }, { |
| | | title: 'ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'msgStatus', |
| | | customRender: function(text) { |
| | | if (text == '0') { |
| | | return 'å¾
å¤ç' |
| | | } else if (text == '1') { |
| | | return 'å¾
确认' |
| | | } else if (text == '2') { |
| | | return '已确认' |
| | | } else { |
| | | return 'å·²æç»' |
| | | } |
| | | } |
| | | }, { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' } |
| | | }], |
| | | url: { |
| | | list: '/mdc/mdcMessageApproval/list' |
| | | }, |
| | | loading: false, |
| | | msgStatusOptionList: [], |
| | | modalTitle: '', |
| | | modalVisible: false, |
| | | buttonId: null |
| | | } |
| | | }, |
| | | created() { |
| | | this.initDictData('mdcMsgStatus') |
| | | }, |
| | | methods: { |
| | | /** |
| | | * è°ç¨æ¥å£è·åæ°æ®åå
¸é
ç½®msgStatus |
| | | * @param dictCode æ°æ®åå
¸ç¼å· |
| | | */ |
| | | initDictData(dictCode) { |
| | | //æ ¹æ®åå
¸Code, åå§ååå
¸æ°ç» |
| | | ajaxGetDictItems(dictCode, null).then((res) => { |
| | | if (res.success) { |
| | | console.log('res================', res) |
| | | this.msgStatusOptionList = res.result |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»æé®å±ç¤ºå¼¹çª |
| | | * @param record ç¹å»è¡ä¿¡æ¯ |
| | | * @param buttonId æé®Idï¼æ¥çï¼0ï¼ä¸æ¥ï¼1ï¼ç¡®è®¤ï¼2ï¼ |
| | | */ |
| | | showModal(record, buttonId) { |
| | | this.buttonId = buttonId |
| | | switch (buttonId) { |
| | | case 0: |
| | | this.modalTitle = 'æ¶æ¯å
容' |
| | | break |
| | | case 1: |
| | | this.modalTitle = '䏿¥åå ' |
| | | break |
| | | case 2: |
| | | this.modalTitle = 'ç¡®è®¤æ¶æ¯' |
| | | break |
| | | default: |
| | | this.modalTitle = 'æ¶æ¯å
容' |
| | | } |
| | | this.$refs.modalRef.formParams = Object.assign({}, record) |
| | | this.modalVisible = true |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <a-input placeholder="请è¾å
¥ç±»å«" v-model="queryParam.rateParameterCategory"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col> |
| | | |
| | | <a-col :md="6" :sm="8"> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | |
| | | :data-source="driveTypeList" |
| | | placeholder="è¯·éæ©é©±å¨ç±»å" |
| | | :filter-option="filterOption" |
| | | allowClear |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | methods: { |
| | | dateParamChange(value) { |
| | | this.dates = value |
| | | console.log('value', value) |
| | | this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | if(!value.length) { |
| | | delete this.queryParam.startTime |
| | | delete this.queryParam.endTime |
| | | }else{ |
| | | this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | } |
| | | }, |
| | | |
| | | exportExcel() { |
| | |
| | | }, |
| | | |
| | | searchQuery() { |
| | | if (this.dates != '') { |
| | | 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.pageNo = 1 |
| | | this.loadData() |
| | | if (this.queryParam.typeTree == '1') { |
| | | this.queryParam.parentId = this.queryParamEquip.parentId |
| | | this.queryParam.equipmentId = this.queryParamEquip.equipmentId |
| | | } else { |
| | | // this.$message.warning("è¯·éæ©æ¶é´") |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©æ¶é´' |
| | | }) |
| | | this.queryParam.parentId = this.queryParamPeople.parentId |
| | | this.queryParam.equipmentId = '' |
| | | } |
| | | // this.onClearSelected() |
| | | this.queryParam.pageNo = 1 |
| | | this.loadData() |
| | | }, |
| | | |
| | | searchReset() { |
| | |
| | | |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤åç" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-form-model-item label="设å¤åç(kw)" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="请è¾å
¥è®¾å¤åç" |
| | | v-model="model.devicePower"/> |
| | | </a-form-model-item> |
| | |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç³»ç»ç±»å" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©ç³»ç»ç±»å" :triggerChange="true" dictCode="system_type" v-model="model.systemType" allow-clear/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤çº§å«" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©è®¾å¤çº§å«" dictCode="device_level" v-model="model.deviceLevel" allow-clear/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤ç§ç±»" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©è®¾å¤ç§ç±»" dictCode="device_category" v-model="model.deviceCategory" allow-clear/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="æåº" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="请è¾å
¥æåº" |
| | | v-model="model.sortNo" style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span='12'> |
| | | <a-form-model-item v-if="isDepartType == 0" label="ç³»ç»çæ¬å·" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="请è¾å
¥ç³»ç»çæ¬å·" |
| | |
| | | equipmentModel: "", |
| | | equipmentIp: "", |
| | | dataPort: "", |
| | | driveType: "" |
| | | driveType: "", |
| | | systemType: "", |
| | | deviceLevel: "", |
| | | deviceCategory: "" |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | | sm: { span: 8 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | |
| | | <!-- æ¥è¯¢åºå --> |
| | | <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-row :gutter="24" style="width: 100%;"> |
| | | <a-col :md="7" :sm="7"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" v-model="dates" format="YYYY-MM-DD"/> |
| | |
| | | }, |
| | | methods: { |
| | | dateParamChange(v1, v2) { |
| | | // console.log(v1,v2) |
| | | console.log(v1,v2) |
| | | this.queryParam.startTime = v2[0] |
| | | this.queryParam.endTime = v2[1] |
| | | // console.log(v2[0],v2[1]) |
| | |
| | | param.field = this.getQueryField(); |
| | | param.parentId = this.queryParams.parentId; |
| | | param.equipmentId = this.queryParams.equipmentId; |
| | | param.startTime = this.queryParam.startTime; |
| | | param.endTime = this.queryParam.endTime; |
| | | getAction(this.url.list,param).then((res) => { |
| | | if(res.success){ |
| | | this.dataSource = res.result.records||res.result; |
| | |
| | | param.field = this.getQueryField(); |
| | | param.parentId = this.queryParams.parentId; |
| | | param.equipmentId = this.queryParams.equipmentId; |
| | | param.startTime = this.queryParam.startTime; |
| | | param.endTime = this.queryParam.endTime; |
| | | if(this.queryParam.startTime && this.queryParam.endTime){ |
| | | param.startTime = this.queryParam.startTime; |
| | | param.endTime = this.queryParam.endTime; |
| | | } |
| | | // console.log(param); |
| | | getAction(this.url.list,param).then((res) => { |
| | | if(res.success){ |
| | |
| | | </a-form> |
| | | </a-spin> |
| | | <holiday-management-modal-list ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></holiday-management-modal-list> |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | </a-modal> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | duplicateCheck |
| | | } from '@/api/api' |
| | | import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal' |
| | | import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer' |
| | | |
| | | export default { |
| | | name: 'HolidayManagementModal', |
| | | components: { SelectDeviceModal, HolidayManagementModalList}, |
| | | components: { SelectDeviceDrawer, HolidayManagementModalList}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | |
| | | // }) |
| | | }, |
| | | deviceSearch() { |
| | | this.$refs.selectDeviceModal.visible = true |
| | | this.$refs.selectDeviceModal.selectedRowKeys = [] |
| | | this.$refs.selectDeviceModal.selectedRows = [] |
| | | this.$refs.selectDeviceModal.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : [] |
| | | this.$refs.selectDeviceDrawer.visible = true |
| | | this.$refs.selectDeviceDrawer.selectedRowKeys = [] |
| | | this.$refs.selectDeviceDrawer.selectedRows = [] |
| | | this.$refs.selectDeviceDrawer.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : [] |
| | | }, |
| | | //çº§èæ¡onChangeäºä»¶ |
| | | // onChange(value) { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal :title="title" |
| | | :maskClosable="true" |
| | | @cancel="closeModal" |
| | | :visible="visible" |
| | | :footer="null"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :form="form" :model="formParams" :rules="validatorRules"> |
| | | <a-form-model-item label="设å¤ç¼å·" :labelCol="{span: 4}" :wrapperCol="{span: 8}"> |
| | | <a-input v-model="formParams.equipmentId" disabled></a-input> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="æ é¢" :labelCol="{span: 4}" :wrapperCol="{span: 20}"> |
| | | <a-input v-model="formParams.titile" disabled></a-input> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="å
容" :labelCol="{span: 4}" :wrapperCol="{span: 20}"> |
| | | <a-input v-model="formParams.msgContent" disabled></a-input> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item label="åå " :labelCol="{span: 4}" :wrapperCol="{span: 20}" prop="reportContent" |
| | | v-if="buttonId===1"> |
| | | <a-textarea v-model="formParams.reportContent" :disabled="buttonId!==1"></a-textarea> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="åå " :labelCol="{span: 4}" :wrapperCol="{span: 20}" v-else> |
| | | <a-textarea v-model="formParams.reportContent" :disabled="buttonId!==1"></a-textarea> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item label="确认" :labelCol="{span: 4}" :wrapperCol="{span: 12}" prop="isConfirm" |
| | | v-if="buttonId==2"> |
| | | <a-select v-model='formParams.isConfirm' placeholder="è¯·éæ©æ¯å¦ç¡®è®¤"> |
| | | <a-select-option value="2">确认</a-select-option> |
| | | <a-select-option value="3">æç»</a-select-option> |
| | | </a-select> |
| | | </a-form-model-item> |
| | | </a-form-model> |
| | | </a-spin> |
| | | |
| | | <div class="drawer-bottom-button" v-show="buttonId!==0"> |
| | | <a-popconfirm title="ç¡®å®æ¾å¼æä½ï¼" @confirm="closeModal" okText="ç¡®å®" cancelText="åæ¶"> |
| | | <a-button style="margin-right: .8rem">åæ¶</a-button> |
| | | </a-popconfirm> |
| | | <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">æäº¤</a-button> |
| | | </div> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { postAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'MdcMessageApprovalModal', |
| | | props: { |
| | | visible: { |
| | | type: Boolean |
| | | }, |
| | | title: { |
| | | type: String |
| | | }, |
| | | buttonId: { |
| | | type: Number |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | form: this.$form.createForm(this), |
| | | formParams: { |
| | | equipmentId: '', |
| | | titile: '', |
| | | msgContent: '', |
| | | reportContent: '', |
| | | msgStatus: '', |
| | | isConfirm: '' |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | reportContent: [ |
| | | { required: true, message: '请è¾å
¥ä¸æ¥åå ' } |
| | | ], |
| | | isConfirm: [ |
| | | { required: true, message: 'è¯·éæ©æ¯å¦ç¡®è®¤' } |
| | | ] |
| | | }, |
| | | url: { |
| | | reportUrl: '/mdc/mdcMessageApproval/reportReason', |
| | | confirmUrl: '/mdc/mdcMessageApproval/handleConfirm' |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | closeModal() { |
| | | this.$refs.form.clearValidate() |
| | | this.$emit('closeModal') |
| | | }, |
| | | handleSubmit() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true |
| | | this.formParams.msgStatus = this.formParams.isConfirm |
| | | let obj |
| | | if (this.buttonId === 1) { |
| | | obj = postAction(this.url.reportUrl, this.formParams) |
| | | } else { |
| | | obj = postAction(this.url.confirmUrl, this.formParams) |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.$emit('formHasSubmitted') |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.closeModal() |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | .drawer-bottom-button { |
| | | position: absolute; |
| | | bottom: -25px; |
| | | width: 100%; |
| | | border-top: 1px solid #e8e8e8; |
| | | padding: 10px 16px; |
| | | text-align: right; |
| | | left: 0; |
| | | background: #fff; |
| | | border-radius: 0 0 2px 2px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="device_list"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="seach-content"> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="驱å¨ç±»å"> |
| | | <a-auto-complete |
| | | v-model="queryParam.driveType" |
| | | :data-source="driveTypeList" |
| | | placeholder="è¯·éæ©é©±å¨ç±»å" |
| | | :filter-option="filterOption" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="7" :sm="7" :xs="7"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker |
| | | :placeholder="['å¼å§æ¶é´', 'ç»ææ¶é´']" |
| | | format="YYYY-MM" |
| | | :value="dates" |
| | | :mode="['month', 'month']" |
| | | @panelChange="dateParamChange" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="2" :sm="2" :xs="2"> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | <a-button type="primary" @click="exportExcel" icon="download">导åº</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="seach-content"> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="驱å¨ç±»å"> |
| | | <a-auto-complete |
| | | v-model="queryParam.driveType" |
| | | :data-source="driveTypeList" |
| | | placeholder="è¯·éæ©é©±å¨ç±»å" |
| | | :filter-option="filterOption" |
| | | :allowClear="true" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="7" :sm="7" :xs="7"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker |
| | | :placeholder="['å¼å§æ¶é´', 'ç»ææ¶é´']" |
| | | format="YYYY-MM" |
| | | :value="dates" |
| | | :mode="['month', 'month']" |
| | | @panelChange="dateParamChange" |
| | | @change="handleDateChange" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="2" :sm="2" :xs="2"> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | <a-button type="primary" @click="exportExcel" icon="download">导åº</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="EfficiencyShift" style="flex:1;overflow: hidden"> |
| | | <a-table :columns="columns" rowKey="equipmentId" :dataSource="dataSource.records" :pagination="false" :scroll="{x:'max-content',y:scrollY}" bordered></a-table> |
| | | </div> |
| | | <!--<div class="pagination">--> |
| | | <!--<a-pagination--> |
| | | <!--:total=dataSource.total--> |
| | | <!--:show-total="(total, range) => `${range[0]}-${range[1]} å
± ${total} æ¡`"--> |
| | | <!--:page-size="+queryParam.pageSize"--> |
| | | <!--:default-current="1"--> |
| | | <!--:current=+queryParam.pageNo--> |
| | | <!--show-size-changer--> |
| | | <!--:pageSizeOptions="['20','30','40','50']"--> |
| | | <!--@change="handlePageNoChange"--> |
| | | <!--@showSizeChange="handlePageSizeChange"--> |
| | | <!--/>--> |
| | | <!--</div>--> |
| | | <div id="EfficiencyShift" style="flex:1;overflow: hidden"> |
| | | <a-table :columns="columns" rowKey="id" :dataSource="dataSource.records" :loading="tableLoading" |
| | | :pagination="false" :scroll="{x:'max-content',y:scrollY}" bordered></a-table> |
| | | </div> |
| | | <!--<div class="pagination">--> |
| | | <!--<a-pagination--> |
| | | <!--:total=dataSource.total--> |
| | | <!--:show-total="(total, range) => `${range[0]}-${range[1]} å
± ${total} æ¡`"--> |
| | | <!--:page-size="+queryParam.pageSize"--> |
| | | <!--:default-current="1"--> |
| | | <!--:current=+queryParam.pageNo--> |
| | | <!--show-size-changer--> |
| | | <!--:pageSizeOptions="['20','30','40','50']"--> |
| | | <!--@change="handlePageNoChange"--> |
| | | <!--@showSizeChange="handlePageSizeChange"--> |
| | | <!--/>--> |
| | | <!--</div>--> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'shift', |
| | | ellipsis: true, |
| | | ellipsis: true |
| | | }, |
| | | { |
| | | title: 'æ¯çå°æ¶', |
| | |
| | | ], |
| | | dataSource: [], |
| | | driveTypeList: [], |
| | | scrollY:465, |
| | | scrollY: 465, |
| | | tableLoading: false |
| | | } |
| | | }, |
| | | props: { nodeTree: '', Type: '', nodePeople: '' }, |
| | |
| | | this.loadData() |
| | | this.getDriveTypeByApi() |
| | | }, |
| | | mounted(){ |
| | | window.addEventListener('resize',this.handleWindowResize) |
| | | mounted() { |
| | | window.addEventListener('resize', this.handleWindowResize) |
| | | this.handleWindowResize() |
| | | }, |
| | | beforeDestroy(){ |
| | | window.removeEventListener('resize',this.handleWindowResize) |
| | | beforeDestroy() { |
| | | window.removeEventListener('resize', this.handleWindowResize) |
| | | }, |
| | | watch: { |
| | | Type(valmath) { |
| | |
| | | }, |
| | | methods: { |
| | | dateParamChange(value) { |
| | | console.log('dateParamChangeValue', value) |
| | | this.dates = value |
| | | this.queryParam.startTime = moment(this.dates[0]).format('YYYY-MM') |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYY-MM') |
| | | }, |
| | | |
| | | handleDateChange(value) { |
| | | console.log('handleDateChangeValue', value) |
| | | if (!value.length) { |
| | | delete this.queryParam.startTime |
| | | delete this.queryParam.endTime |
| | | this.dates = [] |
| | | } |
| | | }, |
| | | initShiftList() { |
| | | getAction(this.url.initShiftList).then((res) => { |
| | | if (res.success) { |
| | |
| | | }, |
| | | |
| | | searchQuery() { |
| | | if (this.dates != '') { |
| | | 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.pageNo = 1 |
| | | this.loadData() |
| | | if (this.queryParam.typeTree == '1') { |
| | | this.queryParam.parentId = this.queryParamEquip.parentId |
| | | this.queryParam.equipmentId = this.queryParamEquip.equipmentId |
| | | } else { |
| | | // this.$message.warning("è¯·éæ©æ¶é´") |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©æ¶é´' |
| | | }) |
| | | this.queryParam.parentId = this.queryParamPeople.parentId |
| | | this.queryParam.equipmentId = '' |
| | | } |
| | | // this.onClearSelected() |
| | | this.queryParam.pageNo = 1 |
| | | this.loadData() |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.queryParam = { |
| | | pageSize: 20, |
| | | pageSize: 10000, |
| | | pageNo: 1 |
| | | } |
| | | this.dates = [] |
| | |
| | | }, |
| | | |
| | | loadData() { |
| | | getAction(this.url.list, this.queryParam).then(res => { |
| | | if (res.success) { |
| | | this.dataSource = res.result |
| | | } |
| | | }) |
| | | this.tableLoading = true |
| | | getAction(this.url.list, this.queryParam) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.dataSource = res.result |
| | | this.tableLoading = false |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 彿µè§å¨å¯è§çªå£å°ºå¯¸åçæ¹åæ¶è§¦å |
| | | */ |
| | | handleWindowResize(){ |
| | | const boxHeight = +window.getComputedStyle(document.getElementById('EfficiencyShift')).height.slice(0,-2) |
| | | const tableHeadHeight = +window.getComputedStyle(document.querySelector('.ant-table-thead th')).height.slice(0,-2) |
| | | handleWindowResize() { |
| | | const boxHeight = +window.getComputedStyle(document.getElementById('EfficiencyShift')).height.slice(0, -2) |
| | | const tableHeadHeight = +window.getComputedStyle(document.querySelector('.ant-table-thead th')).height.slice(0, -2) |
| | | this.scrollY = boxHeight - tableHeadHeight |
| | | } |
| | | } |
| | |
| | | margin: 20px 0; |
| | | } |
| | | |
| | | .device_list{ |
| | | .device_list { |
| | | overflow: hidden; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | @media screen and (min-width: 1920px){ |
| | | .device_list{ |
| | | height: 811px!important; |
| | | @media screen and (min-width: 1920px) { |
| | | .device_list { |
| | | height: 811px !important; |
| | | } |
| | | } |
| | | @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; |
| | | } |
| | | } |
| | | @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; |
| | | } |
| | | } |
| | | @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; |
| | | } |
| | | } |
| | | @media screen and (max-width: 1280px){ |
| | | .device_list{ |
| | | height: 564px!important; |
| | | |
| | | @media screen and (max-width: 1280px) { |
| | | .device_list { |
| | | height: 564px !important; |
| | | } |
| | | } |
| | | |
| | |
| | | <!-- æ¥è¯¢åºå --> |
| | | <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-row :gutter="24" style="width: 100%;"> |
| | | <a-col :md="7" :sm="7"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD"/> |
| | |
| | | </a-form> |
| | | </a-spin> |
| | | <!--<torqueconfiguration-modal-list ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></torqueconfiguration-modal-list>--> |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | </a-modal> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | duplicateCheck |
| | | } from '@/api/api' |
| | | import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal' |
| | | import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer' |
| | | |
| | | export default { |
| | | name: 'TorqueconfigurationModal', |
| | | components: { SelectDeviceModal, TorqueconfigurationModalList}, |
| | | components: { SelectDeviceDrawer, TorqueconfigurationModalList}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | |
| | | // // }) |
| | | // }, |
| | | deviceSearch() { |
| | | this.$refs.selectDeviceModal.visible = true |
| | | this.$refs.selectDeviceModal.selectedRowKeys = [] |
| | | this.$refs.selectDeviceModal.selectedRows = [] |
| | | this.$refs.selectDeviceModal.checkedKeys = this.form.getFieldValue('equipmentId') ? this.form.getFieldValue('equipmentId').split(',') : [] |
| | | this.$refs.selectDeviceDrawer.visible = true |
| | | this.$refs.selectDeviceDrawer.selectedRowKeys = [] |
| | | this.$refs.selectDeviceDrawer.selectedRows = [] |
| | | this.$refs.selectDeviceDrawer.checkedKeys = this.form.getFieldValue('equipmentId') ? this.form.getFieldValue('equipmentId').split(',') : [] |
| | | }, |
| | | //çº§èæ¡onChangeäºä»¶ |
| | | // onChange(value) { |
| | |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-form-item label="æ¥æ"> |
| | | <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" format='YYYY-MM-DD' @change="dataChange"/> |
| | | <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" format='YYYY-MM-DD' @change="dataChange" :allowClear="false"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="2" :sm="2" :xs="2"> |
| | |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | <!--<a-col :md="2" :sm="2" :xs="2">--> |
| | | <!--<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> |
| | |
| | | import moment from 'moment' |
| | | import { putAction, getAction } from '@/api/manage' |
| | | import $ from 'jquery' |
| | | import AFormItem from 'ant-design-vue/es/form/FormItem' |
| | | import * as echarts from 'echarts' |
| | | export default { |
| | | name: 'StatisticalAnalysisMain', |
| | | components:{ |
| | | AFormItem |
| | | |
| | | }, |
| | | props: { equip: {} }, |
| | | data(){ |
| | | return{ |
| | |
| | | dates: [], |
| | | queryParam: {}, |
| | | queryParams:{ |
| | | collectTime:undefined, |
| | | collectTime:null, |
| | | }, |
| | | shiftSubList: [], |
| | | shiftList: [], |
| | |
| | | } |
| | | }, |
| | | created(){ |
| | | let collectTime = moment(moment().add(-1,'d'),'YYYY-MM-DD'); |
| | | this.queryParams.collectTime = collectTime; |
| | | this.queryParams.dateTime = this.queryParams.collectTime.format('YYYYMMDD') |
| | | // let collectTime = moment(moment().add(-1,'d'),'YYYY-MM-DD'); |
| | | this.queryParams.collectTime = moment().add(-1,'d').format('YYYY-MM-DD') |
| | | this.queryParams.dateTime = moment().add(-1,'d').format('YYYYMMDD') |
| | | this.initEquipmentNode() |
| | | this.queryStatistical(); |
| | | // this.queryStatistical(); |
| | | // this.getTime(37800); |
| | | }, |
| | | |
| | |
| | | StartupLine.setOption(statChartPieOption2); |
| | | }, |
| | | queryStatistical(){ |
| | | if(this.queryParams.collectTime){ |
| | | getAction(this.url.dayStatisticalRate,this.queryParams).then(res =>{ |
| | | if(res.success) { |
| | | // console.log(res); |
| | | this.StatCharOpeningRate = res.result.openRate; |
| | | //å©ç¨ç |
| | | this.StatCharUsedRate = res.result.utilizationRate; |
| | | //弿ºç |
| | | this.UtilizationHeight = res.result.openRate; |
| | | this.StatCharUsedopeningRate = res.result.StartupHeight; |
| | | this.StartupHeight = res.result.StartupHeight; |
| | | this.openingLong = this.getTime(res.result.openLong) |
| | | this.waitingLong = this.getTime(res.result.waitLong); |
| | | this.processLong = this.getTime(res.result.processLong); |
| | | this.closedLong = this.getTime(res.result.closeLong); |
| | | this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong); |
| | | this.draw(); |
| | | } |
| | | }) |
| | | }else{ |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:'è¯·éæ©æ¶é´' |
| | | }) |
| | | } |
| | | getAction(this.url.dayStatisticalRate,this.queryParams).then(res =>{ |
| | | if(res.success) { |
| | | // console.log(res); |
| | | this.StatCharOpeningRate = res.result.openRate; |
| | | //å©ç¨ç |
| | | this.StatCharUsedRate = res.result.utilizationRate; |
| | | //弿ºç |
| | | this.UtilizationHeight = res.result.openRate; |
| | | this.StatCharUsedopeningRate = res.result.StartupHeight; |
| | | this.StartupHeight = res.result.StartupHeight; |
| | | this.openingLong = this.getTime(res.result.openLong) |
| | | this.waitingLong = this.getTime(res.result.waitLong); |
| | | this.processLong = this.getTime(res.result.processLong); |
| | | this.closedLong = this.getTime(res.result.closeLong); |
| | | this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong); |
| | | this.draw(); |
| | | } |
| | | }) |
| | | }, |
| | | dataChange(val) { |
| | | this.queryParam.collectTime1 = ""; |
| | |
| | | if(res.result[0]){ |
| | | _this.$set(this.queryParam, 'tierName', res.result[0].title) |
| | | _this.$set(this.queryParams, 'parentId', res.result[0].key) |
| | | _this.queryStatistical() } |
| | | } |
| | | // console.log(res.result[0].entity.tierName) |
| | | _this.queryStatistical() |
| | | } else { |
| | |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.queryParams = {} |
| | | this.queryParams = { |
| | | collectTime:moment().add(-1,'d').format('YYYY-MM-DD'), |
| | | dateTime:moment().add(-1,'d').format('YYYYMMDD') |
| | | } |
| | | this.initEquipmentNode() |
| | | // this.dates = [] |
| | | // this.queryStatistical() |
| | | // this.onClearSelected() |
| | |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-form-item label="æ¥æ"> |
| | | <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" format='YYYY-MM-DD' @change="dataChange"/> |
| | | <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" format='YYYY-MM-DD' @change="dataChange" :allowClear="false"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="2" :sm="2" :xs="2"> |
| | |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | <!--<a-col :md="2" :sm="2" :xs="2">--> |
| | | <!--<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> |
| | |
| | | import moment from 'moment' |
| | | import { putAction, getAction } from '@/api/manage' |
| | | import $ from 'jquery' |
| | | import AFormItem from 'ant-design-vue/es/form/FormItem' |
| | | import * as echarts from 'echarts' |
| | | export default { |
| | | name: 'StatisticsLegend', |
| | | components:{ |
| | | AFormItem |
| | | |
| | | }, |
| | | props: { equip: {} }, |
| | | data(){ |
| | | return{ |
| | |
| | | } |
| | | }, |
| | | created(){ |
| | | |
| | | |
| | | let collectTime = moment(moment().add(-1,'d'),'YYYY-MM-DD'); |
| | | |
| | | |
| | | this.queryParams.collectTime = collectTime; |
| | | |
| | | this.queryParams.dateTime = this.queryParams.collectTime.format('YYYYMMDD') |
| | | this.initEquipmentNode('-1') |
| | | this.queryStatistical(); |
| | | this.queryParams.collectTime = moment().add(-1,'d').format('YYYY-MM-DD') |
| | | this.queryParams.dateTime = moment().add(-1,'d').format('YYYYMMDD') |
| | | this.initEquipmentNode() |
| | | // this.queryStatistical(); |
| | | // this.getTime(37800); |
| | | }, |
| | | |
| | |
| | | StartupLine.setOption(StartupLine_option); |
| | | }, |
| | | queryStatistical(){ |
| | | if(this.queryParams.collectTime){ |
| | | getAction(this.url.dayStatisticalRate,this.queryParams).then(res =>{ |
| | | if(res.success){ |
| | | this.StatCharOpeningRate = res.result.openRate; |
| | | this.StatCharUsedRate = res.result.utilizationRate; |
| | | this.UtilizationHeight = res.result.openRate; |
| | | this.StatCharUsedopeningRate = res.result.usedOpenRate; |
| | | this.StartupHeight = res.result.usedOpenRate; |
| | | this.openingLong = this.getTime(res.result.openLong) |
| | | this.waitingLong = this.getTime(res.result.waitLong); |
| | | this.processLong = this.getTime(res.result.processLong); |
| | | this.closedLong = this.getTime(res.result.closeLong); |
| | | this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong); |
| | | this.draw(); |
| | | } |
| | | }) |
| | | }else{ |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:'è¯·éæ©æ¶é´' |
| | | }) |
| | | } |
| | | getAction(this.url.dayStatisticalRate,this.queryParams).then(res =>{ |
| | | if(res.success){ |
| | | this.StatCharOpeningRate = res.result.openRate; |
| | | this.StatCharUsedRate = res.result.utilizationRate; |
| | | this.UtilizationHeight = res.result.openRate; |
| | | this.StatCharUsedopeningRate = res.result.usedOpenRate; |
| | | this.StartupHeight = res.result.usedOpenRate; |
| | | this.openingLong = this.getTime(res.result.openLong) |
| | | this.waitingLong = this.getTime(res.result.waitLong); |
| | | this.processLong = this.getTime(res.result.processLong); |
| | | this.closedLong = this.getTime(res.result.closeLong); |
| | | this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong); |
| | | this.draw(); |
| | | } |
| | | }) |
| | | }, |
| | | dataChange(val) { |
| | | this.queryParam.collectTime1 = ""; |
| | | if(val){ |
| | | this.queryParams.dateTime = val.format('YYYYMMDD') |
| | | this.queryParams.collectTime = val.format('YYYY-MM-DD'); |
| | | } |
| | | }, |
| | | initEquipmentNode(id) { |
| | | initEquipmentNode() { |
| | | let _this = this |
| | | getAction(this.url.getBaseTree).then((res) => { |
| | | if (res.success) { |
| | | if(res.result[0]){ |
| | | _this.$set(this.queryParam, 'tierName', res.result[0].title) |
| | | _this.$set(this.queryParams, 'parentId', res.result[0].key) |
| | | } |
| | | this.queryStatistical() |
| | | // console.log(res.result[0].entity.tierName) |
| | | |
| | | } else { |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.queryParams = {} |
| | | this.queryParams = { |
| | | collectTime:moment().add(-1,'d').format('YYYY-MM-DD'), |
| | | dateTime:moment().add(-1,'d').format('YYYYMMDD') |
| | | } |
| | | this.initEquipmentNode() |
| | | // this.dates = [] |
| | | // this.queryStatistical() |
| | | // this.onClearSelected() |
| | |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | </a-modal> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | duplicateCheck |
| | | } from '@/api/api' |
| | | import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal' |
| | | import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer' |
| | | |
| | | export default { |
| | | name: 'TorqueconfigurationModal', |
| | | components: { SelectDeviceModal }, |
| | | components: { SelectDeviceDrawer }, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | |
| | | // }) |
| | | }, |
| | | deviceSearch() { |
| | | this.$refs.selectDeviceModal.visible = true |
| | | this.$refs.selectDeviceModal.selectedRowKeys = [] |
| | | this.$refs.selectDeviceModal.selectedRows = [] |
| | | this.$refs.selectDeviceModal.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : [] |
| | | this.$refs.selectDeviceDrawer.visible = true |
| | | this.$refs.selectDeviceDrawer.selectedRowKeys = [] |
| | | this.$refs.selectDeviceDrawer.selectedRows = [] |
| | | this.$refs.selectDeviceDrawer.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : [] |
| | | }, |
| | | //çº§èæ¡onChangeäºä»¶ |
| | | // onChange(value) { |
| | |
| | | <!-- æ¥è¯¢åºå --> |
| | | <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-row :gutter="24" style="width: 100%;"> |
| | | <a-col :md="7" :sm="7"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" v-model="dates" format="YYYY-MM-DD HH:mm"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4"> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <a-input placeholder="è¾å
¥è®¾å¤ç¼å·æ¥è¯¢" v-model="queryParams.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-input placeholder="è¾å
¥è®¾å¤åç§°æ¥è¯¢" v-model="queryParams.equipmentName"></a-input> |
| | | </a-form-item> |
| | |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | </a-modal> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | duplicateCheck |
| | | } from '@/api/api' |
| | | import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal' |
| | | import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer' |
| | | |
| | | export default { |
| | | name: 'UnplannedDowntimemManagerModal', |
| | | components: { SelectDeviceModal,JDate}, |
| | | components: { SelectDeviceDrawer,JDate}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | |
| | | // }) |
| | | }, |
| | | deviceSearch() { |
| | | this.$refs.selectDeviceModal.visible = true |
| | | this.$refs.selectDeviceModal.selectedRowKeys = [] |
| | | this.$refs.selectDeviceModal.selectedRows = [] |
| | | this.$refs.selectDeviceModal.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : [] |
| | | this.$refs.selectDeviceDrawer.visible = true |
| | | this.$refs.selectDeviceDrawer.selectedRowKeys = [] |
| | | this.$refs.selectDeviceDrawer.selectedRows = [] |
| | | this.$refs.selectDeviceDrawer.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : [] |
| | | }, |
| | | //çº§èæ¡onChangeäºä»¶ |
| | | // onChange(value) { |
| | |
| | | <a-col :md="7" :sm="7"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" |
| | | v-model="dates"/> |
| | | v-model="dates" :allowClear="false"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :lg="2" :md="2" :sm="2" :xs="2"> |
| | |
| | | this.queryParam.endDate = v2[1] |
| | | }, |
| | | searchQuery() { |
| | | 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.loadData1() |
| | | if (this.queryParam.typeTree == '1') { |
| | | this.queryParam.parentId = this.queryParamEquip.parentId |
| | | this.queryParam.equipmentId = this.queryParamEquip.equipmentId |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æç¤º', |
| | | description: 'è¯·éæ©æ¶é´' |
| | | }) |
| | | this.queryParam.parentId = this.queryParamPeople.parentId |
| | | this.queryParam.equipmentId = '' |
| | | } |
| | | |
| | | // this.onClearSelected() |
| | | this.loadData1() |
| | | }, |
| | | // searchReset() { |
| | | // this.typeTree = this.queryParam.typeTree |
| | | // this.typeParent = this.queryParam.parentId |
| | | // this.typeEquipment = this.queryParam.equipmentId |
| | | // this.queryParam = {} |
| | | // this.dates = [] |
| | | // this.queryParam.typeTree = this.typeTree |
| | | // this.queryParam.parentId = this.typeParent |
| | | // this.queryParam.equipmentId = this.typeEquipment |
| | | // // this.ipagination.current = 1 |
| | | // this.loadData1(); |
| | | // // this.queryParam = {} |
| | | // // this.dates = [] |
| | | // // this.loadData() |
| | | // // this.onClearSelected() |
| | | // }, |
| | | // loadData1() { |
| | | // let that = this |
| | | // that.columns=[ |
| | | // { |
| | | // title: '设å¤ç¼å·', |
| | | // align: 'center', |
| | | // dataIndex: 'equipmentId', |
| | | // width:'150px' |
| | | // }, |
| | | // { |
| | | // title: '设å¤åç§°', |
| | | // align: 'center', |
| | | // dataIndex: 'equipmentName', |
| | | // width:'150px' |
| | | // }, |
| | | // ] |
| | | // that.tableHeads = [] |
| | | // that.dataList = [] |
| | | // getAction(this.url.efficiencyList, that.queryParam).then(res => { |
| | | // var tmp = {} |
| | | // console.log(res) |
| | | // if (res.success) |
| | | // |
| | | // that.dataSource = res.result.mdcEfficiencyList |
| | | // for(var k = 0;k<that.dataSource[0].dataList.length;k++){ |
| | | // that.columns.push( |
| | | // { |
| | | // title:that.dataSource[0].dataList.theDate, |
| | | // align: 'center', |
| | | // width:'120px', |
| | | // // dataIndex:'utilizationRate', |
| | | // } |
| | | // ) |
| | | // } |
| | | // for(var i = 0;i<that.dataSource.length;i++){ |
| | | // for (var j = 0; j < that.dataSource[i].dataList.length;j++){ |
| | | // // that.columns.push( |
| | | // // { |
| | | // // title:that.dataSource[0].dataList[j].theDate, |
| | | // // align: 'center', |
| | | // // width:'120px', |
| | | // // dataIndex:'utilizationRate', |
| | | // // } |
| | | // // ) |
| | | // } |
| | | // |
| | | // } |
| | | // console.log(that.columns) |
| | | // console.log(that.dataSource) |
| | | // // this.initDeviceType(this.dataList) |
| | | // this.draw() |
| | | // } |
| | | // } |
| | | loadData1() { |
| | | this.outerDataLoading = true |
| | | this.tableHeads = [] |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="æ¯å¦è¿æ»¤" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-form-item label="æ¯å¦å¯ç¨" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <!--<j-switch v-model="model.isUse"></j-switch>--> |
| | | <a-switch v-model="isUse"/> |
| | | <!--<a-radio-group v-model="model.isUse">--> |
| | |
| | | :data-source="driveTypeList" |
| | | placeholder="è¯·éæ©é©±å¨ç±»å" |
| | | :filter-option="filterOption" |
| | | :allowClear="true" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="æ¯å¦è¿æ»¤" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-form-item label="æ¯å¦å¯ç¨" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-switch :checked="isFilterChecked" v-decorator="['isUse', validatorRules.isUse]" @change="isFilterChange"></a-switch> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="æ¯å¦è¿æ»¤" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-form-item label="æ¯å¦å¯ç¨" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-switch :default-checked = 'showM' v-decorator="['isUse', validatorRules.isUse]"></a-switch> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | <!-- tableåºå-end --> |
| | | </div> |
| | | |
| | | <selectDeviceModal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"></selectDeviceModal> |
| | | <SelectDeviceDrawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"></SelectDeviceDrawer> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' |
| | | import api from '@/api/mdc' |
| | | import selectDeviceModal from '../../../../system/modules/SelectDeviceModal.vue' |
| | | import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer.vue' |
| | | |
| | | export default { |
| | | name: 'comparativeAnalysismain', |
| | |
| | | JInput, |
| | | JDate, |
| | | JEllipsis, |
| | | selectDeviceModal |
| | | SelectDeviceDrawer |
| | | }, |
| | | props: { nodeTree: '', Type: '', nodePeople: '' }, |
| | | data() { |
| | |
| | | // }, |
| | | deviceSearch() { |
| | | console.log('触å') |
| | | this.$refs.selectDeviceModal.visible = true |
| | | this.$refs.selectDeviceModal.selectedRowKeys = [] |
| | | this.$refs.selectDeviceModal.selectedRows = [] |
| | | this.$refs.selectDeviceModal.checkedKeys = this.queryParam.equipmentId.split(',') |
| | | this.$refs.selectDeviceDrawer.visible = true |
| | | this.$refs.selectDeviceDrawer.selectedRowKeys = [] |
| | | this.$refs.selectDeviceDrawer.selectedRows = [] |
| | | this.$refs.selectDeviceDrawer.checkedKeys = this.queryParam.equipmentId.split(',') |
| | | }, |
| | | |
| | | /** |
| | |
| | | </a-form> |
| | | </a-spin> |
| | | <device-calend-list-model ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></device-calend-list-model> |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | </a-modal> |
| | | </div> |
| | | </template> |
| | |
| | | } from '@/api/api' |
| | | |
| | | import Calendar from 'vue-calendar-component'; |
| | | import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal' |
| | | import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer' |
| | | |
| | | export default { |
| | | name: 'ShiftInfoModel', |
| | | components: { SelectDeviceModal, DeviceCalendListModel,Calendar}, |
| | | components: { SelectDeviceDrawer, DeviceCalendListModel,Calendar}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | |
| | | this.value = value; |
| | | }, |
| | | deviceSearch() { |
| | | this.$refs.selectDeviceModal.visible = true |
| | | this.$refs.selectDeviceModal.selectedRowKeys = [] |
| | | this.$refs.selectDeviceModal.selectedRows = [] |
| | | this.$refs.selectDeviceModal.checkedKeys = this.form.getFieldValue('equipmentId') ? this.form.getFieldValue('equipmentId').split(',') : [] |
| | | this.$refs.selectDeviceDrawer.visible = true |
| | | this.$refs.selectDeviceDrawer.selectedRowKeys = [] |
| | | this.$refs.selectDeviceDrawer.selectedRows = [] |
| | | this.$refs.selectDeviceDrawer.checkedKeys = this.form.getFieldValue('equipmentId') ? this.form.getFieldValue('equipmentId').split(',') : [] |
| | | }, |
| | | getDeviceRows(val) { |
| | | console.log("========",val); |
| | |
| | | import { getAction } from '@/api/manage' |
| | | // import {mapActions} from 'vuex' |
| | | export default { |
| | | components: { |
| | | components: { |
| | | LogList, |
| | | WorkLogList, |
| | | AlarmLogList, |
| | |
| | | }, |
| | | searchQuery() { |
| | | // console.log(this.queryParams.collectTime) |
| | | if (this.queryParams.collectTime != undefined) { |
| | | this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD') |
| | | if (!this.queryParams.equipmentId || !this.queryParams.equipmentName) { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©è®¾å¤' |
| | | }) |
| | | return false |
| | | } |
| | | this.queryChart() |
| | | } else { |
| | | // this.$message.warning("è¯·éæ©æ¶é´") |
| | | console.log('触åæç¤º') |
| | | this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD') |
| | | if (!this.queryParams.equipmentId || !this.queryParams.equipmentName) { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©æ¶é´' |
| | | description: 'è¯·éæ©è®¾å¤' |
| | | }) |
| | | return false |
| | | } |
| | | this.queryChart() |
| | | // this.queryList() |
| | | }, |
| | | searchReset() { |
| | | this.queryParams = {} |
| | | this.queryParams = { |
| | | collectTime : moment() |
| | | } |
| | | // this.queryList() |
| | | this.equipment = {} |
| | | this.queryChart() |
| | |
| | | <!-- 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" :customRow="rowClick"> |
| | | :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> |
| | |
| | | JeecgListMixin |
| | | } from '@/mixins/JeecgListMixin' |
| | | import moment from 'moment' |
| | | |
| | | export default { |
| | | name: 'LogList', |
| | | mixins: [JeecgListMixin], |
| | |
| | | required: true, |
| | | default: [] |
| | | }, |
| | | loadingequip:{ |
| | | type:Boolean, |
| | | loadingequip: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | watch:{ |
| | | |
| | | }, |
| | | watch: {}, |
| | | data() { |
| | | return { |
| | | statusName: '', |
| | | disabled: true, |
| | | disableMixinCreated: true, |
| | | loading: false, |
| | | ipagination:{ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 100, |
| | | pageSizeOptions: ['100', '500', '1000'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | |
| | | { |
| | | title: 'å¼å§æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'startTime', |
| | | dataIndex: 'startTime' |
| | | // defaultSortOrder:'descend', |
| | | // sorter: (a, b) => {return a.startTime>b.startTime?1:-1} |
| | | }, |
| | | { |
| | | title: 'ç»ææ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'endTime', |
| | | dataIndex: 'endTime' |
| | | // defaultSortOrder:'descend', |
| | | // sorter: (a, b) => {return a.endTime>b.endTime?1:-1} |
| | | }, |
| | |
| | | title: 'æç»æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'duration', |
| | | customRender:(t,r,index) =>{ |
| | | customRender: (t, r, index) => { |
| | | // console.log(t) |
| | | var ss = parseInt(t) |
| | | if(ss>=3600){ |
| | | if (ss >= 3600) { |
| | | // æ ¹æ®ç§æ°è½¬æ¢æå¯¹åºçæ¶åç§ |
| | | const hour = parseInt(ss / 3600) < 10 ? '0' + parseInt(ss / 3600) : parseInt(ss / 3600) |
| | | const min = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60) |
| | | const sec = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60) |
| | | if(min == '00') { |
| | | if(sec == '00'){ |
| | | if (min == '00') { |
| | | if (sec == '00') { |
| | | return hour + 'å°æ¶' |
| | | }else{ |
| | | return hour + 'å°æ¶'+ sec + 'ç§' |
| | | } else { |
| | | return hour + 'å°æ¶' + sec + 'ç§' |
| | | } |
| | | |
| | | }else{ |
| | | if(sec == '00') { |
| | | } else { |
| | | if (sec == '00') { |
| | | return hour + 'å°æ¶' + min + 'å' |
| | | }else{ |
| | | } else { |
| | | return hour + 'å°æ¶' + min + 'å' + sec + 'ç§' |
| | | } |
| | | } |
| | |
| | | // } |
| | | // return hour + 'å°æ¶' + min + 'å' + sec + 'ç§' |
| | | |
| | | }else if(60<ss && ss<3600){ |
| | | } else if (60 < ss && ss < 3600) { |
| | | const min1 = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60) |
| | | const sec1 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60) |
| | | return min1 + 'å' + sec1 + "ç§" |
| | | }else{ |
| | | return min1 + 'å' + sec1 + 'ç§' |
| | | } else { |
| | | const sec2 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60) |
| | | return sec2 + 'ç§' |
| | | } |
| | |
| | | //å页ãæåºãçéååæ¶è§¦å |
| | | //TODO çé |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field; |
| | | this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc' |
| | | } |
| | | this.ipagination = pagination; |
| | | this.ipagination = pagination |
| | | // this.loadData(); |
| | | }, |
| | | /** |
| | |
| | | * @param record ç¹å»çå½åè¡æ°æ® |
| | | * @returns {{on: {click: on.click}}} æ·»å äºä»¶å¯¹è±¡ |
| | | */ |
| | | rowClick(record){ |
| | | rowClick(record) { |
| | | return { |
| | | on:{ |
| | | click:()=>{ |
| | | const timeObj={ |
| | | start:moment(record.startTime), |
| | | end:moment(record.endTime) |
| | | on: { |
| | | click: () => { |
| | | // å
³æºç¶æè®¾å¤æ¥å¿ä¸å¼¹åºå·¥ä½æ²çº¿ |
| | | if (record.status === 0) return |
| | | const timeObj = { |
| | | start: moment(record.startTime), |
| | | end: moment(record.endTime) |
| | | } |
| | | this.$bus.$emit('tableRowRecord',timeObj) |
| | | this.$bus.$emit('tableRowRecord', timeObj) |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | <style lang="less" scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @media screen and (min-width: 1920px){ |
| | | .table_logList{ |
| | | height: 417px!important; |
| | | |
| | | @media screen and (min-width: 1920px) { |
| | | .table_logList { |
| | | height: 417px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px){ |
| | | .table_logList{ |
| | | height: 417px!important; |
| | | |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px) { |
| | | .table_logList { |
| | | height: 417px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px){ |
| | | .table_logList{ |
| | | height: 266px!important; |
| | | |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px) { |
| | | .table_logList { |
| | | height: 266px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px){ |
| | | .table_logList{ |
| | | height: 360px!important; |
| | | |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px) { |
| | | .table_logList { |
| | | height: 360px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (max-width: 1280px){ |
| | | .table_logList{ |
| | | height: 170px!important; |
| | | |
| | | @media screen and (max-width: 1280px) { |
| | | .table_logList { |
| | | height: 170px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | |
| | | 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) |
| | | } |
| | | 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) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.queryParams = { |
| | | equipmentId: node.equipmentId, |
| | | equipmentName: node.equipmentName, |
| | | period: 1000, |
| | | period: 100, |
| | | paramDate: paramDate, |
| | | paramDateStr: paramDate.format('yyyy-MM-DD'), |
| | | start: start, |
| | |
| | | position: 'left', |
| | | boundaryGap: [0, '15%'], |
| | | axisLine: { |
| | | show: true |
| | | // lineStyle:{ |
| | | // color:'#000000' |
| | | // } |
| | | show: true, |
| | | lineStyle:{ |
| | | color:'#5470C6' |
| | | } |
| | | } |
| | | }, |
| | | { |
| | |
| | | position: 'left', |
| | | boundaryGap: [0, '15%'], |
| | | axisLine: { |
| | | show: true |
| | | // lineStyle:{ |
| | | // color:'#000000' |
| | | // } |
| | | show: true, |
| | | lineStyle:{ |
| | | color:'#91CC75' |
| | | } |
| | | } |
| | | }, |
| | | { |
| | |
| | | position: 'left', |
| | | boundaryGap: [0, '15%'], |
| | | axisLine: { |
| | | show: true |
| | | // lineStyle:{ |
| | | // color:'#000000' |
| | | // } |
| | | show: true, |
| | | lineStyle:{ |
| | | color:'#FAC858' |
| | | } |
| | | } |
| | | } |
| | | ], |
| | |
| | | temp.push(item) |
| | | } |
| | | } |
| | | console.log('temp',temp) |
| | | getAction(this.url.workChart, param).then((res) => { |
| | | if (JSON.stringify(res.result) == '[]' || res.result == null) { |
| | | // this.$message.warning('æ æ°æ®ï¼') |
| | |
| | | symbol: 'circle', |
| | | symbolSize: 10, |
| | | yAxisIndex: i, |
| | | |
| | | data: itemLine |
| | | } |
| | | result.push(line) |
| | | |
| | | } |
| | | console.log('result===========',result) |
| | | console.log('legend=============',lengenddata) |
| | | // option.yAxis = Yarr; |
| | | option.series = result |
| | | option.legend = lengenddata |
| | |
| | | <a-range-picker @change="dateParamChange" v-model="dates" format="YYYY-MM-DD HH:mm:ss"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4"> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <a-input placeholder="è¾å
¥è®¾å¤ç¼å·æ¥è¯¢" v-model="queryParams.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-input placeholder="è¾å
¥è®¾å¤åç§°æ¥è¯¢" v-model="queryParams.equipmentName"></a-input> |
| | | </a-form-item> |
| | |
| | | <!--</a-row>--> |
| | | </a-form> |
| | | </a-spin> |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | </a-modal> |
| | | </template> |
| | | |
| | |
| | | duplicateCheck |
| | | } from '@/api/api' |
| | | import Vue from 'vue' |
| | | import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal' |
| | | import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer' |
| | | |
| | | export default { |
| | | name: 'DeviceRepairModel', |
| | | components: { SelectDeviceModal, JDate }, |
| | | components: { SelectDeviceDrawer, JDate }, |
| | | props: { |
| | | equipmentId: { |
| | | type: String |
| | |
| | | // }) |
| | | }, |
| | | deviceSearch() { |
| | | this.$refs.selectDeviceModal.visible = true |
| | | this.$refs.selectDeviceModal.selectedRowKeys = [] |
| | | this.$refs.selectDeviceModal.selectedRows = [] |
| | | this.$refs.selectDeviceModal.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : [] |
| | | this.$refs.selectDeviceDrawer.visible = true |
| | | this.$refs.selectDeviceDrawer.selectedRowKeys = [] |
| | | this.$refs.selectDeviceDrawer.selectedRows = [] |
| | | this.$refs.selectDeviceDrawer.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : [] |
| | | }, |
| | | //çº§èæ¡onChangeäºä»¶ |
| | | // onChange(value) { |
| | |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="4" :sm="4"> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="设å¤ç±»å"> |
| | | <a-select placeholder="è¯·éæ©è®¾å¤ç±»å" :triggerChange="true" v-model="queryParam.equipmentType" :allowClear="true"> |
| | | <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> |
| | |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates"/> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="驱å¨ç±»å"> |
| | | <a-auto-complete |
| | | v-model="queryParam.driveType" |
| | | :data-source="driveTypeList" |
| | | placeholder="è¯·éæ©é©±å¨ç±»å" |
| | | :filter-option="filterOption" |
| | | :allowClear="true" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="14" :sm="14" style="display: flex;align-items: flex-start;-webkit-align-items: flex-start;justify-content: space-between;"> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | <a-button type="primary" @click="exportExcel" icon="download">导åº</a-button> |
| | | </a-space> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates" :allowClear="false"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="8" :sm="8" style="display: flex;align-items: flex-start;-webkit-align-items: flex-start;justify-content: space-between;"> |
| | | <table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;margin-left: 24px"> |
| | | <tr> |
| | | <td v-for="(item, index) in identifying">{{item.title}}</td> |
| | |
| | | </table> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="15" :sm="15"> |
| | | <a-row :gutter="24" type="flex" align="middle"> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | <a-button type="primary" @click="exportExcel" icon="download">导åº</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | <a-col :md="19" :sm="19"> |
| | | <a-checkbox-group :value="checkedList" :default-value="['lyl']" :options="efficiencyOptions" |
| | | @change="efficiencyOptionsOnChange"/> |
| | | </a-col> |
| | |
| | | import $ from 'jquery' |
| | | import '@/components/table2excel/table2excel' |
| | | import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' |
| | | import api from '@/api/mdc' |
| | | |
| | | export default { |
| | | name: 'EfficiencyPOList', |
| | | components: {}, |
| | |
| | | queryParamEquip:{}, |
| | | queryParamPeople:{}, |
| | | identifying: [], |
| | | driveTypeList:[], |
| | | efficiencyOptions: [ |
| | | { label: 'å¼å¨ç', value: 'lyl' }, |
| | | { label: '弿ºç', value: 'kjl' }, |
| | |
| | | this.queryParam.typeTree = "1" |
| | | this.loadData() |
| | | this.queryGroup() |
| | | this.getDriveTypeByApi() |
| | | }, |
| | | watch: { |
| | | Type(valmath){ |
| | |
| | | this.typeParent = this.queryParam.parentId |
| | | this.typeEquipment = this.queryParam.equipmentId |
| | | this.queryParam = {} |
| | | this.dates = [] |
| | | this.queryParam.typeTree = this.typeTree |
| | | this.queryParam.parentId = this.typeParent |
| | | this.queryParam.equipmentId = this.typeEquipment |
| | | this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)] |
| | | this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | // this.ipagination.current = 1 |
| | | this.loadData(); |
| | | // this.queryParam = {} |
| | |
| | | // console.log(res.result) |
| | | this.tableHeads = res.result.dates |
| | | this.dataList = res.result.mdcEfficiencyList |
| | | if (res.result.mdcEfficiencyList && !res.result.mdcEfficiencyList.length) { |
| | | this.$notification.info({ |
| | | message: 'æ¶æ¯', |
| | | description: 'ææ è¯¥è®¾å¤ç±»åæ°æ®' |
| | | }) |
| | | } |
| | | this.checkSameData(this.dataList) |
| | | this.checkSameData1(this.dataList) |
| | | this.checkSameData2(this.dataList) |
| | |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * è°ç¨æ¥å£è·åæ§å¶ç³»ç»ç±»å |
| | | */ |
| | | getDriveTypeByApi(){ |
| | | api.getDriveTypeApi().then((res)=>{ |
| | | this.driveTypeList=res.result.map(item=>item.value) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * èæ³è¾å
¥æ¡çéåè½ |
| | | * @param input è¾å
¥çå
容 |
| | | * @param option é
ç½® |
| | | * @returns {boolean} 夿æ¯å¦çé |
| | | */ |
| | | filterOption(input, option) { |
| | | return ( |
| | | option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0 |
| | | ); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="4" :sm="4"> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="设å¤ç±»å"> |
| | | <a-select placeholder="è¯·éæ©è®¾å¤ç±»å" :triggerChange="true" v-model="queryParam.equipmentType" |
| | | :allowClear="true"> |
| | |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="驱å¨ç±»å"> |
| | | <a-auto-complete |
| | | v-model="queryParam.driveType" |
| | | :data-source="driveTypeList" |
| | | placeholder="è¯·éæ©é©±å¨ç±»å" |
| | | :filter-option="filterOption" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" |
| | | v-model="dates"/> |
| | | v-model="dates" :allowClear="false"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="14" :sm="14" style="display: flex;align-items: flex-start;-webkit-align-items: flex-start;justify-content: space-between;"> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | <a-button type="primary" @click="exportExcel" icon="download">导åº</a-button> |
| | | <a-button type="primary" icon="printer" v-print="'#Efficiency'" v-has="'efficiency:print'">æå°</a-button> |
| | | </a-space> |
| | | <a-col :md="8" :sm="8" |
| | | style="display: flex;align-items: flex-start;-webkit-align-items: flex-start;justify-content: space-between;"> |
| | | <!--<a-space>--> |
| | | <!--<a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button>--> |
| | | <!--<a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button>--> |
| | | <!--<a-button type="primary" @click="exportExcel" icon="download">导åº</a-button>--> |
| | | <!--<a-button type="primary" icon="printer" v-print="'#Efficiency'" v-has="'efficiency:print'">æå°--> |
| | | <!--</a-button>--> |
| | | <!--</a-space>--> |
| | | <table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;margin-left: 24px"> |
| | | <tr> |
| | | <td v-for="(item, index) in identifying">{{item.title}}</td> |
| | |
| | | </table> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="15" :sm="15"> |
| | | <a-row :gutter="24" type="flex" align="middle"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | <a-button type="primary" @click="exportExcel" icon="download">导åº</a-button> |
| | | <a-button type="primary" icon="printer" v-print="'#Efficiency'" v-has="'efficiency:print'">æå° |
| | | </a-button> |
| | | </a-space> |
| | | </a-col> |
| | | <a-col :md="18" :sm="18"> |
| | | <a-checkbox-group :value="checkedList" :default-value="['lyl']" :options="efficiencyOptions" |
| | | @change="efficiencyOptionsOnChange"/> |
| | | </a-col> |
| | |
| | | </a-form> |
| | | </div> |
| | | <!--<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>--> |
| | | <!--</tr>--> |
| | | <!--<tr>--> |
| | | <!--<td style="text-align:center;" v-for="(item, index) in identifying">--> |
| | | <!--<div class="identifyingclass" :style="{background: item.color}"></div>--> |
| | | <!--</td>--> |
| | | <!--<!–<td style="text-align:center;"><div style="width: 55px;height: 15px;background-color: #e8ff37;display:inline-block"></div></td>–>--> |
| | | <!--<!–<td style="text-align:center;"><div style="width: 55px;height: 15px;background-color: #99ff4e;display:inline-block"></div></td>–>--> |
| | | <!--</tr>--> |
| | | <!--</table>--> |
| | | <!--<table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;">--> |
| | | <!--<tr>--> |
| | | <!--<td v-for="(item, index) in identifying">{{item.title}}</td>--> |
| | | <!--</tr>--> |
| | | <!--<tr>--> |
| | | <!--<td style="text-align:center;" v-for="(item, index) in identifying">--> |
| | | <!--<div class="identifyingclass" :style="{background: item.color}"></div>--> |
| | | <!--</td>--> |
| | | <!--<!–<td style="text-align:center;"><div style="width: 55px;height: 15px;background-color: #e8ff37;display:inline-block"></div></td>–>--> |
| | | <!--<!–<td style="text-align:center;"><div style="width: 55px;height: 15px;background-color: #99ff4e;display:inline-block"></div></td>–>--> |
| | | <!--</tr>--> |
| | | <!--</table>--> |
| | | <!--</div>--> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | </td> |
| | | <td class="tdgu3 kaitou">{{item.equipmentId}}</td> |
| | | <td class="tdgu4 kaitou" style="min-width: 162px; max-width: 162px;width: 162px;">{{item.equipmentName}}</td> |
| | | <td class="tdgu4 kaitou" style="min-width: 162px; max-width: 162px;width: 162px;"> |
| | | {{item.equipmentName}} |
| | | </td> |
| | | <td class="tdgu5 kaitou">{{item.equipmentType}}</td> |
| | | </template> |
| | | |
| | |
| | | import $ from 'jquery' |
| | | import '@/components/table2excel/table2excel' |
| | | import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' |
| | | import api from '@/api/mdc' |
| | | |
| | | export default { |
| | | name: 'EfficiencyList', |
| | |
| | | deviceTypeDict: '', |
| | | dates: [], |
| | | selectList: [], |
| | | driveTypeList:[], |
| | | identifying: [], |
| | | queryParam: {}, |
| | | queryParams: {}, |
| | |
| | | this.queryParam.typeTree = '1' |
| | | this.loadData() |
| | | this.queryGroup() |
| | | this.getDriveTypeByApi() |
| | | }, |
| | | watch: { |
| | | Type(valmath) { |
| | |
| | | this.typeParent = this.queryParam.parentId |
| | | this.typeEquipment = this.queryParam.equipmentId |
| | | this.queryParam = {} |
| | | this.dates = [] |
| | | this.queryParam.typeTree = this.typeTree |
| | | this.queryParam.parentId = this.typeParent |
| | | this.queryParam.equipmentId = this.typeEquipment |
| | | this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)] |
| | | this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | // this.ipagination.current = 1 |
| | | this.loadData() |
| | | // this.queryParam = {} |
| | |
| | | if (res.success) { |
| | | this.tableHeads = res.result.dates |
| | | this.dataList = res.result.mdcEfficiencyList |
| | | if (res.result.mdcEfficiencyList && !res.result.mdcEfficiencyList.length) { |
| | | this.$notification.info({ |
| | | message: 'æ¶æ¯', |
| | | description: 'ææ è¯¥è®¾å¤ç±»åæ°æ®' |
| | | }) |
| | | } |
| | | this.distinguishColorList = res.result.utilizationRateList |
| | | this.checkSameData(this.dataList) |
| | | this.checkSameData1(this.dataList) |
| | |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * è°ç¨æ¥å£è·åæ§å¶ç³»ç»ç±»å |
| | | */ |
| | | getDriveTypeByApi(){ |
| | | api.getDriveTypeApi().then((res)=>{ |
| | | this.driveTypeList=res.result.map(item=>item.value) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * èæ³è¾å
¥æ¡çéåè½ |
| | | * @param input è¾å
¥çå
容 |
| | | * @param option é
ç½® |
| | | * @returns {boolean} 夿æ¯å¦çé |
| | | */ |
| | | filterOption(input, option) { |
| | | return ( |
| | | option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0 |
| | | ); |
| | | }, |
| | | } |
| | | } |
| | |
| | | left: 412px; |
| | | } |
| | | |
| | | #Efficiency{ |
| | | #Efficiency { |
| | | overflow: hidden; |
| | | } |
| | | |
| | |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="4" :sm="4" > |
| | | <a-col :md="5" :sm="5" > |
| | | <a-form-item label="设å¤ç±»å"> |
| | | <a-select placeholder="è¯·éæ©è®¾å¤ç±»å" :triggerChange="true" v-model="queryParam.equipmentType" :allowClear="true"> |
| | | <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> |
| | |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="驱å¨ç±»å"> |
| | | <a-auto-complete |
| | | v-model="queryParam.driveType" |
| | | :data-source="driveTypeList" |
| | | placeholder="è¯·éæ©é©±å¨ç±»å" |
| | | :filter-option="filterOption" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <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" :allowClear="false"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="7" :sm="7" :xs="7"> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | <a-button type="primary" @click="exportExcel" icon="download">导åº</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | <!--<a-col :md="7" :sm="7" :xs="7">--> |
| | | <!--<a-space>--> |
| | | <!--<a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button>--> |
| | | <!--<a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button>--> |
| | | <!--<a-button type="primary" @click="exportExcel" icon="download">导åº</a-button>--> |
| | | <!--</a-space>--> |
| | | <!--</a-col>--> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="24" :sm="24" :xs="24" style="display: flex;justify-content: space-between"> |
| | | <a-checkbox-group :value="checkedList" :default-value="['lyl']" :options="efficiencyOptions" |
| | | @change="efficiencyOptionsOnChange"/> |
| | | <a-row :gutter="24" type="flex" align="middle"> |
| | | <a-col :md="24" :sm="24" :xs="24" style="display: flex;justify-content: space-between;align-items: flex-start"> |
| | | <div> |
| | | <a-space style="margin-right: 20px"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | <a-button type="primary" @click="exportExcel" icon="download">导åº</a-button> |
| | | </a-space> |
| | | <a-checkbox-group :value="checkedList" :default-value="['lyl']" :options="efficiencyOptions" |
| | | @change="efficiencyOptionsOnChange"/> |
| | | </div> |
| | | <table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;"> |
| | | <tr> |
| | | <td v-for="(item, index) in identifying">{{item.title}}</td> |
| | |
| | | import $ from 'jquery' |
| | | import '@/components/table2excel/table2excel' |
| | | import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' |
| | | import api from '@/api/mdc' |
| | | |
| | | export default { |
| | | name: 'EfficiencyShiftList', |
| | | components: {}, |
| | |
| | | allowClearSu:true, |
| | | dates: [], |
| | | selectList:[], |
| | | driveTypeList:[], |
| | | identifying: [], |
| | | queryParam: {}, |
| | | queryParamEquip:{}, |
| | |
| | | this.queryParam.typeTree = "1" |
| | | this.loadData(); |
| | | this.queryGroup() |
| | | this.getDriveTypeByApi() |
| | | }, |
| | | watch: { |
| | | Type(valmath){ |
| | |
| | | this.queryParam.startTime = v2[0] |
| | | this.queryParam.endTime = v2[1] |
| | | // ç¹å»æ¶é´éæ©å¨çæ¸
空æé®æ¶ä¼è§¦åæ¤å¤æ(ç¹å»éç½®æé®ä¸ä¼è§¦å)ï¼å®ç°éç½®å表åè½ï¼å宿¹åå表æ¾ç¤ºææ |
| | | if(!this.queryParam.startTime&&!this.queryParam.endTime)this.searchReset() |
| | | // if(!this.queryParam.startTime&&!this.queryParam.endTime)this.searchReset() |
| | | }, |
| | | efficiencyOptionsOnChange(checkedList) { |
| | | let index = checkedList.indexOf('lyl') |
| | |
| | | this.checkedList = checkedList |
| | | }, |
| | | searchQuery() { |
| | | if(this.dates != ''){ |
| | | 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.loadData() |
| | | if(this.queryParam.typeTree == "1"){ |
| | | this.queryParam.parentId = this.queryParamEquip.parentId |
| | | this.queryParam.equipmentId = this.queryParamEquip.equipmentId |
| | | }else{ |
| | | // this.$message.warning("è¯·éæ©æ¶é´") |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"è¯·éæ©æ¶é´" |
| | | }); |
| | | this.queryParam.parentId = this.queryParamPeople.parentId |
| | | this.queryParam.equipmentId = "" |
| | | } |
| | | this.loadData() |
| | | // this.onClearSelected() |
| | | }, |
| | | searchReset() { |
| | |
| | | this.typeParent = this.queryParam.parentId |
| | | this.typeEquipment = this.queryParam.equipmentId |
| | | this.queryParam = {} |
| | | this.dates = [] |
| | | this.dates = [moment().subtract('days', 7), moment().subtract('days', 1)] |
| | | this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.queryParam.typeTree = this.typeTree |
| | | this.queryParam.parentId = this.typeParent |
| | | this.queryParam.equipmentId = this.typeEquipment |
| | |
| | | if (res.success) { |
| | | this.tableHeads = res.result.dates |
| | | this.dataList = res.result.mdcEfficiencyList |
| | | if (res.result.mdcEfficiencyList && !res.result.mdcEfficiencyList.length) { |
| | | this.$notification.info({ |
| | | message: 'æ¶æ¯', |
| | | description: 'ææ è¯¥è®¾å¤ç±»åæ°æ®' |
| | | }) |
| | | } |
| | | this.checkSameData(this.dataList) |
| | | this.checkSameData1(this.dataList) |
| | | this.checkSameData2(this.dataList) |
| | |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * è°ç¨æ¥å£è·åæ§å¶ç³»ç»ç±»å |
| | | */ |
| | | getDriveTypeByApi(){ |
| | | api.getDriveTypeApi().then((res)=>{ |
| | | this.driveTypeList=res.result.map(item=>item.value) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * èæ³è¾å
¥æ¡çéåè½ |
| | | * @param input è¾å
¥çå
容 |
| | | * @param option é
ç½® |
| | | * @returns {boolean} 夿æ¯å¦çé |
| | | */ |
| | | filterOption(input, option) { |
| | | return ( |
| | | option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0 |
| | | ); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | ], |
| | | englishName: [ |
| | | { required: true, message: '请è¾å
¥è±æåç§°!' }, |
| | | { pattern: /^.{2,18}$/, message: '请è¾å
¥2å°18ä½ä»»æå符!' ,trigger:'blur'}, |
| | | // { pattern: /^.{2,24}$/, message: '请è¾å
¥2å°24ä½ä»»æå符!' ,trigger:'blur'}, |
| | | ], |
| | | showFlag: [ |
| | | { required: true, message: '请è¾å
¥æ¾ç¤ºæ å¿!' }, |
| | |
| | | <!-- æ¥è¯¢åºå --> |
| | | <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-row :gutter="24" style="width: 100%;"> |
| | | <a-col :md="7" :sm="7"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" v-model="dates" format="YYYY-MM-DD"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4"> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <a-input placeholder="è¾å
¥è®¾å¤ç¼å·æ¥è¯¢" v-model="queryParams.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-input placeholder="è¾å
¥è®¾å¤åç§°æ¥è¯¢" v-model="queryParams.equipmentName"></a-input> |
| | | </a-form-item> |
| | |
| | | param.field = this.getQueryField(); |
| | | param.parentId = this.queryParams.parentId; |
| | | param.equipmentId = this.queryParams.equipmentId; |
| | | param.startTime = this.queryParam.startTime; |
| | | param.endTime = this.queryParam.endTime; |
| | | if(this.queryParam.startTime && this.queryParam.endTime){ |
| | | param.startTime = this.queryParam.startTime; |
| | | param.endTime = this.queryParam.endTime; |
| | | } |
| | | // console.log(param); |
| | | getAction(this.url.list,param).then((res) => { |
| | | if(res.success){ |
| | |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | </a-modal> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | duplicateCheck |
| | | } from '@/api/api' |
| | | import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal' |
| | | import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer' |
| | | |
| | | export default { |
| | | name: 'mdcPassRateModal', |
| | | components: { SelectDeviceModal}, |
| | | components: { SelectDeviceDrawer}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | |
| | | // }) |
| | | }, |
| | | deviceSearch() { |
| | | this.$refs.selectDeviceModal.visible = true |
| | | this.$refs.selectDeviceModal.selectedRowKeys = [] |
| | | this.$refs.selectDeviceModal.selectedRows = [] |
| | | this.$refs.selectDeviceModal.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : [] |
| | | this.$refs.selectDeviceDrawer.visible = true |
| | | this.$refs.selectDeviceDrawer.selectedRowKeys = [] |
| | | this.$refs.selectDeviceDrawer.selectedRows = [] |
| | | this.$refs.selectDeviceDrawer.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : [] |
| | | }, |
| | | //çº§èæ¡onChangeäºä»¶ |
| | | // onChange(value) { |
| | |
| | | <!-- æ¥è¯¢åºå --> |
| | | <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-row :gutter="24" style="width: 100%;"> |
| | | <a-col :md="7" :sm="7"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" v-model="dates" format="YYYY-MM-DD"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4"> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <a-input placeholder="è¾å
¥è®¾å¤ç¼å·æ¥è¯¢" v-model="queryParams.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-input placeholder="è¾å
¥è®¾å¤åç§°æ¥è¯¢" v-model="queryParams.equipmentName"></a-input> |
| | | </a-form-item> |
| | |
| | | param.field = this.getQueryField(); |
| | | param.parentId = this.queryParams.parentId; |
| | | param.equipmentId = this.queryParams.equipmentId; |
| | | param.startTime = this.queryParam.startTime; |
| | | param.endTime = this.queryParam.endTime; |
| | | if(this.queryParam.startTime && this.queryParam.endTime){ |
| | | param.startTime = this.queryParam.startTime; |
| | | param.endTime = this.queryParam.endTime; |
| | | } |
| | | // console.log(param); |
| | | getAction(this.url.list,param).then((res) => { |
| | | if(res.success){ |
| | |
| | | <!-- æ¥è¯¢åºå --> |
| | | <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="7" :sm="7"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" v-model="dates" format="YYYY-MM-DD"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4"> |
| | | <a-row :gutter="24" style="width: 100%;"> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <a-input placeholder="è¾å
¥è®¾å¤ç¼å·æ¥è¯¢" v-model="queryParams.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-input placeholder="è¾å
¥è®¾å¤åç§°æ¥è¯¢" v-model="queryParams.equipmentName"></a-input> |
| | | </a-form-item> |
| | |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | <!--<a-col :md="2" :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-col :lg="2" :md="3" :sm="3" :xs="3">--> |
| | | <!--<a-button type="primary" @click="exportExcel" icon="download">导åº</a-button>--> |
| | | <!--</a-col>--> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | |
| | | <div id="DeviceList" style="flex: 1;overflow: hidden"> |
| | | <a-table ref="table" bordered size="middle" rowKey="id" :columns="columns" |
| | | :scroll="{x:'max-content',y:scrollY}" :dataSource="dataSource" :pagination="ipagination" :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys}" |
| | | @change="handleTableChange"> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import moment from 'moment' |
| | | import $ from 'jquery' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag' |
| | | import JDate from '../../../../../components/jeecg/JDate' |
| | |
| | | } from '@/api/manage' |
| | | import MdcStandardProcessDurationModal from './MdcStandardProcessDurationModal' |
| | | import MdcStandardProcessDurationEdit from './MdcStandardProcessDurationEdit' |
| | | // import DeviceRepairModelAdd from './DeviceRepairModelAdd' |
| | | // import DeviceRepairModelEdit from './DeviceRepairModelEdit' |
| | | import '@/components/table2excel/table2excel' |
| | | import { |
| | | JeecgListMixin |
| | |
| | | Tooltip, |
| | | MdcStandardProcessDurationModal, |
| | | MdcStandardProcessDurationEdit, |
| | | // DeviceRepairModelAdd, |
| | | // DeviceRepairModelEdit, |
| | | JDictSelectTag, |
| | | JInput, |
| | | JDate, |
| | |
| | | typeTree:"", |
| | | typeParent:1, |
| | | typeEquipment:1, |
| | | dates: [], |
| | | xianshi:"", |
| | | readOnly:true, |
| | | queryParam: {}, |
| | |
| | | align: 'center', |
| | | dataIndex: 'equipmentName', |
| | | width:200 |
| | | // defaultSortOrder:'descend', |
| | | // sorter: (a, b) => {return a.equipmentName>b.equipmentName?1:-1} |
| | | }, |
| | | { |
| | | title: 'é¶ä»¶å·', |
| | | align: 'center', |
| | | dataIndex: 'partsCode', |
| | | width:150 |
| | | // scopedSlots:{customRender:'startTime'}, |
| | | // customRender:(text,row,index) => { |
| | | // return moment(text).format("YYYY-MM-DD HH:mm:ss") |
| | | // } |
| | | }, |
| | | { |
| | | title: 'æ¹æ¬¡å·', |
| | |
| | | Type(valmath){ |
| | | this.dataList = []; |
| | | this.queryParams.typeTree = valmath |
| | | // console.log(this.queryParams.typeTree) |
| | | }, |
| | | nodeTree(val) { //çå¬currSelected ååï¼å°åååçæ°å¼ä¼ éç» getCurrSelected äºä»¶ |
| | | if (JSON.stringify(val) != '{}') { |
| | |
| | | document.body.appendChild(a); |
| | | a.click(); |
| | | a.remove(); |
| | | }, |
| | | dateParamChange(v1, v2) { |
| | | // console.log(v1,v2) |
| | | this.queryParam.startTime = v2[0] |
| | | this.queryParam.endTime = v2[1] |
| | | // console.log(v2[0],v2[1]) |
| | | }, |
| | | onChange(value, dateString) { |
| | | // console.log('Selected Time: ', value); |
| | | // console.log('Formatted Selected Time: ', dateString); |
| | | }, |
| | | onOk(value) { |
| | | console.log('onOk: ', value); |
| | | }, |
| | | searchReset() { |
| | | if(this.queryParams.typeTree == "1"){ |
| | |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | |
| | | </a-modal> |
| | | </template> |
| | |
| | | import { |
| | | duplicateCheck |
| | | } from '@/api/api' |
| | | import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal' |
| | | import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer' |
| | | |
| | | export default { |
| | | name: 'MdcStandardProcessDurationModal', |
| | | components: { SelectDeviceModal }, |
| | | components: { SelectDeviceDrawer }, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | |
| | | // }) |
| | | }, |
| | | deviceSearch() { |
| | | this.$refs.selectDeviceModal.visible = true |
| | | this.$refs.selectDeviceModal.selectedRowKeys = [] |
| | | this.$refs.selectDeviceModal.selectedRows = [] |
| | | this.$refs.selectDeviceModal.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : [] |
| | | this.$refs.selectDeviceDrawer.visible = true |
| | | this.$refs.selectDeviceDrawer.selectedRowKeys = [] |
| | | this.$refs.selectDeviceDrawer.selectedRows = [] |
| | | this.$refs.selectDeviceDrawer.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : [] |
| | | }, |
| | | //çº§èæ¡onChangeäºä»¶ |
| | | // onChange(value) { |
| | |
| | | <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-col :md="7" :sm="7"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" |
| | | v-model="dates"/> |
| | | v-model="dates" :allowClear="false"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="17" :sm="17" :xs="17"> |
| | | <a-form-item label="æ¶é´æ®µ"> |
| | | <a-space> |
| | | <a-time-picker :default-value="moment('00:00', 'HH:mm')" format="HH:mm" @change="onChangeStart"/> |
| | | <a-time-picker :default-value="moment('00:00', 'HH:mm')" format="HH:mm" @change="onChangeStart" :allowClear="false"/> |
| | | è³ |
| | | <a-time-picker :default-value="moment('08:00', 'HH:mm')" format="HH:mm" @change="onChangeEnd"/> |
| | | <a-time-picker :default-value="moment('08:00', 'HH:mm')" format="HH:mm" @change="onChangeEnd" :allowClear="false"/> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | </a-space> |
| | | </a-form-item> |
| | |
| | | this.dates = [v1[0], v1[1]] |
| | | }, |
| | | searchQuery() { |
| | | // å 触åºå·æ°ä¼ä¿®æ¹åæ°æ¶é´å¼ï¼æ
卿¤ç¨æ¶é´éæ©å¨çæ¶é´å¼å¯¹åæ°æ¶é´å¼å次èµå¼ï¼è¥ä¸è¿æ ·åååæ°æ¶é´å¼åä¼ä¸æ¶é´éæ©å¨ä¸çæ¶é´å¼ä¸ä¸è´ |
| | | this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') |
| | | if (this.queryParam.startTime && this.queryParam.endTime && this.dates[0] && this.dates[1]) { |
| | | 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.requestAlldataSize = moment.duration(moment(this.queryParam.endDate) - moment(this.queryParam.startDate), 'millisecond').asDays() + 1 |
| | | this.loadData1() |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æç¤º', |
| | | description: 'è¯·éæ©æ¶é´ææ¶é´æ®µ' |
| | | }) |
| | | } |
| | | |
| | | // this.onClearSelected() |
| | | 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.requestAlldataSize = moment.duration(moment(this.queryParam.endDate) - moment(this.queryParam.startDate), 'millisecond').asDays() + 1 |
| | | this.loadData1() |
| | | }, |
| | | // searchReset() { |
| | | // this.typeTree = this.queryParam.typeTree |
| | | // this.typeParent = this.queryParam.parentId |
| | | // this.typeEquipment = this.queryParam.equipmentId |
| | | // this.queryParam = {} |
| | | // this.dates = [] |
| | | // this.queryParam.typeTree = this.typeTree |
| | | // this.queryParam.parentId = this.typeParent |
| | | // this.queryParam.equipmentId = this.typeEquipment |
| | | // // this.ipagination.current = 1 |
| | | // this.loadData1(); |
| | | // // this.queryParam = {} |
| | | // // this.dates = [] |
| | | // // this.loadData() |
| | | // // this.onClearSelected() |
| | | // }, |
| | | // loadData1() { |
| | | // let that = this |
| | | // that.columns=[ |
| | | // { |
| | | // title: '设å¤ç¼å·', |
| | | // align: 'center', |
| | | // dataIndex: 'equipmentId', |
| | | // width:'150px' |
| | | // }, |
| | | // { |
| | | // title: '设å¤åç§°', |
| | | // align: 'center', |
| | | // dataIndex: 'equipmentName', |
| | | // width:'150px' |
| | | // }, |
| | | // ] |
| | | // that.tableHeads = [] |
| | | // that.dataList = [] |
| | | // getAction(this.url.efficiencyList, that.queryParam).then(res => { |
| | | // var tmp = {} |
| | | // console.log(res) |
| | | // if (res.success) |
| | | // |
| | | // that.dataSource = res.result.mdcEfficiencyList |
| | | // for(var k = 0;k<that.dataSource[0].dataList.length;k++){ |
| | | // that.columns.push( |
| | | // { |
| | | // title:that.dataSource[0].dataList.theDate, |
| | | // align: 'center', |
| | | // width:'120px', |
| | | // // dataIndex:'utilizationRate', |
| | | // } |
| | | // ) |
| | | // } |
| | | // for(var i = 0;i<that.dataSource.length;i++){ |
| | | // for (var j = 0; j < that.dataSource[i].dataList.length;j++){ |
| | | // // that.columns.push( |
| | | // // { |
| | | // // title:that.dataSource[0].dataList[j].theDate, |
| | | // // align: 'center', |
| | | // // width:'120px', |
| | | // // dataIndex:'utilizationRate', |
| | | // // } |
| | | // // ) |
| | | // } |
| | | // |
| | | // } |
| | | // console.log(that.columns) |
| | | // console.log(that.dataSource) |
| | | // // this.initDeviceType(this.dataList) |
| | | // this.draw() |
| | | // } |
| | | // } |
| | | loadData1() { |
| | | this.loading = true |
| | | this.tableHeads = [] |
| | |
| | | <a-col :md="7" :sm="7"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" |
| | | v-model="dates"/> |
| | | v-model="dates" :allowClear="false"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :lg="2" :md="3" :sm="3" :xs="3"> |
| | |
| | | this.dates = [v1[0], v1[1]] |
| | | }, |
| | | searchQuery() { |
| | | console.log('dates', this.dates) |
| | | // å 触åºå·æ°ä¼ä¿®æ¹åæ°æ¶é´å¼ï¼æ
卿¤ç¨æ¶é´éæ©å¨çæ¶é´å¼å¯¹åæ°æ¶é´å¼å次èµå¼ï¼è¥ä¸è¿æ ·åååæ°æ¶é´å¼åä¼ä¸æ¶é´éæ©å¨ä¸çæ¶é´å¼ä¸ä¸è´ |
| | | this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') |
| | | if (this.dates[0] && this.dates[1]) { |
| | | 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.requestAlldataSize = moment.duration(moment(this.queryParam.endDate) - moment(this.queryParam.startDate), 'millisecond').asDays() + 1 |
| | | this.loadData1() |
| | | |
| | | if (this.queryParam.typeTree == '1') { |
| | | this.queryParam.parentId = this.queryParamEquip.parentId |
| | | this.queryParam.equipmentId = this.queryParamEquip.equipmentId |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æç¤º', |
| | | description: 'è¯·éæ©æ¶é´' |
| | | }) |
| | | this.queryParam.parentId = this.queryParamPeople.parentId |
| | | this.queryParam.equipmentId = '' |
| | | } |
| | | // this.onClearSelected() |
| | | this.requestAlldataSize = moment.duration(moment(this.queryParam.endDate) - moment(this.queryParam.startDate), 'millisecond').asDays() + 1 |
| | | this.loadData1() |
| | | }, |
| | | // searchReset() { |
| | | // this.typeTree = this.queryParam.typeTree |
| | |
| | | <!-- 表ååºå --> |
| | | <workshop-modal ref="modalForm" @ok="modalFormOk"></workshop-modal> |
| | | <!--æ°å¢è½¦é´--> |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'æ·»å å·²æè®¾å¤'"></select-device-modal> |
| | | <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'æ·»å å·²æè®¾å¤'"></select-device-drawer> |
| | | <!--å·²æè®¾å¤--> |
| | | </a-row> |
| | | </template> |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { deleteAction, postAction, getAction } from '@/api/manage' |
| | | import SelectDeviceModal from './modules/SelectDeviceModal' |
| | | import SelectDeviceDrawer from './modules/SelectDeviceDrawer' |
| | | import WorkshopModal from './modules/WorkshopModal' |
| | | import { filterObj } from '@/utils/util' |
| | | import moment from 'moment' |
| | |
| | | name: 'WorkshopSignageManagement', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | SelectDeviceModal, |
| | | SelectDeviceDrawer, |
| | | WorkshopModal, |
| | | moment, |
| | | }, |
| | |
| | | if (this.currentWorkshopId == '') { |
| | | this.$message.error('è¯·éæ©ä¸ä¸ªè½¦é´!') |
| | | } else { |
| | | this.$refs.selectDeviceModal.visible = true |
| | | this.$refs.selectDeviceModal.selectedRowKeys = [] |
| | | this.$refs.selectDeviceModal.selectedRows = [] |
| | | this.$refs.selectDeviceModal.checkedKeys = [] |
| | | this.$refs.selectDeviceModal.expandAll() |
| | | this.$refs.selectDeviceDrawer.visible = true |
| | | this.$refs.selectDeviceDrawer.selectedRowKeys = [] |
| | | this.$refs.selectDeviceDrawer.selectedRows = [] |
| | | this.$refs.selectDeviceDrawer.checkedKeys = [] |
| | | this.$refs.selectDeviceDrawer.expandAll() |
| | | } |
| | | }, |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-drawer |
| | | :title="title" |
| | | :visible="visible" |
| | | width="650" |
| | | @ok="handleOk" |
| | | @close="handleCancel" |
| | | > |
| | | |
| | | <a-spin :spinning="loading"> |
| | | <!-- showLine --> |
| | | <a-form> |
| | | <a-form-item label="车é´å±çº§ï¼"> |
| | | <a-tree showLine ref="tree" :expandedKeys.sync="expandedKeys" |
| | | :treeData="treeDataSource" checkable @check="onCheck" v-model="checkedKeys" |
| | | @expand="onExpand"> |
| | | </a-tree> |
| | | </a-form-item> |
| | | </a-form> |
| | | |
| | | </a-spin> |
| | | |
| | | |
| | | <div class="drawer-bottom-button"> |
| | | <a-dropdown |
| | | style="float: left" |
| | | :trigger="['click']" |
| | | placement="topCenter" |
| | | > |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="expandAll">å±å¼ææ</a-menu-item> |
| | | <a-menu-item key="2" @click="closeAll">åå¹¶ææ</a-menu-item> |
| | | <a-menu-item key="3" @click="refreshTree">å·æ°</a-menu-item> |
| | | </a-menu> |
| | | <a-button> |
| | | æ æä½ |
| | | <a-icon type="up"/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | <a-popconfirm title="ç¡®å®æ¾å¼ç¼è¾ï¼" @confirm="handleCancel" okText="ç¡®å®" cancelText="åæ¶"> |
| | | <a-button style="margin-right: .8rem">å
³é</a-button> |
| | | </a-popconfirm> |
| | | <a-button |
| | | @click="handleOk" |
| | | type="primary" |
| | | >ç¡®å® |
| | | </a-button> |
| | | </div> |
| | | |
| | | </a-drawer> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getAction, |
| | | postAction, |
| | | deleteAction |
| | | } from '@/api/manage' |
| | | import BaseTree from '@/views/mdc/common/BaseTree' |
| | | import DepartTree from '@/views/mdc/base/modules/DepartList/DepartListTree/DepartTree' |
| | | import { mapActions } from 'vuex' |
| | | |
| | | export default { |
| | | name: 'SelectDeviceDrawer', |
| | | components: { |
| | | BaseTree, DepartTree |
| | | }, |
| | | props: { |
| | | editDisable: { |
| | | type: Boolean, |
| | | default() { |
| | | return true |
| | | } |
| | | }, |
| | | title: { |
| | | type: String |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | cardLoading: false, |
| | | loading: false, |
| | | treeDataSource: [], |
| | | expandedKeys: [], |
| | | checkedKeys: [], |
| | | url: { |
| | | getBaseTree: '/mdc/mdcEquipment/queryTreeListByProduction' |
| | | }, |
| | | dataList: [], |
| | | allTreeKeys: [], |
| | | visible: false, |
| | | dataSource: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.queryTreeData() |
| | | this.closeAll() |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryProduction']), |
| | | onExpand(expandedKeys) { |
| | | this.expandedKeys = expandedKeys |
| | | this.autoExpandParent = false |
| | | }, |
| | | |
| | | queryTreeData() { |
| | | this.loading = true |
| | | this.cardLoading = true |
| | | this.QueryProduction().then(res => { |
| | | if (res.success) { |
| | | this.dataList = [] |
| | | this.allTreeKeys = [] |
| | | this.getTreeDataSouce(res.result) |
| | | this.treeDataSource = res.result |
| | | this.generateList(this.treeDataSource) |
| | | console.log('treeDataSource', this.treeDataSource) |
| | | this.expandedKeys = this.allTreeKeys |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | this.cardLoading = false |
| | | }) |
| | | }, |
| | | |
| | | generateList(data) { |
| | | for (let i = 0; i < data.length; i++) { |
| | | const node = data[i] |
| | | const key = node.key |
| | | const title = node.title |
| | | this.dataList.push({ |
| | | key, |
| | | title: title |
| | | }) |
| | | this.allTreeKeys.push(key) |
| | | if (node.children) { |
| | | this.generateList(node.children) |
| | | } |
| | | } |
| | | }, |
| | | |
| | | getTreeDataSouce(data) { |
| | | data.forEach(item => { |
| | | if (item.children && item.children.length > 0) { |
| | | this.getTreeDataSouce(item.children) |
| | | } |
| | | item.key = item.equipmentId ? item.equipmentId : item.key |
| | | item.value = item.equipmentId ? item.equipmentId : item.value |
| | | }) |
| | | }, |
| | | expandAll() { |
| | | this.expandedKeys = this.allTreeKeys |
| | | }, |
| | | closeAll() { |
| | | this.expandedKeys = ['-1'] |
| | | }, |
| | | refreshTree() { |
| | | this.queryTreeData() |
| | | }, |
| | | onCheck(value, obj) { |
| | | this.checkedKeys = value |
| | | console.log('obj,', obj) |
| | | this.deviceNodes = obj.checkedNodes.filter(item => item.data.props.equipmentId).map(item => item.data.props.equipmentId) |
| | | console.log(this.deviceNodes) |
| | | }, |
| | | handleCancel() { |
| | | this.visible = false |
| | | }, |
| | | handleOk() { |
| | | this.$emit('selectFinished', this.deviceNodes) |
| | | this.visible = false |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | | /deep/ .ant-modal { |
| | | /*transform-origin: 337px 50px;*/ |
| | | } |
| | | |
| | | .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 |
| | | } |
| | | |
| | | .drawer-bottom-button { |
| | | position: absolute; |
| | | bottom: 0; |
| | | width: 100%; |
| | | border-top: 1px solid #e8e8e8; |
| | | padding: 10px 16px; |
| | | text-align: right; |
| | | left: 0; |
| | | background: #fff; |
| | | border-radius: 0 0 2px 2px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div> |
| | | <a-drawer |
| | | :title="title" |
| | | :visible="visible" |
| | | width="650" |
| | | @ok="handleOk" |
| | | @close="handleCancel" |
| | | > |
| | | <a-modal |
| | | :title="title" |
| | | :visible="visible" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | > |
| | | |
| | | <!--<!– æ¥è¯¢åºå –>--> |
| | | <!--<div class="table-page-search-wrapper">--> |
| | | <!--<a-form layout="inline" @keyup.enter.native="searchQuery">--> |
| | | <!--<a-row :gutter="24">--> |
| | | <a-spin :spinning="loading"> |
| | | <!-- showLine --> |
| | | <a-form> |
| | | <a-form-item label="车é´å±çº§ï¼"> |
| | | <a-tree showLine ref="tree" :expandedKeys.sync="expandedKeys" |
| | | :treeData="treeDataSource" checkable @check="onCheck" v-model="checkedKeys" |
| | | @expand="onExpand"> |
| | | </a-tree> |
| | | </a-form-item> |
| | | </a-form> |
| | | |
| | | <!--<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-spin> |
| | | |
| | | <!--</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-spin :spinning="loading"> |
| | | <!-- showLine --> |
| | | <a-form> |
| | | <a-form-item label="车é´å±çº§ï¼"> |
| | | <a-tree showLine ref="tree" :expandedKeys.sync="expandedKeys" |
| | | :treeData="treeDataSource" checkable @check="onCheck" v-model="checkedKeys" |
| | | @expand="onExpand"> |
| | | </a-tree> |
| | | </a-form-item> |
| | | </a-form> |
| | | |
| | | </a-spin> |
| | | |
| | | |
| | | <div class="drawer-bottom-button"> |
| | | <template slot="footer"> |
| | | <div> |
| | | <a-dropdown |
| | | style="float: left" |
| | | :trigger="['click']" |
| | |
| | | >ç¡®å® |
| | | </a-button> |
| | | </div> |
| | | </template> |
| | | |
| | | </a-drawer> |
| | | </div> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { filterObj } from '@/utils/util' |
| | | // import { getAction } from '@/api/manage' |
| | | import { |
| | | getAction, |
| | | postAction, |
| | |
| | | } from '@/api/manage' |
| | | import BaseTree from '@/views/mdc/common/BaseTree' |
| | | import DepartTree from '@/views/mdc/base/modules/DepartList/DepartListTree/DepartTree' |
| | | import { mapActions } from 'vuex' |
| | | |
| | | export default { |
| | | name: 'SelectDeviceModal', |
| | |
| | | }, |
| | | title: { |
| | | type: String |
| | | }, |
| | | selectedProduction: { |
| | | type: String |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | cardLoading: false, |
| | | loading: false, |
| | | treeDataSource: [], |
| | | expandedKeys: [], |
| | | checkedKeys: [], |
| | | url: { |
| | | getBaseTree: '/mdc/mdcEquipment/queryTreeListByProduction' |
| | | getDeviceTree: '/mdc/mdcEquipment/loadTreeListByProductionIds' |
| | | }, |
| | | selectedWorkshopIds: '', |
| | | dataList: [], |
| | | allTreeKeys: [], |
| | | visible: false, |
| | | dataSource: [] |
| | | |
| | | // names: [], |
| | | // 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' |
| | | // }, |
| | | // activeKey: '1', |
| | | // isDepartType: '' |
| | | } |
| | | }, |
| | | created() { |
| | | // this.loadData() |
| | | this.queryTreeData() |
| | | this.closeAll() |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryProduction']), |
| | | |
| | | onExpand(expandedKeys) { |
| | | this.expandedKeys = expandedKeys |
| | | this.autoExpandParent = false |
| | | }, |
| | | |
| | | queryTreeData() { |
| | | queryTreeData(value) { |
| | | this.loading = true |
| | | this.cardLoading = true |
| | | this.QueryProduction().then(res => { |
| | | if (res.success) { |
| | | this.dataList = [] |
| | | this.allTreeKeys = [] |
| | | this.getTreeDataSouce(res.result) |
| | | this.treeDataSource = res.result |
| | | this.generateList(this.treeDataSource) |
| | | console.log('treeDataSource', this.treeDataSource) |
| | | this.expandedKeys = this.allTreeKeys |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | this.cardLoading = false |
| | | }) |
| | | this.selectedWorkshopIds = value |
| | | getAction(this.url.getDeviceTree, { ids: value }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.dataList = [] |
| | | this.allTreeKeys = [] |
| | | this.getTreeDataSouce(res.result) |
| | | this.treeDataSource = res.result |
| | | this.generateList(this.treeDataSource) |
| | | this.expandedKeys = this.allTreeKeys |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | this.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: err.message |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | generateList(data) { |
| | |
| | | this.expandedKeys = ['-1'] |
| | | }, |
| | | refreshTree() { |
| | | this.queryTreeData() |
| | | this.queryTreeData(this.selectedWorkshopIds) |
| | | }, |
| | | onCheck(value, obj) { |
| | | this.checkedKeys = value |
| | | console.log('obj,', obj) |
| | | this.deviceNodes = obj.checkedNodes.filter(item => item.data.props.equipmentId).map(item => item.data.props.equipmentId) |
| | | console.log(this.deviceNodes) |
| | | }, |
| | | handleCancel() { |
| | | this.visible = false |
| | |
| | | this.$emit('selectFinished', this.deviceNodes) |
| | | 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() |
| | | // }, |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | @back="backDepartInfo" |
| | | :backDepart="true" |
| | | :treeOpera="true" |
| | | >></j-select-depart> |
| | | >> |
| | | </j-select-depart> |
| | | </a-form-model-item> |
| | | |
| | | <!--车é´åé
--> |
| | |
| | | :treeProductOpera="true" |
| | | ></j-select-production> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item |
| | | label="éæ©è®¾å¤" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | v-show="!productionDisabled" |
| | | > |
| | | <a-input-search :readOnly="true" v-model="model.equipmentIds" @search="deviceSearch" enter-button |
| | | placeholder="è¯·éæ©è®¾å¤" :disabled="!model.selectedProduction"/> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item |
| | | label="çç»åé
" |
| | | :labelCol="labelCol" |
| | |
| | | @click="handleSubmit" |
| | | type="primary" |
| | | :loading="confirmLoading" |
| | | >æäº¤</a-button> |
| | | >æäº¤ |
| | | </a-button> |
| | | </div> |
| | | |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | </a-drawer> |
| | | </template> |
| | | |
| | | <script> |
| | | import moment from 'moment' |
| | | import Vue from 'vue' |
| | | import { ACCESS_TOKEN } from "@/store/mutation-types" |
| | | import { getAction } from '@/api/manage' |
| | | import { addUser, editUser, queryUserRole, queryall } from '@/api/api' |
| | | import { disabledAuthFilter } from "@/utils/authFilter" |
| | | import { duplicateCheck } from '@/api/api' |
| | | import JSelectProduction from '../../../components/jeecgbiz/JSelectProduction' |
| | | import { mapActions } from 'vuex' |
| | | import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
| | | import moment from 'moment' |
| | | import Vue from 'vue' |
| | | import { ACCESS_TOKEN } from '@/store/mutation-types' |
| | | import { getAction } from '@/api/manage' |
| | | import { addUser, editUser, queryUserRole, queryall } from '@/api/api' |
| | | import { disabledAuthFilter } from '@/utils/authFilter' |
| | | import { duplicateCheck } from '@/api/api' |
| | | import JSelectProduction from '../../../components/jeecgbiz/JSelectProduction' |
| | | import { mapActions } from 'vuex' |
| | | import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
| | | import SelectDeviceModal from './SelectDeviceModal' |
| | | |
| | | export default { |
| | | name: "UserModal", |
| | | components: { |
| | | JSelectProduction |
| | | }, |
| | | data() { |
| | | return { |
| | | departDisabled: false, //æ¯å¦æ¯æçé¨é¨è°ç¨è¯¥é¡µé¢ |
| | | productionDisabled: false, //æ¯å¦æ¯æç车é´è°ç¨è¯¥é¡µé¢ |
| | | roleDisabled: false, //æ¯å¦æ¯è§è²ç»´æ¤è°ç¨è¯¥é¡µé¢ |
| | | modalWidth: 800, |
| | | drawerWidth: 700, |
| | | modaltoggleFlag: true, |
| | | confirmDirty: false, |
| | | userId: "", //ä¿åç¨æ·id |
| | | disableSubmit: false, |
| | | dateFormat: "YYYY-MM-DD", |
| | | validatorRules: { |
| | | username: [{ required: true, message: '请è¾å
¥ç¨æ·è´¦å·!' }, |
| | | { validator: this.validateUsername, }], |
| | | password: [{ required: true, pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, message: 'å¯ç ç±8使°åã大å°å忝åç¹æ®ç¬¦å·ç»æ!' }, |
| | | { validator: this.validateToNextPassword, trigger: 'change' }], |
| | | confirmpassword: [{ required: true, message: 'è¯·éæ°è¾å
¥ç»å½å¯ç !', }, |
| | | { validator: this.compareToFirstPassword, }], |
| | | realname: [{ required: true, message: '请è¾å
¥ç¨æ·åç§°!' }], |
| | | phone: [{ required: false, message: '请è¾å
¥ææºå·!' }, { validator: this.validatePhone }], |
| | | email: [{ validator: this.validateEmail }], |
| | | roles: {}, |
| | | workNo: [{ required: true, message: '请è¾å
¥å·¥å·' }, |
| | | { validator: this.validateWorkNo }], |
| | | telephone: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请è¾å
¥æ£ç¡®ç座æºå·ç ' },], |
| | | teamId: [{ required: false, message: '请维æ¤çç»' }] |
| | | |
| | | }, |
| | | departIdShow: false, |
| | | title: "æä½", |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | uploadLoading: false, |
| | | confirmLoading: false, |
| | | headers: {}, |
| | | url: { |
| | | fileUpload: window._CONFIG['domianURL'] + "sys/common/upload", |
| | | userWithDepart: "/sys/user/userDepartList", // å¼å
¥ä¸ºæå®ç¨æ·æ¥çé¨é¨ä¿¡æ¯éè¦çurl |
| | | //å¼å
¥ä¸ºæå®ç¨æ·æ¥ç车é´ä¿¡æ¯éè¦çurl |
| | | userProductionList: '/sys/user/userProductionList', |
| | | userId: "/sys/user/generateUserId", // å¼å
¥çææ·»å ç¨æ·æ
åµä¸çurl |
| | | syncUserByUserName: "/act/process/extActProcess/doSyncUserByUserName",//åæ¥ç¨æ·å°å·¥ä½æµ |
| | | queryTenantList: '/sys/tenant/queryList' |
| | | }, |
| | | tenantsOptions: [], |
| | | rolesOptions: [], |
| | | nextDepartOptions: [], |
| | | nextProductionOptions: [], |
| | | isDepartType: '', |
| | | |
| | | } |
| | | }, |
| | | watch: { |
| | | visible: { |
| | | handler(value) { |
| | | if (value) this.initDictData('password_length') |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | const token = Vue.ls.get(ACCESS_TOKEN); |
| | | this.headers = { "X-Access-Token": token } |
| | | this.initRoleList() |
| | | this.initTenantList() |
| | | this.queryTreeData() |
| | | }, |
| | | computed: { |
| | | uploadAction: function () { |
| | | return this.url.fileUpload; |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryDepartTree']), |
| | | queryTreeData() { |
| | | this.QueryDepartTree().then(res => { |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | }) |
| | | export default { |
| | | name: 'UserModal', |
| | | components: { |
| | | SelectDeviceModal, |
| | | JSelectProduction |
| | | }, |
| | | add() { |
| | | this.refresh(); |
| | | this.edit({ activitiSync: '1', userIdentity: 1 }); |
| | | }, |
| | | edit(record) { |
| | | let that = this; |
| | | that.visible = true; |
| | | //æ ¹æ®å±å¹å®½åº¦èªéåºæ½å±å®½åº¦ |
| | | 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; |
| | | } else { |
| | | this.departIdShow = false; |
| | | } |
| | | |
| | | if (record.hasOwnProperty("id")) { |
| | | that.getUserRoles(record.id); |
| | | that.getUserDeparts(record.id); |
| | | } |
| | | console.log('that.model', that.model) |
| | | }, |
| | | isDisabledAuth(code) { |
| | | return disabledAuthFilter(code); |
| | | }, |
| | | //çªå£æå¤§å忢 |
| | | toggleScreen() { |
| | | if (this.modaltoggleFlag) { |
| | | this.modalWidth = window.innerWidth; |
| | | } else { |
| | | this.modalWidth = 800; |
| | | } |
| | | this.modaltoggleFlag = !this.modaltoggleFlag; |
| | | }, |
| | | // æ ¹æ®å±å¹åå,设置æ½å±å°ºå¯¸ |
| | | resetScreenSize() { |
| | | let screenWidth = document.body.clientWidth; |
| | | if (screenWidth < 500) { |
| | | this.drawerWidth = screenWidth; |
| | | } else { |
| | | this.drawerWidth = 700; |
| | | } |
| | | }, |
| | | //åå§åç§æ·åå
¸ |
| | | initTenantList() { |
| | | getAction(this.url.queryTenantList).then(res => { |
| | | if (res.success) { |
| | | this.tenantsOptions = res.result.map((item, index, arr) => { |
| | | let c = { label: item.name, value: item.id + "" } |
| | | return c; |
| | | }) |
| | | console.log('this.tenantsOptions: ', this.tenantsOptions) |
| | | } |
| | | }) |
| | | }, |
| | | //åå§åè§è²åå
¸ |
| | | initRoleList() { |
| | | queryall().then((res) => { |
| | | if (res.success) { |
| | | this.rolesOptions = res.result.map((item, index, arr) => { |
| | | let c = { label: item.roleName, value: item.id } |
| | | return c; |
| | | }) |
| | | console.log('this.rolesOptions: ', this.rolesOptions) |
| | | } |
| | | }); |
| | | }, |
| | | getUserRoles(userid) { |
| | | queryUserRole({ userid: userid }).then((res) => { |
| | | if (res.success) { |
| | | this.model.selectedroles = res.result.join(","); |
| | | console.log('that.model.selectedroles=', this.model.selectedroles) |
| | | } |
| | | }); |
| | | }, |
| | | getUserDeparts(userid) { |
| | | let that = this; |
| | | //é¨é¨çurl |
| | | getAction(that.url.userWithDepart, { userId: userid }).then((res) => { |
| | | if (res.success) { |
| | | let departOptions = []; |
| | | let selectDepartKeys = [] |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | selectDepartKeys.push(res.result[i].key); |
| | | //æ°å¢è´è´£é¨é¨éæ©ä¸ææ¡ |
| | | departOptions.push({ |
| | | value: res.result[i].key, |
| | | label: res.result[i].title |
| | | }) |
| | | } |
| | | |
| | | that.model.selecteddeparts = selectDepartKeys.join(",") |
| | | that.model.selectedProduction = selectDepartKeys.join(",") |
| | | |
| | | that.nextDepartOptions = departOptions; |
| | | console.log('that.nextDepartOptions=', that.nextDepartOptions) |
| | | } |
| | | }) |
| | | |
| | | getAction(that.url.userProductionList, { userId: userid }).then((res) => { |
| | | if (res.success) { |
| | | let ProductionOptions = []; |
| | | let selectProductKeys = [] |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | selectProductKeys.push(res.result[i].key); |
| | | //æ°å¢è´è´£é¨é¨éæ©ä¸ææ¡ |
| | | ProductionOptions.push({ |
| | | value: res.result[i].key, |
| | | label: res.result[i].title |
| | | }) |
| | | } |
| | | |
| | | that.model.selectedProduction = selectProductKeys.join(",") |
| | | |
| | | that.nextProductionOptions = ProductionOptions; |
| | | console.log('that.nextProductionOptions=', that.nextProductionOptions) |
| | | } |
| | | }) |
| | | //车é´çurl |
| | | }, |
| | | backDepartInfo(info) { |
| | | this.model.departIds = this.model.selecteddeparts; |
| | | this.nextDepartOptions = info.map((item, index, arr) => { |
| | | let c = { label: item.text, value: item.value + "" } |
| | | return c; |
| | | }) |
| | | }, |
| | | backProductionInfo(info) { |
| | | this.model.productionIds = this.model.selectedProduction; |
| | | this.nextProductionOptions = info.map((item, index, arr) => { |
| | | let c = { label: item.text, value: item.value + "" } |
| | | return c; |
| | | }) |
| | | }, |
| | | |
| | | refresh() { |
| | | this.userId = "" |
| | | this.nextDepartOptions = []; |
| | | this.nextProductionOptions = []; |
| | | this.departIdShow = false; |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | this.disableSubmit = false; |
| | | this.nextDepartOptions = []; |
| | | this.nextProductionOptions = [] |
| | | this.departIdShow = false; |
| | | this.$refs.form.resetFields(); |
| | | }, |
| | | moment, |
| | | handleSubmit() { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true; |
| | | //妿æ¯ä¸çº§æ©ä¼ å
¥departIds,å¦å为空 |
| | | if (this.model.userIdentity !== 2) { |
| | | this.model.departIds = ""; |
| | | } |
| | | let obj; |
| | | if (!this.model.id) { |
| | | this.model.id = this.userId; |
| | | obj = addUser(this.model); |
| | | } else { |
| | | obj = editUser(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() |
| | | }, |
| | | validateToNextPassword(rule, value, callback) { |
| | | const confirmpassword = this.model.confirmpassword; |
| | | if (value && confirmpassword && value !== confirmpassword) { |
| | | callback('两次è¾å
¥çå¯ç ä¸ä¸æ ·ï¼'); |
| | | } |
| | | if (value && this.confirmDirty) { |
| | | this.$refs.form.validateField(['confirmpassword']); |
| | | } |
| | | callback(); |
| | | }, |
| | | compareToFirstPassword(rule, value, callback) { |
| | | if (value && value !== this.model.password) { |
| | | callback('两次è¾å
¥çå¯ç ä¸ä¸æ ·ï¼'); |
| | | } else { |
| | | callback() |
| | | } |
| | | }, |
| | | validatePhone(rule, value, callback) { |
| | | if (!value) { |
| | | callback() |
| | | } else { |
| | | if (new RegExp(/^1[3|4|5|7|8|9][0-9]\d{8}$/).test(value)) { |
| | | var params = { |
| | | tableName: 'sys_user', |
| | | fieldName: 'phone', |
| | | fieldVal: value, |
| | | dataId: this.userId |
| | | }; |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback() |
| | | } else { |
| | | callback("ææºå·å·²åå¨!") |
| | | } |
| | | }) |
| | | } else { |
| | | callback("请è¾å
¥æ£ç¡®æ ¼å¼çææºå·ç !"); |
| | | } |
| | | } |
| | | }, |
| | | validateEmail(rule, value, callback) { |
| | | if (!value) { |
| | | callback() |
| | | } else { |
| | | if (new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(value)) { |
| | | var params = { |
| | | tableName: 'sys_user', |
| | | fieldName: 'email', |
| | | fieldVal: value, |
| | | dataId: this.userId |
| | | }; |
| | | duplicateCheck(params).then((res) => { |
| | | console.log(res) |
| | | if (res.success) { |
| | | callback() |
| | | } else { |
| | | callback("é®ç®±å·²åå¨!") |
| | | } |
| | | }) |
| | | } else { |
| | | callback("请è¾å
¥æ£ç¡®æ ¼å¼çé®ç®±!") |
| | | } |
| | | } |
| | | }, |
| | | validateUsername(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'sys_user', |
| | | fieldName: 'username', |
| | | fieldVal: value, |
| | | dataId: this.userId |
| | | }; |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback() |
| | | } else { |
| | | callback("ç¨æ·åå·²åå¨!") |
| | | } |
| | | }) |
| | | }, |
| | | validateWorkNo(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'sys_user', |
| | | fieldName: 'work_no', |
| | | fieldVal: value, |
| | | dataId: this.userId |
| | | }; |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback() |
| | | } else { |
| | | callback("å·¥å·å·²åå¨!") |
| | | } |
| | | }) |
| | | }, |
| | | handleConfirmBlur(e) { |
| | | const value = e.target.value; |
| | | this.confirmDirty = this.confirmDirty || !!value |
| | | }, |
| | | beforeUpload: function (file) { |
| | | var fileType = file.type; |
| | | if (fileType.indexOf('image') < 0) { |
| | | this.$message.warning('请ä¸ä¼ å¾ç'); |
| | | return false; |
| | | } |
| | | //TODO éªè¯æä»¶å¤§å° |
| | | }, |
| | | identityChange(e) { |
| | | if (e.target.value === 1) { |
| | | this.departIdShow = false; |
| | | } else { |
| | | this.departIdShow = true; |
| | | } |
| | | }, |
| | | initDictData(dictCode) { |
| | | //æ ¹æ®åå
¸Code, åå§ååå
¸æ°ç» |
| | | ajaxGetDictItems(dictCode, null).then((res) => { |
| | | if (res.success) { |
| | | const regExp = new RegExp("^(?=.*[a-zA-Z])(?=.*\\\d)(?=.*[~!@#$%^&*()_+`\\-={}:\";'<>?,./]).{" + Number(res.result[0].value) + ",}$"); |
| | | |
| | | this.validatorRules.password[0] = { |
| | | data() { |
| | | return { |
| | | departDisabled: false, //æ¯å¦æ¯æçé¨é¨è°ç¨è¯¥é¡µé¢ |
| | | productionDisabled: false, //æ¯å¦æ¯æç车é´è°ç¨è¯¥é¡µé¢ |
| | | roleDisabled: false, //æ¯å¦æ¯è§è²ç»´æ¤è°ç¨è¯¥é¡µé¢ |
| | | modalWidth: 800, |
| | | drawerWidth: 700, |
| | | modaltoggleFlag: true, |
| | | confirmDirty: false, |
| | | userId: '', //ä¿åç¨æ·id |
| | | disableSubmit: false, |
| | | dateFormat: 'YYYY-MM-DD', |
| | | validatorRules: { |
| | | username: [{ required: true, message: '请è¾å
¥ç¨æ·è´¦å·!' }, |
| | | { validator: this.validateUsername }], |
| | | password: [{ |
| | | required: true, |
| | | pattern: regExp, |
| | | message: `å¯ç ç±${res.result[0].value}使°åã大å°å忝åç¹æ®ç¬¦å·ç»æ!`, |
| | | } |
| | | pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, |
| | | message: 'å¯ç ç±8使°åã大å°å忝åç¹æ®ç¬¦å·ç»æ!' |
| | | }, |
| | | { validator: this.validateToNextPassword, trigger: 'change' }], |
| | | confirmpassword: [{ required: true, message: 'è¯·éæ°è¾å
¥ç»å½å¯ç !' }, |
| | | { validator: this.compareToFirstPassword }], |
| | | realname: [{ required: true, message: '请è¾å
¥ç¨æ·åç§°!' }], |
| | | phone: [{ required: false, message: '请è¾å
¥ææºå·!' }, { validator: this.validatePhone }], |
| | | email: [{ validator: this.validateEmail }], |
| | | roles: {}, |
| | | workNo: [{ required: true, message: '请è¾å
¥å·¥å·' }, |
| | | { validator: this.validateWorkNo }], |
| | | telephone: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请è¾å
¥æ£ç¡®ç座æºå·ç ' }], |
| | | teamId: [{ required: false, message: '请维æ¤çç»' }] |
| | | |
| | | }, |
| | | departIdShow: false, |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | uploadLoading: false, |
| | | confirmLoading: false, |
| | | headers: {}, |
| | | url: { |
| | | fileUpload: window._CONFIG['domianURL'] + 'sys/common/upload', |
| | | userWithDepart: '/sys/user/userDepartList', // å¼å
¥ä¸ºæå®ç¨æ·æ¥çé¨é¨ä¿¡æ¯éè¦çurl |
| | | //å¼å
¥ä¸ºæå®ç¨æ·æ¥ç车é´ä¿¡æ¯éè¦çurl |
| | | userProductionList: '/sys/user/userProductionList', |
| | | userId: '/sys/user/generateUserId', // å¼å
¥çææ·»å ç¨æ·æ
åµä¸çurl |
| | | syncUserByUserName: '/act/process/extActProcess/doSyncUserByUserName',//åæ¥ç¨æ·å°å·¥ä½æµ |
| | | queryTenantList: '/sys/tenant/queryList' |
| | | }, |
| | | tenantsOptions: [], |
| | | rolesOptions: [], |
| | | nextDepartOptions: [], |
| | | nextProductionOptions: [], |
| | | isDepartType: '', |
| | | model: { |
| | | selectedProduction: '' |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | watch: { |
| | | visible: { |
| | | handler(value) { |
| | | if (value) this.initDictData('password_length') |
| | | } |
| | | }, |
| | | 'model.selectedProduction': { |
| | | handler(newVal, oldVal) { |
| | | if (newVal && this.$refs.selectDeviceModal) { |
| | | // å¦æè½¦é´éæ©ååä¸ä¸è´åéç½®éæ©è®¾å¤ |
| | | if ((oldVal && newVal !== oldVal)) this.model.equipmentIds = '' |
| | | this.$refs.selectDeviceModal.queryTreeData(newVal) |
| | | } |
| | | // 妿æ¸
空车é´å¼åéç½®éæ©è®¾å¤ |
| | | if (newVal === '') this.model.equipmentIds = '' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | const token = Vue.ls.get(ACCESS_TOKEN) |
| | | this.headers = { 'X-Access-Token': token } |
| | | this.initRoleList() |
| | | this.initTenantList() |
| | | this.queryTreeData() |
| | | }, |
| | | computed: { |
| | | uploadAction: function() { |
| | | return this.url.fileUpload |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryDepartTree']), |
| | | queryTreeData() { |
| | | this.QueryDepartTree().then(res => { |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | }) |
| | | }, |
| | | add() { |
| | | this.refresh() |
| | | this.edit({ |
| | | activitiSync: '1', |
| | | userIdentity: 1, |
| | | selectedroles: '', |
| | | selecteddeparts: '', |
| | | selectedProduction: '' |
| | | }) |
| | | }, |
| | | edit(record) { |
| | | let that = this |
| | | that.visible = true |
| | | //æ ¹æ®å±å¹å®½åº¦èªéåºæ½å±å®½åº¦ |
| | | this.resetScreenSize() |
| | | that.userId = record.id |
| | | console.log('record', record) |
| | | that.model = Object.assign({}, record) |
| | | //身份为ä¸çº§æ¾ç¤ºè´è´£é¨é¨ï¼å¦å䏿¾ç¤º |
| | | if (this.model.userIdentity == 2) { |
| | | this.departIdShow = true |
| | | } else { |
| | | this.departIdShow = false |
| | | } |
| | | |
| | | if (record.hasOwnProperty('id')) { |
| | | that.getUserRoles(record.id) |
| | | that.getUserDeparts(record.id) |
| | | } |
| | | }, |
| | | isDisabledAuth(code) { |
| | | return disabledAuthFilter(code) |
| | | }, |
| | | //çªå£æå¤§å忢 |
| | | toggleScreen() { |
| | | if (this.modaltoggleFlag) { |
| | | this.modalWidth = window.innerWidth |
| | | } else { |
| | | this.modalWidth = 800 |
| | | } |
| | | this.modaltoggleFlag = !this.modaltoggleFlag |
| | | }, |
| | | // æ ¹æ®å±å¹åå,设置æ½å±å°ºå¯¸ |
| | | resetScreenSize() { |
| | | let screenWidth = document.body.clientWidth |
| | | if (screenWidth < 500) { |
| | | this.drawerWidth = screenWidth |
| | | } else { |
| | | this.drawerWidth = 700 |
| | | } |
| | | }, |
| | | //åå§åç§æ·åå
¸ |
| | | initTenantList() { |
| | | getAction(this.url.queryTenantList).then(res => { |
| | | if (res.success) { |
| | | this.tenantsOptions = res.result.map((item, index, arr) => { |
| | | let c = { label: item.name, value: item.id + '' } |
| | | return c |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | //åå§åè§è²åå
¸ |
| | | initRoleList() { |
| | | queryall().then((res) => { |
| | | if (res.success) { |
| | | this.rolesOptions = res.result.map((item, index, arr) => { |
| | | let c = { label: item.roleName, value: item.id } |
| | | return c |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getUserRoles(userid) { |
| | | queryUserRole({ userid: userid }).then((res) => { |
| | | if (res.success) { |
| | | this.$set(this.model, 'selectedroles', res.result.join(',')) |
| | | } |
| | | }) |
| | | }, |
| | | getUserDeparts(userid) { |
| | | let that = this |
| | | //é¨é¨çurl è·åé¨é¨åé
|
| | | getAction(that.url.userWithDepart, { userId: userid }).then((res) => { |
| | | if (res.success) { |
| | | let departOptions = [] |
| | | let selectDepartKeys = [] |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | selectDepartKeys.push(res.result[i].key) |
| | | //æ°å¢è´è´£é¨é¨éæ©ä¸ææ¡ |
| | | departOptions.push({ |
| | | value: res.result[i].key, |
| | | label: res.result[i].title |
| | | }) |
| | | } |
| | | |
| | | this.$set(this.model, 'selecteddeparts', selectDepartKeys.join(',')) |
| | | that.nextDepartOptions = departOptions |
| | | } |
| | | }) |
| | | |
| | | // è·å车é´åé
|
| | | getAction(that.url.userProductionList, { userId: userid }).then((res) => { |
| | | if (res.success) { |
| | | let ProductionOptions = [] |
| | | let selectProductKeys = [] |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | selectProductKeys.push(res.result[i].key) |
| | | //æ°å¢è´è´£é¨é¨éæ©ä¸ææ¡ |
| | | ProductionOptions.push({ |
| | | value: res.result[i].key, |
| | | label: res.result[i].title |
| | | }) |
| | | } |
| | | |
| | | this.$set(this.model, 'selectedProduction', selectProductKeys.join(',')) |
| | | that.nextProductionOptions = ProductionOptions |
| | | } |
| | | }) |
| | | //车é´çurl |
| | | }, |
| | | backDepartInfo(info) { |
| | | this.model.departIds = this.model.selecteddeparts |
| | | this.nextDepartOptions = info.map((item, index, arr) => { |
| | | let c = { label: item.text, value: item.value + '' } |
| | | return c |
| | | }) |
| | | }, |
| | | backProductionInfo(info) { |
| | | this.model.productionIds = this.model.selectedProduction |
| | | this.nextProductionOptions = info.map((item, index, arr) => { |
| | | let c = { label: item.text, value: item.value + '' } |
| | | return c |
| | | }) |
| | | }, |
| | | |
| | | refresh() { |
| | | this.userId = '' |
| | | this.nextDepartOptions = [] |
| | | this.nextProductionOptions = [] |
| | | this.departIdShow = false |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.disableSubmit = false |
| | | this.nextDepartOptions = [] |
| | | this.nextProductionOptions = [] |
| | | this.departIdShow = false |
| | | this.$refs.form.resetFields() |
| | | }, |
| | | moment, |
| | | handleSubmit() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true |
| | | //妿æ¯ä¸çº§æ©ä¼ å
¥departIds,å¦å为空 |
| | | if (this.model.userIdentity !== 2) { |
| | | this.model.departIds = '' |
| | | } |
| | | let obj |
| | | if (!this.model.id) { |
| | | this.model.id = this.userId |
| | | obj = addUser(this.model) |
| | | } else { |
| | | obj = editUser(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() |
| | | }, |
| | | validateToNextPassword(rule, value, callback) { |
| | | const confirmpassword = this.model.confirmpassword |
| | | if (value && confirmpassword && value !== confirmpassword) { |
| | | callback('两次è¾å
¥çå¯ç ä¸ä¸æ ·ï¼') |
| | | } |
| | | if (value && this.confirmDirty) { |
| | | this.$refs.form.validateField(['confirmpassword']) |
| | | } |
| | | callback() |
| | | }, |
| | | compareToFirstPassword(rule, value, callback) { |
| | | if (value && value !== this.model.password) { |
| | | callback('两次è¾å
¥çå¯ç ä¸ä¸æ ·ï¼') |
| | | } else { |
| | | callback() |
| | | } |
| | | }, |
| | | validatePhone(rule, value, callback) { |
| | | if (!value) { |
| | | callback() |
| | | } else { |
| | | if (new RegExp(/^1[3|4|5|7|8|9][0-9]\d{8}$/).test(value)) { |
| | | var params = { |
| | | tableName: 'sys_user', |
| | | fieldName: 'phone', |
| | | fieldVal: value, |
| | | dataId: this.userId |
| | | } |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback() |
| | | } else { |
| | | callback('ææºå·å·²åå¨!') |
| | | } |
| | | }) |
| | | } else { |
| | | callback('请è¾å
¥æ£ç¡®æ ¼å¼çææºå·ç !') |
| | | } |
| | | } |
| | | }, |
| | | validateEmail(rule, value, callback) { |
| | | if (!value) { |
| | | callback() |
| | | } else { |
| | | if (new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(value)) { |
| | | var params = { |
| | | tableName: 'sys_user', |
| | | fieldName: 'email', |
| | | fieldVal: value, |
| | | dataId: this.userId |
| | | } |
| | | duplicateCheck(params).then((res) => { |
| | | console.log(res) |
| | | if (res.success) { |
| | | callback() |
| | | } else { |
| | | callback('é®ç®±å·²åå¨!') |
| | | } |
| | | }) |
| | | } else { |
| | | callback('请è¾å
¥æ£ç¡®æ ¼å¼çé®ç®±!') |
| | | } |
| | | } |
| | | }, |
| | | validateUsername(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'sys_user', |
| | | fieldName: 'username', |
| | | fieldVal: value, |
| | | dataId: this.userId |
| | | } |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback() |
| | | } else { |
| | | callback('ç¨æ·åå·²åå¨!') |
| | | } |
| | | }) |
| | | }, |
| | | validateWorkNo(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'sys_user', |
| | | fieldName: 'work_no', |
| | | fieldVal: value, |
| | | dataId: this.userId |
| | | } |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback() |
| | | } else { |
| | | callback('å·¥å·å·²åå¨!') |
| | | } |
| | | }) |
| | | }, |
| | | handleConfirmBlur(e) { |
| | | const value = e.target.value |
| | | this.confirmDirty = this.confirmDirty || !!value |
| | | }, |
| | | beforeUpload: function(file) { |
| | | var fileType = file.type |
| | | if (fileType.indexOf('image') < 0) { |
| | | this.$message.warning('请ä¸ä¼ å¾ç') |
| | | return false |
| | | } |
| | | //TODO éªè¯æä»¶å¤§å° |
| | | }, |
| | | identityChange(e) { |
| | | if (e.target.value === 1) { |
| | | this.departIdShow = false |
| | | } else { |
| | | this.departIdShow = true |
| | | } |
| | | }, |
| | | initDictData(dictCode) { |
| | | //æ ¹æ®åå
¸Code, åå§ååå
¸æ°ç» |
| | | ajaxGetDictItems(dictCode, null).then((res) => { |
| | | if (res.success) { |
| | | const regExp = new RegExp('^(?=.*[a-zA-Z])(?=.*\\\d)(?=.*[~!@#$%^&*()_+`\\-={}:";\'<>?,./]).{' + Number(res.result[0].value) + ',}$') |
| | | |
| | | this.validatorRules.password[0] = { |
| | | required: true, |
| | | pattern: regExp, |
| | | message: `å¯ç ç±${res.result[0].value}使°åã大å°å忝åç¹æ®ç¬¦å·ç»æ!` |
| | | } |
| | | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | deviceSearch() { |
| | | this.$refs.selectDeviceModal.visible = true |
| | | this.$refs.selectDeviceModal.selectedRowKeys = [] |
| | | this.$refs.selectDeviceModal.selectedRows = [] |
| | | this.$refs.selectDeviceModal.checkedKeys = this.model.equipmentIds ? this.model.equipmentIds.split(',') : [] |
| | | }, |
| | | |
| | | /** |
| | | * 鿩已æè®¾å¤åç¹å»ç¡®å®æ¶è§¦å |
| | | * @param data 已鿩çè®¾å¤æ°ç» |
| | | */ |
| | | selectOK(data) { |
| | | console.log('data=', data) |
| | | this.$set(this.model, 'equipmentIds', data.join(',')) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .avatar-uploader > .ant-upload { |
| | | width: 104px; |
| | | height: 104px; |
| | | } |
| | | .ant-upload-select-picture-card i { |
| | | font-size: 49px; |
| | | color: #999; |
| | | } |
| | | .avatar-uploader > .ant-upload { |
| | | width: 104px; |
| | | height: 104px; |
| | | } |
| | | |
| | | .ant-upload-select-picture-card .ant-upload-text { |
| | | margin-top: 8px; |
| | | color: #666; |
| | | } |
| | | .ant-upload-select-picture-card i { |
| | | font-size: 49px; |
| | | color: #999; |
| | | } |
| | | |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | } |
| | | .ant-upload-select-picture-card .ant-upload-text { |
| | | margin-top: 8px; |
| | | color: #666; |
| | | } |
| | | |
| | | .drawer-bottom-button { |
| | | position: absolute; |
| | | bottom: -8px; |
| | | width: 100%; |
| | | border-top: 1px solid #e8e8e8; |
| | | padding: 10px 16px; |
| | | text-align: right; |
| | | left: 0; |
| | | background: #fff; |
| | | border-radius: 0 0 2px 2px; |
| | | } |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | } |
| | | |
| | | .drawer-bottom-button { |
| | | position: absolute; |
| | | bottom: -8px; |
| | | width: 100%; |
| | | border-top: 1px solid #e8e8e8; |
| | | padding: 10px 16px; |
| | | text-align: right; |
| | | left: 0; |
| | | background: #fff; |
| | | border-radius: 0 0 2px 2px; |
| | | } |
| | | </style> |