Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop
| | |
| | | <div class="header"> |
| | | <a href="/"> |
| | | <img src="~@/assets/lxzn.png" class="logo" alt="logo"> |
| | | <span class="title">ç»è®¡åæ</span> |
| | | <span class="title">MDCæºæ
§è½¦é´</span> |
| | | </a> |
| | | </div> |
| | | <!--<div class="desc">--> |
| | |
| | | <div v-else :class="['top-nav-header-index', theme]"> |
| | | <div class="header-index-wide"> |
| | | <div class="header-index-left" :style="topMenuStyle.headerIndexLeft"> |
| | | <logo class="top-nav-header" :show-title="device !== 'mobile'" :style="topMenuStyle.topNavHeader"/> |
| | | <logo class="top-nav-header" :show-title="showTitle" :style="topMenuStyle.topNavHeader"/> |
| | | <div class="top-nav-text"> |
| | | <div style="width:100%;height: 50%;line-height:35px">å¯çº§ï¼å
é¨</div> |
| | | <div style="width:100%;height: 50%;line-height:25px">è¦åï¼æ¬ç³»ç»ç¦æ¢åå¨ãå¤çãä¼ è¾æ¶å¯ä¿¡æ¯</div> |
| | | </div> |
| | | <div v-if="device !== 'mobile'" :style="topMenuStyle.topSmenuStyle"> |
| | | <s-menu |
| | | mode="horizontal" |
| | |
| | | components: { |
| | | UserMenu, |
| | | SMenu, |
| | | Logo, |
| | | Logo |
| | | }, |
| | | mixins: [mixin], |
| | | props: { |
| | |
| | | topSmenuStyle: {} |
| | | }, |
| | | chatStatus: '', |
| | | showTitle: true |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | if (this.mode === 'topmenu') { |
| | | this.buildTopMenuStyle() |
| | | } |
| | | window.addEventListener('resize', this.handleResize) |
| | | this.topMenuStyle.topNavHeader = { 'min-width': '165px', width: '165px' } |
| | | //update-end--author:sunjianlei---date:20190508------for: é¡¶é¨å¯¼èªæ è¿é¿æ¶æ¾ç¤ºæ´å¤æé®----- |
| | | }, |
| | | methods: { |
| | |
| | | this.topMenuStyle.headerIndexLeft = {} |
| | | } else { |
| | | let rightWidth = '360px' |
| | | this.topMenuStyle.topNavHeader = { 'min-width': '165px' } |
| | | this.topMenuStyle.topSmenuStyle = { 'width': 'calc(100% - 165px)' } |
| | | this.topMenuStyle.topNavHeader = { 'min-width': '50px', width: '50px' } |
| | | this.topMenuStyle.topSmenuStyle = { 'width': 'calc(100% - 350px)' } |
| | | this.topMenuStyle.headerIndexRight = { 'min-width': rightWidth } |
| | | this.topMenuStyle.headerIndexLeft = { 'width': `calc(100% - ${rightWidth})` } |
| | | } |
| | |
| | | }, |
| | | // update-end-author:sunjianlei date:20210508 for: ä¿®å¤å¨æåè½æµè¯èåã另忰èåæ é¢é误ãå±å¼é误çé®é¢ |
| | | |
| | | handleResize() { |
| | | console.log('触å尺寸æ¹å', window.innerWidth) |
| | | if (window.innerWidth > 1680) { |
| | | this.showTitle = true |
| | | this.topMenuStyle.topNavHeader = { 'min-width': '165px' } |
| | | this.topMenuStyle.topSmenuStyle = { 'width': 'calc(100% - 165px)' } |
| | | } else if (window.innerWidth <= 1680 && window.innerWidth > 1280) { |
| | | this.showTitle = false |
| | | this.topMenuStyle.topNavHeader = { 'min-width': '50px', width: '50px' } |
| | | this.topMenuStyle.topSmenuStyle = { 'width': 'calc(100% - 250px)' } |
| | | } else if (window.innerWidth <= 1280 && window.innerWidth > 960) { |
| | | this.topMenuStyle.topSmenuStyle = { 'width': 'calc(100% - 350px)' } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | |
| | | /* update_end author:scott date:20190220 for: 缩å°é¦é¡µå¸å±é¡¶é¨çé«åº¦*/ |
| | | |
| | | .top-nav-text { |
| | | color: #f00; |
| | | height: 100% |
| | | } |
| | | |
| | | @media screen and (min-width: 1920px) { |
| | | .top-nav-text { |
| | | min-width: 400px; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px) { |
| | | .top-nav-text { |
| | | min-width: 300px; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px) { |
| | | .top-nav-text { |
| | | min-width: 300px; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px) { |
| | | .top-nav-text { |
| | | min-width: 450px; |
| | | } |
| | | } |
| | | |
| | | @media screen and (max-width: 1280px) { |
| | | .top-nav-text { |
| | | min-width: 300px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <router-link :to="routerLinkTo"> |
| | | |
| | | <!-- update-begin- author:sunjianlei --- date:20190814 --- for: logoé¢è²æ ¹æ®ä¸»é¢é¢è²åå --> |
| | | <img v-if="navTheme === 'dark'" src="~@/assets/lxzn.png" alt="logo"> |
| | | <img v-if="navTheme === 'dark'" src="~@/assets/lxzn_white.png" alt="logo"> |
| | | <img v-else src="~@/assets/lxzn.png" alt="logo"> |
| | | <!-- update-begin- author:sunjianlei --- date:20190814 --- for: logoé¢è²æ ¹æ®ä¸»é¢é¢è²åå --> |
| | | |
| | |
| | | props: { |
| | | title: { |
| | | type: String, |
| | | default: 'ç»è®¡åæ', |
| | | default: 'MDCæºæ
§è½¦é´', |
| | | required: false |
| | | }, |
| | | showTitle: { |
| | |
| | | :filterOption="filterOption" |
| | | :open="isMobile()?true:null" |
| | | :getPopupContainer="(node) => node.parentNode" |
| | | :style="isMobile()?{width: '100%',marginBottom:'50px'}:{}" |
| | | :style="isMobile()?{width: '100%',marginBottom:'50px',color:theme=='dark'?'#fff':'#000'}:{color:theme=='dark'?'#fff':'#000'}" |
| | | @change="searchMethods" |
| | | @blur="hiddenClick" |
| | | > |
| | |
| | | </a-menu-item>--> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | <span class="action"> |
| | | <a class="logout_title" href="javascript:;" @click="handleLogout"> |
| | | <span class="action" @click="handleLogout"> |
| | | <a class="logout_title" href="javascript:;" > |
| | | <a-icon type="logout"/> |
| | | <span v-if="isDesktop()"> éåºç»å½</span> |
| | | </a> |
| | |
| | | /* update-begin author:sunjianlei date:20191220 for: è§£å³å
¨å±æ ·å¼å²çªé®é¢ */ |
| | | .user-wrapper .search-input { |
| | | width: 180px; |
| | | color: inherit; |
| | | |
| | | /deep/ .ant-select-selection { |
| | | background-color: inherit; |
| | |
| | | label="确认æ°å¯ç "> |
| | | <a-input type="password" @blur="handleConfirmBlur" placeholder="请确认æ°å¯ç " v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/> |
| | | </a-form-item> |
| | | |
| | | </a-form> |
| | | </a-spin> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
| | | import { putAction } from '@/api/manage' |
| | | |
| | | export default { |
| | |
| | | }, |
| | | password:{ |
| | | rules: [{ |
| | | required: true, message: '请è¾å
¥æ°å¯ç !', |
| | | required: true, message: '请è¾å
¥æ°å¯ç !',trigger:'blur' |
| | | }, { |
| | | validator: this.validateToNextPassword, |
| | | }], |
| | | }, |
| | | { |
| | | pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, |
| | | message: 'å¯ç ç±8使°åã大å°å忝åç¹æ®ç¬¦å·ç»æ!', |
| | | }], |
| | | }, |
| | | confirmpassword:{ |
| | | rules: [{ |
| | |
| | | username:"", |
| | | } |
| | | }, |
| | | watch:{ |
| | | visible:{ |
| | | handler(value){ |
| | | if(value) this.initDictData('password_length') |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | show(uname){ |
| | | if(!uname){ |
| | |
| | | this.form.resetFields(); |
| | | this.visible = 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.rules[2]={ |
| | | pattern: regExp, |
| | | message: `å¯ç ç±${res.result[0].value}使°åã大å°å忝åç¹æ®ç¬¦å·ç»æ!`, |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let params = Object.assign({username:this.username},values) |
| | | console.log("ä¿®æ¹å¯ç æäº¤æ°æ®",params) |
| | | putAction(this.url,params).then((res)=>{ |
| | | if(res.success){ |
| | | console.log(res) |
| | | that.$message.success(res.message); |
| | | that.close(); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | }) |
| | | if(values.oldpassword!==values.confirmpassword){ |
| | | that.confirmLoading = true; |
| | | let params = Object.assign({username:this.username},values) |
| | | console.log("ä¿®æ¹å¯ç æäº¤æ°æ®",params) |
| | | putAction(this.url,params).then((res)=>{ |
| | | if(res.success){ |
| | | console.log(res) |
| | | that.$message.success(res.message); |
| | | that.close(); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | }) |
| | | }else{ |
| | | that.$message.warning('æ°å¯ç 䏿§å¯ç ä¸è½ç¸å'); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | |
| | | |
| | | export default { |
| | | primaryColor: '#000000', // primary color of ant design |
| | | navTheme: 'light', // theme for nav menu |
| | | navTheme: 'dark', // theme for nav menu |
| | | layout: 'topmenu', // nav menu position: sidemenu or topmenu |
| | | contentWidth: 'Fixed', // layout of content: Fluid or Fixed, only works when layout is topmenu |
| | | fixedHeader: true, // sticky header |
| | |
| | | <template> |
| | | <dv-full-screen-container class="full-screen-container"> |
| | | <header class="page-header"> |
| | | <header class="page-header" :style="{height: pageHeaderHeight+'px'}"> |
| | | {{ workshopDetails.workshopName }} |
| | | <div class="header-left" v-has="'home:saveDevicePositionAndSize'"> |
| | | <a-space> |
| | |
| | | <a-button type="primary" icon="save" size="large" @click="saveDevicePositionAndSizeByApi">ä¿åä½ç½®</a-button> |
| | | </div> |
| | | <div class="device-status-info"> |
| | | <div v-for="item in deviceStatusList" :key="item.value" class="single-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> |
| | | </div> |
| | | </a-space> |
| | | </div> |
| | | </header> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | </VueDragResize> |
| | | |
| | | </div> |
| | | </dv-border-box-8> |
| | | |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | pageHeaderHeight: 80,// 页头é«åº¦ |
| | | taskBarHeight: window.screen.height - window.screen.availHeight,// å±å¹åºé¨ä»»å¡æ é«åº¦ |
| | | utilsBarHeight: window.outerHeight - window.innerHeight,// æµè§å¨å·¥å
·æ é«åº¦ |
| | | normalPageHeight: 0, |
| | | fullScreenPageHeight: 0, |
| | | workshopDetails: {}, // 车é´è¯¦ç»ä¿¡æ¯, |
| | | isDraggable: false, // æ¯å¦å¼å¯ææ½ |
| | | isResizable: false, // æ¯å¦å¼å¯ç¼©æ¾ |
| | |
| | | value: 22, |
| | | color: '#FF0000' |
| | | } |
| | | ] // 设å¤ç¶ææç¤ºç¯å表 |
| | | ],// 设å¤ç¶ææç¤ºç¯åè¡¨ï¼ |
| | | isFullscreen: false |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | this.workshopDetails.backgroundImage |
| | | )})` |
| | | |
| | | this.fullScreenPageHeight = `calc(100% - ${this.pageHeaderHeight}px)` |
| | | this.normalPageHeight = `calc(100% - ${this.pageHeaderHeight}px - ${this.taskBarHeight}px - ${this.utilsBarHeight}px)` |
| | | |
| | | if (this.isFullscreen) { |
| | | this.$refs.deviceContainerRef.style.height = this.fullScreenPageHeight |
| | | } else { |
| | | this.$refs.deviceContainerRef.style.height = this.normalPageHeight |
| | | } |
| | | }) |
| | | }, |
| | | |
| | |
| | | // setTimeout( this.$refs.equmentDetaiModel.initData(item.equipmentId),0) |
| | | // },1000*10) |
| | | } |
| | | }, |
| | | |
| | | onResize() { |
| | | // å©ç¨å±å¹å辨çåwindow对象çå
é«åº¦æ¥å¤æå
¼å®¹IE |
| | | let winFlag = window.innerHeight === window.screen.height |
| | | // å©ç¨windowå
¨å±æ è¯æ¥å¤æ -- IEæ æ |
| | | let isFull = window.fullScreen || document.webkitIsFullScreen |
| | | |
| | | if (isFull === undefined) { |
| | | this.isFullscreen = winFlag |
| | | } else { |
| | | this.isFullscreen = winFlag || isFull |
| | | } |
| | | console.log(winFlag) // trueå
¨å± false䏿¯å
¨å± |
| | | console.log('任塿 é«åº¦', this.taskBarHeight) |
| | | console.log('å·¥å
·æ é«åº¦', this.utilsBarHeight) |
| | | |
| | | //å
¨å±åå¾çº¸çåå¯è§é«åº¦åå»é¡µå¤´é«åº¦ï¼æ£å¸¸çªå£ååå»é¡µå¤´ãå±å¹åºé¨ä»»å¡æ 以念è§å¨å·¥å
·æ é«åº¦ |
| | | if (winFlag) { |
| | | console.log('触åå
¨å±') |
| | | this.$refs.deviceContainerRef.style.height = this.fullScreenPageHeight |
| | | |
| | | } else { |
| | | console.log('å
³éå
¨å±') |
| | | // 妿巿°é¡µé¢éæ°å è½½åé»è®¤å¤äºå
¨å±æ¨¡å¼ï¼åå·¥å
·æ é«åº¦ä¸ºè´æ°ï¼å æ¤éè¦éåºå
¨å±æ¨¡å¼æ¶é置工å
·æ é«åº¦ |
| | | this.utilsBarHeight = window.outerHeight - window.innerHeight |
| | | this.normalPageHeight = `calc(100% - ${this.pageHeaderHeight}px - ${this.taskBarHeight}px - ${this.utilsBarHeight}px)` |
| | | this.$refs.deviceContainerRef.style.height = this.normalPageHeight |
| | | } |
| | | } |
| | | |
| | | }, |
| | |
| | | this.getDeviceListByApi(this.$route.params.id) |
| | | this.getWorkshopDetailsByApi(this.$route.params.id) |
| | | } |
| | | |
| | | |
| | | let winFlag = window.innerHeight === window.screen.height |
| | | // å©ç¨windowå
¨å±æ è¯æ¥å¤æ -- IEæ æ |
| | | let isFull = window.fullScreen || document.webkitIsFullScreen |
| | | |
| | | if (isFull === undefined) { |
| | | this.isFullscreen = winFlag |
| | | } else { |
| | | this.isFullscreen = winFlag || isFull |
| | | } |
| | | |
| | | // window.addEventListener('resize', this.onResize) |
| | | }, |
| | | mounted() { |
| | | // ç¦æ¢ç¨æ·éä¸å
容 |
| | | document.onselectstart = () => false |
| | | }, |
| | | beforeDestroy() { |
| | | // ç¡®ä¿éæ¯å®æ¶å¨ååæ¶èµæº |
| | | // ç¡®ä¿éæ¯å®æ¶å¨ãäºä»¶ååæ¶èµæº |
| | | clearInterval(this.timingAcquisition) |
| | | this.timingAcquisition = null |
| | | // window.removeEventListener('resize', this.onResize) |
| | | } |
| | | } |
| | | </script> |
| | |
| | | color: #fff; |
| | | |
| | | .page-header { |
| | | height: 80px; |
| | | font-size: 50px; |
| | | text-align: center; |
| | | position: relative; |
| | |
| | | justify-content: space-between; |
| | | |
| | | .single-status-info { |
| | | width: 60px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | /*width: 70px;*/ |
| | | /*display: flex;*/ |
| | | /*align-items: center;*/ |
| | | /*justify-content: space-between;*/ |
| | | |
| | | .status-square { |
| | | width: 14px; |
| | |
| | | |
| | | .content-container { |
| | | width: 100%; |
| | | height: calc(100% - 80px); |
| | | /*height: calc(100% - 200px);*/ |
| | | /*height: 100%;*/ |
| | | background-repeat: no-repeat; |
| | | background-size: 100% 100%; |
| | | |
| | | |
| | | .single-device { |
| | | position: absolute; |
| | |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items:end ; |
| | | |
| | | align-items: end; |
| | | |
| | | .status-image { |
| | | background-size: 100% 100%; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="width: 100%; height: 100%;"> |
| | | <a-card :bordered="false"> |
| | | <a-row type="flex" :gutter="16"> |
| | | <a-col :md="5"> |
| | | <a-tabs :activeKey="activeKey" @change="tabChange"> |
| | | <a-tab-pane key="1" tab="车é´å±çº§" force-render> |
| | | <base-tree @getCurrSelected="changeSelectionNode"></base-tree> |
| | | </a-tab-pane> |
| | | <a-tab-pane v-if="isDepartType == 0" key="2" tab="é¨é¨å±çº§"> |
| | | <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-col> |
| | | |
| | | <a-col :md="19"> |
| | | <DeviceProcessReportList ref="deviceList" :nodeTree='selectEquement' :nodePeople='selectPeople' |
| | | :Type="slectTypeTree"/> |
| | | </a-col> |
| | | </a-row> |
| | | </a-card> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import { putAction, getAction } from '@/api/manage' |
| | | import { frozenBatch } from '@/api/api' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JInput from '@/components/jeecg/JInput' |
| | | import BaseTree from '../common/BaseTree' |
| | | import EfficiencyShiftList from './modules/efficiencyShiftReport/EfficiencyShiftList' |
| | | import JSuperQuery from '@/components/jeecg/JSuperQuery' |
| | | import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' |
| | | import DepartTree from './modules/DepartList/DepartListTree/DepartTree' |
| | | import { mapActions } from 'vuex' |
| | | import DeviceProcessReportList from './modules/DeviceProcessReport/DeviceProcessReportList' |
| | | |
| | | export default { |
| | | name: 'DeviceProcessReport', |
| | | components: { |
| | | DeviceProcessReportList, |
| | | JThirdAppButton, |
| | | JInput, |
| | | BaseTree, |
| | | JSuperQuery, |
| | | DepartTree, |
| | | EfficiencyShiftList |
| | | }, |
| | | data() { |
| | | return { |
| | | activeKey: '1', |
| | | description: '设å¤ä¿¡æ¯', |
| | | selectEquementId: '', |
| | | selectEquement: {}, |
| | | slectTypeTree: '', |
| | | selectPeople: {}, |
| | | url: { |
| | | equipmentStatistics: '/mdc/equipment/equipmentStatistics' |
| | | }, |
| | | isDepartType: '' |
| | | } |
| | | }, |
| | | created() { |
| | | this.queryTreeData() |
| | | }, |
| | | 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(() => { |
| | | }) |
| | | }, |
| | | tabChange(val) { |
| | | // console.log(val); |
| | | this.activeKey = val |
| | | this.slectTypeTree = val |
| | | }, |
| | | changeSelectionNode(val) { |
| | | this.selectEquement = val |
| | | this.slectTypeTree = '1' |
| | | }, |
| | | changeSelectionNodedd(val) { |
| | | this.selectPeople = val |
| | | this.slectTypeTree = '2' |
| | | } |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | |
| | | .equipMessage { |
| | | width: 100%; |
| | | height: 10%; |
| | | } |
| | | |
| | | .equipMessage table { |
| | | width: 60%; |
| | | height: 100%; |
| | | line-height: 50%; |
| | | } |
| | | |
| | | .equipMessage table td { |
| | | text-align: center; |
| | | } |
| | | |
| | | .equipMessage table td span { |
| | | display: inline-block; |
| | | width: 15px; |
| | | height: 15px; |
| | | } |
| | | |
| | | .equipMessage table td .equipShutdown { |
| | | background-color: #808080; |
| | | } |
| | | |
| | | .equipMessage table td .equipStandby { |
| | | background-color: #ffbf37; |
| | | } |
| | | |
| | | .equipMessage table td .equipRun { |
| | | background-color: #19FE01; |
| | | } |
| | | |
| | | .equipMessage table td .equipAlarm { |
| | | background-color: #FD0008; |
| | | } |
| | | </style> |
| | |
| | | <div style="width: 100%; height: 100%;"> |
| | | <a-card :bordered="false"> |
| | | <a-row type="flex" :gutter="16"> |
| | | <a-col :md="4"> |
| | | <a-col :md="5"> |
| | | <a-tabs :activeKey="activeKey" @change="tabChange"> |
| | | <a-tab-pane key="1" tab="车é´å±çº§" force-render> |
| | | <base-tree @getCurrSelected="changeSelectionNode"></base-tree> |
| | |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-col> |
| | | <a-col :md="20"> |
| | | <a-col :md="19"> |
| | | <efficiencyPO-list ref="EfficiencyPOList" :nodeTree='selectEquement' :nodePeople='selectPeople' :Type="slectTypeTree"/> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <div style="width: 100%; height: 100%;"> |
| | | <a-card :bordered="false"> |
| | | <a-row type="flex" :gutter="16"> |
| | | <a-col :md="4"> |
| | | <a-col :md="5"> |
| | | <a-tabs :activeKey="activeKey" @change="tabChange"> |
| | | <a-tab-pane key="1" tab="车é´å±çº§" force-render> |
| | | <base-tree @getCurrSelected="changeSelectionNode"></base-tree> |
| | |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-col> |
| | | <a-col :md="20"> |
| | | <a-col :md="19"> |
| | | <EfficiencyList ref="EfficiencyList" :nodePeople='selectPeople' :nodeTree = 'selectEquement' :Type="slectTypeTree"></EfficiencyList> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <a-input placeholder="请è¾å
¥ç±»å«" v-model="queryParam.rateParameterCategory"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="2" :sm="2"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | </a-col> |
| | | <a-col :md="2" :sm="2"> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | <a-col> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | |
| | | this.allTreeKeys = [] |
| | | this.treeDataSource = res.result |
| | | this.generateList(res.result) |
| | | this.expandedKeys=this.allTreeKeys |
| | | } else { |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="width: 100%;"> |
| | | <div :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <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="5" :sm="5" :xs="5"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker |
| | | :placeholder="['å¼å§æ¶é´', 'ç»ææ¶é´']" |
| | | format="YYYY-MM-DD" |
| | | :value="dates" |
| | | @change="dateParamChange" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <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 class="container" id="EfficiencyShift" style="margin-top: 20px;"> |
| | | <div class="table2"> |
| | | <a-table :columns="columns" :dataSource="dataSource.records" :pagination="false" bordered> |
| | | <span slot="duration" slot-scope="text">{{getFormattedTime(text)}}</span> |
| | | </a-table> |
| | | </div> |
| | | </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> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import moment from 'moment' |
| | | import { putAction, getAction } from '@/api/manage' |
| | | import $ from 'jquery' |
| | | import '@/components/table2excel/table2excel' |
| | | import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' |
| | | import api from '@/api/mdc' |
| | | |
| | | export default { |
| | | name: 'DeviceProcessReportList', |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | typeTree: '', |
| | | typeParent: 1, |
| | | typeEquipment: 1, |
| | | allowClear: true, |
| | | allowClearSu: true, |
| | | dates: [moment(), moment()], |
| | | identifying: [], |
| | | queryParam: { |
| | | pageSize: 20, |
| | | pageNo: 1 |
| | | }, |
| | | queryParamEquip: {}, |
| | | queryParamPeople: {}, |
| | | url: { |
| | | list: '/mdc/mdcProcessCount/list' |
| | | }, |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 70, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | // fixed: 'left' |
| | | }, |
| | | { |
| | | title: '设å¤ç»ä¸ç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'equipmentId', |
| | | width: 120 |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | width: 150, |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '驱å¨ç±»å', |
| | | align: 'center', |
| | | width: 110, |
| | | dataIndex: 'driveType' |
| | | }, |
| | | { |
| | | title: 'ç¨åºå·', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'sequenceNumber' |
| | | }, |
| | | { |
| | | title: 'å 工件æ°', |
| | | align: 'center', |
| | | width: 80, |
| | | dataIndex: 'processCount' |
| | | }, |
| | | { |
| | | title: 'æç»æ¶é´', |
| | | dataIndex: 'duration', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'duration' }, |
| | | width: 110 |
| | | }, |
| | | { |
| | | title: 'æ¥æ', |
| | | dataIndex: 'theDate', |
| | | align: 'center', |
| | | width: 110 |
| | | } |
| | | ], |
| | | dataSource: [], |
| | | driveTypeList: [] |
| | | } |
| | | }, |
| | | props: { nodeTree: '', Type: '', nodePeople: '' }, |
| | | created() { |
| | | this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.queryParam.typeTree = '1' |
| | | this.loadData() |
| | | this.getDriveTypeByApi() |
| | | }, |
| | | watch: { |
| | | Type(valmath) { |
| | | this.dataList = [] |
| | | this.queryParam.typeTree = valmath |
| | | }, |
| | | nodeTree(val) { //çå¬currSelected ååï¼å°åååçæ°å¼ä¼ éç» getCurrSelected äºä»¶ |
| | | console.log(val) |
| | | if (JSON.stringify(val) != '{}') { |
| | | if (val.equipmentId != null) { |
| | | this.queryParamEquip.parentId = '' |
| | | this.queryParamEquip.equipmentId = val.equipmentId |
| | | } else { |
| | | this.queryParamEquip.parentId = val.key |
| | | this.queryParamEquip.equipmentId = '' |
| | | } |
| | | this.searchQuery() |
| | | } |
| | | }, |
| | | nodePeople(val) { |
| | | if (JSON.stringify(val) != '{}') { |
| | | if (val.equipmentId != null) { |
| | | this.queryParamPeople.parentId = val.equipmentId |
| | | this.queryParamPeople.equipmentId = '' |
| | | } else { |
| | | this.queryParamPeople.parentId = val.key |
| | | this.queryParamPeople.equipmentId = '' |
| | | } |
| | | this.searchQuery() |
| | | } |
| | | } |
| | | }, |
| | | filters: { |
| | | numFilter(value) { |
| | | if (value) { |
| | | return parseFloat((value * 100).toFixed(2)) |
| | | } else { |
| | | return '0' |
| | | } |
| | | } |
| | | }, |
| | | 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') |
| | | }, |
| | | |
| | | exportExcel() { |
| | | $('#EfficiencyShift').table2excel({ |
| | | exclude: '.noExl', |
| | | name: 'Excel Document Name', |
| | | filename: '设å¤å 工工件æ¥è¡¨', |
| | | exclude_img: true, |
| | | fileext: '.xls', |
| | | exclude_links: true, |
| | | exclude_inputs: true |
| | | }) |
| | | }, |
| | | |
| | | 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() |
| | | } else { |
| | | // this.$message.warning("è¯·éæ©æ¶é´") |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©æ¶é´' |
| | | }) |
| | | } |
| | | // this.onClearSelected() |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.queryParam = { |
| | | pageSize: 20, |
| | | pageNo: 1 |
| | | } |
| | | this.dates = [] |
| | | this.loadData() |
| | | }, |
| | | |
| | | loadData() { |
| | | getAction(this.url.list, this.queryParam).then(res => { |
| | | if (res.success) { |
| | | this.dataSource = res.result |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * è°ç¨æ¥å£è·åæ§å¶ç³»ç»ç±»å |
| | | */ |
| | | getDriveTypeByApi() { |
| | | api.getDriveTypeApi().then((res) => { |
| | | this.driveTypeList = res.result.map(item => item.value) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * æ ¼å¼åæ¶é´ |
| | | * @param seconds ç§æ° |
| | | * @returns '' æ ¼å¼ååæ¶é´å符串 |
| | | */ |
| | | getFormattedTime(seconds) { |
| | | var hours = Math.floor(seconds / 3600) |
| | | var minutes = Math.floor((seconds % 3600) / 60) |
| | | var secs = seconds % 60 |
| | | |
| | | if (hours === 0) { |
| | | if (minutes === 0) { |
| | | return secs === 0 ? 0 : `${secs}ç§` |
| | | } else { |
| | | if (secs === 0) { |
| | | return `${minutes}å` |
| | | } |
| | | return `${minutes}å ${secs}ç§` |
| | | } |
| | | } else { |
| | | if (minutes === 0 && secs === 0) { |
| | | return `${hours}å°æ¶` |
| | | } else if (minutes !== 0 && secs === 0) { |
| | | return `${hours}å°æ¶ ${minutes}å` |
| | | } |
| | | } |
| | | return `${hours}å°æ¶ ${minutes}å ${secs}ç§` |
| | | }, |
| | | |
| | | /** |
| | | * å页å¨é¡µæ°åçæ¹åæ¶è§¦å |
| | | * @param page æ¹ååé¡µæ° |
| | | * @param pageSize æ¹å忝页å±ç¤ºæ°æ®æ¡æ° |
| | | */ |
| | | handlePageNoChange(page, pageSize) { |
| | | this.queryParam.pageNo = page |
| | | this.loadData() |
| | | }, |
| | | |
| | | /** |
| | | * å页卿¯é¡µå±ç¤ºæ°æ®æ¡æ°åçæ¹åæ¶è§¦å |
| | | * @param current æ¹ååé¡µæ° |
| | | * @param size æ¹å忝页å±ç¤ºæ°æ®æ¡æ° |
| | | */ |
| | | handlePageSizeChange(current, size) { |
| | | this.queryParam.pageSize = size |
| | | this.loadData() |
| | | }, |
| | | |
| | | /** |
| | | * èæ³è¾å
¥æ¡çéåè½ |
| | | * @param input è¾å
¥çå
容 |
| | | * @param option é
ç½® |
| | | * @returns {boolean} 夿æ¯å¦çé |
| | | */ |
| | | filterOption(input, option) { |
| | | return ( |
| | | option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0 |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .table2 { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: auto; |
| | | } |
| | | |
| | | .pagination { |
| | | display: flex; |
| | | justify-content: end; |
| | | margin: 20px 0; |
| | | } |
| | | |
| | | @media screen and (min-width: 1920px) { |
| | | #EfficiencyShift { |
| | | height: 670px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px) { |
| | | #EfficiencyShift { |
| | | height: 670px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px) { |
| | | #EfficiencyShift { |
| | | height: 522px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px) { |
| | | #EfficiencyShift { |
| | | height: 414px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | @media screen and (max-width: 1280px) { |
| | | #EfficiencyShift { |
| | | height: 414px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | .identifyingclass { |
| | | width: 55px; |
| | | height: 15px; |
| | | display: inline-block |
| | | } |
| | | |
| | | .dataContent { |
| | | white-space: nowrap; |
| | | /*margin: 0;*/ |
| | | /*border: none;*/ |
| | | border-collapse: separate; |
| | | border-spacing: 0; |
| | | /*table-layout: fixed;*/ |
| | | border: 1px solid #ccc; |
| | | /*border: 1px solid #ccc;*/ |
| | | width: 100%; |
| | | /*height: 100%;*/ |
| | | /*overflow: hidden;*/ |
| | | /*overflow-y: auto;*/ |
| | | text-align: center; |
| | | } |
| | | |
| | | .dataContent .fixed th { |
| | | width: 50px; |
| | | } |
| | | |
| | | .dataContent .thead th { |
| | | background-color: #fafafa; |
| | | text-align: center; |
| | | height: 30px; |
| | | padding: 5px; |
| | | } |
| | | |
| | | .dataContent .notfixed th { |
| | | width: auto; |
| | | } |
| | | |
| | | /*.dataContent tr td {*/ |
| | | /*height: 35px*/ |
| | | /*}*/ |
| | | |
| | | .dataContent .mathData td { |
| | | padding: 10px; |
| | | /*display: none;*/ |
| | | } |
| | | |
| | | .dataContent .mathData .td { |
| | | /*background-color: #ff9bd2;*/ |
| | | display: inline-block; |
| | | padding: 10px; |
| | | } |
| | | |
| | | .dataContent .mathData .tdd { |
| | | /*display: none;*/ |
| | | } |
| | | |
| | | </style> |
| | |
| | | <a-col :span="24"> |
| | | <a-form-item label="设å¤ç»" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]" |
| | | @search="deviceSearch" enter-button/> |
| | | @search="deviceSearch" enter-button placeholder="è¯·éæ©è®¾å¤"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </a-form> |
| | | </a-spin> |
| | | <holiday-management-modal-list ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></holiday-management-modal-list> |
| | | |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | </a-modal> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | duplicateCheck |
| | | } from '@/api/api' |
| | | import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal' |
| | | |
| | | export default { |
| | | name: 'HolidayManagementModal', |
| | | components: {HolidayManagementModalList}, |
| | | components: { SelectDeviceModal, HolidayManagementModalList}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | |
| | | // }) |
| | | }, |
| | | deviceSearch() { |
| | | this.$refs.deviceRepairListModel.openPage() |
| | | this.$refs.deviceRepairListModel.title = 'éæ©è®¾å¤' |
| | | this.$refs.deviceRepairListModel.disableSubmit = false |
| | | 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(',') : [] |
| | | }, |
| | | //çº§èæ¡onChangeäºä»¶ |
| | | // onChange(value) { |
| | |
| | | }, |
| | | checkboxChange(e) { |
| | | this.checked = e.target.checked |
| | | }, |
| | | |
| | | /** |
| | | * 鿩已æè®¾å¤åç¹å»ç¡®å®æ¶è§¦å |
| | | * @param data 已鿩çè®¾å¤ |
| | | */ |
| | | selectOK(data) { |
| | | // let params = {} |
| | | // params.equipmentIdList = [] |
| | | // for (var a = 0; a < data.length; a++) { |
| | | // params.equipmentIdList.push(data[a]) |
| | | // } |
| | | console.log('data=', data) |
| | | this.form.setFieldsValue({ |
| | | equipmentIds: data.join(',') |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="çå¶"> |
| | | <a-select v-model="queryParam.shiftId" placeholder="è¯·éæ©çå¶" |
| | | @change="initShiftSubList" :allowClear="allowClear"> |
| | | <a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.value"> |
| | | {{ em.label }} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="çæ¬¡"> |
| | | <a-select v-model="queryParam.shiftSubId" placeholder="è¯·éæ©çæ¬¡" @change="initShiftSubListChange" |
| | | :allowClear="allowClearSu"> |
| | | <a-select-option v-for="(em,index) in shiftSubList" :key="index" :value="em.value"> |
| | | {{ em.label }} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <!--<a-col :md="5" :sm="5" :xs="5">--> |
| | | <!--<a-form-item label="çå¶">--> |
| | | <!--<a-select v-model="queryParam.shiftId" placeholder="è¯·éæ©çå¶"--> |
| | | <!--@change="initShiftSubList" :allowClear="allowClear">--> |
| | | <!--<a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.value">--> |
| | | <!--{{ em.label }}--> |
| | | <!--</a-select-option>--> |
| | | <!--</a-select>--> |
| | | <!--</a-form-item>--> |
| | | <!--</a-col>--> |
| | | <!--<a-col :md="5" :sm="5" :xs="5">--> |
| | | <!--<a-form-item label="çæ¬¡">--> |
| | | <!--<a-select v-model="queryParam.shiftSubId" placeholder="è¯·éæ©çæ¬¡" @change="initShiftSubListChange"--> |
| | | <!--:allowClear="allowClearSu">--> |
| | | <!--<a-select-option v-for="(em,index) in shiftSubList" :key="index" :value="em.value">--> |
| | | <!--{{ em.label }}--> |
| | | <!--</a-select-option>--> |
| | | <!--</a-select>--> |
| | | <!--</a-form-item>--> |
| | | <!--</a-col>--> |
| | | |
| | | <a-col :md="8" :sm="8" :xs="8"> |
| | | <a-space> |
| | |
| | | <div class="container" id="EfficiencyShift" style="margin-top: 20px;"> |
| | | <div class="table2"> |
| | | <a-table :columns="columns" :dataSource="dataSource.records" :pagination="false" bordered |
| | | :scroll="{ x: 1500, y: false }"> |
| | | |
| | | :scroll="{ x: 3200, y: false }"> |
| | | </a-table> |
| | | </div> |
| | | </div> |
| | |
| | | :default-current="1" |
| | | :current=+queryParam.pageNo |
| | | show-size-changer |
| | | :pageSizeOptions="['10','15','20','25']" |
| | | :pageSizeOptions="['20','30','40','50']" |
| | | @change="handlePageNoChange" |
| | | @showSizeChange="handlePageSizeChange" |
| | | /> |
| | |
| | | dates: [moment().subtract('month', 1), moment().subtract('month', 1)], |
| | | identifying: [], |
| | | queryParam: { |
| | | pageSize: 10, |
| | | pageSize: 20, |
| | | pageNo: 1 |
| | | }, |
| | | queryParamEquip: {}, |
| | |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | fixed: 'left' |
| | | } |
| | | // fixed: 'left' |
| | | }, |
| | | { |
| | | title: '设å¤ç»ä¸ç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'equipmentId', |
| | | width: 120, |
| | | fixed: 'left' |
| | | width: 120 |
| | | // fixed: 'left' |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | width: 150, |
| | | dataIndex: 'equipmentName', |
| | | fixed: 'left' |
| | | width: 200, |
| | | dataIndex: 'equipmentName' |
| | | // fixed: 'left' |
| | | }, |
| | | { |
| | | title: '设å¤åå·', |
| | |
| | | { |
| | | title: 'çæ¬¡', |
| | | align: 'center', |
| | | width: 80, |
| | | dataIndex: 'shift' |
| | | width: 300, |
| | | dataIndex: 'shift', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'æ¯çå°æ¶', |
| | |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.typeTree = this.queryParam.typeTree |
| | | this.typeParent = this.queryParam.parentId |
| | | this.typeEquipment = this.queryParam.equipmentId |
| | | this.queryParam = { |
| | | pageSize: 10, |
| | | pageSize: 20, |
| | | pageNo: 1 |
| | | } |
| | | this.dates = [] |
| | | this.shiftSubList = [] |
| | | this.queryParam.typeTree = this.typeTree |
| | | this.queryParam.parentId = this.typeParent |
| | | this.queryParam.equipmentId = this.typeEquipment |
| | | this.loadData() |
| | | }, |
| | | |
| | |
| | | <a-col :span="24"> |
| | | <a-form-item label="设å¤ç»" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]" |
| | | @search="deviceSearch" enter-button/> |
| | | @search="deviceSearch" enter-button placeholder="è¯·éæ©è®¾å¤"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <a-col :span="12"> |
| | | <a-form-item label="æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©æ¶é´" |
| | | v-decorator="['torqueDate', validatorRules.torqueDate]"></j-date> |
| | | v-decorator="['torqueDate', validatorRules.torqueDate]"></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item label="æç©å¼" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input-number :min="0" :disabled="disableSubmit" placeholder="请è¾å
¥æç©å¼" |
| | | v-decorator="['torqueValue', validatorRules.torqueValue]"/> |
| | | v-decorator="['torqueValue', validatorRules.torqueValue]"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item label="夿³¨" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-textarea :maxLength="20" v-decorator="['notes', validatorRules.notes]" placeholder="请è¾å
¥å¤æ³¨" ></a-textarea> |
| | | </a-form-item> |
| | | <a-form-item label="夿³¨" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-textarea :maxLength="20" v-decorator="['notes', validatorRules.notes]" |
| | | placeholder="请è¾å
¥å¤æ³¨"></a-textarea> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | <torqueconfiguration-modal-list ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></torqueconfiguration-modal-list> |
| | | |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | </a-modal> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | duplicateCheck |
| | | } from '@/api/api' |
| | | import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal' |
| | | |
| | | export default { |
| | | name: 'TorqueconfigurationModal', |
| | | components: {TorqueconfigurationModalList}, |
| | | components: { SelectDeviceModal }, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | mesag:21, |
| | | readOnly:true, |
| | | mesag: 21, |
| | | readOnly: true, |
| | | title: '', |
| | | visible: false, |
| | | show: false, |
| | | model: {}, |
| | | checked: false, |
| | | startData:"", |
| | | endData:"", |
| | | startData: '', |
| | | endData: '', |
| | | labelCol: { |
| | | xs: { |
| | | span: 24 |
| | |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | equipmentIds:{ |
| | | rules:[ |
| | | equipmentIds: { |
| | | rules: [ |
| | | { |
| | | required:true, |
| | | message: "è¯·éæ©è®¾å¤" |
| | | }, |
| | | ], |
| | | required: true, |
| | | message: 'è¯·éæ©è®¾å¤' |
| | | } |
| | | ] |
| | | }, |
| | | torqueDate:{ |
| | | rules:[ |
| | | torqueDate: { |
| | | rules: [ |
| | | { |
| | | required:true, |
| | | message: "è¯·éæ©æ¶é´" |
| | | }, |
| | | ], |
| | | required: true, |
| | | message: 'è¯·éæ©æ¶é´' |
| | | } |
| | | ] |
| | | }, |
| | | torqueValue:{ |
| | | rules:[ |
| | | torqueValue: { |
| | | rules: [ |
| | | { |
| | | required:true, |
| | | message: "请è¾å
¥æç©å¼" |
| | | }, |
| | | ], |
| | | }, |
| | | required: true, |
| | | message: '请è¾å
¥æç©å¼' |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | |
| | | url: { |
| | |
| | | // // this.endData = dateStrings[1]; |
| | | // // console.log(this.startData,this.endData); |
| | | // }, |
| | | onChangeEnd(dates, dateStrings){ |
| | | this.endTime = dateStrings[0]; |
| | | onChangeEnd(dates, dateStrings) { |
| | | this.endTime = dateStrings[0] |
| | | }, |
| | | getDeviceRows(val) { |
| | | var equipmentIds; |
| | | for(var i = 0;i<val.length;i++){ |
| | | var equipmentIds |
| | | for (var i = 0; i < val.length; i++) { |
| | | if (i == 0) { |
| | | equipmentIds = val[i].equipmentId; |
| | | equipmentIds = val[i].equipmentId |
| | | } else { |
| | | equipmentIds = equipmentIds + "," + val[i].equipmentId; |
| | | equipmentIds = equipmentIds + ',' + val[i].equipmentId |
| | | } |
| | | } |
| | | // console.log("========",equipmentIds); |
| | | this.form.setFieldsValue({ |
| | | equipmentIds: equipmentIds, |
| | | equipmentIds: equipmentIds |
| | | }) |
| | | // this.form.setFieldsValue({ |
| | | // equipmentId: val.equipmentId, |
| | |
| | | // }) |
| | | }, |
| | | deviceSearch() { |
| | | this.$refs.deviceRepairListModel.openPage() |
| | | this.$refs.deviceRepairListModel.title = 'éæ©è®¾å¤' |
| | | this.$refs.deviceRepairListModel.disableSubmit = false |
| | | 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(',') : [] |
| | | }, |
| | | //çº§èæ¡onChangeäºä»¶ |
| | | // onChange(value) { |
| | |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'equipmentIds', 'equipmentName', 'mdcRepairType', 'startTime', 'endTime', |
| | | this.form.setFieldsValue(pick(this.model, 'equipmentIds', 'equipmentName', 'mdcRepairType', 'startTime', 'endTime' |
| | | )) |
| | | }) |
| | | }, |
| | |
| | | // // this.endTime = '' |
| | | // that.confirmLoading = false |
| | | // }else{ |
| | | let obj |
| | | if (!this.model.id) { |
| | | obj = postAction(this.url.add, formData) |
| | | } else { |
| | | obj = requestPut(this.url.edit, formData, { |
| | | id: this.model.id |
| | | }) |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success("æ·»å æå") |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:"æ·»å æå" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | let obj |
| | | if (!this.model.id) { |
| | | obj = postAction(this.url.add, formData) |
| | | } else { |
| | | obj = requestPut(this.url.edit, formData, { |
| | | id: this.model.id |
| | | }) |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success("æ·»å æå") |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: 'æ·»å æå' |
| | | }) |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | // } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | } |
| | | // } |
| | | |
| | | // } |
| | | }) |
| | |
| | | }, |
| | | checkboxChange(e) { |
| | | this.checked = e.target.checked |
| | | }, |
| | | |
| | | /** |
| | | * 鿩已æè®¾å¤åç¹å»ç¡®å®æ¶è§¦å |
| | | * @param data 已鿩çè®¾å¤ |
| | | */ |
| | | selectOK(data) { |
| | | // let params = {} |
| | | // params.equipmentIdList = [] |
| | | // for (var a = 0; a < data.length; a++) { |
| | | // params.equipmentIdList.push(data[a]) |
| | | // } |
| | | console.log('data=', data) |
| | | this.form.setFieldsValue({ |
| | | equipmentIds: data.join(',') |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | /deep/ .ant-input-number{ |
| | | width: 100%!important; |
| | | |
| | | /deep/ .ant-input-number { |
| | | width: 100% !important; |
| | | } |
| | | </style> |
| | |
| | | <a-col :span="24"> |
| | | <a-form-item label="设å¤ç»" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]" |
| | | @search="deviceSearch" enter-button/> |
| | | @search="deviceSearch" enter-button placeholder="è¯·éæ©è®¾å¤"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | <plan-downtime-maintenance-modal-list ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></plan-downtime-maintenance-modal-list> |
| | | |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import moment from 'moment' |
| | | import pick from 'lodash.pick' |
| | | import PlanDowntimeMaintenanceModalList from './UnplannedDowntimemManagerModalList' |
| | | import JDate from '../deviceRepair/JDate' |
| | | import { |
| | | getAction, |
| | |
| | | import { |
| | | duplicateCheck |
| | | } from '@/api/api' |
| | | import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal' |
| | | |
| | | export default { |
| | | name: 'UnplannedDowntimemManagerModal', |
| | | components: {PlanDowntimeMaintenanceModalList,JDate}, |
| | | components: { SelectDeviceModal,JDate}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | |
| | | // }) |
| | | }, |
| | | deviceSearch() { |
| | | this.$refs.deviceRepairListModel.openPage() |
| | | this.$refs.deviceRepairListModel.title = 'éæ©è®¾å¤' |
| | | this.$refs.deviceRepairListModel.disableSubmit = false |
| | | 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(',') : [] |
| | | }, |
| | | //çº§èæ¡onChangeäºä»¶ |
| | | // onChange(value) { |
| | |
| | | }, |
| | | checkboxChange(e) { |
| | | this.checked = e.target.checked |
| | | }, |
| | | |
| | | /** |
| | | * 鿩已æè®¾å¤åç¹å»ç¡®å®æ¶è§¦å |
| | | * @param data 已鿩çè®¾å¤ |
| | | */ |
| | | selectOK(data) { |
| | | // let params = {} |
| | | // params.equipmentIdList = [] |
| | | // for (var a = 0; a < data.length; a++) { |
| | | // params.equipmentIdList.push(data[a]) |
| | | // } |
| | | console.log('data=', data) |
| | | this.form.setFieldsValue({ |
| | | equipmentIds: data.join(',') |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | cancelText="å
³é" |
| | | wrap-class-name="full-modal" |
| | | centered |
| | | :closable="false" |
| | | :footer="null" |
| | | > |
| | | <div |
| | |
| | | v-show="mdcDriveTypeParamConfigList != null" |
| | | v-if="driverType != 'PLC'" |
| | | :column="4" |
| | | class="operationData" |
| | | > |
| | | |
| | | <a-descriptions-item |
| | | v-for="(item,id) in mdcDriveTypeParamConfigList " |
| | | :key="item.id" |
| | | :label="item.chineseName" |
| | | >{{item.value}} |
| | | > |
| | | <a-popover v-if="item.value&&item.value.length>18"> |
| | | <template slot="content"> |
| | | {{item.value}} |
| | | </template> |
| | | {{item.value}} |
| | | </a-popover> |
| | | |
| | | <template v-else> |
| | | {{item.value}} |
| | | </template> |
| | | </a-descriptions-item> |
| | | |
| | | </a-descriptions> |
| | |
| | | <!-->{{item.value}}</a-descriptions-item>--> |
| | | <!--</a-descriptions>--> |
| | | |
| | | <a-descriptions |
| | | title="çæ¬ä¿¡æ¯ for lsv2" |
| | | v-if="driverType == 'LSV2'" |
| | | :column="4" |
| | | > |
| | | <a-descriptions-item label="NCçæ¬">{{resultData.nCVersion}}</a-descriptions-item> |
| | | <a-descriptions-item label="TNCçæ¬">{{resultData.tNCVersion}}</a-descriptions-item> |
| | | <a-descriptions-item label="OPTçæ¬">{{resultData.oPTVersion}}</a-descriptions-item> |
| | | <a-descriptions-item label="PLCçæ¬">{{resultData.pLCVersion}}</a-descriptions-item> |
| | | </a-descriptions> |
| | | <!--<a-descriptions--> |
| | | <!--title="çæ¬ä¿¡æ¯ for lsv2"--> |
| | | <!--v-if="driverType == 'LSV2'"--> |
| | | <!--:column="4"--> |
| | | <!--class="lsv2Data"--> |
| | | <!-->--> |
| | | <!--<a-descriptions-item label="NCçæ¬">{{resultData.ncversion}}</a-descriptions-item>--> |
| | | <!--<a-descriptions-item label="TNCçæ¬">{{resultData.tncversion}}</a-descriptions-item>--> |
| | | <!--<a-descriptions-item label="OPTçæ¬">{{resultData.optversion}}</a-descriptions-item>--> |
| | | <!--<a-descriptions-item label="PLCçæ¬">{{resultData.plcversion}}</a-descriptions-item>--> |
| | | <!--</a-descriptions>--> |
| | | |
| | | </td> |
| | | </tr> |
| | |
| | | postAction |
| | | } from '@/api/manage' |
| | | import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' |
| | | import Template1 from '../../../../jeecg/JVxeDemo/layout-demo/Template1' |
| | | |
| | | export default { |
| | | name: 'EqumentDetaiModal', |
| | | components: {}, |
| | | components: { Template1 }, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: true, |
| | | show: false, |
| | | length: 20, |
| | | splitNumber: 1, |
| | | lineStyle: { |
| | |
| | | }, |
| | | pointer: { |
| | | show: true, |
| | | width: 3 |
| | | width: 3, |
| | | itemStyle:{ |
| | | color:'#fff' |
| | | } |
| | | }, |
| | | data: [{ |
| | | name: '', |
| | |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: true, |
| | | show: false, |
| | | length: 20, |
| | | splitNumber: 1, |
| | | lineStyle: { |
| | |
| | | }, |
| | | pointer: { |
| | | show: true, |
| | | width: 3 |
| | | width: 3, |
| | | itemStyle:{ |
| | | color:'#fff' |
| | | } |
| | | }, |
| | | data: [{ |
| | | name: '', |
| | |
| | | type: 'gauge', |
| | | radius: '80%', |
| | | min: 0, //æå°å»åº¦ |
| | | max: 300, //æå¤§å»åº¦ |
| | | max: 100, //æå¤§å»åº¦ |
| | | splitNumber: 10, //å»åº¦æ°é |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: true, |
| | | show: false, |
| | | length: 20, |
| | | splitNumber: 1, |
| | | lineStyle: { |
| | |
| | | radius: '52.5%', |
| | | z: 3, |
| | | startAngle: 225, |
| | | max: 300, |
| | | max: 100, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [_this.spindleload / 300, '#31F3FF'], // 卿 |
| | | [_this.spindleload / 100, '#31F3FF'], // 卿 |
| | | [1, '#185363'] |
| | | ], |
| | | width: 4 |
| | |
| | | }, |
| | | pointer: { |
| | | show: true, |
| | | width: 3 |
| | | width: 3, |
| | | itemStyle:{ |
| | | color:'#fff' |
| | | } |
| | | }, |
| | | data: [{ |
| | | name: '', |
| | |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: true, |
| | | show: false, |
| | | length: 20, |
| | | splitNumber: 1, |
| | | lineStyle: { |
| | |
| | | }, |
| | | pointer: { |
| | | show: true, |
| | | width: 3 |
| | | width: 3, |
| | | itemStyle:{ |
| | | color:'#fff' |
| | | } |
| | | }, |
| | | data: [{ |
| | | name: '', |
| | |
| | | padding-bottom: 0; |
| | | margin: 0; |
| | | background-color: #4a4a48 !important; |
| | | opacity: 0.5; |
| | | opacity: 0.9; |
| | | } |
| | | /deep/ .ant-modal-content { |
| | | display: flex; |
| | |
| | | /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ |
| | | /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ |
| | | background-color: #312c2c; |
| | | opacity: 0.7; |
| | | opacity: 1; |
| | | } |
| | | |
| | | /deep/ .ant-modal-close { |
| | |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions-item-label{ |
| | | width: 6.7vw; |
| | | text-align: right; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | /deep/ .operationData .ant-descriptions-item-content, |
| | | .lsv2Data .ant-descriptions-item-content |
| | | { |
| | | width: 130px; |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | <div id="DeviceList"> |
| | | <div class="openRateTrendDg"> |
| | | <div id="Efficiency" class="container" style="margin-top: 20px;"> |
| | | <div class="table2"> |
| | | <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" |
| | | style="white-space: nowrap;text-align: left;"> |
| | | <thead> |
| | | <tr class="thead fixed equipname"> |
| | | <th class="thgu dong1 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">æ¥è¦å· |
| | | </th> |
| | | <th class="thgu dong2 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;"> |
| | | åºç°æ¬¡æ° |
| | | </th> |
| | | <th class="thgu dong3 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;"> |
| | | å计æç»æ¶é´ï¼ç§ï¼ |
| | | </th> |
| | | <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;"> |
| | | æ¥è¦ä¿¡æ¯ |
| | | </th> |
| | | <!--<template v-for="(tableHead, index) in tableHeads">--> |
| | | <!--<th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>--> |
| | | <!--</template>--> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr class="mathData" v-for="(item, index) in dataList" @click="TableDraw(index,item)"> |
| | | <td class="tdgu kaitou">{{item.alarmCode}}</td> |
| | | <td class="tdgu1 kaitou">{{item.count}}</td> |
| | | <td class="tdgu2 kaitou">{{item.timeCount}}</td> |
| | | <td class="tdgu3 kaitou">{{item.alarmContent}}</td> |
| | | <!--<template v-for="(tableHead, index) in item.dataList">--> |
| | | <!--<td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td>--> |
| | | <!--</template>--> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <!--<div id="Efficiency" class="container">--> |
| | | <!--<div class="table2">--> |
| | | <!--<table class="dataContent table" border="1" cellspacing="0" cellpadding="0"--> |
| | | <!--style="white-space: nowrap;text-align: left;">--> |
| | | <!--<thead>--> |
| | | <!--<tr class="thead fixed equipname">--> |
| | | <!--<th class="thgu dong1 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">æ¥è¦å·--> |
| | | <!--</th>--> |
| | | <!--<th class="thgu dong2 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">--> |
| | | <!--åºç°æ¬¡æ°--> |
| | | <!--</th>--> |
| | | <!--<th class="thgu dong3 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">--> |
| | | <!--å计æç»æ¶é´--> |
| | | <!--</th>--> |
| | | <!--<th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">--> |
| | | <!--æ¥è¦ä¿¡æ¯--> |
| | | <!--</th>--> |
| | | <!--<!–<template v-for="(tableHead, index) in tableHeads">–>--> |
| | | <!--<!–<th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>–>--> |
| | | <!--<!–</template>–>--> |
| | | <!--</tr>--> |
| | | <!--</thead>--> |
| | | <!--<tbody>--> |
| | | <!--<tr class="mathData" v-for="(item, index) in dataList" @click="TableDraw(index,item)">--> |
| | | <!--<td class="tdgu kaitou">{{item.alarmCode}}</td>--> |
| | | <!--<td class="tdgu1 kaitou">{{item.count}}</td>--> |
| | | <!--<td class="tdgu2 kaitou">{{getFormattedTime(item.timeCount)}}--> |
| | | <!--<!–<td class="tdgu2 kaitou">{{item.timeCount}}</td>–>--> |
| | | <!--<td class="tdgu3 kaitou">{{item.alarmContent}}</td>--> |
| | | <!--<!–<template v-for="(tableHead, index) in item.dataList">–>--> |
| | | <!--<!–<td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td>–>--> |
| | | <!--<!–</template>–>--> |
| | | <!--</tr>--> |
| | | <!--</tbody>--> |
| | | <!--</table>--> |
| | | <!--</div>--> |
| | | <!--</div>--> |
| | | <a-table :columns="columns" :data-source="dataList" bordered :pagination="false" :scroll="{y:210}" |
| | | :customRow="customRow" |
| | | rowKey="alarmCode" @expand="handleExpandChange" |
| | | > |
| | | <span slot="timeCount" slot-scope="text">{{getFormattedTime(text)}}</span> |
| | | <!--<a-table--> |
| | | <!--slot="expandedRowRender"--> |
| | | <!--slot-scope="row"--> |
| | | <!--:columns="innerColumns"--> |
| | | <!--:data-source="row.innerDataList"--> |
| | | <!--:pagination="false"--> |
| | | <!--rowKey="equipmentId"--> |
| | | <!--:loading="loading"--> |
| | | <!-->--> |
| | | <!--<span slot="duration" slot-scope="text">{{getFormattedTime(text)}}</span>--> |
| | | <!--</a-table>--> |
| | | </a-table> |
| | | </div> |
| | | |
| | | <a-spin :spinning="spinning"> |
| | | <div style="width: 100%;height: 100%;display: flex;"> |
| | | <div id="MdcEquipmentWarningPie" style="height: 100%;width: 35%;"></div> |
| | | <div id="MdcEquipmentWarningLine" style="height: 100%;width: 65%;"></div> |
| | | </div> |
| | | </div> |
| | | <div style="width: 100%;height: 60%;display: flex;"> |
| | | <div id="MdcEquipmentWarningPie" style="height: 100%;width: 35%;"></div> |
| | | <div id="MdcEquipmentWarningLine" style="height: 100%;width: 65%;"></div> |
| | | </div> |
| | | </a-spin> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | JeecgListMixin |
| | | } from '@/mixins/JeecgListMixin' |
| | | |
| | | const columns = [ |
| | | { title: 'æ¥è¦å·', dataIndex: 'alarmCode', key: 'alarmCode', align: 'center' }, |
| | | { title: 'åºç°æ¬¡æ°', dataIndex: 'count', key: 'count', align: 'center', sorter: (a, b) => b.count - a.count }, |
| | | { |
| | | title: 'å计æç»æ¶é´', |
| | | dataIndex: 'timeCount', |
| | | key: 'timeCount', |
| | | scopedSlots: { customRender: 'timeCount' }, |
| | | align: 'center', |
| | | sorter: (a, b) => b.timeCount - a.timeCount |
| | | }, |
| | | { title: 'æ¥è¦ä¿¡æ¯', dataIndex: 'alarmContent', key: 'alarmContent', align: 'center' } |
| | | ] |
| | | |
| | | const innerColumns = [ |
| | | { title: '设å¤ç¼å·', dataIndex: 'equipmentId', key: 'equipmentId', align: 'center' }, |
| | | { title: '设å¤åç§°', dataIndex: 'equipmentName', key: 'equipmentName', align: 'center' }, |
| | | { title: 'æ¥è¦æ¶é´', dataIndex: 'alarmTime', key: 'alarmTime', align: 'center' }, |
| | | { title: 'ç»ææ¶é´', dataIndex: 'endTime', key: 'endTime', align: 'center' }, |
| | | { |
| | | title: 'æç»æ¶é´', |
| | | dataIndex: 'duration', |
| | | key: 'duration', |
| | | scopedSlots: { customRender: 'duration' }, |
| | | align: 'center' |
| | | } |
| | | ] |
| | | |
| | | export default { |
| | | // mixins: [JeecgListMixin], |
| | | name: 'alarmAnalysisMain', |
| | |
| | | dataSource: [], |
| | | /* tableå è½½ç¶æ */ |
| | | loading: false, |
| | | spinning: false, |
| | | typeTree: '', |
| | | typeParent: 1, |
| | | typeEquipment: 1, |
| | |
| | | tableHeads: [], |
| | | pieDate: [0], |
| | | XData: [0], |
| | | YData: [0] |
| | | YData: [0], |
| | | columns, |
| | | innerColumns, |
| | | hasRequsetAlarmCodeList: [] |
| | | } |
| | | }, |
| | | props: { nodeTree: '', Type: '', nodePeople: '' }, |
| | |
| | | }, |
| | | TableDraw(key, val) { |
| | | let that = this |
| | | that.spinning = true |
| | | that.queryParam.alarmCode = val.alarmCode |
| | | console.log(this.queryParam) |
| | | that.pieDate = [] |
| | | that.XData = [] |
| | | that.YData = [] |
| | | getAction(that.url.alarmTrend, that.queryParam).then(res => { |
| | | if (res.success) { |
| | | for (var i = 0; i < res.result.equipmentCountList.length; i++) { |
| | | that.pieDate.push({ |
| | | name: res.result.equipmentCountList[i].key, |
| | | value: res.result.equipmentCountList[i].count |
| | | getAction(that.url.alarmTrend, that.queryParam) |
| | | .then(res => { |
| | | if (res.success) { |
| | | that.pieDate = res.result.equipmentCountList.map(item => { |
| | | return { |
| | | name: item.key, |
| | | value: item.count |
| | | } |
| | | }) |
| | | that.XData = res.result.dateCountList.map(item => item.key) |
| | | that.YData = res.result.dateCountList.map(item => item.count) |
| | | |
| | | // this.tableHeads = res.result.dates |
| | | // this.dataList = res.result |
| | | // this.draw() |
| | | // this.checkSameData(this.dataList) |
| | | // this.checkSameData1(this.dataList) |
| | | // this.checkSameData2(this.dataList) |
| | | // this.combineCell(); |
| | | // this.initDeviceType(this.dataList) |
| | | that.drawWrin() |
| | | } |
| | | for (var j = 0; j < res.result.dateCountList.length; j++) { |
| | | that.XData.push(res.result.dateCountList[j].key) |
| | | that.YData.push(res.result.dateCountList[j].count) |
| | | } |
| | | // this.tableHeads = res.result.dates |
| | | // this.dataList = res.result |
| | | // this.draw() |
| | | // this.checkSameData(this.dataList) |
| | | // this.checkSameData1(this.dataList) |
| | | // this.checkSameData2(this.dataList) |
| | | // this.combineCell(); |
| | | // this.initDeviceType(this.dataList) |
| | | that.drawWrin() |
| | | } |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | that.spinning = false |
| | | }) |
| | | console.log(this.YData) |
| | | |
| | | }, |
| | |
| | | if (res.success) { |
| | | // this.tableHeads = res.result.dates |
| | | this.dataList = res.result |
| | | this.hasRequsetAlarmCodeList = [] |
| | | // this.draw() |
| | | // this.checkSameData(this.dataList) |
| | | // this.checkSameData1(this.dataList) |
| | |
| | | title: { |
| | | text: 'å设å¤åºç°æ¤æ¥è¦çæ¯ä¾', |
| | | x: 'center', |
| | | y: 'bottom' |
| | | y: 'bottom', |
| | | textStyle: { |
| | | color: '#4FAEDC' |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | |
| | | radius: '60%', |
| | | itemStyle: { |
| | | normal: { |
| | | /*color: function (params) { |
| | | var colorList = ['#4169E1', '#A8A8A8']; |
| | | return colorList[params.dataIndex] |
| | | },*/ |
| | | color: function(params) { |
| | | var colorList = ['#5AB1EF', '#2EC7C9', '#B6A2DE', '#FFB980', '#D87A80', '#8D98B3'] |
| | | return colorList[params.dataIndex] |
| | | }, |
| | | label: { |
| | | show: true, |
| | | position: 'top', |
| | | formatter: '{b}\n{c}' |
| | | // position: 'top', |
| | | formatter: '{b}\n{c}', |
| | | color: function(params) { |
| | | var colorList = ['#5AB1EF', '#2EC7C9', '#B6A2DE', '#FFB980', '#D87A80', '#8D98B3'] |
| | | return colorList[params.dataIndex] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | title: { |
| | | text: 'æ¯å¤©åºç°æ¤æ¥è¦çæ°éèµ°å¿', |
| | | x: 'center', |
| | | y: 'bottom' |
| | | y: 'bottom', |
| | | textStyle: { |
| | | color: '#4FAEDC' |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis' |
| | |
| | | data: this.XData |
| | | /*axisLabel :{ |
| | | interval:0 |
| | | }*/ |
| | | }*/, |
| | | axisLine: { |
| | | //x轴线çé¢è²ä»¥å宽度 |
| | | show: true, |
| | | lineStyle: { |
| | | width: 2, |
| | | color: '#4FAEDC' |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | type: 'value', |
| | | name: '次æ°' |
| | | name: '次æ°', |
| | | axisLine: { |
| | | //x轴线çé¢è²ä»¥å宽度 |
| | | show: true, |
| | | lineStyle: { |
| | | width: 2, |
| | | color: '#4FAEDC' |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | series: [ |
| | |
| | | data: [ |
| | | { type: 'max', name: 'æå¤§å¼' }, |
| | | { type: 'min', name: 'æå°å¼' } |
| | | ] |
| | | ], |
| | | label: { |
| | | color: '#fff' |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#2EC7C9' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | equipmentWarningLine.setOption(equipmentWarningLineOption, true) |
| | | }, |
| | | |
| | | /** |
| | | * æ ¼å¼åæ¶é´ |
| | | * @param seconds ç§æ° |
| | | * @returns '' æ ¼å¼ååæ¶é´å符串 |
| | | */ |
| | | getFormattedTime(seconds) { |
| | | var hours = Math.floor(seconds / 3600) |
| | | var minutes = Math.floor((seconds % 3600) / 60) |
| | | var secs = seconds % 60 |
| | | |
| | | if (hours === 0) { |
| | | if (minutes === 0) { |
| | | return secs === 0 ? 0 : `${secs}ç§` |
| | | } else { |
| | | if (secs === 0) { |
| | | return `${minutes}å` |
| | | } |
| | | return `${minutes}å ${secs}ç§` |
| | | } |
| | | } else { |
| | | if (minutes === 0 && secs === 0) { |
| | | return `${hours}å°æ¶` |
| | | } else if (minutes !== 0 && secs === 0) { |
| | | return `${hours}å°æ¶ ${minutes}å` |
| | | } |
| | | } |
| | | return `${hours}å°æ¶ ${minutes}å ${secs}ç§` |
| | | }, |
| | | |
| | | /** |
| | | * èªå®ä¹è¡¨æ ¼è¡è§¦å |
| | | * @param record å½åè¡ä¿¡æ¯ |
| | | * @param index å½åè¡ä¸æ |
| | | * @returns {{on: {click: on.click}}} è¿å对象 |
| | | */ |
| | | customRow(record, index) { |
| | | return { |
| | | on: { |
| | | click: (event) => { |
| | | // 妿ç¹å»ç䏿¯å±å¼å¾æ åºå忏²æå¾è¡¨ï¼ç¸ååç¸å½äºç¹å»å±å¼å¾æ |
| | | if (event.target.className !== 'ant-table-row-expand-icon-cell') { |
| | | this.TableDraw(index, record) |
| | | } else { |
| | | if (event.target.children && event.target.children.length > 0) event.target.children[0].click() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | handleExpandChange(expanded, record) { |
| | | console.log('expanded', expanded, 'record', record) |
| | | let _this = this |
| | | // å½å±å¼æ¶è¥è¯¥è¡æªè¢«å±å¼è¿æä¼è¯·æ±åå°æ°æ®ï¼å±å¼è¿çæ°æ®ä¼è¢«ç¼åæ ééå¤è¯·æ± |
| | | if (expanded && !this.hasRequsetAlarmCodeList.includes(record.alarmCode)) { |
| | | this.loading = true |
| | | setTimeout(() => { |
| | | _this.dataList.forEach(item => { |
| | | if (record.alarmCode === item.alarmCode) { |
| | | item.innerDataList = [ |
| | | { |
| | | equipmentId: '11234', |
| | | equipmentName: 'ç«ä½æºåº', |
| | | alarmTime: 20, |
| | | endTime: 20, |
| | | duration: 123 |
| | | }, |
| | | { |
| | | equipmentId: '4213', |
| | | equipmentName: 'å§å®¤æºåº', |
| | | alarmTime: 312, |
| | | endTime: 31, |
| | | duration: 421 |
| | | } |
| | | ] |
| | | } |
| | | }) |
| | | this.loading = false |
| | | }, 1000) |
| | | this.hasRequsetAlarmCodeList.push(record.alarmCode) |
| | | } |
| | | } |
| | | |
| | | // /** |
| | | // * èªå®ä¹å±å¼è¡¨æ ¼å¾æ |
| | | // * @param props 徿 屿§ |
| | | // * @returns {null} è¥ä¸»è¡¨æ°æ®ä¸æ æ°æ®å䏿¾ç¤ºå¾æ |
| | | // */ |
| | | // expandIcon(props){ |
| | | // console.log('props',props) |
| | | // if (props.record.innerDataList&&props.record.innerDataList.length>0){ |
| | | // if (props.expanded) { |
| | | // return <a style="margin-right:0px;color:#999" onClick={e=> { |
| | | // props.onExpand(props.record, e); |
| | | // }}><a-icon type="minus" /></a> |
| | | // } else{ |
| | | // return <a style="margin-right:0px;color:#999" onClick={e => { |
| | | // props.onExpand(props.record, e); |
| | | // }}><a-icon type="plus"/></a> |
| | | // } |
| | | // }else{ |
| | | // return null |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | |
| | | @media screen and (min-width: 1920px) { |
| | | #Efficiency { |
| | | height: 337px !important; |
| | | height: 258px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px) { |
| | | #Efficiency { |
| | | height: 337px !important; |
| | | height: 258px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px) { |
| | | #Efficiency { |
| | | height: 190px !important; |
| | | height: 160px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px) { |
| | | #Efficiency { |
| | | height: 90px !important; |
| | | height: 60px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | |
| | | .efficiency_list #DeviceList { |
| | | height: 90% !important; |
| | | } |
| | | |
| | | /deep/ .ant-table-body .ant-table-row td { |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | /deep/ .ant-spin-nested-loading { |
| | | height: 55%; |
| | | } |
| | | |
| | | /deep/ .ant-spin-container { |
| | | height: 100%; |
| | | } |
| | | |
| | | /deep/ .ant-table.ant-table-bordered { |
| | | height: 265px; |
| | | } |
| | | |
| | | /deep/ .ant-table-scroll>.ant-table-placeholder { |
| | | height: 210px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div :bordered="false" class="device_list"> |
| | | <div class="com_box"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <!--<a-col :md="5" :sm="5">--> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <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="5" :sm="5">--> |
| | | <!--<a-form-item label="åç§°">--> |
| | | <!--<a-input placeholder="è¾å
¥è®¾å¤åç§°æ¥è¯¢" :readOnly="readOnly" v-model="queryParam.tierName"></a-input>--> |
| | | <!--<a-input placeholder="è¾å
¥è®¾å¤åç§°æ¥è¯¢" :readOnly="readOnly" v-model="queryParam.tierName"></a-input>--> |
| | | <!--</a-form-item>--> |
| | | <!--</a-col>--> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="驱å¨ç±»å"> |
| | | <!--<j-dict-select-tag placeholder="è¯·éæ©é©±å¨ç±»å"--> |
| | | <!--:triggerChange="true" dictCode="mdc_driveType"--> |
| | | <!--v-model="queryParam.driveType" allow-clear/>--> |
| | | <a-auto-complete |
| | | v-model="queryParam.driveType" |
| | | :data-source="driveTypeList" |
| | | placeholder="驱å¨ç±»å" |
| | | :filter-option="filterOption" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="9" :sm="9" :xs="4"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD"/> |
| | | </a-form-item> |
| | | </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-row> |
| | | </a-form> |
| | | <!--</a-col>--> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="设å¤"> |
| | | <a-input-search :readOnly="true" v-model="queryParam.equipmentId" @search="deviceSearch" |
| | | placeholder='è¯·éæ©è®¾å¤'/> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="驱å¨ç±»å"> |
| | | <!--<j-dict-select-tag placeholder="è¯·éæ©é©±å¨ç±»å"--> |
| | | <!--:triggerChange="true" dictCode="mdc_driveType"--> |
| | | <!--v-model="queryParam.driveType" allow-clear/>--> |
| | | <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" :xs="6"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- tableåºå-begin --> |
| | | <div id="DeviceList"> |
| | | <a-tabs :activeKey="activeKey" @change="tabChange" tabPosition="top"> |
| | | <a-tab-pane key="1" tab="å¾å½¢"> |
| | | <comparative-analysis-bar ref="AnalysisBar" :dataList='AnalysisBarList'></comparative-analysis-bar> |
| | | </a-tab-pane> |
| | | <a-tab-pane key="2" tab="仪表" forceRender> |
| | | <comparative-analysis-gauge ref="AnalysisGauge" :dataList="AnalysisGauge"></comparative-analysis-gauge> |
| | | </a-tab-pane> |
| | | <a-tab-pane key="3" tab="饼å¾" forceRender> |
| | | <conparative-analysis-pie ref="AnalysisPie" :dataList="AnalysisPie"></conparative-analysis-pie> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | </div> |
| | | <!-- tableåºå-begin --> |
| | | <div id="DeviceList"> |
| | | <a-tabs :activeKey="activeKey" @change="tabChange" tabPosition="top"> |
| | | <a-tab-pane key="1" tab="å¾å½¢"> |
| | | <comparative-analysis-bar ref="AnalysisBar" :dataList='AnalysisBarList'></comparative-analysis-bar> |
| | | </a-tab-pane> |
| | | <a-tab-pane key="2" tab="仪表" forceRender> |
| | | <comparative-analysis-gauge ref="AnalysisGauge" :dataList="AnalysisGauge"></comparative-analysis-gauge> |
| | | </a-tab-pane> |
| | | <a-tab-pane key="3" tab="饼å¾" forceRender> |
| | | <conparative-analysis-pie ref="AnalysisPie" :dataList="AnalysisPie"></conparative-analysis-pie> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | </div> |
| | | |
| | | <selectDeviceModal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"></selectDeviceModal> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | getAction |
| | | } from '@/api/manage' |
| | | import comparativeAnalysisBar from './comparativeAnalysisBar' |
| | | import comparativeAnalysisGauge from'./comparativeAnalysisGauge' |
| | | import comparativeAnalysisGauge from './comparativeAnalysisGauge' |
| | | import conparativeAnalysisPie from './conparativeAnalysisPie' |
| | | import '@/components/table2excel/table2excel' |
| | | import JInput from '@/components/jeecg/JInput' |
| | |
| | | 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' |
| | | |
| | | export default { |
| | | name: 'comparativeAnalysismain', |
| | | // mixins: [JeecgListMixin], |
| | |
| | | JDictSelectTag, |
| | | JInput, |
| | | JDate, |
| | | JEllipsis |
| | | JEllipsis, |
| | | selectDeviceModal |
| | | }, |
| | | props: { nodeTree: '', Type:'',nodePeople: '' }, |
| | | props: { nodeTree: '', Type: '', nodePeople: '' }, |
| | | data() { |
| | | return { |
| | | activeKey: '1', |
| | | typeTree:"", |
| | | typeParent:1, |
| | | typeEquipment:1, |
| | | AnalysisBarList:[], |
| | | AnalysisGauge:[], |
| | | AnalysisPie:[], |
| | | typeTree: '', |
| | | typeParent: 1, |
| | | typeEquipment: 1, |
| | | AnalysisBarList: [], |
| | | AnalysisGauge: [], |
| | | AnalysisPie: [], |
| | | dates: [], |
| | | xianshi:"", |
| | | readOnly:true, |
| | | queryParam: {}, |
| | | queryParams:{}, |
| | | queryParamEquip:{}, |
| | | queryParamPeople:{}, |
| | | dataStartsoucre:[], |
| | | url: { |
| | | comparativeAnalysis:'/mdc/efficiencyReport/comparativeAnalysis' |
| | | xianshi: '', |
| | | readOnly: true, |
| | | queryParam: { |
| | | equipmentId: '' |
| | | }, |
| | | AnalysisList:{}, |
| | | driveTypeList:[] |
| | | queryParams: {}, |
| | | queryParamEquip: {}, |
| | | queryParamPeople: {}, |
| | | dataStartsoucre: [], |
| | | url: { |
| | | comparativeAnalysis: '/mdc/efficiencyReport/comparativeAnalysis' |
| | | }, |
| | | AnalysisList: {}, |
| | | driveTypeList: [] |
| | | } |
| | | }, |
| | | watch:{ |
| | | Type(valmath){ |
| | | this.dataList = []; |
| | | watch: { |
| | | Type(valmath) { |
| | | this.dataList = [] |
| | | this.queryParams.typeTree = valmath |
| | | // console.log(this.queryParams.typeTree) |
| | | }, |
| | |
| | | if (JSON.stringify(val) != '{}') { |
| | | if (val.equipmentId) { |
| | | // this.$set(this.queryParam, 'tierName', val.title) |
| | | this.queryParamEquip.parentId = "" |
| | | this.queryParams.equipmentId = val.equipmentId |
| | | this.queryParamEquip.parentId = '' |
| | | // this.queryParams.equipmentId = val.equipmentId |
| | | this.queryParam.equipmentId = val.equipmentId |
| | | this.queryParamEquip.equipmentId = val.equipmentId |
| | | } else { |
| | | // this.$set(this.queryParam, 'tierName', val.title) |
| | |
| | | this.queryParams.equipmentId = '' |
| | | } |
| | | this.searchQuery() |
| | | |
| | | } |
| | | }, |
| | | nodePeople(val){ |
| | | nodePeople(val) { |
| | | if (JSON.stringify(val) != '{}') { |
| | | if (val.equipmentId) { |
| | | // this.$set(this.queryParam, 'tierName', val.title) |
| | | this.queryParamEquip.parentId = "" |
| | | this.queryParamEquip.parentId = '' |
| | | this.queryParams.equipmentId = val.equipmentId |
| | | this.queryParamEquip.equipmentId = val.equipmentId |
| | | } else { |
| | |
| | | // console.log(v1,v2) |
| | | this.queryParam.startTime = v2[0] |
| | | this.queryParam.endTime = v2[1] |
| | | console.log(v2[0],v2[1]) |
| | | console.log(v2[0], v2[1]) |
| | | }, |
| | | loadAnalysis(){ |
| | | getAction(this.url.comparativeAnalysis,this.queryParam).then(res => { |
| | | loadAnalysis() { |
| | | getAction(this.url.comparativeAnalysis, this.queryParam).then(res => { |
| | | if (res.success) { |
| | | this.AnalysisList = res.result |
| | | this.AnalysisBarList = res.result.graphics |
| | |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | searchQuery(){ |
| | | if(this.dates&&this.dates.length>0){ |
| | | searchQuery() { |
| | | if (this.dates && this.dates.length > 0) { |
| | | this.AnalysisList = [] |
| | | this.AnalysisBarList = [] |
| | | this.AnalysisGauge = [] |
| | | this.AnalysisPie = [] |
| | | if(this.queryParams.typeTree == "1"){ |
| | | this.queryParams.parentId = this.queryParamEquip.parentId |
| | | if (this.queryParams.typeTree == '1') { |
| | | this.queryParams.parentId = this.queryParamEquip.parentId |
| | | // this.queryParams.equipmentId = this.queryParamEquip.equipmentId |
| | | }else{ |
| | | } else { |
| | | this.queryParams.parentId = this.queryParamEquip.parentId |
| | | // this.queryParams.equipmentId = "" |
| | | } |
| | | this.AnalysisList = [] |
| | | //è·åæ¥è¯¢æ¡ä»¶ |
| | | this.queryParam.parentId = this.queryParams.parentId; |
| | | this.queryParam.equipmentId = this.queryParams.equipmentId; |
| | | this.queryParam.parentId = this.queryParams.parentId |
| | | // this.queryParam.equipmentId = this.queryParams.equipmentId |
| | | this.queryParam.typeTree = this.queryParams.typeTree |
| | | getAction(this.url.comparativeAnalysis,this.queryParam).then((res) => { |
| | | if(res.success){ |
| | | getAction(this.url.comparativeAnalysis, this.queryParam).then((res) => { |
| | | if (res.success) { |
| | | this.AnalysisList = res.result |
| | | this.AnalysisBarList = res.result.graphics |
| | | this.AnalysisGauge = res.result.meters |
| | | this.AnalysisPie.push(res.result.pieCharts) |
| | | }else{ |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }else{ |
| | | } else { |
| | | this.$notification.warning({ |
| | | message:'æç¤º' , |
| | | description:'è¯·éæ©æ¶é´' |
| | | message: 'æç¤º', |
| | | description: 'è¯·éæ©æ¶é´' |
| | | }) |
| | | } |
| | | |
| | |
| | | this.AnalysisBarList = [] |
| | | this.AnalysisGauge = [] |
| | | this.AnalysisPie = [] |
| | | if(this.queryParams.typeTree == "1"){ |
| | | if (this.queryParams.typeTree == '1') { |
| | | this.typeTree = this.queryParams.typeTree |
| | | this.typeParent = this.queryParams.parentId |
| | | this.typeParent = this.queryParams.parentId |
| | | this.typeEquipment = this.queryParams.equipmentId |
| | | this.queryParams = {} |
| | | this.queryParam = {} |
| | | this.dates = [] |
| | | this.queryParams.typeTree = this.typeTree |
| | | this.queryParams.parentId = this.typeParent |
| | | if(this.queryParams.parentId != ""){ |
| | | this.queryParams.equipmentId = "" |
| | | }else{ |
| | | if(this.queryParams.equipmentId == this.queryParamEquip.equipmentId){ |
| | | this.queryParams.equipmentId = this.typeEquipment |
| | | }else{ |
| | | if (this.queryParams.parentId != '') { |
| | | this.queryParams.equipmentId = '' |
| | | } else { |
| | | if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) { |
| | | this.queryParams.equipmentId = this.typeEquipment |
| | | } else { |
| | | this.queryParams.equipmentId = this.queryParamEquip.equipmentId |
| | | } |
| | | } |
| | | getAction(this.url.comparativeAnalysis,this.queryParams).then((res) => { |
| | | if(res.success){ |
| | | getAction(this.url.comparativeAnalysis, this.queryParams).then((res) => { |
| | | if (res.success) { |
| | | this.AnalysisList = res.result |
| | | this.AnalysisBarList = res.result.graphics |
| | | this.AnalysisGauge = res.result.meters |
| | | this.AnalysisPie.push(res.result.pieCharts) |
| | | }else{ |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }else{ |
| | | } else { |
| | | this.typeTree = this.queryParams.typeTree |
| | | this.typeParent = this.queryParams.parentId |
| | | this.typeParent = this.queryParams.parentId |
| | | this.typeEquipment = this.queryParams.equipmentId |
| | | this.queryParams = {} |
| | | this.queryParam = {} |
| | | this.dates = [] |
| | | this.queryParams.typeTree = this.typeTree |
| | | this.queryParams.parentId = this.typeParent |
| | | if(this.queryParams.parentId != ""){ |
| | | this.queryParams.equipmentId = "" |
| | | }else{ |
| | | if(this.queryParams.equipmentId == this.queryParamEquip.equipmentId){ |
| | | this.queryParams.equipmentId = this.typeEquipment |
| | | }else{ |
| | | if (this.queryParams.parentId != '') { |
| | | this.queryParams.equipmentId = '' |
| | | } else { |
| | | if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) { |
| | | this.queryParams.equipmentId = this.typeEquipment |
| | | } else { |
| | | this.queryParams.equipmentId = this.queryParamEquip.equipmentId |
| | | } |
| | | } |
| | | getAction(this.url.comparativeAnalysis,this.queryParams).then((res) => { |
| | | if(res.success){ |
| | | getAction(this.url.comparativeAnalysis, this.queryParams).then((res) => { |
| | | if (res.success) { |
| | | this.AnalysisList = res.result |
| | | this.AnalysisBarList = res.result.graphics |
| | | this.AnalysisGauge = res.result.meters |
| | | this.AnalysisPie.push(res.result.pieCharts) |
| | | }else{ |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | /** |
| | | * è°ç¨æ¥å£è·åæ§å¶ç³»ç»ç±»å |
| | | */ |
| | | getDriveTypeByApi(){ |
| | | api.getDriveTypeApi().then((res)=>{ |
| | | this.driveTypeList=res.result.map(item=>item.value) |
| | | getDriveTypeByApi() { |
| | | api.getDriveTypeApi().then((res) => { |
| | | this.driveTypeList = res.result.map(item => item.value) |
| | | }) |
| | | }, |
| | | /** |
| | |
| | | filterOption(input, option) { |
| | | return ( |
| | | option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0 |
| | | ); |
| | | ) |
| | | }, |
| | | // onChange(value, dateString) { |
| | | // // console.log('Selected Time: ', value); |
| | |
| | | // this.loading = false |
| | | // }) |
| | | // }, |
| | | deviceSearch() { |
| | | console.log('触å') |
| | | this.$refs.selectDeviceModal.visible = true |
| | | this.$refs.selectDeviceModal.selectedRowKeys = [] |
| | | this.$refs.selectDeviceModal.selectedRows = [] |
| | | this.$refs.selectDeviceModal.checkedKeys = this.queryParam.equipmentId.split(',') |
| | | }, |
| | | |
| | | /** |
| | | * 鿩已æè®¾å¤åç¹å»ç¡®å®æ¶è§¦å |
| | | * @param data 已鿩çè®¾å¤ |
| | | */ |
| | | selectOK(data) { |
| | | // let params = {} |
| | | // params.equipmentIdList = [] |
| | | // for (var a = 0; a < data.length; a++) { |
| | | // params.equipmentIdList.push(data[a]) |
| | | // } |
| | | console.log('data=', data) |
| | | this.queryParam.equipmentId = data.join(',') |
| | | console.log('queryParam', this.queryParam.equipmentId) |
| | | } |
| | | }, |
| | | created() { |
| | | this.dates = [moment().subtract('days', 7), moment().subtract('days', 0)] |
| | | this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.queryParam.typeTree = "1"; |
| | | this.loadAnalysis(); |
| | | this.queryParam.typeTree = '1' |
| | | this.loadAnalysis() |
| | | this.getDriveTypeByApi() |
| | | } |
| | | } |
| | |
| | | <style lang="less" scoped> |
| | | /*@import '~@assets/less/common.less';*/ |
| | | |
| | | @media screen and (min-width: 1920px){ |
| | | .device_list{ |
| | | height: 811px!important; |
| | | @media screen and (min-width: 1920px) { |
| | | .device_list { |
| | | height: 811px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px){ |
| | | .device_list{ |
| | | height: 811px!important; |
| | | |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px) { |
| | | .device_list { |
| | | height: 811px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px){ |
| | | .device_list{ |
| | | height: 663px!important; |
| | | |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px) { |
| | | .device_list { |
| | | height: 663px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px){ |
| | | .device_list{ |
| | | height: 564px!important; |
| | | |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px) { |
| | | .device_list { |
| | | height: 564px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | @media screen and (max-width: 1280px){ |
| | | .device_list{ |
| | | height: 564px!important; |
| | | |
| | | @media screen and (max-width: 1280px) { |
| | | .device_list { |
| | | height: 564px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | /*.device_list{*/ |
| | | /*display: flex;*/ |
| | | /*display: flex;*/ |
| | | /*}*/ |
| | | /*.device_list .table-page-search-wrapper{*/ |
| | | /**/ |
| | | /**/ |
| | | /*}*/ |
| | | /deep/ .ant-card-body{ |
| | | height: 100%!important; |
| | | /deep/ .ant-card-body { |
| | | height: 100% !important; |
| | | } |
| | | .device_list .com_box{ |
| | | display: flex!important; |
| | | height: 100%!important; |
| | | flex-direction: column!important; |
| | | |
| | | .device_list .com_box { |
| | | display: flex !important; |
| | | height: 100% !important; |
| | | flex-direction: column !important; |
| | | } |
| | | .device_list .table-page-search-wrapper{ |
| | | height: 6%!important; |
| | | |
| | | .device_list .table-page-search-wrapper { |
| | | height: 6% !important; |
| | | } |
| | | .device_list #DeviceList{ |
| | | height: 90%!important; |
| | | |
| | | .device_list #DeviceList { |
| | | height: 90% !important; |
| | | } |
| | | </style> |
| | |
| | | <a-descriptions-item label="设å¤åç§°">{{resultData.equipmentName}}</a-descriptions-item> |
| | | <a-descriptions-item label="IPå°å">{{resultData.equipmentIP}}</a-descriptions-item> |
| | | <a-descriptions-item label="端å£å·">{{resultData.dataPort}}</a-descriptions-item> |
| | | <a-descriptions-item label="ç³»ç»çæ¬å·">{{resultData.SystemVersion}}</a-descriptions-item> |
| | | <a-descriptions-item label="ç³»ç»çæ¬å·">{{resultData.systemVersion}}</a-descriptions-item> |
| | | <a-descriptions-item label="驱å¨ç±»å">{{resultData.driveType}}</a-descriptions-item> |
| | | <a-descriptions-item label="ç³»ç»åå·">{{resultData.SystemType}}</a-descriptions-item> |
| | | <a-descriptions-item label="ç³»ç»åå·">{{resultData.systemType}}</a-descriptions-item> |
| | | <a-descriptions-item label="设å¤ç±»å">{{resultData.deviceType}}</a-descriptions-item> |
| | | <a-descriptions-item label="设å¤åç">{{resultData.devicePower}}</a-descriptions-item> |
| | | <a-descriptions-item label="ææè½´æ°">{{resultData.ValidAxis}}</a-descriptions-item> |
| | | <a-descriptions-item label="æå¤§è½´æ°">{{resultData.MaxAxis}}</a-descriptions-item> |
| | | <a-descriptions-item label="ææè½´æ°">{{resultData.validAxis}}</a-descriptions-item> |
| | | <a-descriptions-item label="æå¤§è½´æ°">{{resultData.maxAxis}}</a-descriptions-item> |
| | | <a-descriptions-item label="夿³¨">{{resultData.remark}}</a-descriptions-item> |
| | | |
| | | </a-descriptions> |
| | | |
| | | <!-- <a-descriptions |
| | |
| | | v-show="mdcDriveTypeParamConfigList != null" |
| | | v-if="driverType != 'PLC'" |
| | | :column="4" |
| | | class="operationData" |
| | | > |
| | | |
| | | <a-descriptions-item |
| | | v-for="(item,id) in mdcDriveTypeParamConfigList " |
| | | :key="item.id" |
| | | :label="item.chineseName" |
| | | >{{item.value}}</a-descriptions-item> |
| | | > |
| | | <a-popover v-if="item.value&&item.value.length>18"> |
| | | <template slot="content"> |
| | | {{item.value}} |
| | | </template> |
| | | {{item.value}} |
| | | </a-popover> |
| | | |
| | | <template v-else> |
| | | {{item.value}} |
| | | </template> |
| | | </a-descriptions-item> |
| | | |
| | | </a-descriptions> |
| | | |
| | |
| | | <!-->{{item.value}}</a-descriptions-item>--> |
| | | <!--</a-descriptions>--> |
| | | |
| | | <a-descriptions |
| | | title="çæ¬ä¿¡æ¯ for lsv2" |
| | | v-if="driverType == 'LSV2'" |
| | | :column="4" |
| | | > |
| | | <a-descriptions-item label="NCçæ¬">{{resultData.nCVersion}}</a-descriptions-item> |
| | | <a-descriptions-item label="TNCçæ¬">{{resultData.tNCVersion}}</a-descriptions-item> |
| | | <a-descriptions-item label="OPTçæ¬">{{resultData.oPTVersion}}</a-descriptions-item> |
| | | <a-descriptions-item label="PLCçæ¬">{{resultData.pLCVersion}}</a-descriptions-item> |
| | | </a-descriptions> |
| | | <!--<a-descriptions--> |
| | | <!--title="çæ¬ä¿¡æ¯ for lsv2"--> |
| | | <!--v-if="driverType == 'LSV2'"--> |
| | | <!--:column="4"--> |
| | | <!--class="lsv2Data"--> |
| | | <!-->--> |
| | | <!--<a-descriptions-item label="NCçæ¬">{{resultData.ncversion}}</a-descriptions-item>--> |
| | | <!--<a-descriptions-item label="TNCçæ¬">{{resultData.tncversion}}</a-descriptions-item>--> |
| | | <!--<a-descriptions-item label="OPTçæ¬">{{resultData.optversion}}</a-descriptions-item>--> |
| | | <!--<a-descriptions-item label="PLCçæ¬">{{resultData.plcversion}}</a-descriptions-item>--> |
| | | <!--</a-descriptions>--> |
| | | |
| | | </td> |
| | | </tr> |
| | |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | |
| | | mdcDriveTypeParamConfigList: [], |
| | | xyzAliasesList: [], |
| | | title: '', |
| | |
| | | show: false, |
| | | }, |
| | | axisTick: { |
| | | show: true, |
| | | show: false, |
| | | length: 20, |
| | | splitNumber: 1, |
| | | lineStyle: { |
| | |
| | | pointer: { |
| | | show: true, |
| | | width: 3, |
| | | itemStyle:{ |
| | | color:'#fff', |
| | | } |
| | | }, |
| | | data: [{ |
| | | name: '', |
| | |
| | | show: false, |
| | | }, |
| | | axisTick: { |
| | | show: true, |
| | | show: false, |
| | | length: 20, |
| | | splitNumber: 1, |
| | | lineStyle: { |
| | |
| | | pointer: { |
| | | show: true, |
| | | width: 3, |
| | | itemStyle:{ |
| | | color:'#fff' |
| | | } |
| | | }, |
| | | data: [{ |
| | | name: '', |
| | |
| | | type: 'gauge', |
| | | radius: '80%', |
| | | min: 0, //æå°å»åº¦ |
| | | max: 300, //æå¤§å»åº¦ |
| | | max: 100, //æå¤§å»åº¦ |
| | | splitNumber: 10, //å»åº¦æ°é |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | |
| | | show: false, |
| | | }, |
| | | axisTick: { |
| | | show: true, |
| | | show: false, |
| | | length: 20, |
| | | splitNumber: 1, |
| | | lineStyle: { |
| | |
| | | radius: '52.5%', |
| | | z: 3, |
| | | startAngle: 225, |
| | | max: 300, |
| | | max: 100, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [_this.spindleload / 300, '#31F3FF'], // 卿 |
| | | [_this.spindleload / 100, '#31F3FF'], // 卿 |
| | | [1, '#185363'] |
| | | ], |
| | | width: 4 |
| | |
| | | pointer: { |
| | | show: true, |
| | | width: 3, |
| | | itemStyle:{ |
| | | color:'#fff' |
| | | } |
| | | }, |
| | | data: [{ |
| | | name: '', |
| | |
| | | show: false, |
| | | }, |
| | | axisTick: { |
| | | show: true, |
| | | show: false, |
| | | length: 20, |
| | | splitNumber: 1, |
| | | lineStyle: { |
| | |
| | | pointer: { |
| | | show: true, |
| | | width: 3, |
| | | itemStyle:{ |
| | | color:'#fff' |
| | | } |
| | | }, |
| | | data: [{ |
| | | name: '', |
| | |
| | | /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ |
| | | /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ |
| | | background-color: #312c2c; |
| | | opacity: 0.7; |
| | | opacity: 0.9; |
| | | } |
| | | /deep/ .ant-modal-close { |
| | | color: #1191b0; |
| | |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions-item-label{ |
| | | width: 6.7vw; |
| | | text-align: right; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | /deep/ .operationData .ant-descriptions-item-content |
| | | { |
| | | width: 130px; |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | </style> |
| | |
| | | <a-col :span="24"> |
| | | <a-form-item label="设å¤ç»" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-input-search :readOnly="true" v-decorator="['equipmentId', validatorRules.equipmentId]" |
| | | @search="deviceSearch" enter-button/> |
| | | @search="deviceSearch" enter-button placeholder="è¯·éæ©è®¾å¤"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </a-form> |
| | | </a-spin> |
| | | <device-calend-list-model ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></device-calend-list-model> |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | </a-modal> |
| | | </div> |
| | | </template> |
| | |
| | | } from '@/api/api' |
| | | |
| | | import Calendar from 'vue-calendar-component'; |
| | | import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal' |
| | | |
| | | export default { |
| | | name: 'ShiftInfoModel', |
| | | components: {DeviceCalendListModel,Calendar}, |
| | | components: { SelectDeviceModal, DeviceCalendListModel,Calendar}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | |
| | | this.value = value; |
| | | }, |
| | | deviceSearch() { |
| | | this.$refs.deviceRepairListModel.openPage() |
| | | this.$refs.deviceRepairListModel.title = 'éæ©è®¾å¤' |
| | | this.$refs.deviceRepairListModel.disableSubmit = false |
| | | 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(',') : [] |
| | | }, |
| | | getDeviceRows(val) { |
| | | console.log("========",val); |
| | |
| | | this.close() |
| | | }, |
| | | |
| | | /** |
| | | * 鿩已æè®¾å¤åç¹å»ç¡®å®æ¶è§¦å |
| | | * @param data 已鿩çè®¾å¤ |
| | | */ |
| | | selectOK(data) { |
| | | // let params = {} |
| | | // params.equipmentIdList = [] |
| | | // for (var a = 0; a < data.length; a++) { |
| | | // params.equipmentIdList.push(data[a]) |
| | | // } |
| | | console.log('data=', data) |
| | | this.form.setFieldsValue({ |
| | | equipmentId: data.join(',') |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <!--</a-form-item>--> |
| | | <a-form-item label="设å¤ç»" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]" |
| | | @search="deviceSearch" enter-button/> |
| | | @search="deviceSearch" enter-button placeholder="è¯·éæ©è®¾å¤"/> |
| | | <!--<a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="请è¾å
¥è®¾å¤ç¼å·"--> |
| | | <!--v-decorator="['equipmentId',validatorRules.equipmentId]"/>--> |
| | | </a-form-item> |
| | |
| | | <!--</a-row>--> |
| | | </a-form> |
| | | </a-spin> |
| | | <device-repair-list-model ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows" |
| | | :selectedEquipmentIds="selectedEquipmentIds" |
| | | ></device-repair-list-model> |
| | | |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import moment from 'moment' |
| | | import pick from 'lodash.pick' |
| | | import DeviceRepairListModel from './DeviceRepairListModel' |
| | | import JDate from './JDate' |
| | | import { |
| | | getAction, |
| | |
| | | import { |
| | | duplicateCheck |
| | | } from '@/api/api' |
| | | import AFormItem from 'ant-design-vue/es/form/FormItem' |
| | | import Vue from 'vue' |
| | | import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal' |
| | | |
| | | export default { |
| | | name: 'DeviceRepairModel', |
| | | components: { AFormItem, DeviceRepairListModel, JDate }, |
| | | components: { SelectDeviceModal, JDate }, |
| | | props: { |
| | | equipmentId: { |
| | | type: String |
| | |
| | | // }) |
| | | }, |
| | | deviceSearch() { |
| | | this.$refs.deviceRepairListModel.openPage() |
| | | this.$refs.deviceRepairListModel.title = 'éæ©è®¾å¤' |
| | | this.$refs.deviceRepairListModel.disableSubmit = false |
| | | 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(',') : [] |
| | | }, |
| | | //çº§èæ¡onChangeäºä»¶ |
| | | // onChange(value) { |
| | |
| | | return { |
| | | disabledSeconds: () => this.range(1, 60) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 鿩已æè®¾å¤åç¹å»ç¡®å®æ¶è§¦å |
| | | * @param data 已鿩çè®¾å¤ |
| | | */ |
| | | selectOK(data) { |
| | | // let params = {} |
| | | // params.equipmentIdList = [] |
| | | // for (var a = 0; a < data.length; a++) { |
| | | // params.equipmentIdList.push(data[a]) |
| | | // } |
| | | console.log('data=', data) |
| | | this.form.setFieldsValue({ |
| | | equipmentIds: data.join(',') |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | <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-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-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :lg="2" :md="3" :sm="3" :xs="3"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | </a-col> |
| | | <a-col :lg="2" :md="3" :sm="3" :xs="3"> |
| | | <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 :md="14" :sm="14"> |
| | | <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"> |
| | |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | <div class="container" id="EfficiencyPO" style="margin-top: 20px;"> |
| | | <div class="table2"> |
| | | <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap"> |
| | | <thead> |
| | | <tr class="thead fixed equipname"> |
| | | <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> |
| | | <th class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> |
| | | <th class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> |
| | | <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤ç¼å·</th> |
| | | <th class="thgu dong5 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">设å¤åç§°</th> |
| | | <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤ç±»å</th> |
| | | <!--<th rowspan="2">ç»å«</th>--> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | | <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th> |
| | | </template> |
| | | </tr> |
| | | <tr class="thead notfixed gudingth"> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | | <th>å¼å¨ç(%)</th> |
| | | <th v-if="checkedList.indexOf('kjl') > -1">弿ºç(%)</th> |
| | | <th v-if="checkedList.indexOf('kjsj') > -1">弿ºæ¶é´(s)</th> |
| | | <th v-if="checkedList.indexOf('jgsj') > -1">å å·¥æ¶é´(s)</th> |
| | | <th v-if="checkedList.indexOf('djsj') > -1">å¾
æºæ¶é´(s)</th> |
| | | <th v-if="checkedList.indexOf('gjsj') > -1">å
³æºæ¶é´(s)</th> |
| | | </template> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr class="mathData" v-for="(item, index) in dataList"> |
| | | <td class="tdgu kaitou wenzi" :rowspan="item.level1span" :class="{hidden: item.level1dis,noExl:item.level1dis}" v-show="!item.level1dis">{{item.level1}}</td> |
| | | <td class="tdgu1 kaitou wenzi" :rowspan="item.level2span" :class="{hidden: item.level2dis,noExl:item.level2dis}" v-show="!item.level2dis">{{item.level2}}</td> |
| | | <td class="tdgu2 kaitou wenzi" :rowspan="item.level3span" :class="{hidden: item.level3dis,noExl:item.level3dis}" v-show="!item.level3dis">{{item.level3}}</td> |
| | | <td class="tdgu3 kaitou">{{item.equipmentId}}</td> |
| | | <td class="tdgu4 kaitou">{{item.equipmentName}}</td> |
| | | <td class="tdgu5 kaitou">{{item.equipmentType}}</td> |
| | | <!--<td>{{item.tierType}}</td>--> |
| | | <template v-for="(tableHead, index) in item.dataList"> |
| | | <td :style="{background:tableHead.color }">{{tableHead.startRate | numFilter}}</td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjl') > -1"> |
| | | {{tableHead.openRate | numFilter}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1"> |
| | | {{tableHead.openLong}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1"> |
| | | {{tableHead.processLong}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1"> |
| | | {{tableHead.waitLong}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1"> |
| | | {{tableHead.closeLong}} |
| | | </td> |
| | | </template> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | <a-spin :spinning="spinning"> |
| | | <div class="container" id="EfficiencyPO" style="margin-top: 20px;" > |
| | | <div class="table2"> |
| | | <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap" v-if="dataList.length>0"> |
| | | <thead> |
| | | <tr class="thead fixed equipname"> |
| | | <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">å
¬å¸</th> |
| | | <th class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">车é´</th> |
| | | <th class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">工段</th> |
| | | <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤ç¼å·</th> |
| | | <th class="thgu dong5 name" rowspan="2" style="min-width: 162px; max-width: 162px;width: 162px;">设å¤åç§°</th> |
| | | <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤ç±»å</th> |
| | | <!--<th rowspan="2">ç»å«</th>--> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | | <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th> |
| | | </template> |
| | | </tr> |
| | | <tr class="thead notfixed gudingth"> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | | <th>å¼å¨ç(%)</th> |
| | | <th v-if="checkedList.indexOf('kjl') > -1">弿ºç(%)</th> |
| | | <th v-if="checkedList.indexOf('kjsj') > -1">弿ºæ¶é´(å°æ¶)</th> |
| | | <th v-if="checkedList.indexOf('jgsj') > -1">å å·¥æ¶é´(å°æ¶)</th> |
| | | <th v-if="checkedList.indexOf('djsj') > -1">å¾
æºæ¶é´(å°æ¶)</th> |
| | | <th v-if="checkedList.indexOf('gjsj') > -1">å
³æºæ¶é´(å°æ¶)</th> |
| | | </template> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr class="mathData" v-for="(item, index) in dataList"> |
| | | <template v-if="item.level1!=='å计'&&item.level1!=='å¹³åå¼'"> |
| | | <td class="tdgu kaitou wenzi" :rowspan="item.level1span" :class="{hidden: item.level1dis,noExl:item.level1dis}" v-show="!item.level1dis">{{item.level1}}</td> |
| | | <td class="tdgu1 kaitou wenzi" :rowspan="item.level2span" :class="{hidden: item.level2dis,noExl:item.level2dis}" v-show="!item.level2dis">{{item.level2}}</td> |
| | | <td class="tdgu2 kaitou wenzi" :rowspan="item.level3span" :class="{hidden: item.level3dis,noExl:item.level3dis}" v-show="!item.level3dis">{{item.level3}}</td> |
| | | <td class="tdgu3 kaitou">{{item.equipmentId}}</td> |
| | | <td style="min-width: 162px; max-width: 162px;width: 162px;" class="tdgu4 kaitou">{{item.equipmentName}}</td> |
| | | <td class="tdgu5 kaitou">{{item.equipmentType}}</td> |
| | | </template> |
| | | |
| | | <template v-else> |
| | | <td colspan="6" class="tdgu kaitou">{{item.level1}}</td> |
| | | </template> |
| | | <!--<td>{{item.tierType}}</td>--> |
| | | <template v-for="(tableHead, index) in item.dataList"> |
| | | <td :style="{background:tableHead.color }">{{tableHead.startRate | numFilter}}</td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjl') > -1"> |
| | | {{tableHead.openRate | numFilter}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1"> |
| | | {{tableHead.openLong | getFormattedTime}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1"> |
| | | {{tableHead.processLong | getFormattedTime}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1"> |
| | | {{tableHead.waitLong | getFormattedTime}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1"> |
| | | {{tableHead.closeLong | getFormattedTime}} |
| | | </td> |
| | | </template> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </a-spin> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | typeParent:1, |
| | | typeEquipment:1, |
| | | dates: [], |
| | | selectList:[], |
| | | queryParam: {}, |
| | | queryParamEquip:{}, |
| | | queryParamPeople:{}, |
| | |
| | | dataList: [], |
| | | url: { |
| | | list: '/mdc/efficiencyReport/efficiencyPOList', |
| | | listByType: '/mdc/MdcUtilizationRate/getByType' |
| | | listByType: '/mdc/MdcUtilizationRate/getByType', |
| | | queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType' |
| | | }, |
| | | tableHeads: [] |
| | | tableHeads: [], |
| | | spinning:false |
| | | } |
| | | }, |
| | | props: { nodeTree: '', Type:'',nodePeople: ''}, |
| | |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.queryParam.typeTree = "1" |
| | | this.loadData() |
| | | this.queryGroup() |
| | | }, |
| | | watch: { |
| | | Type(valmath){ |
| | |
| | | } else { |
| | | return '0' |
| | | } |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * æ ¼å¼åæ¶é´ |
| | | * @param seconds ç§æ° |
| | | * @returns '' æ ¼å¼ååæ¶é´å符串 |
| | | */ |
| | | getFormattedTime(seconds) { |
| | | if (seconds) { |
| | | return parseFloat((seconds / 3600).toFixed(2)) + 'å°æ¶' |
| | | } else { |
| | | return '0' |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | checkSameData(dataList){ |
| | |
| | | // this.onClearSelected() |
| | | }, |
| | | loadData() { |
| | | this.spinning=true |
| | | this.tableHeads = [] |
| | | this.dataList = [] |
| | | getAction(this.url.list, this.queryParam).then(res => { |
| | |
| | | this.combineCell(); |
| | | // this.initDeviceType(this.dataList) |
| | | } |
| | | }).finally(()=>{ |
| | | this.spinning=false |
| | | }) |
| | | }, |
| | | 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 |
| | | }) |
| | | } |
| | | } |
| | |
| | | } |
| | | .table tbody tr .tdgu5{ |
| | | position: sticky; |
| | | left: 400px; |
| | | left: 412px; |
| | | z-index: 2; |
| | | } |
| | | |
| | |
| | | } |
| | | .table2 thead .equipname .dong6{ |
| | | z-index: 5; |
| | | left: 400px; |
| | | left: 412px; |
| | | } |
| | | |
| | | |
| | |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates"/> |
| | | <a-col :md="4" :sm="4"> |
| | | <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 :lg="2" :md="3" :sm="3" :xs="3"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" |
| | | v-model="dates"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :lg="2" :md="3" :sm="3" :xs="3"> |
| | | <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 :md="14" :sm="14"> |
| | | <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"> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="Efficiency" class="container" style="margin-top: 20px;"> |
| | | <div class="table2"> |
| | | <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap"> |
| | | <thead> |
| | | <tr class="thead fixed equipname"> |
| | | <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> |
| | | <th class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> |
| | | <th class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> |
| | | <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤ç¼å·</th> |
| | | <th class="thgu dong5 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">设å¤åç§°</th> |
| | | <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤ç±»å</th> |
| | | <!--<th rowspan="2">ç»å«</th>--> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | | <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th> |
| | | </template> |
| | | </tr> |
| | | <tr class="thead notfixed gudingth"> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | | <th>å©ç¨ç(%)</th> |
| | | <th v-if="checkedList.indexOf('kjl') > -1">弿ºç(%)</th> |
| | | <th v-if="checkedList.indexOf('kjsj') > -1">弿ºæ¶é´(s)</th> |
| | | <th v-if="checkedList.indexOf('jgsj') > -1">å å·¥æ¶é´(s)</th> |
| | | <th v-if="checkedList.indexOf('djsj') > -1">å¾
æºæ¶é´(s)</th> |
| | | <th v-if="checkedList.indexOf('gjsj') > -1">å
³æºæ¶é´(s)</th> |
| | | </template> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr class="mathData" v-for="(item, index) in dataList"> |
| | | <td class="tdgu kaitou wenzi" :rowspan="item.level1span" :class="{hidden: item.level1dis,noExl:item.level1dis}" v-show="!item.level1dis">{{item.level1}}</td> |
| | | <td class="tdgu1 kaitou wenzi" :rowspan="item.level2span" :class="{hidden: item.level2dis,noExl:item.level2dis}" v-show="!item.level2dis">{{item.level2}}</td> |
| | | <td class="tdgu2 kaitou wenzi" :rowspan="item.level3span" :class="{hidden: item.level3dis,noExl:item.level3dis}" v-show="!item.level3dis">{{item.level3}}</td> |
| | | <td class="tdgu3 kaitou">{{item.equipmentId}}</td> |
| | | <td class="tdgu4 kaitou">{{item.equipmentName}}</td> |
| | | <td class="tdgu5 kaitou">{{item.equipmentType}}</td> |
| | | <template v-for="(tableHead, index) in item.dataList"> |
| | | <td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjl') > -1"> |
| | | {{tableHead.openRate | numFilter}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1"> |
| | | {{tableHead.openLong}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1"> |
| | | {{tableHead.processLong}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1"> |
| | | {{tableHead.waitLong}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1"> |
| | | {{tableHead.closeLong}} |
| | | </td> |
| | | </template> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | <a-spin :spinning="spinning"> |
| | | <div id="Efficiency" class="container" style="margin-top: 20px;"> |
| | | <div class="table2"> |
| | | <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap" |
| | | v-if="dataList.length>0"> |
| | | <thead> |
| | | <tr class="thead fixed equipname"> |
| | | <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">å
¬å¸</th> |
| | | <th class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">车é´</th> |
| | | <th class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">工段</th> |
| | | <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤ç¼å· |
| | | </th> |
| | | <th class="thgu dong5 name" rowspan="2" style="min-width: 162px; max-width: 162px;width: 162px;">设å¤åç§° |
| | | </th> |
| | | <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤ç±»å |
| | | </th> |
| | | <!--<th rowspan="2">ç»å«</th>--> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | | <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th> |
| | | </template> |
| | | </tr> |
| | | <tr class="thead notfixed gudingth"> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | | <th>å©ç¨ç(%)</th> |
| | | <th v-if="checkedList.indexOf('kjl') > -1">弿ºç(%)</th> |
| | | <th v-if="checkedList.indexOf('kjsj') > -1">弿ºæ¶é´(å°æ¶)</th> |
| | | <th v-if="checkedList.indexOf('jgsj') > -1">å å·¥æ¶é´(å°æ¶)</th> |
| | | <th v-if="checkedList.indexOf('djsj') > -1">å¾
æºæ¶é´(å°æ¶)</th> |
| | | <th v-if="checkedList.indexOf('gjsj') > -1">å
³æºæ¶é´(å°æ¶)</th> |
| | | </template> |
| | | |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | |
| | | <tr class="mathData" v-for="(item, index) in dataList"> |
| | | <template v-if="item.level1!=='å计'&&item.level1!=='å¹³åå¼'"> |
| | | <td class="tdgu kaitou wenzi" :rowspan="item.level1span" |
| | | :class="{hidden: item.level1dis,noExl:item.level1dis}" v-show="!item.level1dis">{{item.level1}} |
| | | </td> |
| | | <td class="tdgu1 kaitou wenzi" :rowspan="item.level2span" |
| | | :class="{hidden: item.level2dis,noExl:item.level2dis}" v-show="!item.level2dis">{{item.level2}} |
| | | </td> |
| | | <td class="tdgu2 kaitou wenzi" :rowspan="item.level3span" |
| | | :class="{hidden: item.level3dis,noExl:item.level3dis}" v-show="!item.level3dis">{{item.level3}} |
| | | </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="tdgu5 kaitou">{{item.equipmentType}}</td> |
| | | </template> |
| | | |
| | | <!--å计ä¸å¹³åå¼åºå--> |
| | | <template v-else> |
| | | <td colspan="6" class="tdgu kaitou">{{item.level1}}</td> |
| | | </template> |
| | | |
| | | <template v-for="(tableHead, index) in item.dataList"> |
| | | <td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjl') > -1"> |
| | | {{tableHead.openRate | numFilter}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1"> |
| | | {{tableHead.openLong | getFormattedTime}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1"> |
| | | {{tableHead.processLong | getFormattedTime}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1"> |
| | | {{tableHead.waitLong | getFormattedTime}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1"> |
| | | {{tableHead.closeLong | getFormattedTime}} |
| | | </td> |
| | | </template> |
| | | |
| | | </tr> |
| | | |
| | | </tbody> |
| | | </table> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </a-spin> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import moment from 'moment' |
| | | import { putAction, getAction } from '@/api/manage' |
| | | import $ from 'jquery' |
| | | import '@/components/table2excel/table2excel' |
| | | import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' |
| | | export default { |
| | | name: 'EfficiencyList', |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | typeTree:"", |
| | | typeParent:1, |
| | | typeEquipment:1, |
| | | TreeIDOne:1, |
| | | TreeIDTwo:2, |
| | | deviceTypeDict: '', |
| | | dates: [], |
| | | identifying: [], |
| | | queryParam: {}, |
| | | queryParams:{}, |
| | | queryParamEquip:{}, |
| | | queryParamPeople:{}, |
| | | efficiencyOptions: [ |
| | | { label: 'å©ç¨ç', value: 'lyl' }, |
| | | { label: '弿ºç', value: 'kjl' }, |
| | | { label: '弿ºæ¶é´', value: 'kjsj' }, |
| | | { label: 'å å·¥æ¶é´', value: 'jgsj' }, |
| | | { label: 'å¾
æºæ¶é´', value: 'djsj' }, |
| | | { label: 'å
³æºæ¶é´', value: 'gjsj' } |
| | | ], |
| | | checkedList: ['lyl'], |
| | | dataList: [], |
| | | url: { |
| | | list: '/mdc/efficiencyReport/efficiencyList', |
| | | listByType: '/mdc/MdcUtilizationRate/getByType', |
| | | }, |
| | | tableHeads: [], |
| | | import moment from 'moment' |
| | | import { putAction, getAction } from '@/api/manage' |
| | | import $ from 'jquery' |
| | | import '@/components/table2excel/table2excel' |
| | | import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' |
| | | |
| | | } |
| | | }, |
| | | props: { nodeTree: '',Type:'',nodePeople:'' }, |
| | | created() { |
| | | this.showIdentifying() |
| | | 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.queryParam.typeTree = "1" |
| | | this.loadData() |
| | | }, |
| | | watch: { |
| | | Type(valmath){ |
| | | this.dataList = []; |
| | | this.queryParam.typeTree = valmath |
| | | }, |
| | | nodeTree(val) { //çå¬currSelected ååï¼å°åååçæ°å¼ä¼ éç» getCurrSelected äºä»¶ |
| | | if (JSON.stringify(val) != '{}') { |
| | | if (val.equipmentId != null) { |
| | | this.queryParamEquip.parentId = '' |
| | | this.queryParamEquip.equipmentId = val.equipmentId |
| | | } else { |
| | | this.queryParamEquip.parentId = val.key |
| | | this.queryParamEquip.equipmentId = '' |
| | | } |
| | | this.searchQuery() |
| | | export default { |
| | | name: 'EfficiencyList', |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | typeTree: '', |
| | | typeParent: 1, |
| | | typeEquipment: 1, |
| | | TreeIDOne: 1, |
| | | TreeIDTwo: 2, |
| | | deviceTypeDict: '', |
| | | dates: [], |
| | | selectList: [], |
| | | identifying: [], |
| | | queryParam: {}, |
| | | queryParams: {}, |
| | | queryParamEquip: {}, |
| | | queryParamPeople: {}, |
| | | efficiencyOptions: [ |
| | | { label: 'å©ç¨ç', value: 'lyl' }, |
| | | { label: '弿ºç', value: 'kjl' }, |
| | | { label: '弿ºæ¶é´', value: 'kjsj' }, |
| | | { label: 'å å·¥æ¶é´', value: 'jgsj' }, |
| | | { label: 'å¾
æºæ¶é´', value: 'djsj' }, |
| | | { label: 'å
³æºæ¶é´', value: 'gjsj' } |
| | | ], |
| | | checkedList: ['lyl'], |
| | | dataList: [], |
| | | url: { |
| | | list: '/mdc/efficiencyReport/efficiencyList', |
| | | listByType: '/mdc/MdcUtilizationRate/getByType', |
| | | queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType' |
| | | }, |
| | | tableHeads: [], |
| | | distinguishColorList: [], |
| | | utilizationRateRowAverage: '', |
| | | openRateRowAverage: '', |
| | | openLongRowAverage: '', |
| | | processLongRowAverage: '', |
| | | waitLongRowAverage: '', |
| | | closeLongRowAverage: '', |
| | | spinning: false |
| | | } |
| | | }, |
| | | nodePeople(val){ |
| | | if (JSON.stringify(val) != '{}') { |
| | | if (val.equipmentId != null) { |
| | | this.queryParamPeople.parentId = val.equipmentId |
| | | this.queryParamPeople.equipmentId = '' |
| | | } else { |
| | | this.queryParamPeople.parentId = val.key |
| | | this.queryParamPeople.equipmentId = '' |
| | | } |
| | | this.searchQuery() |
| | | } |
| | | } |
| | | }, |
| | | filters: { |
| | | numFilter(value) { |
| | | if (value) { |
| | | return parseFloat((value * 100).toFixed(2)) |
| | | } else { |
| | | return '0' |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | checkSameData(dataList){ |
| | | let cache = {}; //åå¨çæ¯é®æ¯kclx çå¼ï¼å¼æ¯kclx å¨indeces䏿°ç»ç䏿 |
| | | let indices = []; //æ°ç»ä¸æ¯ä¸ä¸ªå¼æ¯ä¸ä¸ªæ°ç»ï¼æ°ç»ä¸çæ¯ä¸ä¸ªå
ç´ æ¯åæ°ç»ä¸ç¸åkclxç䏿 |
| | | dataList.map((item,index)=>{ |
| | | let level1 = item.level1; |
| | | let _index = cache[level1]; |
| | | if(_index!==undefined){ |
| | | indices[_index].push(index) |
| | | }else{ |
| | | cache[level1] = indices.length |
| | | indices.push([index]) |
| | | } |
| | | }) |
| | | let result = []; |
| | | indices.map((item)=>{ |
| | | item.map((index)=>{ |
| | | result.push(dataList[index]) |
| | | }) |
| | | }) |
| | | this.dataList = result |
| | | props: { nodeTree: '', Type: '', nodePeople: '' }, |
| | | created() { |
| | | this.showIdentifying() |
| | | 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.queryParam.typeTree = '1' |
| | | this.loadData() |
| | | this.queryGroup() |
| | | }, |
| | | checkSameData1(dataList){ |
| | | let cache = {}; //åå¨çæ¯é®æ¯kclx çå¼ï¼å¼æ¯kclx å¨indeces䏿°ç»ç䏿 |
| | | let indices = []; //æ°ç»ä¸æ¯ä¸ä¸ªå¼æ¯ä¸ä¸ªæ°ç»ï¼æ°ç»ä¸çæ¯ä¸ä¸ªå
ç´ æ¯åæ°ç»ä¸ç¸åkclxç䏿 |
| | | dataList.map((item,index)=>{ |
| | | let level2 = item.level2; |
| | | let _index = cache[level2]; |
| | | if(_index!==undefined){ |
| | | indices[_index].push(index) |
| | | }else{ |
| | | cache[level2] = indices.length |
| | | indices.push([index]) |
| | | } |
| | | }) |
| | | let result = []; |
| | | indices.map((item)=>{ |
| | | item.map((index)=>{ |
| | | result.push(dataList[index]) |
| | | }) |
| | | }) |
| | | this.dataList = result |
| | | }, |
| | | checkSameData2(dataList){ |
| | | let cache = {}; //åå¨çæ¯é®æ¯kclx çå¼ï¼å¼æ¯kclx å¨indeces䏿°ç»ç䏿 |
| | | let indices = []; //æ°ç»ä¸æ¯ä¸ä¸ªå¼æ¯ä¸ä¸ªæ°ç»ï¼æ°ç»ä¸çæ¯ä¸ä¸ªå
ç´ æ¯åæ°ç»ä¸ç¸åkclxç䏿 |
| | | dataList.map((item,index)=>{ |
| | | let level3 = item.level3; |
| | | let _index = cache[level3]; |
| | | if(_index!==undefined){ |
| | | indices[_index].push(index) |
| | | }else{ |
| | | cache[level3] = indices.length |
| | | indices.push([index]) |
| | | } |
| | | }) |
| | | let result = []; |
| | | indices.map((item)=>{ |
| | | item.map((index)=>{ |
| | | result.push(dataList[index]) |
| | | }) |
| | | }) |
| | | this.dataList = result |
| | | }, |
| | | // åå¹¶ |
| | | combineCell() { |
| | | console.log(this.dataList) |
| | | let list =this.dataList; |
| | | for (let field in list[0]) { |
| | | var k = 0; |
| | | while (k < list.length) { |
| | | list[k][field + 'span'] = 1; |
| | | list[k][field + 'dis'] = false; |
| | | for (var i = k + 1; i <= list.length - 1; i++) { |
| | | if (list[k][field] == list[i][field] && list[k][field] != '') { |
| | | list[k][field + 'span']++; |
| | | list[k][field + 'dis'] = false; |
| | | list[i][field + 'span'] = 1; |
| | | list[i][field + 'dis'] = true; |
| | | } else { |
| | | break; |
| | | } |
| | | watch: { |
| | | Type(valmath) { |
| | | this.dataList = [] |
| | | this.queryParam.typeTree = valmath |
| | | }, |
| | | nodeTree(val) { //çå¬currSelected ååï¼å°åååçæ°å¼ä¼ éç» getCurrSelected äºä»¶ |
| | | if (JSON.stringify(val) != '{}') { |
| | | if (val.equipmentId != null) { |
| | | this.queryParamEquip.parentId = '' |
| | | this.queryParamEquip.equipmentId = val.equipmentId |
| | | } else { |
| | | this.queryParamEquip.parentId = val.key |
| | | this.queryParamEquip.equipmentId = '' |
| | | } |
| | | k = i; |
| | | this.searchQuery() |
| | | } |
| | | }, |
| | | nodePeople(val) { |
| | | if (JSON.stringify(val) != '{}') { |
| | | if (val.equipmentId != null) { |
| | | this.queryParamPeople.parentId = val.equipmentId |
| | | this.queryParamPeople.equipmentId = '' |
| | | } else { |
| | | this.queryParamPeople.parentId = val.key |
| | | this.queryParamPeople.equipmentId = '' |
| | | } |
| | | this.searchQuery() |
| | | } |
| | | } |
| | | return list; |
| | | }, |
| | | disabledDate(current){ |
| | | //Can not slect days before today and today |
| | | return current && current > moment().subtract('days', 1); |
| | | filters: { |
| | | numFilter(value) { |
| | | if (value) { |
| | | return parseFloat((value * 100).toFixed(2)) |
| | | } else { |
| | | return '0' |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * æ ¼å¼åæ¶é´ |
| | | * @param seconds ç§æ° |
| | | * @returns '' æ ¼å¼ååæ¶é´å符串 |
| | | */ |
| | | getFormattedTime(seconds) { |
| | | if (seconds) { |
| | | return parseFloat((seconds / 3600).toFixed(2)) + 'å°æ¶' |
| | | } else { |
| | | return '0' |
| | | } |
| | | } |
| | | }, |
| | | initDeviceType(deviceList) { |
| | | let dictCode = 'mdc_equipmentType' |
| | | let items = [] |
| | | items = getDictItemsFromCache(dictCode) |
| | | if (deviceList && items.length > 0) { |
| | | for (let a = 0; a < deviceList.length; a++) { |
| | | if (items && items.length > 0) { |
| | | for (let i = 0; i < items.length; i++) { |
| | | if (deviceList[a].equipmentType == items[i].value) { |
| | | deviceList[a].equipmentType = items[i].title |
| | | computed: {}, |
| | | methods: { |
| | | checkSameData(dataList) { |
| | | let cache = {} //åå¨çæ¯é®æ¯kclx çå¼ï¼å¼æ¯kclx å¨indeces䏿°ç»ç䏿 |
| | | let indices = [] //æ°ç»ä¸æ¯ä¸ä¸ªå¼æ¯ä¸ä¸ªæ°ç»ï¼æ°ç»ä¸çæ¯ä¸ä¸ªå
ç´ æ¯åæ°ç»ä¸ç¸åkclxç䏿 |
| | | dataList.map((item, index) => { |
| | | let level1 = item.level1 |
| | | let _index = cache[level1] |
| | | if (_index !== undefined) { |
| | | indices[_index].push(index) |
| | | } else { |
| | | cache[level1] = indices.length |
| | | indices.push([index]) |
| | | } |
| | | }) |
| | | let result = [] |
| | | indices.map((item) => { |
| | | item.map((index) => { |
| | | result.push(dataList[index]) |
| | | }) |
| | | }) |
| | | this.dataList = result |
| | | }, |
| | | checkSameData1(dataList) { |
| | | let cache = {} //åå¨çæ¯é®æ¯kclx çå¼ï¼å¼æ¯kclx å¨indeces䏿°ç»ç䏿 |
| | | let indices = [] //æ°ç»ä¸æ¯ä¸ä¸ªå¼æ¯ä¸ä¸ªæ°ç»ï¼æ°ç»ä¸çæ¯ä¸ä¸ªå
ç´ æ¯åæ°ç»ä¸ç¸åkclxç䏿 |
| | | dataList.map((item, index) => { |
| | | let level2 = item.level2 |
| | | let _index = cache[level2] |
| | | if (_index !== undefined) { |
| | | indices[_index].push(index) |
| | | } else { |
| | | cache[level2] = indices.length |
| | | indices.push([index]) |
| | | } |
| | | }) |
| | | let result = [] |
| | | indices.map((item) => { |
| | | item.map((index) => { |
| | | result.push(dataList[index]) |
| | | }) |
| | | }) |
| | | this.dataList = result |
| | | }, |
| | | checkSameData2(dataList) { |
| | | let cache = {} //åå¨çæ¯é®æ¯kclx çå¼ï¼å¼æ¯kclx å¨indeces䏿°ç»ç䏿 |
| | | let indices = [] //æ°ç»ä¸æ¯ä¸ä¸ªå¼æ¯ä¸ä¸ªæ°ç»ï¼æ°ç»ä¸çæ¯ä¸ä¸ªå
ç´ æ¯åæ°ç»ä¸ç¸åkclxç䏿 |
| | | dataList.map((item, index) => { |
| | | let level3 = item.level3 |
| | | let _index = cache[level3] |
| | | if (_index !== undefined) { |
| | | indices[_index].push(index) |
| | | } else { |
| | | cache[level3] = indices.length |
| | | indices.push([index]) |
| | | } |
| | | }) |
| | | let result = [] |
| | | indices.map((item) => { |
| | | item.map((index) => { |
| | | result.push(dataList[index]) |
| | | }) |
| | | }) |
| | | this.dataList = result |
| | | }, |
| | | // åå¹¶ |
| | | combineCell() { |
| | | console.log(this.dataList) |
| | | let list = this.dataList |
| | | for (let field in list[0]) { |
| | | var k = 0 |
| | | while (k < list.length) { |
| | | list[k][field + 'span'] = 1 |
| | | list[k][field + 'dis'] = false |
| | | for (var i = k + 1; i <= list.length - 1; i++) { |
| | | if (list[k][field] == list[i][field] && list[k][field] != '') { |
| | | list[k][field + 'span']++ |
| | | list[k][field + 'dis'] = false |
| | | list[i][field + 'span'] = 1 |
| | | list[i][field + 'dis'] = true |
| | | } else { |
| | | break |
| | | } |
| | | } |
| | | } else { |
| | | ajaxGetDictItems(dictCode, null).then((res) => { |
| | | if (res.success) { |
| | | let items = res.result |
| | | for (let i = 0; i < items.length; i++) { |
| | | if (deviceList[a].equipmentType == items[i].value) { |
| | | deviceList[a].equipmentType = items[i].title |
| | | } |
| | | k = i |
| | | } |
| | | } |
| | | return list |
| | | }, |
| | | disabledDate(current) { |
| | | //Can not slect days before today and today |
| | | return current && current > moment().subtract('days', 1) |
| | | }, |
| | | initDeviceType(deviceList) { |
| | | let dictCode = 'mdc_equipmentType' |
| | | let items = [] |
| | | items = getDictItemsFromCache(dictCode) |
| | | if (deviceList && items.length > 0) { |
| | | for (let a = 0; a < deviceList.length; a++) { |
| | | if (items && items.length > 0) { |
| | | for (let i = 0; i < items.length; i++) { |
| | | if (deviceList[a].equipmentType == items[i].value) { |
| | | deviceList[a].equipmentType = items[i].title |
| | | } |
| | | } |
| | | }) |
| | | } else { |
| | | ajaxGetDictItems(dictCode, null).then((res) => { |
| | | if (res.success) { |
| | | let items = res.result |
| | | for (let i = 0; i < items.length; i++) { |
| | | if (deviceList[a].equipmentType == items[i].value) { |
| | | deviceList[a].equipmentType = items[i].title |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | exportExcel() { |
| | | $("#Efficiency").table2excel({ |
| | | exclude: ".noExl", |
| | | name: "Excel Document Name", |
| | | filename: "设å¤å©ç¨ç", |
| | | exclude_img: true, |
| | | fileext: ".xls", |
| | | exclude_links: true, |
| | | exclude_inputs: false |
| | | }); |
| | | }, |
| | | showIdentifying() { |
| | | getAction(this.url.listByType, { type: 'lyl' }).then(res => { |
| | | if (res.success) { |
| | | this.identifying = res.result |
| | | } |
| | | }) |
| | | }, |
| | | dateParamChange(v1, v2) { |
| | | this.queryParam.startTime = v2[0] |
| | | this.queryParam.endTime = v2[1] |
| | | // ç¹å»æ¶é´éæ©å¨çæ¸
空æé®æ¶ä¼è§¦åæ¤å¤æ(ç¹å»éç½®æé®ä¸ä¼è§¦å)ï¼å®ç°éç½®å表åè½ï¼å宿¹åå表æ¾ç¤ºææ |
| | | if(!this.queryParam.startTime&&!this.queryParam.endTime)this.searchReset() |
| | | }, |
| | | efficiencyOptionsOnChange(checkedList) { |
| | | let index = checkedList.indexOf('lyl') |
| | | if (index < 0) { |
| | | // this.$message.warn('ä¸è½åæ¶æ¥è¯¢å¼å¨ç') |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"ä¸è½åæ¶æ¥è¯¢å¼å¨ç" |
| | | }, |
| | | exportExcel() { |
| | | $('#Efficiency').table2excel({ |
| | | exclude: '.noExl', |
| | | name: 'Excel Document Name', |
| | | filename: '设å¤å©ç¨ç', |
| | | exclude_img: true, |
| | | fileext: '.xls', |
| | | exclude_links: true, |
| | | exclude_inputs: false |
| | | }) |
| | | }, |
| | | showIdentifying() { |
| | | getAction(this.url.listByType, { type: 'lyl' }).then(res => { |
| | | if (res.success) { |
| | | this.identifying = res.result |
| | | } |
| | | }) |
| | | }, |
| | | dateParamChange(v1, v2) { |
| | | this.queryParam.startTime = v2[0] |
| | | this.queryParam.endTime = v2[1] |
| | | // ç¹å»æ¶é´éæ©å¨çæ¸
空æé®æ¶ä¼è§¦åæ¤å¤æ(ç¹å»éç½®æé®ä¸ä¼è§¦å)ï¼å®ç°éç½®å表åè½ï¼å宿¹åå表æ¾ç¤ºææ |
| | | if (!this.queryParam.startTime && !this.queryParam.endTime) this.searchReset() |
| | | }, |
| | | efficiencyOptionsOnChange(checkedList) { |
| | | let index = checkedList.indexOf('lyl') |
| | | if (index < 0) { |
| | | // this.$message.warn('ä¸è½åæ¶æ¥è¯¢å¼å¨ç') |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'ä¸è½åæ¶æ¥è¯¢å¼å¨ç' |
| | | }) |
| | | |
| | | return false |
| | | } |
| | | this.checkedList = checkedList |
| | | }, |
| | | // searchQuery() { |
| | | // if(this.queryParam.typeTree == "1"){ |
| | | // // this.queryParam.TreeIDTwo = "" |
| | | // this.queryParam.parentId = this.queryParamEquip.parentId |
| | | // this.queryParam.equipmentId = this.queryParamEquip.equipmentId |
| | | // }else{ |
| | | // // this.queryParam.TreeIDOne = "" |
| | | // this.queryParam.parentId = this.queryParamPeople.parentId |
| | | // this.queryParam.equipmentId = "" |
| | | // } |
| | | // this.loadData() |
| | | // // this.onClearSelected() |
| | | // }, |
| | | // searchReset() { |
| | | // this.typeTree = this.queryParam.typeTree |
| | | // this.typeParent = this.queryParams.parentId |
| | | // this.queryParam = {} |
| | | // this.dates = [] |
| | | // this.queryParam.typeTree = this.typeTree |
| | | // this.queryParam.parentId = this.typeParent |
| | | // this.loadData() |
| | | // // this.onClearSelected() |
| | | // }, |
| | | 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 = "" |
| | | return false |
| | | } |
| | | this.checkedList = checkedList |
| | | }, |
| | | // searchQuery() { |
| | | // if(this.queryParam.typeTree == "1"){ |
| | | // // this.queryParam.TreeIDTwo = "" |
| | | // this.queryParam.parentId = this.queryParamEquip.parentId |
| | | // this.queryParam.equipmentId = this.queryParamEquip.equipmentId |
| | | // }else{ |
| | | // // this.queryParam.TreeIDOne = "" |
| | | // this.queryParam.parentId = this.queryParamPeople.parentId |
| | | // this.queryParam.equipmentId = "" |
| | | // } |
| | | // this.loadData() |
| | | // // this.onClearSelected() |
| | | // }, |
| | | // searchReset() { |
| | | // this.typeTree = this.queryParam.typeTree |
| | | // this.typeParent = this.queryParams.parentId |
| | | // this.queryParam = {} |
| | | // this.dates = [] |
| | | // this.queryParam.typeTree = this.typeTree |
| | | // this.queryParam.parentId = this.typeParent |
| | | // this.loadData() |
| | | // // this.onClearSelected() |
| | | // }, |
| | | searchQuery() { |
| | | console.log('dates', this.dates) |
| | | 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() |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©æ¶é´' |
| | | }) |
| | | } |
| | | // this.onClearSelected() |
| | | }, |
| | | 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.loadData() |
| | | }else{ |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"è¯·éæ©æ¶é´" |
| | | }); |
| | | } |
| | | // this.onClearSelected() |
| | | }, |
| | | 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.loadData(); |
| | | // this.queryParam = {} |
| | | // this.dates = [] |
| | | // this.loadData() |
| | | // this.onClearSelected() |
| | | }, |
| | | loadData() { |
| | | this.tableHeads = [] |
| | | this.dataList = [] |
| | | getAction(this.url.list, this.queryParam).then(res => { |
| | | if (res.success) { |
| | | this.tableHeads = res.result.dates |
| | | this.dataList = res.result.mdcEfficiencyList |
| | | this.checkSameData(this.dataList) |
| | | this.checkSameData1(this.dataList) |
| | | this.checkSameData2(this.dataList) |
| | | this.combineCell(); |
| | | // this.initDeviceType(this.dataList) |
| | | |
| | | } |
| | | }) |
| | | // this.queryParam = {} |
| | | // this.dates = [] |
| | | // this.loadData() |
| | | // this.onClearSelected() |
| | | }, |
| | | loadData() { |
| | | this.tableHeads = [] |
| | | this.dataList = [] |
| | | this.spinning = true |
| | | getAction(this.url.list, this.queryParam).then(res => { |
| | | if (res.success) { |
| | | this.tableHeads = res.result.dates |
| | | this.dataList = res.result.mdcEfficiencyList |
| | | this.distinguishColorList = res.result.utilizationRateList |
| | | this.checkSameData(this.dataList) |
| | | this.checkSameData1(this.dataList) |
| | | this.checkSameData2(this.dataList) |
| | | this.combineCell() |
| | | // this.columns.push(...dataColumns) |
| | | // this.initDeviceType(this.dataList) |
| | | } |
| | | }).finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | }, |
| | | 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> |
| | | <style scoped> |
| | | .table2{ |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: auto; |
| | | } |
| | | .table2 thead tr th:first-child, |
| | | .table tbody tr .tdgu{ |
| | | position: sticky; |
| | | left: 0; |
| | | z-index: 1; |
| | | } |
| | | .table tbody tr .wenzi{ |
| | | /*writing-mode: vertical-lr;*/ |
| | | /*text-orientation: upright;*/ |
| | | transform: rotate(360deg); |
| | | writing-mode: vertical-lr; |
| | | letter-spacing: 2px; |
| | | } |
| | | .table tbody tr .kaitou{ |
| | | z-index: 1; |
| | | background-color: white; |
| | | } |
| | | .table tbody tr .tdgu1{ |
| | | position: sticky; |
| | | left: 50px; |
| | | z-index: 2; |
| | | } |
| | | .table tbody tr .tdgu2{ |
| | | position: sticky; |
| | | left: 100px; |
| | | z-index: 2; |
| | | } |
| | | .table tbody tr .tdgu3{ |
| | | position: sticky; |
| | | left: 150px; |
| | | z-index: 2; |
| | | } |
| | | .table tbody tr .tdgu4{ |
| | | position: sticky; |
| | | left: 250px; |
| | | z-index: 2; |
| | | } |
| | | .table tbody tr .tdgu5{ |
| | | position: sticky; |
| | | left: 400px; |
| | | z-index: 2; |
| | | } |
| | | .table2 thead tr .timeth, |
| | | .table2 thead tr .thgu { |
| | | position: sticky; |
| | | top:0; |
| | | z-index: 3; |
| | | } |
| | | .table2 thead .gudingth th{ |
| | | position: sticky; |
| | | top: 32px; |
| | | z-index: 2; |
| | | } |
| | | .table2 thead .equipname .name{ |
| | | z-index: 3; |
| | | } |
| | | .table2 thead .equipname .dong1{ |
| | | z-index: 4; |
| | | left: 0; |
| | | /*border: 1px solid #000;*/ |
| | | } |
| | | .table2 thead .equipname .dong2{ |
| | | z-index: 5; |
| | | left: 50px; |
| | | } |
| | | .table2 thead .equipname .dong3{ |
| | | z-index: 5; |
| | | left: 100px; |
| | | } |
| | | .table2 thead .equipname .dong4{ |
| | | z-index: 5; |
| | | left: 150px; |
| | | } |
| | | .table2 thead .equipname .dong5{ |
| | | z-index: 5; |
| | | left: 250px; |
| | | } |
| | | .table2 thead .equipname .dong6{ |
| | | z-index: 5; |
| | | left: 400px; |
| | | } |
| | | |
| | | @media screen and (min-width: 1920px){ |
| | | #Efficiency{ |
| | | height: 687px!important; |
| | | overflow: scroll; |
| | | .table2 { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px){ |
| | | #Efficiency{ |
| | | height: 687px!important; |
| | | overflow: scroll; |
| | | |
| | | .table2 thead tr th:first-child, |
| | | .table tbody tr .tdgu { |
| | | position: sticky; |
| | | left: 0; |
| | | z-index: 1; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px){ |
| | | #Efficiency{ |
| | | height: 540px!important; |
| | | overflow: scroll; |
| | | |
| | | .table tbody tr .wenzi { |
| | | /*writing-mode: vertical-lr;*/ |
| | | /*text-orientation: upright;*/ |
| | | transform: rotate(360deg); |
| | | writing-mode: vertical-lr; |
| | | letter-spacing: 2px; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px){ |
| | | #Efficiency{ |
| | | height: 440px!important; |
| | | overflow: scroll; |
| | | |
| | | .table tbody tr .kaitou { |
| | | z-index: 1; |
| | | background-color: white; |
| | | } |
| | | } |
| | | @media screen and (max-width: 1280px){ |
| | | #Efficiency{ |
| | | height: 440px!important; |
| | | overflow: scroll; |
| | | |
| | | .table tbody tr .tdgu1 { |
| | | position: sticky; |
| | | left: 50px; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | #Efficiency .table_guding1{ |
| | | position: absolute; |
| | | overflow: hidden; |
| | | width: 500px; |
| | | } |
| | | #Efficiency .table_guding2{ |
| | | overflow-x: scroll; |
| | | width: 500px; |
| | | } |
| | | .identifyingclass { |
| | | width: 55px; |
| | | height: 15px; |
| | | display: inline-block |
| | | } |
| | | |
| | | .dataContent { |
| | | white-space: nowrap; |
| | | /*margin: 0;*/ |
| | | /*border: none;*/ |
| | | border-collapse: separate; |
| | | border-spacing: 0; |
| | | /*table-layout: fixed;*/ |
| | | border: 1px solid #ccc; |
| | | /*border: 1px solid #ccc;*/ |
| | | width: 100%; |
| | | /*height: 100%;*/ |
| | | /*overflow: hidden;*/ |
| | | /*overflow-y: auto;*/ |
| | | text-align: center; |
| | | } |
| | | .table tbody tr .tdgu2 { |
| | | position: sticky; |
| | | left: 100px; |
| | | z-index: 2; |
| | | } |
| | | |
| | | /*.dataContent .fixed th {*/ |
| | | /*width: 50px;*/ |
| | | /*}*/ |
| | | .table tbody tr .tdgu3 { |
| | | position: sticky; |
| | | left: 150px; |
| | | z-index: 2; |
| | | } |
| | | |
| | | .dataContent .thead th { |
| | | background-color: #fafafa; |
| | | text-align: center; |
| | | height: 30px; |
| | | padding: 5px; |
| | | } |
| | | .table tbody tr .tdgu4 { |
| | | position: sticky; |
| | | left: 250px; |
| | | z-index: 2; |
| | | } |
| | | |
| | | .dataContent .notfixed th { |
| | | /*width: auto;*/ |
| | | } |
| | | .table tbody tr .tdgu5 { |
| | | position: sticky; |
| | | left: 412px; |
| | | z-index: 2; |
| | | } |
| | | |
| | | /*.dataContent tr td {*/ |
| | | .table2 thead tr .timeth, |
| | | .table2 thead tr .thgu { |
| | | position: sticky; |
| | | top: 0; |
| | | z-index: 3; |
| | | } |
| | | |
| | | .table2 thead .gudingth th { |
| | | position: sticky; |
| | | top: 32px; |
| | | z-index: 2; |
| | | } |
| | | |
| | | .table2 thead .equipname .name { |
| | | z-index: 3; |
| | | } |
| | | |
| | | .table2 thead .equipname .dong1 { |
| | | z-index: 4; |
| | | left: 0; |
| | | /*border: 1px solid #000;*/ |
| | | } |
| | | |
| | | .table2 thead .equipname .dong2 { |
| | | z-index: 5; |
| | | left: 50px; |
| | | } |
| | | |
| | | .table2 thead .equipname .dong3 { |
| | | z-index: 5; |
| | | left: 100px; |
| | | } |
| | | |
| | | .table2 thead .equipname .dong4 { |
| | | z-index: 5; |
| | | left: 150px; |
| | | } |
| | | |
| | | .table2 thead .equipname .dong5 { |
| | | z-index: 5; |
| | | left: 250px; |
| | | } |
| | | |
| | | .table2 thead .equipname .dong6 { |
| | | z-index: 5; |
| | | left: 412px; |
| | | } |
| | | |
| | | @media screen and (min-width: 1920px) { |
| | | #Efficiency { |
| | | height: 687px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px) { |
| | | #Efficiency { |
| | | height: 687px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px) { |
| | | #Efficiency { |
| | | height: 540px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px) { |
| | | #Efficiency { |
| | | height: 440px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | @media screen and (max-width: 1280px) { |
| | | #Efficiency { |
| | | height: 440px !important; |
| | | overflow: scroll; |
| | | } |
| | | } |
| | | |
| | | #Efficiency .table_guding1 { |
| | | position: absolute; |
| | | overflow: hidden; |
| | | width: 500px; |
| | | } |
| | | |
| | | #Efficiency .table_guding2 { |
| | | overflow-x: scroll; |
| | | width: 500px; |
| | | } |
| | | |
| | | .identifyingclass { |
| | | width: 55px; |
| | | height: 15px; |
| | | display: inline-block |
| | | } |
| | | |
| | | .dataContent { |
| | | white-space: nowrap; |
| | | /*margin: 0;*/ |
| | | /*border: none;*/ |
| | | border-collapse: separate; |
| | | border-spacing: 0; |
| | | /*table-layout: fixed;*/ |
| | | border: 1px solid #ccc; |
| | | /*border: 1px solid #ccc;*/ |
| | | width: 100%; |
| | | /*height: 100%;*/ |
| | | /*overflow: hidden;*/ |
| | | /*overflow-y: auto;*/ |
| | | text-align: center; |
| | | } |
| | | |
| | | /*.dataContent .fixed th {*/ |
| | | /*width: 50px;*/ |
| | | /*}*/ |
| | | |
| | | .dataContent .thead th { |
| | | background-color: #fafafa; |
| | | text-align: center; |
| | | height: 30px; |
| | | padding: 5px; |
| | | } |
| | | |
| | | .dataContent .notfixed th { |
| | | /*width: auto;*/ |
| | | } |
| | | |
| | | /*.dataContent tr td {*/ |
| | | /*height: 35px;*/ |
| | | /*}*/ |
| | | /*}*/ |
| | | |
| | | .dataContent .mathData td { |
| | | padding: 10px; |
| | | /*display: none;*/ |
| | | } |
| | | .dataContent .mathData td { |
| | | padding: 10px; |
| | | /*display: none;*/ |
| | | } |
| | | |
| | | .dataContent .mathData .td { |
| | | /*background-color: #ff9bd2;*/ |
| | | display: inline-block; |
| | | padding: 10px; |
| | | } |
| | | .dataContent .mathData .td { |
| | | /*background-color: #ff9bd2;*/ |
| | | display: inline-block; |
| | | padding: 10px; |
| | | } |
| | | |
| | | .dataContent .mathData .tdd { |
| | | /*display: none;*/ |
| | | } |
| | | td { |
| | | vertical-align: middle; |
| | | } |
| | | .pink { |
| | | background-color: #ff9bd2; |
| | | } |
| | | td { |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .yellow { |
| | | background-color: #e8ff37; |
| | | } |
| | | .pink { |
| | | background-color: #ff9bd2; |
| | | } |
| | | |
| | | .green { |
| | | background-color: #99ff4e; |
| | | } |
| | | .yellow { |
| | | background-color: #e8ff37; |
| | | } |
| | | |
| | | .green { |
| | | background-color: #99ff4e; |
| | | } |
| | | |
| | | .vertical-text { |
| | | writing-mode: vertical-rl; |
| | | } |
| | | |
| | | /*/deep/ .ant-table-body .ant-table-row td {*/ |
| | | /*padding-top: 10px;*/ |
| | | /*padding-bottom: 10px;*/ |
| | | /*}*/ |
| | | |
| | | /deep/ .ant-table-body .ant-table-row td.data { |
| | | min-width: 150px; |
| | | max-width: 150px; |
| | | } |
| | | |
| | | /deep/ .ant-table-tbody > tr.ant-table-row:hover > td { |
| | | background: none !important; |
| | | } |
| | | |
| | | /deep/ .ant-table-thead th { |
| | | text-align: center; |
| | | } |
| | | |
| | | </style> |
| | |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="9" :sm="9" :xs="9"> |
| | | <a-col :md="4" :sm="4" > |
| | | <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="5" :sm="5" :xs="5"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="6" :xs="6"> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-form-item label="çå¶"> |
| | | <a-select v-model="queryParam.shiftId" placeholder="è¯·éæ©çå¶" |
| | | @change="initShiftSubList" :allowClear = "allowClear"> |
| | |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="6" :xs="6"> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-form-item label="çæ¬¡"> |
| | | <a-select v-model="queryParam.shiftSubId" placeholder="è¯·éæ©çæ¬¡" @change="initShiftSubListChange" :allowClear = "allowClearSu"> |
| | | <a-select-option v-for="(em,index) in shiftSubList" :key="index" :value="em.value"> |
| | |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="15" :sm="15" :xs="15"> |
| | | <a-col :md="9" :sm="9" :xs="9"> |
| | | <a-checkbox-group :value="checkedList" :default-value="['lyl']" :options="efficiencyOptions" |
| | | @change="efficiencyOptionsOnChange"/> |
| | | </a-col> |
| | | <a-col :md="3" :sm="3" :xs="3"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <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="3" :sm="3" :xs="3"> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | </a-col> |
| | | <a-col :md="3" :sm="3" :xs="3"> |
| | | <a-button type="primary" @click="exportExcel" icon="download">导åº</a-button> |
| | | <a-col :md="10" :sm="10"> |
| | | <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> |
| | | </tr> |
| | | </table> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div style="width: 530px;top: 0; right: 0px;"> |
| | | <table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;"> |
| | | <tr> |
| | | <td v-for="(item, index) in identifying">{{item.title}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td style="text-align:center;" v-for="(item, index) in identifying"> |
| | | <div class="identifyingclass" :style="{background: item.color}"></div> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | <div class="container" id="EfficiencyShift" style="margin-top: 20px;"> |
| | | <div class="table2"> |
| | | <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap"> |
| | | <thead> |
| | | <tr class="thead fixed equipname"> |
| | | <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> |
| | | <th class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> |
| | | <th class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> |
| | | <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤ç¼å·</th> |
| | | <th class="thgu dong5 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">设å¤åç§°</th> |
| | | <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤ç±»å</th> |
| | | <th class="thgu dong7 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">çæ¬¡</th> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | | <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th> |
| | | </template> |
| | | <!--average--> |
| | | <!--<th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 150px;width: 150px;">å¹³åå¼(çæ¬¡å©ç¨ç)</th>--> |
| | | |
| | | </tr> |
| | | <tr class="thead notfixed gudingth"> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | | <th>çæ¬¡å©ç¨ç(%)</th> |
| | | <!--<th v-if="checkedList.indexOf('gzl') > -1">æ
éç(%)</th>--> |
| | | <!--<th v-if="checkedList.indexOf('processingLong') > -1">è¿è¡æ¶é´(s)</th>--> |
| | | <!--<th v-if="checkedList.indexOf('totalLong') > -1">æææ¶é´(s)</th>--> |
| | | <!--<th v-if="checkedList.indexOf('faultLong') > -1">æ
éæ¶é´(s)</th>--> |
| | | <!--<!–<th v-if="checkedList.indexOf('gjsj') > -1">å
³æºæ¶é´(s)</th>–>--> |
| | | <th v-if="checkedList.indexOf('kjsj') > -1">弿ºæ¶é´(s)</th> |
| | | <th v-if="checkedList.indexOf('jgsj') > -1">å å·¥æ¶é´(s)</th> |
| | | <th v-if="checkedList.indexOf('djsj') > -1">å¾
æºæ¶é´(s)</th> |
| | | <th v-if="checkedList.indexOf('gjsj') > -1">å
³æºæ¶é´(s)</th> |
| | | </template> |
| | | </tr> |
| | | <!-- <tr>--> |
| | | <!-- <th rowspan="2">å¹³åå¼</th>--> |
| | | <!-- </tr>--> |
| | | </thead> |
| | | <tbody> |
| | | <tr class="mathData" v-for="(item, index) in dataList"> |
| | | <td class="tdgu kaitou wenzi" :rowspan="item.level1span" :class="{hidden: item.level1dis,noExl:item.level1dis}" v-show="!item.level1dis">{{item.level1}}</td> |
| | | <td class="tdgu1 kaitou wenzi" :rowspan="item.level2span" :class="{hidden: item.level2dis,noExl:item.level2dis}" v-show="!item.level2dis">{{item.level2}}</td> |
| | | <td class="tdgu2 kaitou wenzi" :rowspan="item.level3span" :class="{hidden: item.level3dis,noExl:item.level3dis}" v-show="!item.level3dis">{{item.level3}}</td> |
| | | <td class="tdgu3 kaitou">{{item.equipmentId}}</td> |
| | | <td class="tdgu4 kaitou">{{item.equipmentName}}</td> |
| | | <td class="tdgu5 kaitou">{{item.equipmentType}}</td> |
| | | <td class="tdgu6 kaitou">{{item.shiftSubName}}</td> |
| | | |
| | | <!--<td>{{item.tierType}}</td>--> |
| | | <template v-for="(tableHead, index) in item.dataList"> |
| | | <!--<td :style="{background:tableHead.color }" v-if='tableHead.utilizationRate !== 0'>{{tableHead.utilizationRate | numFilter}}</td>--> |
| | | <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 1'>ç»´ä¿®</td>--> |
| | | <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 2'>ä¼ç</td>--> |
| | | <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 10'>{{tableHead.lyl | numFilter}}</td>--> |
| | | <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 11'>æªè®¡ç®</td>--> |
| | | <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 12'>æ çæ¬¡</td>--> |
| | | <td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td> |
| | | <!--<td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gzl') > -1">--> |
| | | <!--{{tableHead.gzl | numFilter}}--> |
| | | <!--</td>--> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1"> |
| | | {{tableHead.openLong}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1"> |
| | | {{tableHead.processLong}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1"> |
| | | {{tableHead.waitLong}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1"> |
| | | {{tableHead.closeLong}} |
| | | </td> |
| | | <!--<td :style="{background:item[tableHead].color }" v-if="checkedList.indexOf('gjsj') > -1">--> |
| | | <!--{{item[tableHead].gjsj}}--> |
| | | <!--</td>--> |
| | | </template> |
| | | <!--<td :style="{background:item.average.color }" >{{item.average.lyl | numFilter}}</td>--> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <!--<div style="width: 530px;position:absolute;top: 10px; right: 0;">--> |
| | | <!--<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>--> |
| | | <!--</tr>--> |
| | | <!--</table>--> |
| | | <!--</div>--> |
| | | </div> |
| | | <a-spin :spinning="spinning"> |
| | | <div class="container" id="EfficiencyShift" style="margin-top: 20px;"> |
| | | <div class="table2"> |
| | | <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap" v-if="dataList.length>0"> |
| | | <thead> |
| | | <tr class="thead fixed equipname"> |
| | | <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">å
¬å¸</th> |
| | | <th class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">车é´</th> |
| | | <th class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">工段</th> |
| | | <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤ç¼å·</th> |
| | | <th class="thgu dong5 name" rowspan="2" style="min-width: 162px; max-width: 162px;width: 162px;">设å¤åç§°</th> |
| | | <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤ç±»å</th> |
| | | <th class="thgu dong7 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">çæ¬¡</th> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | | <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th> |
| | | </template> |
| | | <!--average--> |
| | | <!--<th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 150px;width: 150px;">å¹³åå¼(çæ¬¡å©ç¨ç)</th>--> |
| | | |
| | | </tr> |
| | | <tr class="thead notfixed gudingth"> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | | <th>çæ¬¡å©ç¨ç(%)</th> |
| | | <!--<th v-if="checkedList.indexOf('gzl') > -1">æ
éç(%)</th>--> |
| | | <!--<th v-if="checkedList.indexOf('processingLong') > -1">è¿è¡æ¶é´(s)</th>--> |
| | | <!--<th v-if="checkedList.indexOf('totalLong') > -1">æææ¶é´(s)</th>--> |
| | | <!--<th v-if="checkedList.indexOf('faultLong') > -1">æ
éæ¶é´(s)</th>--> |
| | | <!--<!–<th v-if="checkedList.indexOf('gjsj') > -1">å
³æºæ¶é´(s)</th>–>--> |
| | | <th v-if="checkedList.indexOf('kjsj') > -1">弿ºæ¶é´(å°æ¶)</th> |
| | | <th v-if="checkedList.indexOf('jgsj') > -1">å å·¥æ¶é´(å°æ¶)</th> |
| | | <th v-if="checkedList.indexOf('djsj') > -1">å¾
æºæ¶é´(å°æ¶)</th> |
| | | <th v-if="checkedList.indexOf('gjsj') > -1">å
³æºæ¶é´(å°æ¶)</th> |
| | | </template> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr class="mathData" v-for="(item, index) in dataList"> |
| | | <template v-if="item.level1!=='å计'&&item.level1!=='å¹³åå¼'"> |
| | | <td class="tdgu kaitou wenzi" :rowspan="item.level1span" :class="{hidden: item.level1dis,noExl:item.level1dis}" v-show="!item.level1dis">{{item.level1}}</td> |
| | | <td class="tdgu1 kaitou wenzi" :rowspan="item.level2span" :class="{hidden: item.level2dis,noExl:item.level2dis}" v-show="!item.level2dis">{{item.level2}}</td> |
| | | <td class="tdgu2 kaitou wenzi" :rowspan="item.level3span" :class="{hidden: item.level3dis,noExl:item.level3dis}" v-show="!item.level3dis">{{item.level3}}</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="tdgu5 kaitou">{{item.equipmentType}}</td> |
| | | <td class="tdgu6 kaitou">{{item.shiftSubName}}</td> |
| | | </template> |
| | | |
| | | <template v-else> |
| | | <td colspan="7" class="tdgu kaitou">{{item.level1}}</td> |
| | | </template> |
| | | <!--<td>{{item.tierType}}</td>--> |
| | | <template v-for="(tableHead, index) in item.dataList"> |
| | | <!--<td :style="{background:tableHead.color }" v-if='tableHead.utilizationRate !== 0'>{{tableHead.utilizationRate | numFilter}}</td>--> |
| | | <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 1'>ç»´ä¿®</td>--> |
| | | <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 2'>ä¼ç</td>--> |
| | | <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 10'>{{tableHead.lyl | numFilter}}</td>--> |
| | | <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 11'>æªè®¡ç®</td>--> |
| | | <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 12'>æ çæ¬¡</td>--> |
| | | <td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td> |
| | | <!--<td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gzl') > -1">--> |
| | | <!--{{tableHead.gzl | numFilter}}--> |
| | | <!--</td>--> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1"> |
| | | {{tableHead.openLong | getFormattedTime}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1"> |
| | | {{tableHead.processLong | getFormattedTime}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1"> |
| | | {{tableHead.waitLong | getFormattedTime}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1"> |
| | | {{tableHead.closeLong | getFormattedTime}} |
| | | </td> |
| | | <!--<td :style="{background:item[tableHead].color }" v-if="checkedList.indexOf('gjsj') > -1">--> |
| | | <!--{{item[tableHead].gjsj}}--> |
| | | <!--</td>--> |
| | | </template> |
| | | <!--<td :style="{background:item.average.color }" >{{item.average.lyl | numFilter}}</td>--> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </a-spin> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | allowClear:true, |
| | | allowClearSu:true, |
| | | dates: [], |
| | | selectList:[], |
| | | identifying: [], |
| | | queryParam: {}, |
| | | queryParamEquip:{}, |
| | |
| | | list: '/mdc/efficiencyReport/efficiencyShiftList', |
| | | listByType: '/mdc/MdcUtilizationRate/getByType', |
| | | initShiftList: '/mdc/mdcMdcShift/initShiftList', |
| | | initShiftSubList: '/mdc/mdcShiftSub/initShiftSubList' |
| | | initShiftSubList: '/mdc/mdcShiftSub/initShiftSubList', |
| | | queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType' |
| | | }, |
| | | tableHeads: [], |
| | | shiftList: [], |
| | | shiftSubList: [] |
| | | shiftSubList: [], |
| | | spinning:false |
| | | } |
| | | }, |
| | | props: { nodeTree: '', Type:'',nodePeople: '' }, |
| | |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.queryParam.typeTree = "1" |
| | | this.loadData(); |
| | | this.queryGroup() |
| | | }, |
| | | watch: { |
| | | Type(valmath){ |
| | |
| | | } else { |
| | | return '0' |
| | | } |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * æ ¼å¼åæ¶é´ |
| | | * @param seconds ç§æ° |
| | | * @returns '' æ ¼å¼ååæ¶é´å符串 |
| | | */ |
| | | getFormattedTime(seconds) { |
| | | if (seconds) { |
| | | return parseFloat((seconds / 3600).toFixed(2)) + 'å°æ¶' |
| | | } else { |
| | | return '0' |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | checkSameData(dataList){ |
| | |
| | | // this.onClearSelected() |
| | | }, |
| | | loadData() { |
| | | this.spinning=true |
| | | this.tableHeads = [] |
| | | this.dataList = [] |
| | | getAction(this.url.list, this.queryParam).then(res => { |
| | |
| | | this.combineCell(); |
| | | // this.initDeviceType(this.dataList) |
| | | } |
| | | }).finally(()=>{ |
| | | this.spinning=false |
| | | }) |
| | | }, |
| | | 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 |
| | | }) |
| | | } |
| | | } |
| | |
| | | } |
| | | .table tbody tr .tdgu5{ |
| | | position: sticky; |
| | | left: 400px; |
| | | left: 412px; |
| | | z-index: 2; |
| | | } |
| | | .table tbody tr .tdgu6{ |
| | | position: sticky; |
| | | left: 500px; |
| | | left: 512px; |
| | | z-index: 2; |
| | | } |
| | | |
| | |
| | | } |
| | | .table2 thead .equipname .dong6{ |
| | | z-index: 5; |
| | | left: 400px; |
| | | left: 412px; |
| | | } |
| | | .table2 thead .equipname .dong7{ |
| | | z-index: 6; |
| | | left: 500px; |
| | | left: 512px; |
| | | } |
| | | |
| | | @media screen and (min-width: 1920px){ |
| | |
| | | .dataContent .mathData .tdd { |
| | | /*display: none;*/ |
| | | } |
| | | .seach-content{ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | /*.seach-content{*/ |
| | | /*display: flex;*/ |
| | | /*justify-content: space-between;*/ |
| | | /*}*/ |
| | | |
| | | </style> |
| | |
| | | // this.$set(this.queryParam, 'tierName', val.title) |
| | | this.queryParamEquip.parentId = '' |
| | | this.queryParams.equipmentId = val.equipmentId |
| | | this.queryParams.equipmentName = val.equipmentName |
| | | this.queryParamEquip.equipmentId = val.equipmentId |
| | | this.searchQuery() |
| | | } else { |
| | |
| | | // this.$set(this.queryParam, 'tierName', val.title) |
| | | this.queryParamEquip.parentId = '' |
| | | this.queryParams.equipmentId = val.equipmentId |
| | | this.queryParams.equipmentName = val.equipmentName |
| | | console.log('XXXval=', val) |
| | | this.queryParamEquip.equipmentId = val.equipmentId |
| | | this.searchQuery() |
| | | } else { |
| | |
| | | ], |
| | | englishName: [ |
| | | { required: true, message: '请è¾å
¥è±æåç§°!' }, |
| | | { pattern: /^.{6,18}$/, message: '请è¾å
¥6å°18ä½ä»»æå符!' }, |
| | | { pattern: /^.{2,18}$/, message: '请è¾å
¥2å°18ä½ä»»æå符!' ,trigger:'blur'}, |
| | | ], |
| | | showFlag: [ |
| | | { required: true, message: '请è¾å
¥æ¾ç¤ºæ å¿!' }, |
| | |
| | | <a-col :span="12"> |
| | | <a-form-item label="设å¤ç»" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]" |
| | | @search="deviceSearch" enter-button/> |
| | | @search="deviceSearch" enter-button placeholder="è¯·éæ©è®¾å¤"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | <mdc-pass-rate-modal-list ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></mdc-pass-rate-modal-list> |
| | | |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import moment from 'moment' |
| | | import pick from 'lodash.pick' |
| | | import mdcPassRateModalList from './mdcPassRateModalList' |
| | | // import JDate from './JDate' |
| | | import { |
| | | getAction, |
| | |
| | | import { |
| | | duplicateCheck |
| | | } from '@/api/api' |
| | | import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal' |
| | | |
| | | export default { |
| | | name: 'mdcPassRateModal', |
| | | components: {mdcPassRateModalList}, |
| | | components: { SelectDeviceModal}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | |
| | | // }) |
| | | }, |
| | | deviceSearch() { |
| | | this.$refs.deviceRepairListModel.openPage() |
| | | this.$refs.deviceRepairListModel.title = 'éæ©è®¾å¤' |
| | | this.$refs.deviceRepairListModel.disableSubmit = false |
| | | 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(',') : [] |
| | | }, |
| | | //çº§èæ¡onChangeäºä»¶ |
| | | // onChange(value) { |
| | |
| | | }, |
| | | checkboxChange(e) { |
| | | this.checked = e.target.checked |
| | | }, |
| | | |
| | | /** |
| | | * 鿩已æè®¾å¤åç¹å»ç¡®å®æ¶è§¦å |
| | | * @param data 已鿩çè®¾å¤ |
| | | */ |
| | | selectOK(data) { |
| | | // let params = {} |
| | | // params.equipmentIdList = [] |
| | | // for (var a = 0; a < data.length; a++) { |
| | | // params.equipmentIdList.push(data[a]) |
| | | // } |
| | | console.log('data=', data) |
| | | this.form.setFieldsValue({ |
| | | equipmentIds: data.join(',') |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | <a-col :span="24"> |
| | | <a-form-item label="设å¤ç»" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]" |
| | | @search="deviceSearch" enter-button/> |
| | | @search="deviceSearch" enter-button placeholder="è¯·éæ©è®¾å¤"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | <mdc-standard-process-duration-modal-list ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></mdc-standard-process-duration-modal-list> |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | |
| | | </a-modal> |
| | | </template> |
| | |
| | | <script> |
| | | import moment from 'moment' |
| | | import pick from 'lodash.pick' |
| | | import MdcStandardProcessDurationModalList from './MdcStandardProcessDurationModalList' |
| | | // import JDate from './JDate' |
| | | import { |
| | | getAction, |
| | |
| | | import { |
| | | duplicateCheck |
| | | } from '@/api/api' |
| | | import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal' |
| | | |
| | | export default { |
| | | name: 'MdcStandardProcessDurationModal', |
| | | components: {MdcStandardProcessDurationModalList}, |
| | | components: { SelectDeviceModal }, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | |
| | | // }) |
| | | }, |
| | | deviceSearch() { |
| | | this.$refs.deviceRepairListModel.openPage() |
| | | this.$refs.deviceRepairListModel.title = 'éæ©è®¾å¤' |
| | | this.$refs.deviceRepairListModel.disableSubmit = false |
| | | 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(',') : [] |
| | | }, |
| | | //çº§èæ¡onChangeäºä»¶ |
| | | // onChange(value) { |
| | |
| | | }, |
| | | checkboxChange(e) { |
| | | this.checked = e.target.checked |
| | | }, |
| | | |
| | | /** |
| | | * 鿩已æè®¾å¤åç¹å»ç¡®å®æ¶è§¦å |
| | | * @param data 已鿩çè®¾å¤ |
| | | */ |
| | | selectOK(data) { |
| | | // let params = {} |
| | | // params.equipmentIdList = [] |
| | | // for (var a = 0; a < data.length; a++) { |
| | | // params.equipmentIdList.push(data[a]) |
| | | // } |
| | | console.log('data=', data) |
| | | this.form.setFieldsValue({ |
| | | equipmentIds: data.join(',') |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item label="é¢è²" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input type="color" v-decorator="['rateParameterColor',validatorRules.rateParameterColor]"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | </a-modal> |
| | |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'rateParameterCategory', 'rateParameterLevel', 'minimumRange', 'maximumRange')) |
| | | this.form.setFieldsValue(pick(this.model, 'rateParameterCategory', 'rateParameterLevel', 'minimumRange', 'maximumRange', 'rateParameterColor')) |
| | | }) |
| | | }, |
| | | close() { |
| | |
| | | if (res.success) { |
| | | // that.$message.success("ä¿åæå") |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:"ä¿åæå" |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: 'ä¿åæå' |
| | | }) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | }, |
| | | tableHeads: [], |
| | | XData: [0], |
| | | YData: [0] |
| | | YData: [0], |
| | | isLazyRequest: '',// æ¯å¦å¼å¯æå è½½ |
| | | requestAlldataSize: 8,// æ»å
±è¯·æ±çå表项æ°ç® |
| | | everyRequestDataSize: 15// æ¯æ¬¡è¯·æ±çå表项æ°ç® |
| | | } |
| | | }, |
| | | props: { nodeTree: '', Type: '', nodePeople: '' }, |
| | |
| | | this.queryParam.typeTree = '1' |
| | | this.loadData1() |
| | | |
| | | }, |
| | | mounted() { |
| | | this.tableScroll = document.querySelector('.table2') |
| | | }, |
| | | beforeDestroy() { |
| | | this.tableScroll.removeEventListener('scroll', this.tableScrollX) |
| | | }, |
| | | watch: { |
| | | Type(valmath) { |
| | |
| | | dateParamChange(v1, v2) { |
| | | this.queryParam.startDate = v2[0] |
| | | this.queryParam.endDate = v2[1] |
| | | this.dates = [v1[0], v1[1]] |
| | | }, |
| | | searchQuery() { |
| | | if (this.queryParam.startTime && this.queryParam.endTime && this.dates && this.dates.length > 0) { |
| | | 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 |
| | |
| | | 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({ |
| | |
| | | // } |
| | | // } |
| | | loadData1() { |
| | | this.loading=true |
| | | this.loading = true |
| | | this.tableHeads = [] |
| | | this.dataList = [] |
| | | // è¥æ¥æéæ©å¨è®¾ç½®çæ¥è¯¢è¯·æ±æ°éè¶
è¿15æ¡åå¼å¯æå è½½ |
| | | if (this.requestAlldataSize > 15) { |
| | | // å¼å¯æå è½½åå°ç»ææ¥æè®¾ç½®ä¸ºå¼å§æ¥æä¹åç14天ï¼å³å
æ¥è¯¢15天å
çæ°æ® |
| | | this.queryParam.endDate = moment(this.queryParam.startDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD') |
| | | this.isLazyRequest = true |
| | | this.tableScroll.removeEventListener('scroll', this.tableScrollX) // 为é¿å
æ»å¨æ¡ææ»å¨è·ç¦»ååç¹å»æ¥è¯¢æé®è§¦åæ»å¨äºä»¶ï¼å æ¤å¨è§¦åäºä»¶åç§»é¤äºä»¶ |
| | | } |
| | | getAction(this.url.efficiencyList, this.queryParam).then(res => { |
| | | if (res.success) { |
| | | this.tableHeads = res.result.dates |
| | |
| | | // this.checkSameData2(this.dataList) |
| | | // this.combineCell(); |
| | | // this.initDeviceType(this.dataList) |
| | | |
| | | this.tableScroll.addEventListener('scroll', this.tableScrollX) |
| | | } |
| | | }).finally(()=>{ |
| | | this.loading=false |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | draw() { |
| | |
| | | ] |
| | | } |
| | | openRateTrendAnalysisChart.setOption(openRateTrendChartOptions, true) |
| | | }, |
| | | |
| | | /** |
| | | * æ»å¨æ¡è§¦åºå·æ°è¡¨æ ¼æ°æ® |
| | | */ |
| | | tableScrollX() { |
| | | // 彿»å¨æ¡è§¦åºä¸æå è½½å¼å¯æ¶è§¦åæ»å¨æ¡è§¦åºå·æ° |
| | | if (Math.ceil(this.tableScroll.scrollLeft + this.tableScroll.clientWidth) + 1 >= this.tableScroll.scrollWidth && this.isLazyRequest) { |
| | | this.loading = true |
| | | this.queryParam.startDate = moment(this.queryParam.endDate).add(1, 'days').format('YYYYMMDD') |
| | | // å¤æè®¾ç½®æå è½½åçç»ææ¶é´æ¯å¦è¶
è¿æ¶é´éæ©å¨ä¸è®¾ç½®çç»ææ¶é´ |
| | | if (moment(this.queryParam.endDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD') - moment(this.dates[1]).format('YYYYMMDD') < 0) { |
| | | //忬¡æ¥è¯¢å15天å
çæ°æ® |
| | | this.queryParam.endDate = moment(this.queryParam.endDate).add(this.everyRequestDataSize, 'days').format('YYYYMMDD') |
| | | } else { |
| | | // 妿ä¸å°äºæ¶é´éæ©å¨ä¸è®¾ç½®çæ¶é´å设置请æ±ç»ææ¥æä¸ºæ¶é´éæ©å¨ä¸è®¾ç½®çç»ææ¶é´å¹¶ä¸å
³éæå è½½ï¼æå³çæå䏿¬¡è§¦åºå·æ°ï¼ |
| | | this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.isLazyRequest = false |
| | | } |
| | | getAction(this.url.efficiencyList, this.queryParam).then(res => { |
| | | if (res.success) { |
| | | this.tableHeads = [...this.tableHeads, ...res.result.dates] |
| | | this.dataList.forEach(item1 => { |
| | | res.result.mdcEfficiencyList.forEach(item2 => { |
| | | if (item1.equipmentId === item2.equipmentId) { |
| | | item1.dataList = [...item1.dataList, ...item2.dataList] |
| | | } |
| | | }) |
| | | }) |
| | | this.draw() |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | }, |
| | | tableHeads: [], |
| | | XData: [0], |
| | | YData: [0] |
| | | YData: [0], |
| | | isLazyRequest: '',// æ¯å¦å¼å¯æå è½½ |
| | | requestAlldataSize: 8,// æ»å
±è¯·æ±çå表项æ°ç® |
| | | everyRequestDataSize: 15// æ¯æ¬¡è¯·æ±çå表项æ°ç® |
| | | } |
| | | }, |
| | | props: { nodeTree: '', Type: '', nodePeople: '' }, |
| | |
| | | this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.queryParam.typeTree = '1' |
| | | this.loadData1() |
| | | }, |
| | | mounted() { |
| | | this.tableScroll = document.querySelector('.table2') |
| | | }, |
| | | beforeDestroy() { |
| | | this.tableScroll.removeEventListener('scroll', this.tableScrollX) |
| | | }, |
| | | watch: { |
| | | Type(valmath) { |
| | |
| | | dateParamChange(v1, v2) { |
| | | this.queryParam.startDate = v2[0] |
| | | this.queryParam.endDate = v2[1] |
| | | this.dates = [v1[0], v1[1]] |
| | | }, |
| | | searchQuery() { |
| | | if (this.dates && this.dates.length > 0) { |
| | | 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 |
| | |
| | | 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({ |
| | |
| | | this.loading = true |
| | | this.tableHeads = [] |
| | | this.dataList = [] |
| | | // è¥æ¥æéæ©å¨è®¾ç½®çæ¥è¯¢è¯·æ±æ°éè¶
è¿15æ¡åå¼å¯æå è½½ |
| | | if (this.requestAlldataSize > 15) { |
| | | // å¼å¯æå è½½åå°ç»ææ¥æè®¾ç½®ä¸ºå¼å§æ¥æä¹åç14天ï¼å³å
æ¥è¯¢15天å
çæ°æ® |
| | | this.queryParam.endDate = moment(this.queryParam.startDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD') |
| | | this.isLazyRequest = true |
| | | this.tableScroll.removeEventListener('scroll', this.tableScrollX) // 为é¿å
æ»å¨æ¡ææ»å¨è·ç¦»ååç¹å»æ¥è¯¢æé®è§¦åæ»å¨äºä»¶ï¼å æ¤å¨è§¦åäºä»¶åç§»é¤äºä»¶ |
| | | } |
| | | getAction(this.url.efficiencyList, this.queryParam).then(res => { |
| | | if (res.success) { |
| | | this.tableHeads = res.result.dates |
| | |
| | | // this.checkSameData2(this.dataList) |
| | | // this.combineCell(); |
| | | // this.initDeviceType(this.dataList) |
| | | this.tableScroll.addEventListener('scroll', this.tableScrollX) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | ] |
| | | } |
| | | openRateTrendAnalysisChart.setOption(openRateTrendChartOptions, true) |
| | | }, |
| | | |
| | | /** |
| | | * æ»å¨æ¡è§¦åºå·æ°è¡¨æ ¼æ°æ® |
| | | */ |
| | | tableScrollX() { |
| | | // 彿»å¨æ¡è§¦åºä¸æå è½½å¼å¯æ¶è§¦åæ»å¨æ¡è§¦åºå·æ° |
| | | if (Math.ceil(this.tableScroll.scrollLeft + this.tableScroll.clientWidth) + 1 >= this.tableScroll.scrollWidth && this.isLazyRequest) { |
| | | this.loading = true |
| | | this.queryParam.startDate = moment(this.queryParam.endDate).add(1, 'days').format('YYYYMMDD') |
| | | // å¤æè®¾ç½®æå è½½åçç»ææ¶é´æ¯å¦è¶
è¿æ¶é´éæ©å¨ä¸è®¾ç½®çç»ææ¶é´ |
| | | if (moment(this.queryParam.endDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD') - moment(this.dates[1]).format('YYYYMMDD') < 0) { |
| | | //忬¡æ¥è¯¢å15天å
çæ°æ® |
| | | this.queryParam.endDate = moment(this.queryParam.endDate).add(this.everyRequestDataSize, 'days').format('YYYYMMDD') |
| | | } else { |
| | | // 妿ä¸å°äºæ¶é´éæ©å¨ä¸è®¾ç½®çæ¶é´å设置请æ±ç»ææ¥æä¸ºæ¶é´éæ©å¨ä¸è®¾ç½®çç»ææ¶é´å¹¶ä¸å
³éæå è½½ï¼æå³çæå䏿¬¡è§¦åºå·æ°ï¼ |
| | | this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.isLazyRequest = false |
| | | } |
| | | getAction(this.url.efficiencyList, this.queryParam).then(res => { |
| | | if (res.success) { |
| | | this.tableHeads = [...this.tableHeads, ...res.result.dates] |
| | | this.dataList.forEach(item1 => { |
| | | res.result.mdcEfficiencyList.forEach(item2 => { |
| | | if (item1.equipmentId === item2.equipmentId) { |
| | | item1.dataList = [...item1.dataList, ...item2.dataList] |
| | | } |
| | | }) |
| | | }) |
| | | this.draw() |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | this.allTreeKeys = [] |
| | | this.treeDataSource = res.result |
| | | this.generateList(res.result) |
| | | this.expandedKeys=this.allTreeKeys |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | } |
| | |
| | | <a-button @click="handleAdd(1)" type="primary">æ·»å 车é´</a-button> |
| | | <a-button @click="handleAdd(2)" type="primary">æ·»å ä¸çº§</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('车é´ä¿¡æ¯')">导åº</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" |
| | | :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | </a-upload> |
| | | <a-button title="å é¤å¤æ¡æ°æ®" @click="batchDel" type="default">æ¹éå é¤</a-button> |
| | | <a-button @click="handleDelete" v-if="selectedKeys.length>0">å é¤</a-button> |
| | | <a-button title="å é¤å¤æ¡æ°æ®" @click="batchDel" v-if="checkedKeys.length>0">æ¹éå é¤</a-button> |
| | | <!--<a-button @click="refresh" type="default" icon="reload" :loading="loading">å·æ°</a-button>--> |
| | | </a-row> |
| | | ` |
| | | <div style="background: #fff;padding-left:16px;height: 100%; margin-top: 5px"> |
| | | <a-alert type="info" :showIcon="true"> |
| | | <div slot="message"> |
| | |
| | | <a-input-search @search="onSearch" style="width:100%;margin-top: 10px" placeholder="请è¾å
¥è½¦é´åç§°"/> |
| | | <!-- æ --> |
| | | <a-col :md="10" :sm="24"> |
| | | <template> |
| | | <a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus"> |
| | | <span style="user-select: none"> |
| | | <!--<template>--> |
| | | <!--<a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">--> |
| | | <!--<span style="user-select: none">--> |
| | | <!--<a-tree--> |
| | | <!--checkable--> |
| | | <!--multiple--> |
| | | <!--@select="onSelect"--> |
| | | <!--@check="onCheck"--> |
| | | <!--@rightClick="rightHandle"--> |
| | | <!--:selectedKeys="selectedKeys"--> |
| | | <!--:checkedKeys="checkedKeys"--> |
| | | <!--:treeData="departTree"--> |
| | | <!--:checkStrictly="checkStrictly"--> |
| | | <!--:expandedKeys="iExpandedKeys"--> |
| | | <!--:autoExpandParent="autoExpandParent"--> |
| | | <!--@expand="onExpand"/>--> |
| | | <!--</span>--> |
| | | <!--<!–æ°å¢å³é®ç¹å»äºä»¶,åå¢å æ·»å åå é¤åè½–>--> |
| | | |
| | | <!--<a-menu slot="overlay">--> |
| | | <!--<a-menu-item @click="handleAdd(3)" key="1">æ·»å </a-menu-item>--> |
| | | <!--<a-menu-item @click="handleDelete" key="2">å é¤</a-menu-item>--> |
| | | <!--<a-menu-item @click="closeDrop" key="3">åæ¶</a-menu-item>--> |
| | | <!--</a-menu>--> |
| | | <!--</a-dropdown>--> |
| | | <!--</template>--> |
| | | <a-tree |
| | | checkable |
| | | multiple |
| | |
| | | :expandedKeys="iExpandedKeys" |
| | | :autoExpandParent="autoExpandParent" |
| | | @expand="onExpand"/> |
| | | </span> |
| | | <!--æ°å¢å³é®ç¹å»äºä»¶,åå¢å æ·»å åå é¤åè½--> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item @click="handleAdd(3)" key="1">æ·»å </a-menu-item> |
| | | <a-menu-item @click="handleDelete" key="2">å é¤</a-menu-item> |
| | | <a-menu-item @click="closeDrop" key="3">åæ¶</a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </template> |
| | | </a-col> |
| | | </div> |
| | | </a-card> |
| | |
| | | <a-menu-item key="6" @click="closeAll">åå¹¶ææ</a-menu-item> |
| | | </a-menu> |
| | | <a-button> |
| | | æ æä½ <a-icon type="up" /> |
| | | æ æä½ |
| | | <a-icon type="up"/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | |
| | | </a-col> |
| | | <a-col :md="12" :sm="24"> |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tab-pane tab="åºæ¬ä¿¡æ¯" key="1" > |
| | | <a-tab-pane tab="åºæ¬ä¿¡æ¯" key="1"> |
| | | <a-card :bordered="false" v-if="selectedKeys.length>0"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionName" label="车é´åç§°"> |
| | | <a-input placeholder="请è¾å
¥äº§çº¿/车é´åç§°" v-model="model.productionName" /> |
| | | <a-input placeholder="请è¾å
¥äº§çº¿/车é´åç§°" v-model="model.productionName"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="ä¸çº§è½¦é´"> |
| | | <a-tree-select |
| | |
| | | </a-tree-select> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="æåº"> |
| | | <a-input-number v-model="model.departOrder" /> |
| | | <a-input-number v-model="model.productionOrder"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="夿³¨"> |
| | | <a-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.memo"/> |
| | |
| | | <a-button @click="submitCurrForm" type="primary" htmlType="button" icon="form">ä¿å</a-button> |
| | | </div> |
| | | </a-card> |
| | | <a-card v-else > |
| | | <a-card v-else> |
| | | <a-empty> |
| | | <span slot="description"> 请å
éæ©ä¸ä¸ªè½¦é´! </span> |
| | | </a-empty> |
| | |
| | | <!--</a-tab-pane>--> |
| | | <a-tab-pane tab="设å¤å表" key="2" forceRender> |
| | | <!--<depart-auth-modal/>--> |
| | | <production-equipment ref="departAuth"></production-equipment> |
| | | <production-equipment ref="departAuth"></production-equipment> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | </a-col> |
| | | <production-modal ref="departModal" @ok="loadTree"></production-modal> |
| | | <production-modal ref="departModal" @ok="loadTree"></production-modal> |
| | | </a-row> |
| | | </template> |
| | | <script> |
| | | import ProductionEquipment from './modules/ProductionManager/ProductionEquipment' |
| | | import {queryProductionTreeList, searchByKeywords, deleteByProduction} from '@/api/api' |
| | | import {httpAction, deleteAction} from '@/api/manage' |
| | | import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
| | | import { queryProductionTreeList, searchByKeywords, deleteByProduction } from '@/api/api' |
| | | import { httpAction, deleteAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import ProductionModal from './modules/ProductionManager/ProductionModal' |
| | | // 表头 |
| | | const columns = [ |
| | | { |
| | | title: 'æºæåç§°', |
| | | dataIndex: 'departName' |
| | | }, |
| | | { |
| | | title: 'æºæç±»å', |
| | | align: 'center', |
| | | dataIndex: 'orgType' |
| | | }, |
| | | { |
| | | title: 'æºæç¼ç ', |
| | | dataIndex: 'orgCode', |
| | | }, |
| | | { |
| | | title: 'ææºå·', |
| | | dataIndex: 'mobile' |
| | | }, |
| | | { |
| | | title: 'ä¼ ç', |
| | | dataIndex: 'fax' |
| | | }, |
| | | { |
| | | title: 'å°å', |
| | | dataIndex: 'address' |
| | | }, |
| | | { |
| | | title: 'æåº', |
| | | align: 'center', |
| | | dataIndex: 'departOrder' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | align: 'center', |
| | | dataIndex: 'action', |
| | | scopedSlots: {customRender: 'action'} |
| | | } |
| | | ] |
| | | |
| | | export default { |
| | | name: 'ProductionManager', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | ProductionEquipment, |
| | | ProductionModal, |
| | | ProductionModal |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | model: {}, |
| | | dropTrigger: '', |
| | | depart: {}, |
| | | columns: columns, |
| | | disableSubmit: false, |
| | | checkedKeys: [], |
| | | selectedKeys: [], |
| | | autoIncr: 1, |
| | | currSelected: {}, |
| | | allTreeKeys:[], |
| | | allTreeKeys: [], |
| | | checkStrictly: true, |
| | | labelCol: { |
| | | xs: {span: 24}, |
| | | sm: {span: 5} |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: {span: 24}, |
| | | sm: {span: 16} |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | graphDatasource: { |
| | | nodes: [], |
| | | edges: [] |
| | | }, |
| | | validatorRules: { |
| | | productionName: [{required: true, message: '请è¾å
¥äº§çº¿/车é´åç§°!'}], |
| | | productionName: [{ required: true, message: '请è¾å
¥äº§çº¿/车é´åç§°!' }] |
| | | }, |
| | | url: { |
| | | delete: '/mdc/mdcProduction/delete', |
| | | edit: '/mdc/mdcProduction/edit', |
| | | deleteBatch: '/mdc/mdcProduction/deleteBatch', |
| | | exportXlsUrl: "/mdc/mdcProduction/exportXls", |
| | | importExcelUrl: "/mdc/mdcProduction/importExcel", |
| | | exportXlsUrl: '/mdc/mdcProduction/exportXls', |
| | | importExcelUrl: '/mdc/mdcProduction/importExcel' |
| | | }, |
| | | orgCategoryDisabled:false, |
| | | orgCategoryDisabled: false, |
| | | isIncludesNotLeaf: false |
| | | } |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function () { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | methods: { |
| | | loadData() { |
| | | this.refresh(); |
| | | this.refresh() |
| | | }, |
| | | loadTree() { |
| | | var that = this |
| | |
| | | queryProductionTreeList().then((res) => { |
| | | if (res.success) { |
| | | //é¨é¨å
¨éåï¼åæ·»å é¨é¨ï¼é䏿°éå¢å¤ |
| | | this.allTreeKeys = []; |
| | | this.allTreeKeys = [] |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | let temp = res.result[i] |
| | | that.treeData.push(temp) |
| | | that.departTree.push(temp) |
| | | that.setThisExpandedKeys(temp) |
| | | that.getAllKeys(temp); |
| | | that.getAllKeys(temp) |
| | | // console.log(temp.id) |
| | | } |
| | | this.loading = false |
| | |
| | | this.loadTree() |
| | | }, |
| | | // å³é®æä½æ¹æ³ |
| | | rightHandle(node) { |
| | | rightHandle({ event, node }) { |
| | | this.dropTrigger = 'contextmenu' |
| | | console.log(node.node.eventKey) |
| | | this.rightClickSelectedKey = node.node.eventKey |
| | | this.rightClickSelectedOrgCode = node.node.dataRef.orgCode |
| | | const record = node.dataRef |
| | | this.rightClickSelectedKey = record.id |
| | | this.rightClickSelected = record |
| | | this.rightClickSelectedOrgCode = record.orgCode |
| | | }, |
| | | onExpand(expandedKeys) { |
| | | console.log('onExpand', expandedKeys) |
| | |
| | | addRootNode() { |
| | | this.$refs.nodeModal.add(this.currFlowId, '') |
| | | }, |
| | | batchDel: function () { |
| | | batchDel: function() { |
| | | console.log(this.checkedKeys) |
| | | if (this.checkedKeys.length <= 0) { |
| | | // this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼') |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"è¯·éæ©ä¸æ¡è®°å½" |
| | | }); |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.checkedKeys.length; a++) { |
| | | ids += this.checkedKeys[a] + ',' |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认å é¤', |
| | | content: 'ç¡®å®è¦å 餿éä¸ç ' + this.checkedKeys.length + ' æ¡æ°æ®ï¼ä»¥ååèç¹æ°æ®å?', |
| | | onOk: function () { |
| | | deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.loadTree() |
| | | that.onClearSelected() |
| | | } else { |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | this.isIncludesNotLeaf = false |
| | | this.includesNotLeaf(this.departTree) |
| | | console.log('isIncludesNotLeaf', this.isIncludesNotLeaf) |
| | | |
| | | // 为trueå表示éä¸é¡¹å
å«éå¶åç»ç¹ falseå表示éä¸é¡¹å为å¶åç»ç¹ |
| | | if (!this.isIncludesNotLeaf) { |
| | | if (this.checkedKeys.length <= 0) { |
| | | // this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼') |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©ä¸æ¡è®°å½' |
| | | }) |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.checkedKeys.length; a++) { |
| | | ids += this.checkedKeys[a] + ',' |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认å é¤', |
| | | content: 'ç¡®å®è¦å 餿éä¸ç ' + this.checkedKeys.length + ' æ¡æ°æ®?', |
| | | onOk: function() { |
| | | deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success(res.message) |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadTree() |
| | | that.onClearSelected() |
| | | } else { |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'éä¸é¡¹å
å«å·²æè½½åèç¹è½¦é´' |
| | | }) |
| | | } |
| | | }, |
| | | includesNotLeaf(treeData) { |
| | | for (let i = 0; i < treeData.length; i++) { |
| | | if (!treeData[i].leaf) { |
| | | this.includesNotLeaf(treeData[i].children) |
| | | } |
| | | if (this.checkedKeys.includes(treeData[i].id) && !treeData[i].leaf) { |
| | | this.isIncludesNotLeaf = true |
| | | } |
| | | } |
| | | }, |
| | | onSearch(value) { |
| | | let that = this |
| | | if (value) { |
| | | searchByKeywords({keyWord: value}).then((res) => { |
| | | searchByKeywords({ keyWord: value }).then((res) => { |
| | | if (res.success) { |
| | | that.departTree = [] |
| | | for (let i = 0; i < res.result.length; i++) { |
| | |
| | | } else { |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | console.log('onCheck', checkedKeys, info) |
| | | this.hiding = false |
| | | //---- author:os_chengtgen -- date:20190827 -- for:忢ç¶åå¾éæ¨¡å¼ =======------ |
| | | if(this.checkStrictly){ |
| | | this.checkedKeys = checkedKeys.checked; |
| | | }else{ |
| | | if (this.checkStrictly) { |
| | | this.checkedKeys = checkedKeys.checked |
| | | } else { |
| | | this.checkedKeys = checkedKeys |
| | | } |
| | | //---- author:os_chengtgen -- date:20190827 -- for:忢ç¶åå¾éæ¨¡å¼ =======------ |
| | |
| | | onSelect(selectedKeys, e) { |
| | | console.log('selected', selectedKeys, e) |
| | | this.hiding = false |
| | | this.deleteTrigger = 'leftClick' |
| | | let record = e.node.dataRef |
| | | console.log('onSelect-record', record) |
| | | this.currSelected = Object.assign({}, record) |
| | |
| | | this.selectedKeys = [record.key] |
| | | this.model.parentId = record.parentId |
| | | this.setValuesToForm(record) |
| | | this.$refs.departAuth.show(record.id); |
| | | |
| | | this.$refs.departAuth.show(record.id) |
| | | }, |
| | | // 触åonSelectäºä»¶æ¶,为é¨é¨æ å³ä¾§çform表åèµå¼ |
| | | setValuesToForm(record) { |
| | | if(record.orgCategory == '1'){ |
| | | this.orgCategoryDisabled = true; |
| | | }else{ |
| | | this.orgCategoryDisabled = false; |
| | | if (record.orgCategory == '1') { |
| | | this.orgCategoryDisabled = true |
| | | } else { |
| | | this.orgCategoryDisabled = false |
| | | } |
| | | }, |
| | | getCurrSelectedTitle() { |
| | |
| | | if (!this.currSelected.id) { |
| | | // this.$message.warning('请ç¹å»éæ©è¦ä¿®æ¹è½¦é´!') |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"请ç¹å»éæ©è¦ä¿®æ¹è½¦é´ï¼" |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: '请ç¹å»éæ©è¦ä¿®æ¹è½¦é´ï¼' |
| | | }) |
| | | return |
| | | } |
| | | |
| | | httpAction(this.url.edit, this.currSelected, 'put').then((res) => { |
| | | if (res.success) { |
| | | // this.$message.success('ä¿åæå!') |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"ä¿åæå" |
| | | }); |
| | | this.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: 'ä¿åæå' |
| | | }) |
| | | this.loadTree() |
| | | } else { |
| | | // this.$message.error(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | emptyCurrForm() { |
| | | this.$refs.form.resetFields(); |
| | | this.model={} |
| | | this.$refs.form.resetFields() |
| | | this.model = {} |
| | | }, |
| | | nodeSettingFormSubmit() { |
| | | this.$refs.form.validate(valid => { |
| | |
| | | if (!key) { |
| | | // this.$message.warning('请å
ç¹å»éä¸ä¸çº§è½¦é´ï¼') |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"请å
ç¹å»éä¸ä¸çº§è½¦é´ï¼" |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: '请å
ç¹å»éä¸ä¸çº§è½¦é´ï¼' |
| | | }) |
| | | return false |
| | | } |
| | | this.$refs.departModal.add(this.selectedKeys) |
| | |
| | | }, |
| | | handleDelete() { |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认å é¤', |
| | | content: 'ç¡®å®è¦å 餿¤è½¦é´ä»¥ååèç¹æ°æ®å?', |
| | | onOk: function () { |
| | | deleteByProduction({id: that.rightClickSelectedKey}).then((resp) => { |
| | | if (resp.success) { |
| | | //å 餿ååï¼å»é¤å·²éä¸ä¸çæ°æ® |
| | | that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1); |
| | | // that.$message.success('å 餿å!') |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:"å 餿å" |
| | | }); |
| | | that.loadTree() |
| | | //å é¤å忥æ¸
空å³ä¾§åºæ¬ä¿¡æ¯å
容 |
| | | // let orgCode=that.model.orgCode; |
| | | // if(orgCode && orgCode === that.rightClickSelectedOrgCode){ |
| | | if (this.currSelected.leaf) { |
| | | this.$confirm({ |
| | | title: '确认å é¤', |
| | | content: `ç¡®å®è¦å é¤ ${that.currSelected.productionName} å?`, |
| | | onOk: function() { |
| | | deleteByProduction({ id: that.currSelected.id }).then((resp) => { |
| | | if (resp.success) { |
| | | //å 餿ååï¼å»é¤å·²éä¸ä¸çæ°æ® |
| | | // that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1) |
| | | // that.$message.success('å 餿å!') |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: 'å 餿å' |
| | | }) |
| | | that.loadTree() |
| | | //å é¤å忥æ¸
空å³ä¾§åºæ¬ä¿¡æ¯å
容 |
| | | // let orgCode=that.model.orgCode; |
| | | // if(orgCode && orgCode === that.rightClickSelectedOrgCode){ |
| | | that.onClearSelected() |
| | | // } |
| | | } else { |
| | | // that.$message.warning('å é¤å¤±è´¥!') |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"å é¤å¤±è´¥" |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | // } |
| | | } else { |
| | | // that.$message.warning('å é¤å¤±è´¥!') |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'å é¤å¤±è´¥' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'æ¤è½¦é´å·²æè½½åèç¹' |
| | | }) |
| | | } |
| | | console.log('deletedRecord', deletedRecord) |
| | | }, |
| | | selectDirectiveOk(record) { |
| | | console.log('éä¸æä»¤æ°æ®', record) |
| | | this.nodeSettingForm.setFieldsValue({directiveCode: record.directiveCode}) |
| | | this.nodeSettingForm.setFieldsValue({ directiveCode: record.directiveCode }) |
| | | this.currSelected.sysCode = record.sysCode |
| | | }, |
| | | getFlowGraphData(node) { |
| | |
| | | } |
| | | }, |
| | | //---- author:os_chengtgen -- date:20190827 -- for:忢ç¶åå¾éæ¨¡å¼ =======------ |
| | | expandAll () { |
| | | expandAll() { |
| | | this.iExpandedKeys = this.allTreeKeys |
| | | }, |
| | | closeAll () { |
| | | closeAll() { |
| | | this.iExpandedKeys = [] |
| | | }, |
| | | checkALL () { |
| | | checkALL() { |
| | | this.checkStriccheckStrictlytly = false |
| | | this.checkedKeys = this.allTreeKeys |
| | | }, |
| | | cancelCheckALL () { |
| | | cancelCheckALL() { |
| | | //this.checkedKeys = this.defaultCheckedKeys |
| | | this.checkedKeys = [] |
| | | }, |
| | | switchCheckStrictly (v) { |
| | | if(v==1){ |
| | | switchCheckStrictly(v) { |
| | | if (v == 1) { |
| | | this.checkStrictly = false |
| | | }else if(v==2){ |
| | | } else if (v == 2) { |
| | | this.checkStrictly = true |
| | | } |
| | | }, |
| | |
| | | this.currFlowId = this.$route.params.id |
| | | this.currFlowName = this.$route.params.name |
| | | // this.loadTree() |
| | | }, |
| | | } |
| | | |
| | | } |
| | | </script> |
| | |
| | | title: '车é´', |
| | | align: "center", |
| | | width: 240, |
| | | dataIndex: 'productionName' |
| | | dataIndex: 'productionName', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | |
| | | title: '车é´', |
| | | align: "center", |
| | | width: 240, |
| | | dataIndex: 'productionName' |
| | | dataIndex: 'productionName', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | |
| | | title: '车é´', |
| | | align: "center", |
| | | width: 240, |
| | | dataIndex: 'productionName' |
| | | dataIndex: 'productionName', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'çç»', |
| | |
| | | <!-- æç´¢åºå --> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="12" :sm="8"> |
| | | <a-form-item label="车é´åç§°" :labelCol="{ span: 5 }" :wrapperCol="{ span: 18, offset: 1 }"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="车é´åç§°" :labelCol="{ span: 5 }" :wrapperCol="{ span: 19}"> |
| | | <a-input placeholder="" v-model="queryParam.workshopName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <span style="float: left; overflow: hidden" class="table-page-search-submitButtons"> |
| | | <a-col :md="12" :sm="24"> |
| | | <a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <a-col> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | </span> |
| | | </a-row> |
| | |
| | | </a-col> |
| | | <a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1"> |
| | | <a-card :bordered="false"> |
| | | <div style="text-align: right"> |
| | | <a-icon type="close-circle" @click="hideUserList" /> |
| | | <div @click="hideUserList" class="close-circle"> |
| | | <a-icon type="close-circle"/> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | |
| | | </div> |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" :md="24" :sm="24"> |
| | | <a-button @click="handleAddDeviceInWorkshop" type="primary" icon="plus" style="margin-top: 16px" |
| | | <a-button @click="handleAddDeviceInWorkshop" type="primary" icon="plus" style="margin: 5px 0 10px 2px" |
| | | >å·²æè®¾å¤ |
| | | </a-button> |
| | | |
| | |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px"> |
| | |
| | | <!-- 表ååºå --> |
| | | <workshop-modal ref="modalForm" @ok="modalFormOk"></workshop-modal> |
| | | <!--æ°å¢è½¦é´--> |
| | | <select-device-modal ref="selectUserModal" @selectFinished="selectOK"></select-device-modal> |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'æ·»å å·²æè®¾å¤'"></select-device-modal> |
| | | <!--å·²æè®¾å¤--> |
| | | </a-row> |
| | | </template> |
| | |
| | | if (res.success) { |
| | | this.dataSource2 = res.result.records |
| | | this.ipagination2.total = res.result.total |
| | | }else{ |
| | | this.dataSource2=[] |
| | | } |
| | | this.loading2 = false |
| | | }) |
| | |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.loadData2() |
| | | that.onClearSelected() |
| | | that.onClearSelected2() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | |
| | | if (this.currentWorkshopId == '') { |
| | | this.$message.error('è¯·éæ©ä¸ä¸ªè½¦é´!') |
| | | } else { |
| | | this.$refs.selectUserModal.visible = true |
| | | this.$refs.selectUserModal.selectedRowKeys = [] |
| | | this.$refs.selectUserModal.selectedRows = [] |
| | | this.$refs.selectDeviceModal.visible = true |
| | | this.$refs.selectDeviceModal.selectedRowKeys = [] |
| | | this.$refs.selectDeviceModal.selectedRows = [] |
| | | this.$refs.selectDeviceModal.checkedKeys = [] |
| | | this.$refs.selectDeviceModal.expandAll() |
| | | } |
| | | }, |
| | | |
| | |
| | | .ant-btn { |
| | | margin-left: 8px; |
| | | } |
| | | .close-circle{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | right: 15px; |
| | | top: 15px; |
| | | cursor: pointer; |
| | | } |
| | | </style> |
| | |
| | | |
| | | <script> |
| | | import {changePassword} from '@/api/api' |
| | | import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
| | | |
| | | export default { |
| | | name: "PasswordModal", |
| | |
| | | sm: { span: 16 }, |
| | | }, |
| | | form:this.$form.createForm(this) |
| | | } |
| | | }, |
| | | watch:{ |
| | | visible:{ |
| | | handler(value){ |
| | | if(value) this.initDictData('password_length') |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | handleConfirmBlur (e) { |
| | | const value = e.target.value |
| | | this.confirmDirty = this.confirmDirty || !!value |
| | | } |
| | | }, |
| | | 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.rules[0]={ |
| | | required:true, |
| | | pattern: regExp, |
| | | message: `å¯ç ç±${res.result[0].value}使°åã大å°å忝åç¹æ®ç¬¦å·ç»æ!`, |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | httpAction(this.url.add,this.model,"post").then((res)=>{ |
| | | if(res.success){ |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | |
| | | <template> |
| | | <div> |
| | | <a-modal |
| | | centered |
| | | <a-drawer |
| | | :title="title" |
| | | :width="1000" |
| | | :visible="visible" |
| | | width="650" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | @close="handleCancel" |
| | | > |
| | | |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <!--<!– æ¥è¯¢åºå –>--> |
| | | <!--<div class="table-page-search-wrapper">--> |
| | | <!--<a-form layout="inline" @keyup.enter.native="searchQuery">--> |
| | | <!--<a-row :gutter="24">--> |
| | | |
| | | <a-col :span="10"> |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-input placeholder="请è¾å
¥è®¾å¤åç§°" v-model="queryParam.equipmentName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | <!--<a-col :span="10">--> |
| | | <!--<a-form-item label="设å¤åç§°">--> |
| | | <!--<a-input placeholder="请è¾å
¥è®¾å¤åç§°" v-model="queryParam.equipmentName"></a-input>--> |
| | | <!--</a-form-item>--> |
| | | <!--</a-col>--> |
| | | <!--<a-col :span="8">--> |
| | | <!--<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">--> |
| | | <!--<a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button>--> |
| | | <!--<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button>--> |
| | | <!--</span>--> |
| | | <!--</a-col>--> |
| | | |
| | | </a-row> |
| | | <!--</a-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"> |
| | | <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> |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <a-table |
| | | size="small" |
| | | bordered |
| | | rowKey="equipmentId" |
| | | :columns="columns1" |
| | | :dataSource="dataSource1" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :scroll="{ y: 240 }" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys,onSelectAll:onSelectAll,onSelect:onSelect,onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | </a-modal> |
| | | |
| | | </a-drawer> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { filterObj } from '@/utils/util' |
| | | import { getAction } from '@/api/manage' |
| | | // import { filterObj } from '@/utils/util' |
| | | // import { getAction } from '@/api/manage' |
| | | 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: 'SelectDeviceModal', |
| | | components: { |
| | | BaseTree, DepartTree |
| | | }, |
| | | props: { |
| | | editDisable: { |
| | | type: Boolean, |
| | | default() { |
| | | return true |
| | | } |
| | | }, |
| | | title: { |
| | | type: String |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'æ·»å å·²æè®¾å¤', |
| | | names: [], |
| | | visible: false, |
| | | placement: 'right', |
| | | description: '', |
| | | // æ¥è¯¢æ¡ä»¶ |
| | | queryParam: {}, |
| | | // 表头 |
| | | columns1: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 50, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'equipmentId' |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '设å¤ç±»å', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'equipmentType' |
| | | }, |
| | | { |
| | | title: '驱å¨ç±»å', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'driveType' |
| | | } |
| | | ], |
| | | //æ°æ®é |
| | | dataSource1: [], |
| | | dataSource2: [], |
| | | // å页忰 |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | cardLoading: false, |
| | | loading: false, |
| | | selectedRowKeys: [], |
| | | selectedRows: [], |
| | | treeDataSource: [], |
| | | expandedKeys: [], |
| | | checkedKeys: [], |
| | | url: { |
| | | list: '/mdc/mdcEquipment/list' |
| | | } |
| | | getBaseTree: '/mdc/mdcEquipment/queryTreeListByProduction' |
| | | }, |
| | | 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.loadData() |
| | | this.queryTreeData() |
| | | this.closeAll() |
| | | }, |
| | | methods: { |
| | | searchQuery() { |
| | | this.loadData(1) |
| | | ...mapActions(['QueryProduction']), |
| | | |
| | | onExpand(expandedKeys) { |
| | | this.expandedKeys = expandedKeys |
| | | this.autoExpandParent = false |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.loadData(1) |
| | | |
| | | 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.dataSource2 = this.selectedRowKeys |
| | | console.log('data---------' + this.dataSource2) |
| | | if (this.dataSource2.length > 0) { |
| | | this.$emit('selectFinished', this.dataSource2) |
| | | } |
| | | 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() |
| | | } |
| | | |
| | | // add() { |
| | | // this.visible = true |
| | | // }, |
| | | // loadData(arg) { |
| | | // //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | // if (arg === 1) { |
| | | // this.ipagination.current = 1 |
| | | // } |
| | | // var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | // getAction(this.url.list, params).then((res) => { |
| | | // if (res.success) { |
| | | // this.dataSource1 = res.result.records |
| | | // this.ipagination.total = res.result.total |
| | | // } |
| | | // }) |
| | | // }, |
| | | // getQueryParams() { |
| | | // var param = Object.assign({}, this.queryParam, this.isorter) |
| | | // param.field = this.getQueryField() |
| | | // param.pageNo = this.ipagination.current |
| | | // param.pageSize = this.ipagination.pageSize |
| | | // return filterObj(param) |
| | | // }, |
| | | // getQueryField() { |
| | | // //TODO åæ®µæéæ§å¶ |
| | | // }, |
| | | // onSelectAll(selected, selectedRows, changeRows) { |
| | | // if (selected === true) { |
| | | // for (var a = 0; a < changeRows.length; a++) { |
| | | // this.dataSource2.push(changeRows[a]) |
| | | // } |
| | | // } else { |
| | | // for (var b = 0; b < changeRows.length; b++) { |
| | | // this.dataSource2.splice(this.dataSource2.indexOf(changeRows[b]), 1) |
| | | // } |
| | | // } |
| | | // // console.log(selected, selectedRows, changeRows); |
| | | // }, |
| | | // onSelect(record, selected) { |
| | | // console.log(this.selectedRowKeys) |
| | | // if (selected === true) { |
| | | // this.dataSource2.push(record) |
| | | // } else { |
| | | // var index = this.dataSource2.indexOf(record) |
| | | // //console.log(); |
| | | // if (index >= 0) { |
| | | // this.dataSource2.splice(this.dataSource2.indexOf(record), 1) |
| | | // } |
| | | // } |
| | | // }, |
| | | // onSelectChange(selectedRowKeys, selectedRows) { |
| | | // console.log('selectedRowKeys', selectedRowKeys) |
| | | // this.selectedRowKeys = selectedRowKeys |
| | | // this.selectionRows = selectedRows |
| | | // }, |
| | | // onClearSelected() { |
| | | // this.selectedRowKeys = [] |
| | | // this.selectionRows = [] |
| | | // }, |
| | | // handleDelete: function(record) { |
| | | // this.dataSource2.splice(this.dataSource2.indexOf(record), 1) |
| | | // }, |
| | | // handleTableChange(pagination, filters, sorter) { |
| | | // //å页ãæåºãçéååæ¶è§¦å |
| | | // console.log(sorter) |
| | | // //TODO çé |
| | | // if (Object.keys(sorter).length > 0) { |
| | | // this.isorter.column = sorter.field |
| | | // this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc' |
| | | // } |
| | | // this.ipagination = pagination |
| | | // this.loadData() |
| | | // }, |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | | /deep/ .ant-modal { |
| | | /*transform-origin: 337px 50px;*/ |
| | | } |
| | | |
| | | .ant-card-body .table-operator { |
| | | margin-bottom: 18px; |
| | | } |
| | |
| | | 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> |
| | |
| | | <j-select-production v-model="model.selectedProduction" :multi="true" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-production> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="çç»åé
" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="teamId"> |
| | | <j-dict-select-tag |
| | | <j-dict-select-tag |
| | | v-model="model.teamId" |
| | | :triggerChange="true" |
| | | dictCode="mom_base_team,name,id,del_flag = 0" |
| | |
| | | import { duplicateCheck } from '@/api/api' |
| | | import JSelectProduction from '../../../components/jeecgbiz/JSelectProduction' |
| | | import {mapActions} from 'vuex' |
| | | import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
| | | |
| | | export default { |
| | | name: "UserModal", |
| | |
| | | nextProductionOptions:[], |
| | | isDepartType:'', |
| | | |
| | | } |
| | | }, |
| | | watch:{ |
| | | visible:{ |
| | | handler(value){ |
| | | if(value) this.initDictData('password_length') |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | }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}使°åã大å°å忝åç¹æ®ç¬¦å·ç»æ!`, |
| | | } |
| | | |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | </a-button> |
| | | </a-form-item> |
| | | |
| | | <a-form-model-item style="color: red"> |
| | | å¯çº§ï¼å
é¨ è¦åï¼æ¬ç³»ç»ç¦æ¢åå¨ãå¤çãä¼ è¾æ¶å¯ä¿¡æ¯ |
| | | </a-form-model-item> |
| | | |
| | | </a-form-model> |
| | | |
| | | <!--<two-step-captcha v-if="requiredTwoStepCaptcha" :visible="stepCaptchaVisible" @success="stepCaptchaSuccess" @cancel="stepCaptchaCancel"></two-step-captcha>--> |
| | |
| | | @success="loginSelectOk" |
| | | ></login-select-tenant> |
| | | <!--<third-login ref="thirdLogin"></third-login>--> |
| | | <user-password ref="userPassword"/> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import LoginPhone from './LoginPhone' |
| | | import store from '@/store' |
| | | import { getAction } from '../../api/manage' |
| | | import UserPassword from '../../components/tools/UserPassword' |
| | | |
| | | export default { |
| | | components: { |
| | | UserPassword, |
| | | LoginSelectTenant, |
| | | TwoStepCaptcha, |
| | | // ThirdLogin, |
| | |
| | | }, |
| | | // ç»å½åå°æå |
| | | requestSuccess(loginResult) { |
| | | this.$router.push({ path: "/isps/userAnnouncement" }).catch(() => { |
| | | // this.$router.push({ path: "/isps/userAnnouncement" }).catch(() => { |
| | | // console.log('ç»å½è·³è½¬é¦é¡µåºé,è¿ä¸ªé误ä»åªéæ¥ç') |
| | | // }) |
| | | this.$router.push({ path: "/dashboard/analysis" }).catch(() => { |
| | | console.log('ç»å½è·³è½¬é¦é¡µåºé,è¿ä¸ªé误ä»åªéæ¥ç') |
| | | }) |
| | | this.$notification.success({ |
| | |
| | | // this.$refs.loginSelect.show(loginResult) |
| | | }, |
| | | //ç»å½åå°å¤±è´¥ |
| | | requestFailed(err) { |
| | | requestFailed(err,username) { |
| | | let description = ((err.response || {}).data || {}).message || err.message || "请æ±åºç°é误ï¼è¯·ç¨ååè¯" |
| | | this.$notification['error']({ |
| | | message: 'ç»å½å¤±è´¥', |
| | | description: description, |
| | | duration: 4, |
| | | }); |
| | | if(err.code!==5001&&err.code!==5002){ |
| | | this.$notification['error']({ |
| | | message: 'ç»å½å¤±è´¥', |
| | | description: description, |
| | | duration: 4, |
| | | }); |
| | | }else{ |
| | | this.$notification['warning']({ |
| | | message: 'æç¤º', |
| | | description: description, |
| | | duration:1, |
| | | onClose:()=>{ |
| | | console.log('err',err) |
| | | this.$refs.userPassword.show(username) |
| | | } |
| | | }); |
| | | } |
| | | //è´¦æ·å¯ç ç»å½éè¯¯åæ´æ°éªè¯ç |
| | | // if (this.customActiveKey === 'tab1' && description.indexOf('å¯ç é误') > 0) { |
| | | // this.$refs.alogin.handleChangeCheckCode() |
| | |
| | | this.Login(loginParams).then((res) => { |
| | | this.$emit('success', res.result) |
| | | }).catch((err) => { |
| | | this.$emit('fail', err) |
| | | this.$emit('fail', err,loginParams.username) |
| | | }); |
| | | }else{ |
| | | this.$emit('validateFail') |