From e055d2d93b516985fbc2df0f6f5a135f3230cccf Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期四, 14 三月 2024 11:13:47 +0800 Subject: [PATCH] Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop --- src/components/tools/UserMenu.vue | 2 src/views/mdc/base/modules/HolidayManagement/HolidayManagementModal.vue | 14 src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModal.vue | 14 src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue | 75 src/views/mdc/base/modules/MdcMessageApproval/MdcMessageApprovalModal.vue | 144 ++ src/views/system/modules/UserModal.vue | 958 +++++++------ src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue | 2 src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue | 14 src/views/mdc/base/modules/deviceLog/LogInfo.vue | 25 src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue | 27 src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue | 2 src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue | 74 src/views/mdc/base/DeviceBaseInfo.vue | 119 + src/views/mdc/base/EquipmentOperationParamsAlarm.vue | 120 + src/views/mdc/base/modules/deviceLog/LogList.vue | 101 src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue | 2 src/views/system/modules/SelectDeviceDrawer.vue | 225 +++ src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue | 12 src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue | 3 src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue | 14 src/views/system/modules/SelectDeviceModal.vue | 286 --- src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModal.vue | 14 src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue | 14 src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue | 14 src/views/mdc/base/MdcUtilizationRateList.vue | 3 src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue | 6 src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue | 104 - src/views/system/WorkshopSignageManagement.vue | 16 src/views/mdc/base/MdcMessageApproval.vue | 178 ++ src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue | 107 + src/views/mdc/base/modules/alarmManager/alarmManagerModal.vue | 2 src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue | 102 + src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue | 14 src/components/table2excel/table2excel.js | 14 src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue | 12 src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue | 4 src/views/mdc/base/EquipmentList.vue | 362 +--- src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue | 74 src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue | 34 src/views/mdc/base/AlarmManager.vue | 4 src/utils/request.js | 8 src/views/mdc/base/modules/EquipmentList/UserModal.vue | 30 src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue | 48 src/views/WorkshopSignage.vue | 267 +++ src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue | 213 +- src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue | 12 src/views/mdc/base/modules/deviceLog/WorkChartModel.vue | 51 src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue | 92 - src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue | 14 49 files changed, 2,288 insertions(+), 1,758 deletions(-) diff --git a/src/components/table2excel/table2excel.js b/src/components/table2excel/table2excel.js index 4891d2b..9fdec8d 100644 --- a/src/components/table2excel/table2excel.js +++ b/src/components/table2excel/table2excel.js @@ -93,15 +93,21 @@ 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>"; } diff --git a/src/components/tools/UserMenu.vue b/src/components/tools/UserMenu.vue index 3da3327..54fe97a 100644 --- a/src/components/tools/UserMenu.vue +++ b/src/components/tools/UserMenu.vue @@ -185,7 +185,7 @@ 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({ diff --git a/src/utils/request.js b/src/utils/request.js index 4f0c381..26a7423 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -79,7 +79,8 @@ if (token) { store.dispatch('Logout').then(() => { setTimeout(() => { - window.location.reload() + router.push({ path: '/user/login' }); + // window.location.reload() }, 1500) }) } @@ -169,7 +170,10 @@ onOk: () => { store.dispatch('Logout').then(() => { Vue.ls.remove(ACCESS_TOKEN) - window.location.reload() + setTimeout(() => { + router.push({ path: '/user/login' }); + // window.location.reload() + }, 1500) }) } }) diff --git a/src/views/WorkshopSignage.vue b/src/views/WorkshopSignage.vue index c9209c4..c803017 100644 --- a/src/views/WorkshopSignage.vue +++ b/src/views/WorkshopSignage.vue @@ -1,32 +1,49 @@ <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" @@ -38,11 +55,13 @@ 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)"> @@ -73,15 +92,15 @@ ></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> @@ -110,6 +129,10 @@ isSwitchChecked: false, // 鏄惁寮�鍚姛鑳� timingAcquisition: null, // 瀹氭椂鍒锋柊鏄惁寮�鍚� parentH: 5000,//鐖剁骇楂樺害 + parentW: 1920,//鐖剁骇瀹藉害 + showGuideline: 'none', + guidelineXTop: 0, + guidelineYLeft: 0, deviceList: [ // { // equipmentId: '123213213123232',// 璁惧ID @@ -118,35 +141,47 @@ // 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,// 杩涘叆鐪嬫澘椤甸潰鏃舵槸鍚︿负鍏ㄥ睆妯″紡锛屼笉鍖呮嫭姝e父妯″紡杩涘叆鍚庡垏鎹负鍏ㄥ睆妯″紡 - parentLimitation: false// 鎷栨嫿鍖哄煙鏄惁闄愬埗鍦ㄧ埗鍏冪礌鍖哄煙鍐� + parentLimitation: false,// 鎷栨嫿鍖哄煙鏄惁闄愬埗鍦ㄧ埗鍏冪礌鍖哄煙鍐�, + checkedStatusCount: null,// 宸插嬀閫夌瓫閫夌姸鎬佷釜鏁� + imgSrc: ''// 杞﹂棿鍥剧焊鍦板潃 } }, watch: { @@ -176,6 +211,7 @@ api.getDeviceListInWorkshopSignagePageApi(id).then((res) => { if (res.result && res.result.length > 0) { this.deviceList = res.result + this.deviceList_copy = res.result } }) }, @@ -187,12 +223,13 @@ 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 // 鍦ㄧ埗鍏冪礌楂樺害璁剧疆鍚庡啀璁剧疆闄愬埗鎷栨嫿鍖哄煙锛屼笉杩欐牱鏈夋鐜囧鑷寸埗鍏冪礌楂樺害鏈缃氨闄愬埗鎷栨嫿 }) }, @@ -252,10 +289,13 @@ // } 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 }, /** @@ -264,7 +304,8 @@ * @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 }, /** @@ -297,8 +338,87 @@ * 娴忚鍣ㄥ昂瀵稿彂鐢熸敼鍙樻椂瑙﹀彂 */ 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() { @@ -306,6 +426,7 @@ this.getDeviceListByApi(this.$route.params.id) this.getWorkshopDetailsByApi(this.$route.params.id) } + this.checkedStatusCount = this.deviceStatusList.length - 1 }, mounted() { // 绂佹鐢ㄦ埛閫変腑鍐呭 @@ -317,7 +438,7 @@ document.body.clientHeight // 鍒ゆ柇娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴︽槸鍚︾瓑浜庡垎杈ㄧ巼锛岃嫢鐩哥瓑鍒欒〃绀鸿繘鍏ユ椂娴忚鍣ㄤ负鍏ㄥ睆妯″紡 - if (this.windowHeight === screen.height) this.isFullScreen = true + // if (this.windowHeight === screen.height) this.isFullScreen = true window.addEventListener('resize', this.handleWindowSizeChange) }, @@ -336,38 +457,41 @@ 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; } } } @@ -377,6 +501,22 @@ 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; @@ -418,4 +558,9 @@ } } } + + /deep/ .ant-checkbox-inner { + background-color: transparent; + border-color: #fff; + } </style> \ No newline at end of file diff --git a/src/views/mdc/base/AlarmManager.vue b/src/views/mdc/base/AlarmManager.vue index acd894f..7a3d59d 100644 --- a/src/views/mdc/base/AlarmManager.vue +++ b/src/views/mdc/base/AlarmManager.vue @@ -284,7 +284,7 @@ // }, { dataIndex:'isUse_dictText', - title: '鏄惁杩囨护', + title: '鏄惁鍚敤', align: "center", width:380 // dictCode:'alarm_is_use' @@ -338,7 +338,7 @@ 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 }, diff --git a/src/views/mdc/base/DeviceBaseInfo.vue b/src/views/mdc/base/DeviceBaseInfo.vue index b697ecf..cded000 100644 --- a/src/views/mdc/base/DeviceBaseInfo.vue +++ b/src/views/mdc/base/DeviceBaseInfo.vue @@ -5,31 +5,45 @@ <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="甯冨眬鍥�"> @@ -86,7 +100,34 @@ }, 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() { @@ -197,7 +238,17 @@ 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() @@ -211,7 +262,7 @@ } } </script> -<style scoped> +<style scoped lang="less"> @import '~@assets/less/common.less'; .equipMessage { @@ -251,4 +302,20 @@ .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> \ No newline at end of file diff --git a/src/views/mdc/base/EquipmentList.vue b/src/views/mdc/base/EquipmentList.vue index cee4b26..2a5815b 100644 --- a/src/views/mdc/base/EquipmentList.vue +++ b/src/views/mdc/base/EquipmentList.vue @@ -8,14 +8,12 @@ <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> @@ -23,7 +21,8 @@ <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> @@ -37,7 +36,7 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <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"> @@ -56,7 +55,8 @@ <!-- 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> @@ -72,17 +72,10 @@ :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"> @@ -93,28 +86,11 @@ <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="纭畾瑙e喕鍚�?" @confirm="() => handleFrozen(record.id,1,record.username)">--> - <!--<a>瑙e喕</a>--> - <!--</a-popconfirm>--> - <!--</a-menu-item>--> - </a-menu> </a-dropdown> </span> @@ -125,43 +101,21 @@ <!-- 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 { @@ -172,103 +126,88 @@ { 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() @@ -280,61 +219,60 @@ 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' }, @@ -347,98 +285,97 @@ { 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' } ] @@ -447,125 +384,44 @@ } 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 ? "瑙e喕" : "鍐荤粨") + "閫変腑璐﹀彿?", - 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 瀵嗙爜淇敼瀹屾垚 涓嶉渶瑕佸埛鏂伴〉闈紝鍙互鎶奷atasource涓殑鏁版嵁鏇存柊涓�涓� - }, - onSyncFinally({isToLocal}) { - // 鍚屾鍒版湰鍦版椂鍒锋柊涓嬫暟鎹� - if (isToLocal) { - this.loadData() - } - }, - - getWorkshopListByApi(){ - queryProductionTreeList().then(res=>{ - if(res.success) this.workshopTreeData=res.result - }) - } } - } </script> <style scoped> diff --git a/src/views/mdc/base/EquipmentOperationParamsAlarm.vue b/src/views/mdc/base/EquipmentOperationParamsAlarm.vue index 2c37b68..400450a 100644 --- a/src/views/mdc/base/EquipmentOperationParamsAlarm.vue +++ b/src/views/mdc/base/EquipmentOperationParamsAlarm.vue @@ -4,13 +4,36 @@ <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> @@ -27,21 +50,31 @@ :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: '#', @@ -56,49 +89,102 @@ { 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> diff --git a/src/views/mdc/base/MdcMessageApproval.vue b/src/views/mdc/base/MdcMessageApproval.vue new file mode 100644 index 0000000..f619525 --- /dev/null +++ b/src/views/mdc/base/MdcMessageApproval.vue @@ -0,0 +1,178 @@ +<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> diff --git a/src/views/mdc/base/MdcUtilizationRateList.vue b/src/views/mdc/base/MdcUtilizationRateList.vue index 3ed3fa0..e1c0abe 100644 --- a/src/views/mdc/base/MdcUtilizationRateList.vue +++ b/src/views/mdc/base/MdcUtilizationRateList.vue @@ -9,7 +9,8 @@ <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> diff --git a/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue b/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue index f301ebf..f6ae0f2 100644 --- a/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue +++ b/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue @@ -12,6 +12,7 @@ :data-source="driveTypeList" placeholder="璇烽�夋嫨椹卞姩绫诲瀷" :filter-option="filterOption" + allowClear /> </a-form-item> </a-col> @@ -209,9 +210,13 @@ 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() { @@ -227,24 +232,15 @@ }, 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() { diff --git a/src/views/mdc/base/modules/EquipmentList/UserModal.vue b/src/views/mdc/base/modules/EquipmentList/UserModal.vue index 921c8e5..7bc3c27 100644 --- a/src/views/mdc/base/modules/EquipmentList/UserModal.vue +++ b/src/views/mdc/base/modules/EquipmentList/UserModal.vue @@ -78,7 +78,7 @@ </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> @@ -118,11 +118,32 @@ <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="璇疯緭鍏ョ郴缁熺増鏈彿" @@ -224,11 +245,14 @@ equipmentModel: "", equipmentIp: "", dataPort: "", - driveType: "" + driveType: "", + systemType: "", + deviceLevel: "", + deviceCategory: "" }, labelCol: { xs: { span: 24 }, - sm: { span: 6 }, + sm: { span: 8 }, }, wrapperCol: { xs: { span: 24 }, diff --git a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue index 184f6bd..6a2918f 100644 --- a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue +++ b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue @@ -3,7 +3,7 @@ <!-- 鏌ヨ鍖哄煙 --> <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"/> @@ -235,7 +235,7 @@ }, 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]) @@ -350,8 +350,6 @@ 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; @@ -437,8 +435,10 @@ 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){ diff --git a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModal.vue b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModal.vue index 3c952d6..68cce5c 100644 --- a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModal.vue +++ b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModal.vue @@ -36,7 +36,7 @@ </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> @@ -53,11 +53,11 @@ 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 { @@ -185,10 +185,10 @@ // }) }, 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(',') : [] }, //绾ц仈妗唎nChange浜嬩欢 // onChange(value) { diff --git a/src/views/mdc/base/modules/MdcMessageApproval/MdcMessageApprovalModal.vue b/src/views/mdc/base/modules/MdcMessageApproval/MdcMessageApprovalModal.vue new file mode 100644 index 0000000..30d9cbf --- /dev/null +++ b/src/views/mdc/base/modules/MdcMessageApproval/MdcMessageApprovalModal.vue @@ -0,0 +1,144 @@ +<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> \ No newline at end of file diff --git a/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue b/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue index e9fec71..0b18f26 100644 --- a/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue +++ b/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue @@ -1,60 +1,63 @@ <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> @@ -125,7 +128,7 @@ align: 'center', width: 100, dataIndex: 'shift', - ellipsis: true, + ellipsis: true }, { title: '姣忕彮灏忔椂', @@ -269,7 +272,8 @@ ], dataSource: [], driveTypeList: [], - scrollY:465, + scrollY: 465, + tableLoading: false } }, props: { nodeTree: '', Type: '', nodePeople: '' }, @@ -280,12 +284,12 @@ 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) { @@ -329,11 +333,19 @@ }, 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) { @@ -373,29 +385,20 @@ }, 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 = [] @@ -412,11 +415,17 @@ }, 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 + }) }, /** @@ -453,9 +462,9 @@ /** * 褰撴祻瑙堝櫒鍙绐楀彛灏哄鍙戠敓鏀瑰彉鏃惰Е鍙� */ - 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 } } @@ -468,35 +477,39 @@ 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; } } diff --git a/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue index f04727f..2486fc5 100644 --- a/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue +++ b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue @@ -3,7 +3,7 @@ <!-- 鏌ヨ鍖哄煙 --> <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"/> diff --git a/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModal.vue b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModal.vue index 5e65299..a0810d5 100644 --- a/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModal.vue +++ b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModal.vue @@ -47,7 +47,7 @@ </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> @@ -64,11 +64,11 @@ 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 { @@ -213,10 +213,10 @@ // // }) // }, 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(',') : [] }, //绾ц仈妗唎nChange浜嬩欢 // onChange(value) { diff --git a/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue b/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue index fb2e168..6185aa3 100644 --- a/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue +++ b/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue @@ -11,7 +11,7 @@ </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"> @@ -20,12 +20,6 @@ <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> @@ -94,14 +88,9 @@ 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{ @@ -121,7 +110,7 @@ dates: [], queryParam: {}, queryParams:{ - collectTime:undefined, + collectTime:null, }, shiftSubList: [], shiftList: [], @@ -133,11 +122,11 @@ } }, 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); }, @@ -414,31 +403,24 @@ 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 = ""; @@ -454,7 +436,7 @@ 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 { @@ -483,7 +465,11 @@ }, 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() diff --git a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue index ecbcaae..b65eec2 100644 --- a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue +++ b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue @@ -11,7 +11,7 @@ </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"> @@ -20,12 +20,6 @@ <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> @@ -97,14 +91,9 @@ 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{ @@ -136,16 +125,11 @@ } }, 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); }, @@ -595,45 +579,38 @@ 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({ @@ -660,7 +637,11 @@ }, 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() diff --git a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue index ea4852a..ee2f506 100644 --- a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue +++ b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue @@ -40,7 +40,7 @@ </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> @@ -57,11 +57,11 @@ 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 { @@ -198,10 +198,10 @@ // }) }, 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(',') : [] }, //绾ц仈妗唎nChange浜嬩欢 // onChange(value) { diff --git a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue index 172ff2b..9e81036 100644 --- a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue +++ b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue @@ -3,18 +3,18 @@ <!-- 鏌ヨ鍖哄煙 --> <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> diff --git a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModal.vue b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModal.vue index 9b68f1e..997ced4 100644 --- a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModal.vue +++ b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModal.vue @@ -43,7 +43,7 @@ </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> @@ -59,11 +59,11 @@ 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 { @@ -200,10 +200,10 @@ // }) }, 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(',') : [] }, //绾ц仈妗唎nChange浜嬩欢 // onChange(value) { diff --git a/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue b/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue index da98855..8ee1144 100644 --- a/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue +++ b/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue @@ -8,7 +8,7 @@ <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"> @@ -311,93 +311,15 @@ 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 = [] diff --git a/src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue b/src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue index 54261aa..4955e2e 100644 --- a/src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue +++ b/src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue @@ -29,7 +29,7 @@ </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">--> diff --git a/src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue b/src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue index cc5e3b8..23245fd 100644 --- a/src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue +++ b/src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue @@ -30,11 +30,12 @@ :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> diff --git a/src/views/mdc/base/modules/alarmManager/alarmManagerModal.vue b/src/views/mdc/base/modules/alarmManager/alarmManagerModal.vue index 9156b7c..951523b 100644 --- a/src/views/mdc/base/modules/alarmManager/alarmManagerModal.vue +++ b/src/views/mdc/base/modules/alarmManager/alarmManagerModal.vue @@ -22,7 +22,7 @@ </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> diff --git a/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue b/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue index a3a6eed..11bd91d 100644 --- a/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue +++ b/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue @@ -61,7 +61,7 @@ <!-- table鍖哄煙-end --> </div> - <selectDeviceModal ref="selectDeviceModal" @selectFinished="selectOK" :title="'閫夋嫨璁惧'"></selectDeviceModal> + <SelectDeviceDrawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'閫夋嫨璁惧'"></SelectDeviceDrawer> </div> </template> @@ -84,7 +84,7 @@ 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', @@ -98,7 +98,7 @@ JInput, JDate, JEllipsis, - selectDeviceModal + SelectDeviceDrawer }, props: { nodeTree: '', Type: '', nodePeople: '' }, data() { @@ -438,10 +438,10 @@ // }, 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(',') }, /** diff --git a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue index 01f0c63..6d15f94 100644 --- a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue +++ b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue @@ -44,7 +44,7 @@ </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> @@ -63,11 +63,11 @@ } 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 { @@ -241,10 +241,10 @@ 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); diff --git a/src/views/mdc/base/modules/deviceLog/LogInfo.vue b/src/views/mdc/base/modules/deviceLog/LogInfo.vue index 58000dd..9ccf664 100644 --- a/src/views/mdc/base/modules/deviceLog/LogInfo.vue +++ b/src/views/mdc/base/modules/deviceLog/LogInfo.vue @@ -174,7 +174,7 @@ import { getAction } from '@/api/manage' // import {mapActions} from 'vuex' export default { - components: { + components: { LogList, WorkLogList, AlarmLogList, @@ -332,28 +332,21 @@ }, 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() diff --git a/src/views/mdc/base/modules/deviceLog/LogList.vue b/src/views/mdc/base/modules/deviceLog/LogList.vue index 440c9af..4888611 100644 --- a/src/views/mdc/base/modules/deviceLog/LogList.vue +++ b/src/views/mdc/base/modules/deviceLog/LogList.vue @@ -3,7 +3,8 @@ <!-- 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> @@ -29,6 +30,7 @@ JeecgListMixin } from '@/mixins/JeecgListMixin' import moment from 'moment' + export default { name: 'LogList', mixins: [JeecgListMixin], @@ -44,26 +46,24 @@ 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, @@ -79,14 +79,14 @@ { 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} }, @@ -94,25 +94,25 @@ 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 + '绉�' } } @@ -124,11 +124,11 @@ // } // 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 + '绉�' } @@ -149,10 +149,10 @@ //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂 //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(); }, /** @@ -160,15 +160,17 @@ * @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) } } } @@ -182,33 +184,38 @@ <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; } } diff --git a/src/views/mdc/base/modules/deviceLog/WorkChartModel.vue b/src/views/mdc/base/modules/deviceLog/WorkChartModel.vue index aefcf42..864753c 100644 --- a/src/views/mdc/base/modules/deviceLog/WorkChartModel.vue +++ b/src/views/mdc/base/modules/deviceLog/WorkChartModel.vue @@ -160,20 +160,19 @@ 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) } }) }, @@ -230,7 +229,7 @@ this.queryParams = { equipmentId: node.equipmentId, equipmentName: node.equipmentName, - period: 1000, + period: 100, paramDate: paramDate, paramDateStr: paramDate.format('yyyy-MM-DD'), start: start, @@ -312,10 +311,10 @@ position: 'left', boundaryGap: [0, '15%'], axisLine: { - show: true - // lineStyle:{ - // color:'#000000' - // } + show: true, + lineStyle:{ + color:'#5470C6' + } } }, { @@ -325,10 +324,10 @@ position: 'left', boundaryGap: [0, '15%'], axisLine: { - show: true - // lineStyle:{ - // color:'#000000' - // } + show: true, + lineStyle:{ + color:'#91CC75' + } } }, { @@ -338,10 +337,10 @@ position: 'left', boundaryGap: [0, '15%'], axisLine: { - show: true - // lineStyle:{ - // color:'#000000' - // } + show: true, + lineStyle:{ + color:'#FAC858' + } } } ], @@ -377,6 +376,7 @@ 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('鏃犳暟鎹紒') @@ -423,12 +423,13 @@ 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 diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue index d187ef1..25fbb93 100644 --- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue +++ b/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue @@ -9,12 +9,12 @@ <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> diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue index 99823a2..64f0cbd 100644 --- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue +++ b/src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue @@ -74,7 +74,7 @@ <!--</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> @@ -91,11 +91,11 @@ 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 @@ -273,10 +273,10 @@ // }) }, 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(',') : [] }, //绾ц仈妗唎nChange浜嬩欢 // onChange(value) { diff --git a/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue b/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue index be9c4d5..02e63d1 100644 --- a/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue +++ b/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue @@ -5,7 +5,7 @@ <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'> @@ -14,17 +14,23 @@ </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> @@ -39,8 +45,15 @@ </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> @@ -150,6 +163,8 @@ import $ from 'jquery' import '@/components/table2excel/table2excel' import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' +import api from '@/api/mdc' + export default { name: 'EfficiencyPOList', components: {}, @@ -164,6 +179,7 @@ queryParamEquip:{}, queryParamPeople:{}, identifying: [], + driveTypeList:[], efficiencyOptions: [ { label: '寮�鍔ㄧ巼', value: 'lyl' }, { label: '寮�鏈虹巼', value: 'kjl' }, @@ -192,6 +208,7 @@ this.queryParam.typeTree = "1" this.loadData() this.queryGroup() + this.getDriveTypeByApi() }, watch: { Type(valmath){ @@ -423,10 +440,12 @@ 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 = {} @@ -443,6 +462,12 @@ // 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) @@ -470,7 +495,28 @@ }).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> diff --git a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue index 9e2abec..cc8458f 100644 --- a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue +++ b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue @@ -6,7 +6,7 @@ <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"> @@ -16,19 +16,31 @@ </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> @@ -43,8 +55,17 @@ </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> @@ -52,18 +73,18 @@ </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> @@ -123,7 +144,9 @@ </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> @@ -169,6 +192,7 @@ import $ from 'jquery' import '@/components/table2excel/table2excel' import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' + import api from '@/api/mdc' export default { name: 'EfficiencyList', @@ -183,6 +207,7 @@ deviceTypeDict: '', dates: [], selectList: [], + driveTypeList:[], identifying: [], queryParam: {}, queryParams: {}, @@ -223,6 +248,7 @@ this.queryParam.typeTree = '1' this.loadData() this.queryGroup() + this.getDriveTypeByApi() }, watch: { Type(valmath) { @@ -480,10 +506,12 @@ 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 = {} @@ -499,6 +527,12 @@ 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) @@ -528,6 +562,27 @@ }).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 + ); }, } } @@ -636,7 +691,7 @@ left: 412px; } - #Efficiency{ + #Efficiency { overflow: hidden; } diff --git a/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue b/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue index c7adad0..457d549 100644 --- a/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue +++ b/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue @@ -6,7 +6,7 @@ <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'> @@ -15,9 +15,19 @@ </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"> @@ -39,18 +49,25 @@ </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> @@ -184,6 +201,8 @@ import $ from 'jquery' import '@/components/table2excel/table2excel' import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' + import api from '@/api/mdc' + export default { name: 'EfficiencyShiftList', components: {}, @@ -196,6 +215,7 @@ allowClearSu:true, dates: [], selectList:[], + driveTypeList:[], identifying: [], queryParam: {}, queryParamEquip:{}, @@ -237,6 +257,7 @@ this.queryParam.typeTree = "1" this.loadData(); this.queryGroup() + this.getDriveTypeByApi() }, watch: { Type(valmath){ @@ -455,7 +476,7 @@ 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') @@ -470,22 +491,14 @@ 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() { @@ -493,7 +506,9 @@ 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 @@ -508,6 +523,12 @@ 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) @@ -535,7 +556,28 @@ }).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> diff --git a/src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue b/src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue index 161ebd0..033191f 100644 --- a/src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue +++ b/src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue @@ -139,7 +139,7 @@ ], englishName: [ { required: true, message: '璇疯緭鍏ヨ嫳鏂囧悕绉�!' }, - { pattern: /^.{2,18}$/, message: '璇疯緭鍏�2鍒�18浣嶄换鎰忓瓧绗�!' ,trigger:'blur'}, + // { pattern: /^.{2,24}$/, message: '璇疯緭鍏�2鍒�24浣嶄换鎰忓瓧绗�!' ,trigger:'blur'}, ], showFlag: [ { required: true, message: '璇疯緭鍏ユ樉绀烘爣蹇�!' }, diff --git a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue index 8505d58..f466042 100644 --- a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue +++ b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue @@ -3,18 +3,18 @@ <!-- 鏌ヨ鍖哄煙 --> <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> @@ -464,8 +464,10 @@ 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){ diff --git a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue index dffd018..ec5eb17 100644 --- a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue +++ b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue @@ -39,7 +39,7 @@ </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> @@ -55,11 +55,11 @@ 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 { @@ -196,10 +196,10 @@ // }) }, 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(',') : [] }, //绾ц仈妗唎nChange浜嬩欢 // onChange(value) { diff --git a/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue b/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue index 3cae1f0..5892c14 100644 --- a/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue +++ b/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue @@ -3,18 +3,18 @@ <!-- 鏌ヨ鍖哄煙 --> <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> @@ -473,8 +473,10 @@ 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){ diff --git a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue index 8a6bdcf..41f7c37 100644 --- a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue +++ b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue @@ -3,18 +3,13 @@ <!-- 鏌ヨ鍖哄煙 --> <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> @@ -25,15 +20,6 @@ <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> @@ -63,7 +49,7 @@ <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> @@ -91,7 +77,6 @@ </template> <script> - import moment from 'moment' import $ from 'jquery' import JDictSelectTag from '@/components/dict/JDictSelectTag' import JDate from '../../../../../components/jeecg/JDate' @@ -103,8 +88,6 @@ } 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 @@ -120,8 +103,6 @@ Tooltip, MdcStandardProcessDurationModal, MdcStandardProcessDurationEdit, - // DeviceRepairModelAdd, - // DeviceRepairModelEdit, JDictSelectTag, JInput, JDate, @@ -133,7 +114,6 @@ typeTree:"", typeParent:1, typeEquipment:1, - dates: [], xianshi:"", readOnly:true, queryParam: {}, @@ -154,18 +134,12 @@ 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: '鎵规鍙�', @@ -214,7 +188,6 @@ Type(valmath){ this.dataList = []; this.queryParams.typeTree = valmath - // console.log(this.queryParams.typeTree) }, nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 if (JSON.stringify(val) != '{}') { @@ -257,19 +230,6 @@ 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"){ diff --git a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue index 0cc0796..097c031 100644 --- a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue +++ b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue @@ -44,7 +44,7 @@ </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> @@ -61,11 +61,11 @@ 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 { @@ -210,10 +210,10 @@ // }) }, 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(',') : [] }, //绾ц仈妗唎nChange浜嬩欢 // onChange(value) { diff --git a/src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue b/src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue index 630964f..0f05931 100644 --- a/src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue +++ b/src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue @@ -5,18 +5,18 @@ <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> @@ -225,96 +225,20 @@ 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 = [] diff --git a/src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue b/src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue index 6f33288..8b4bcfd 100644 --- a/src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue +++ b/src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue @@ -8,7 +8,7 @@ <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"> @@ -237,26 +237,19 @@ 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 diff --git a/src/views/system/WorkshopSignageManagement.vue b/src/views/system/WorkshopSignageManagement.vue index 380e6d3..1c02197 100644 --- a/src/views/system/WorkshopSignageManagement.vue +++ b/src/views/system/WorkshopSignageManagement.vue @@ -150,14 +150,14 @@ <!-- 琛ㄥ崟鍖哄煙 --> <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' @@ -166,7 +166,7 @@ name: 'WorkshopSignageManagement', mixins: [JeecgListMixin], components: { - SelectDeviceModal, + SelectDeviceDrawer, WorkshopModal, moment, }, @@ -475,11 +475,11 @@ 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() } }, diff --git a/src/views/system/modules/SelectDeviceDrawer.vue b/src/views/system/modules/SelectDeviceDrawer.vue new file mode 100644 index 0000000..5d49708 --- /dev/null +++ b/src/views/system/modules/SelectDeviceDrawer.vue @@ -0,0 +1,225 @@ +<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> \ No newline at end of file diff --git a/src/views/system/modules/SelectDeviceModal.vue b/src/views/system/modules/SelectDeviceModal.vue index f91e1d4..599de84 100644 --- a/src/views/system/modules/SelectDeviceModal.vue +++ b/src/views/system/modules/SelectDeviceModal.vue @@ -1,65 +1,26 @@ <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']" @@ -84,14 +45,12 @@ >纭畾 </a-button> </div> + </template> - </a-drawer> - </div> + </a-modal> </template> <script> - // import { filterObj } from '@/utils/util' - // import { getAction } from '@/api/manage' import { getAction, postAction, @@ -99,7 +58,6 @@ } 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', @@ -115,122 +73,63 @@ }, 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) { @@ -265,13 +164,11 @@ 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 @@ -280,81 +177,6 @@ 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() - // }, - } } diff --git a/src/views/system/modules/UserModal.vue b/src/views/system/modules/UserModal.vue index 5543680..5d5f949 100644 --- a/src/views/system/modules/UserModal.vue +++ b/src/views/system/modules/UserModal.vue @@ -130,7 +130,8 @@ @back="backDepartInfo" :backDepart="true" :treeOpera="true" - >></j-select-depart> + >> + </j-select-depart> </a-form-model-item> <!--杞﹂棿鍒嗛厤--> @@ -148,6 +149,17 @@ :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" @@ -289,476 +301,512 @@ @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); - //韬唤涓轰笂绾ф樉绀鸿礋璐i儴闂紝鍚﹀垯涓嶆樉绀� - 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; - //閮ㄩ棬鐨剈rl - 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) - } - }) - //杞﹂棿鐨剈rl - }, - 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) + //韬唤涓轰笂绾ф樉绀鸿礋璐i儴闂紝鍚﹀垯涓嶆樉绀� + 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 + //閮ㄩ棬鐨剈rl 鑾峰彇閮ㄩ棬鍒嗛厤 + 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 + } + }) + //杞﹂棿鐨剈rl + }, + 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> \ No newline at end of file -- Gitblit v1.9.3