Merge remote-tracking branch 'origin/master'
| | |
| | | const queryRepairDepartTreeList = (params)=>getAction("/eam/eamBaseRepairDepart/queryTreeList",params); |
| | | const queryRepDepIdTree = (params)=>getAction("/eam/eamBaseRepairDepart/queryIdTree",params); |
| | | const deleteByRepairDepartId = (params)=>deleteAction("/eam/eamBaseRepairDepart/delete",params); |
| | | |
| | | //EAMä¸å¿ |
| | | const queryEamCenterTreeList = (params)=>getAction("/eam/BaseFactory/queryTreeList",params); |
| | | const queryEamCenterIdTree = (params)=>getAction("/eam/BaseFactory/queryIdTree",params); |
| | | const deleteByEamCenterId = (params)=>deleteAction("/eam/BaseFactory/delete",params); |
| | | //产线æ |
| | | |
| | | |
| | |
| | | editEquipment, |
| | | queryRepairDepartTreeList, |
| | | queryRepDepIdTree, |
| | | deleteByRepairDepartId |
| | | |
| | | deleteByRepairDepartId, |
| | | queryEamCenterTreeList, |
| | | queryEamCenterIdTree, |
| | | deleteByEamCenterId |
| | | } |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="components-input-demo-presuffix"> |
| | | <!----> |
| | | <a-input @click="openModal" placeholder="请ç¹å»éæ©EAMä¸å¿" v-model="textVals" readOnly :disabled="disabled"> |
| | | <a-icon slot="prefix" type="cluster" title="EAMä¸å¿éæ©æ§ä»¶"/> |
| | | <a-icon v-if="storeVals" slot="suffix" type="close-circle" @click="handleEmpty" title="æ¸
空"/> |
| | | </a-input> |
| | | <JSelectBaseFactoryModal |
| | | ref="innerBaseFactorySelectModal" |
| | | :modal-width="modalWidth" |
| | | :multi="multi" |
| | | :rootOpened="rootOpened" |
| | | :BaseFactoryId="value" |
| | | :store="storeField" |
| | | :text="textField" |
| | | :treeBaseFactory="treeBaseFactory" |
| | | @ok="handleOK" |
| | | @initComp="initComp"> |
| | | |
| | | </JSelectBaseFactoryModal> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import JSelectBaseFactoryModal from './modal/JSelectBaseFactoryModal' |
| | | import { underLinetoHump } from '@/components/_util/StringUtil' |
| | | export default { |
| | | name: 'JSelectBaseFactory', |
| | | components:{ |
| | | JSelectBaseFactoryModal |
| | | }, |
| | | props:{ |
| | | modalWidth:{ |
| | | type:Number, |
| | | default:500, |
| | | required:false |
| | | }, |
| | | multi:{ |
| | | type:Boolean, |
| | | default:false, |
| | | required:false |
| | | }, |
| | | rootOpened:{ |
| | | type:Boolean, |
| | | default:true, |
| | | required:false |
| | | }, |
| | | value:{ |
| | | type:String, |
| | | required:false |
| | | }, |
| | | disabled:{ |
| | | type: Boolean, |
| | | required: false, |
| | | default: false |
| | | }, |
| | | // èªå®ä¹è¿ååæ®µï¼é»è®¤è¿å id |
| | | customReturnField: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | backBaseFactory: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | }, |
| | | // åå¨å段 [key field] |
| | | store: { |
| | | type: String, |
| | | default: 'id', |
| | | required: false |
| | | }, |
| | | // æ¾ç¤ºå段 [label field] |
| | | text: { |
| | | type: String, |
| | | default: 'factoryName', |
| | | required: false |
| | | }, |
| | | treeBaseFactory: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | |
| | | }, |
| | | data(){ |
| | | return { |
| | | visible:false, |
| | | confirmLoading:false, |
| | | storeVals: '', //[key values] |
| | | textVals: '' //[label values] |
| | | } |
| | | }, |
| | | computed:{ |
| | | storeField(){ |
| | | let field = this.customReturnField |
| | | if(!field){ |
| | | field = this.store; |
| | | } |
| | | return underLinetoHump(field) |
| | | }, |
| | | textField(){ |
| | | return underLinetoHump(this.text) |
| | | } |
| | | }, |
| | | mounted(){ |
| | | this.storeVals = this.value |
| | | }, |
| | | watch:{ |
| | | value(val){ |
| | | this.storeVals = val |
| | | } |
| | | }, |
| | | methods:{ |
| | | initComp(textVals){ |
| | | this.textVals = textVals |
| | | }, |
| | | //è¿åéä¸ç车é´ä¿¡æ¯ |
| | | backBaseFactoryInfo(){ |
| | | if(this.backBaseFactory===true){ |
| | | //LOWCOD-2147 ãç¨æ·ç®¡çãéæ©é¨é¨åä¸çº§ä»¥åï¼è´è´£é¨é¨æ²¡ææ°æ®å¯é (é¶çæ¹é èªå®ä¹è¿ååæ®µå¯¼è´) |
| | | if(this.storeVals && this.storeVals.length>0){ |
| | | let arr1 = this.storeVals.split(',') |
| | | let arr2 = this.textVals.split(',') |
| | | let info = [] |
| | | for(let i=0;i<arr1.length;i++){ |
| | | info.push({ |
| | | value: arr1[i], |
| | | text: arr2[i] |
| | | }) |
| | | } |
| | | this.$emit('back', info) |
| | | } |
| | | } |
| | | }, |
| | | openModal(){ |
| | | this.$refs.innerBaseFactorySelectModal.show() |
| | | }, |
| | | handleOK(rows) { |
| | | if (!rows && rows.length <= 0) { |
| | | this.textVals = '' |
| | | this.storeVals = '' |
| | | } else { |
| | | let arr1 = [] |
| | | let arr2 = [] |
| | | for(let dep of rows){ |
| | | arr1.push(dep[this.storeField]) |
| | | arr2.push(dep[this.textField]) |
| | | } |
| | | this.storeVals = arr1.join(',') |
| | | this.textVals = arr2.join(',') |
| | | } |
| | | this.$emit("change", this.storeVals) |
| | | this.backBaseFactoryInfo() |
| | | }, |
| | | getBaseFactoryNames(){ |
| | | return this.departNames |
| | | }, |
| | | handleEmpty(){ |
| | | this.handleOK('') |
| | | } |
| | | }, |
| | | model: { |
| | | prop: 'value', |
| | | event: 'change' |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .components-input-demo-presuffix .anticon-close-circle { |
| | | cursor: pointer; |
| | | color: #ccc; |
| | | transition: color 0.3s; |
| | | font-size: 12px; |
| | | } |
| | | .components-input-demo-presuffix .anticon-close-circle:hover { |
| | | color: #f5222d; |
| | | } |
| | | .components-input-demo-presuffix .anticon-close-circle:active { |
| | | color: #666; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | title="请ç¹å»éæ©EAMä¸å¿" |
| | | :width="modalWidth" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | @ok="handleSubmit" |
| | | @cancel="handleCancel" |
| | | @update:fullscreen="isFullscreen" |
| | | wrapClassName="j-repair-depart-select-modal" |
| | | switchFullscreen |
| | | cancelText="å
³é"> |
| | | <a-spin tip="Loading..." :spinning="false"> |
| | | <a-input-search style="margin-bottom: 1px" placeholder="请è¾å
¥ä¸å¿/å·¥åº/工段åç§°æå车è¿è¡æç´¢" @search="onSearch" /> |
| | | <a-tree |
| | | checkable |
| | | :class="treeScreenClass" |
| | | :treeData="treeData" |
| | | :checkStrictly="checkStrictly" |
| | | @check="onCheck" |
| | | @select="onSelect" |
| | | @expand="onExpand" |
| | | :autoExpandParent="autoExpandParent" |
| | | :expandedKeys="expandedKeys" |
| | | :checkedKeys="checkedKeys"> |
| | | |
| | | <template slot="title" slot-scope="{title}"> |
| | | <span v-if="title.indexOf(searchValue) > -1"> |
| | | {{title.substr(0, title.indexOf(searchValue))}} |
| | | <span style="color: #f50">{{searchValue}}</span> |
| | | {{title.substr(title.indexOf(searchValue) + searchValue.length)}} |
| | | </span> |
| | | <span v-else>{{title}}</span> |
| | | </template> |
| | | </a-tree> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import {queryEamCenterTreeList} from '@/api/api' |
| | | export default { |
| | | name: 'JSelectBaseFactoryModal', |
| | | props:['modalWidth','multi','rootOpened','BaseFactoryId', 'store', 'text','treeBaseFactory'], |
| | | data(){ |
| | | return { |
| | | visible:false, |
| | | confirmLoading:false, |
| | | treeData:[], |
| | | autoExpandParent:true, |
| | | expandedKeys:[], |
| | | dataList:[], |
| | | checkedKeys:[], |
| | | checkedRows:[], |
| | | searchValue:"", |
| | | checkStrictly: false, |
| | | fullscreen:false |
| | | } |
| | | }, |
| | | created(){ |
| | | this.loadDepart(); |
| | | }, |
| | | watch:{ |
| | | BaseFactoryId(){ |
| | | this.initDepartComponent() |
| | | }, |
| | | visible: { |
| | | handler() { |
| | | this.initDepartComponent(true) |
| | | } |
| | | } |
| | | }, |
| | | computed:{ |
| | | treeScreenClass() { |
| | | return { |
| | | 'my-dept-select-tree': true, |
| | | 'fullscreen': this.fullscreen, |
| | | } |
| | | }, |
| | | }, |
| | | methods:{ |
| | | show(){ |
| | | this.visible=true |
| | | this.checkedRows=[] |
| | | this.checkedKeys=[] |
| | | }, |
| | | loadDepart(){ |
| | | // è¿ä¸ªæ¹æ³æ¯æ¾å°ææçé¨é¨ä¿¡æ¯ |
| | | queryEamCenterTreeList().then(res=>{ |
| | | if(res.success){ |
| | | let arr = [...res.result] |
| | | this.reWriterWithSlot(arr) |
| | | this.treeData = arr |
| | | this.initDepartComponent() |
| | | if(this.rootOpened){ |
| | | this.initExpandedKeys(res.result) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | initDepartComponent(flag){ |
| | | let arr = [] |
| | | //è¯¥æ¹æ³ä¸¤ä¸ªå°æ¹ç¨ 1.visibleæ¹åäºä»¶éæ°è®¾ç½®éä¸é¡¹ 2.ç»ä»¶ç¼è¾é¡µé¢åæ¾ |
| | | let fieldName = flag==true?'key':this.text |
| | | if(this.BaseFactoryId){ |
| | | let arr2 = this.BaseFactoryId.split(',') |
| | | for(let item of this.dataList){ |
| | | if(arr2.indexOf(item[this.store])>=0){ |
| | | arr.push(item[fieldName]) |
| | | } |
| | | } |
| | | } |
| | | if(flag==true){ |
| | | this.checkedKeys = [...arr] |
| | | }else{ |
| | | this.$emit("initComp", arr.join(',')) |
| | | } |
| | | }, |
| | | reWriterWithSlot(arr){ |
| | | for(let item of arr){ |
| | | if(item.children && item.children.length>0){ |
| | | this.reWriterWithSlot(item.children) |
| | | let temp = Object.assign({},item) |
| | | temp.children = {} |
| | | this.dataList.push(temp) |
| | | }else{ |
| | | this.dataList.push(item) |
| | | item.scopedSlots={ title: 'title' } |
| | | } |
| | | } |
| | | }, |
| | | initExpandedKeys(arr){ |
| | | if(arr && arr.length>0){ |
| | | let keys = [] |
| | | for(let item of arr){ |
| | | if(item.children && item.children.length>0){ |
| | | keys.push(item.id) |
| | | } |
| | | } |
| | | this.expandedKeys=[...keys] |
| | | //å
¨é¨keys |
| | | //this.allTreeKeys = [...keys] |
| | | }else{ |
| | | this.expandedKeys=[] |
| | | //this.allTreeKeys = [] |
| | | } |
| | | }, |
| | | onCheck (checkedKeys,info) { |
| | | if(!this.multi){ |
| | | let arr = checkedKeys.checked.filter(item => this.checkedKeys.indexOf(item) < 0) |
| | | this.checkedKeys = [...arr] |
| | | this.checkedRows = (this.checkedKeys.length === 0) ? [] : [info.node.dataRef] |
| | | }else{ |
| | | if(this.checkStrictly){ |
| | | this.checkedKeys = checkedKeys.checked |
| | | }else{ |
| | | this.checkedKeys = checkedKeys |
| | | } |
| | | this.checkedRows = this.getCheckedRows(this.checkedKeys) |
| | | } |
| | | }, |
| | | onSelect(selectedKeys,info) { |
| | | //åæ¶å
³èçæ
åµä¸æèµ°onSelectçé»è¾ |
| | | if(this.checkStrictly){ |
| | | let keys = [] |
| | | keys.push(selectedKeys[0]) |
| | | if(!this.checkedKeys || this.checkedKeys.length===0 || !this.multi){ |
| | | this.checkedKeys = [...keys] |
| | | this.checkedRows=[info.node.dataRef] |
| | | }else{ |
| | | let currKey = info.node.dataRef.key |
| | | if(this.checkedKeys.indexOf(currKey)>=0){ |
| | | this.checkedKeys = this.checkedKeys.filter(item=> item !==currKey) |
| | | }else{ |
| | | this.checkedKeys.push(...keys) |
| | | } |
| | | } |
| | | this.checkedRows = this.getCheckedRows(this.checkedKeys) |
| | | } |
| | | }, |
| | | onExpand (expandedKeys) { |
| | | this.expandedKeys = expandedKeys |
| | | this.autoExpandParent = false |
| | | }, |
| | | handleSubmit(){ |
| | | if(!this.checkedKeys || this.checkedKeys.length==0){ |
| | | this.$emit("ok",'') |
| | | }else{ |
| | | let checkRow = this.getCheckedRows(this.checkedKeys) |
| | | let keyStr = this.checkedKeys.join(",") |
| | | this.$emit("ok", checkRow, keyStr) |
| | | } |
| | | this.handleClear() |
| | | }, |
| | | handleCancel(){ |
| | | this.handleClear() |
| | | }, |
| | | handleClear(){ |
| | | this.visible=false |
| | | this.checkedKeys=[] |
| | | }, |
| | | getParentKey(currKey,treeData){ |
| | | let parentKey |
| | | for (let i = 0; i < treeData.length; i++) { |
| | | const node = treeData[i] |
| | | if (node.children) { |
| | | if (node.children.some(item => item.key === currKey)) { |
| | | parentKey = node.key |
| | | } else if (this.getParentKey(currKey, node.children)) { |
| | | parentKey = this.getParentKey(currKey, node.children) |
| | | } |
| | | } |
| | | } |
| | | return parentKey |
| | | }, |
| | | onSearch(value){ |
| | | const expandedKeys = this.dataList.map((item) => { |
| | | if (item.title.indexOf(value) > -1) { |
| | | return this.getParentKey(item.key,this.treeData) |
| | | } |
| | | return null |
| | | }).filter((item, i, self) => item && self.indexOf(item) === i) |
| | | |
| | | Object.assign(this, { |
| | | expandedKeys, |
| | | searchValue: value, |
| | | autoExpandParent: true, |
| | | }) |
| | | |
| | | |
| | | }, |
| | | // æ ¹æ® checkedKeys è·å rows |
| | | getCheckedRows(checkedKeys) { |
| | | const forChildren = (list, key) => { |
| | | for (let item of list) { |
| | | if (item.id === key) { |
| | | return item |
| | | } |
| | | if (item.children instanceof Array) { |
| | | let value = forChildren(item.children, key) |
| | | if (value != null) { |
| | | return value |
| | | } |
| | | } |
| | | } |
| | | return null |
| | | } |
| | | |
| | | let rows = [] |
| | | for (let key of checkedKeys) { |
| | | let row = forChildren(this.treeData, key) |
| | | if (row != null) { |
| | | rows.push(row) |
| | | } |
| | | } |
| | | return rows |
| | | }, |
| | | switchCheckStrictly (v) { |
| | | if(v==1){ |
| | | this.checkStrictly = false |
| | | }else if(v==2){ |
| | | this.checkStrictly = true |
| | | } |
| | | }, |
| | | isFullscreen(val){ |
| | | this.fullscreen=val |
| | | } |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | // éå¶é¨é¨éæ©æ é«åº¦ï¼é¿å
é¨é¨å¤ªå¤æ¶ç¹å»ç¡®å®ä¸ä¾¿ |
| | | .my-dept-select-tree{ |
| | | height:350px; |
| | | |
| | | &.fullscreen{ |
| | | height: calc(100vh - 250px); |
| | | } |
| | | overflow-y: scroll; |
| | | } |
| | | .drawer-bootom-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> |
| | |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | :customRow='clickThenSelect' |
| | | <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" |
| | | :pagination="ipagination" :loading="loading" class="j-table-force-nowrap" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" :customRow='clickThenSelect' |
| | | @change="handleTableChange"> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a v-if="record.standardStatus === 'START'" @click.stop="handleUpgrade(record)">åç</a> |
| | |
| | | </span> |
| | | </a-table> |
| | | |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tab-pane tab='ä¿å
»æ åæç»é¡¹' key="1"> |
| | | <div class="table-operator" style="margin:-16px"> |
| | | <eam-maintenance-standard-detail-list ref="standardDetailRef" :standardId="standardId" |
| | | :pageSelectionRow="selectionRows[0]"/> |
| | | </div> |
| | | <a-tabs defaultActiveKey="1" v-if="selectionRows.length===1"> |
| | | <template v-if="selectionRows[0]&&selectionRows[0].maintenanceCategory=='POINT_INSPECTION'"> |
| | | <a-tab-pane tab="æ¥ç¹æ£" key="1"> |
| | | <eam-maintenance-standard-detail-list :standardId="standardId" :pageSelectionRow="selectionRows[0]" |
| | | filterKey="DAY_INSPECTION"/> |
| | | </a-tab-pane> |
| | | <a-tab-pane tab="å¨ç¹æ£" key="2" forceRender> |
| | | <eam-maintenance-standard-detail-list :standardId="standardId" :pageSelectionRow="selectionRows[0]" |
| | | filterKey="WEEK_INSPECTION"/> |
| | | </a-tab-pane> |
| | | </template> |
| | | |
| | | <template v-if="selectionRows[0]&&selectionRows[0].maintenanceCategory=='SECOND_MAINTENANCE'"> |
| | | <a-tab-pane tab="æä½å·¥" key="1"> |
| | | <eam-maintenance-standard-detail-list :standardId="standardId" :pageSelectionRow="selectionRows[0]" |
| | | filterKey="OPERATOR_MAINTENANCE"/> |
| | | </a-tab-pane> |
| | | <a-tab-pane tab="维修工" key="2" forceRender> |
| | | <eam-maintenance-standard-detail-list :standardId="standardId" :pageSelectionRow="selectionRows[0]" |
| | | filterKey="REPAIRER_MAINTENANCE"/> |
| | | </a-tab-pane> |
| | | </template> |
| | | |
| | | <a-tab-pane tab="ä¸ä¿" key="1" v-if="selectionRows[0]&&selectionRows[0].maintenanceCategory=='THIRD_MAINTENANCE'"> |
| | | <eam-maintenance-standard-detail-list :standardId="standardId" |
| | | :pageSelectionRow="selectionRows[0]"/> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | |
| | | secondMaintenanceImportExcel: '/eam/maintenanceStandard/importSecondMaintenanceStandard', |
| | | thirdMaintenanceImportExcel: '/eam/maintenanceStandard/importThirdMaintenanceStandard', |
| | | inspectionXlsDownloadUrl: '导å
¥æ¨¡æ¿/ç¹æ£æ å导å
¥æ¨¡æ¿_v1.0.xlsx', |
| | | weekMaintenanceXlsDownloadUrl: '导å
¥æ¨¡æ¿/å¨ä¿æ å导å
¥æ¨¡æ¿_v1.0.xlsx', |
| | | secondMaintenanceXlsDownloadUrl: '导å
¥æ¨¡æ¿/äºä¿æ å导å
¥æ¨¡æ¿_v1.0.xlsx', |
| | | thirdMaintenanceXlsDownloadUrl: '导å
¥æ¨¡æ¿/ä¸ä¿æ å导å
¥æ¨¡æ¿_v1.0.xlsx' |
| | | secondMaintenanceXlsDownloadUrl: '导å
¥æ¨¡æ¿/äºä¿æ å导å
¥æ¨¡æ¿_v1.0.docx', |
| | | thirdMaintenanceXlsDownloadUrl: '导å
¥æ¨¡æ¿/ä¸ä¿æ å导å
¥æ¨¡æ¿_v1.0.docx' |
| | | }, |
| | | standardId: '-1' |
| | | } |
| | |
| | | type: Object, |
| | | default: () => { |
| | | } |
| | | }, |
| | | filterKey: { |
| | | type: String |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | description: 'ä¿å
»æ åæç»ç®¡ç页é¢', |
| | | // 表头 |
| | | columns: [], |
| | | defaultColumns: [ |
| | | inspectionColumns: [ |
| | | { |
| | | title: 'åºå·', |
| | | align: 'center', |
| | | dataIndex: 'itemCode', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: 'é¨ä½', |
| | | align: 'center', |
| | | dataIndex: 'itemPart', |
| | | ellipsis: true |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹åç±»', |
| | |
| | | ellipsis: true |
| | | } |
| | | ], |
| | | secondMaintenanceColumns: [ |
| | | { |
| | | title: 'åºå·', |
| | | align: 'center', |
| | | dataIndex: 'itemCode', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹åç±»', |
| | | align: 'center', |
| | | dataIndex: 'itemCategory_dictText', |
| | | width: 150 |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹ç®', |
| | | align: 'center', |
| | | dataIndex: 'itemName', |
| | | ellipsis: true |
| | | } |
| | | ], |
| | | thirdMaintenanceColumns: [ |
| | | { |
| | | title: 'åºå·', |
| | | align: 'center', |
| | | dataIndex: 'itemCode', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¨ä½', |
| | | align: 'center', |
| | | dataIndex: 'itemPart', |
| | | ellipsis: true |
| | | }, |
| | | { |
| | | title: 'ä¿å
Ȍ
容', |
| | | align: 'center', |
| | | dataIndex: 'itemName', |
| | | ellipsis: true |
| | | }, |
| | | { |
| | | title: 'éªæ¶æ å', |
| | | align: 'center', |
| | | dataIndex: 'itemDemand', |
| | | ellipsis: true |
| | | } |
| | | ], |
| | | disableMixinCreated: true, |
| | | url: { |
| | | list: '/eam/eamMaintenanceStandardDetail/list' |
| | | } |
| | |
| | | immediate: true, |
| | | handler(val) { |
| | | if (val) { |
| | | this.loadData(1) |
| | | console.log('val---------------------', val) |
| | | this.$nextTick(() => this.loadData(1)) |
| | | } else { |
| | | this.clearList() |
| | | } |
| | | } |
| | | }, |
| | | pageSelectionRow: { |
| | | immediate: true, |
| | | handler(val) { |
| | | if (val) { |
| | | if (val.maintenanceCategory != 'THIRD_MAINTENANCE') this.columns = [...this.defaultColumns.filter(item => item.dataIndex != 'itemPart')] |
| | | else this.columns = [...this.defaultColumns.filter(item => item.dataIndex != 'itemCategory_dictText')] |
| | | switch (val.maintenanceCategory) { |
| | | case 'POINT_INSPECTION': |
| | | this.columns = this.inspectionColumns |
| | | break |
| | | case 'SECOND_MAINTENANCE': |
| | | this.columns = this.secondMaintenanceColumns |
| | | break |
| | | case 'THIRD_MAINTENANCE': |
| | | this.columns = this.thirdMaintenanceColumns |
| | | break |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list屿§!') |
| | | return |
| | | } |
| | | if (this.standardId && this.standardId === '-1') { |
| | | this.clearList() |
| | | return |
| | |
| | | this.dataSource = [] |
| | | params.standardId = this.standardId |
| | | this.loading = true |
| | | console.log('----------------------', this.filterKey) |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | // console.log(res) |
| | | //update-begin---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | this.dataSource = res.result.records || res.result |
| | | if (this.filterKey) this.dataSource = res.result.records.filter(item => item.itemCategory == this.filterKey) |
| | | else this.dataSource = res.result.records |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total |
| | | } else { |
| | |
| | | <a-row> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="ç³»ç»"> |
| | | <a-input placeholder="请è¾å
¥ç³»ç»" :disabled="Boolean(+model.operationSystem)" v-model="model.system"/> |
| | | <a-input placeholder="请è¾å
¥ç³»ç»" :disabled="!Boolean(+model.operationSystem)" v-model="model.system"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | |
| | | { |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.inputNumber, |
| | | type: JVXETypes.normal, |
| | | width: 100, |
| | | align: 'center', |
| | | disabled: true |
| | |
| | | type: JVXETypes.normal, |
| | | width: 60, |
| | | align: 'center', |
| | | fixed: 'left' |
| | | disabled: true |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹', |
| | | key: 'itemName', |
| | | type: JVXETypes.textarea, |
| | | align: 'center', |
| | | fixed: 'left' |
| | | disabled: true |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.textarea, |
| | | align: 'center', |
| | | fixed: 'left' |
| | | disabled: true |
| | | }, |
| | | { |
| | | title: 'ç¹æ£ç»æ', |
| | | key: 'inspectionResult', |
| | | type: JVXETypes.slot, |
| | | slotName: 'inspectionResult', |
| | | align: 'center' |
| | | type: JVXETypes.textarea, |
| | | align: 'center', |
| | | disabled: true |
| | | }, |
| | | { |
| | | title: 'å¼å¸¸æè¿°', |
| | | key: 'exceptionDescription', |
| | | type: JVXETypes.slot, |
| | | slotName: 'exceptionDescription', |
| | | align: 'center' |
| | | type: JVXETypes.textarea, |
| | | align: 'center', |
| | | disabled: true |
| | | }, |
| | | { |
| | | title: 'å¼å¸¸æ¯å¦æ¥ä¿®', |
| | | key: 'reportFlag', |
| | | type: JVXETypes.slot, |
| | | slotName: 'reportFlag', |
| | | align: 'center' |
| | | type: JVXETypes.textarea, |
| | | align: 'center', |
| | | disabled: true |
| | | } |
| | | ] |
| | | } |
| | |
| | | |
| | | <maintenance-standard-approval-modal ref="maintenanceStandardApprovalModal" @modalFormOk="modalFormOk" |
| | | :selectShenpiData="selectedRowData"/> |
| | | |
| | | <inspection-order-handle ref="modalFormInspectionOrder" :selectShenpiData="selectedRowData"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction } from '@api/manage' |
| | | import MaintenanceStandardApprovalModal from './MaintenanceStandard/MaintenanceStandardApprovalModal' |
| | | import InspectionOrderHandle from './InspectionOrder/InspectionOrderHandle' |
| | | |
| | | export default { |
| | | name: 'NcDeviceCharactersList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { MaintenanceStandardApprovalModal }, |
| | | components: { InspectionOrderHandle, MaintenanceStandardApprovalModal }, |
| | | data() { |
| | | return { |
| | | description: '工使µ-æçå¾
å', |
| | |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»ä¿å
»è§èåç±»æµç¨è¯¦æ
æ¶è§¦å |
| | | * @param record |
| | | */ |
| | | handleMaintenanceStandard(record) { |
| | | console.log('this.$refs.maintenanceStandardApprovalModal.', this.$refs.maintenanceStandardApprovalModal) |
| | | this.selectedRowData = Object.assign({}, record) |
| | | this.$refs.maintenanceStandardApprovalModal.visible = true |
| | | this.$refs.maintenanceStandardApprovalModal.title = 'ä¿å
»è§è' |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="1200" |
| | | :visible="visible" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit||!hasInspectionDateArrived} }" |
| | | @ok="submitForm" |
| | | @cancel="handleCancel" |
| | | :mask-closable="false" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | centered |
| | | > |
| | | <j-modal :title="title" :width="1200" :visible="visible" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit||!hasInspectionDateArrived} }" @ok="submitForm" |
| | | @cancel="handleCancel" :mask-closable="false" :confirmLoading="confirmLoading" fullscreen> |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref='form' :model='tableRowRecord' :labelCol="labelCol" :wrapperCol="wrapperCol" |
| | | :rules="validatorRules"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ç¹æ£åºç¡ä¿¡æ¯</a-divider> |
| | | |
| | | <a-row :gutter="48"> |
| | | <a-col :span="8"> |
| | | <a-tabs> |
| | | <a-tab-pane tab="åºç¡ä¿¡æ¯"> |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="å·¥åå·"> |
| | |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="设å¤ç¼å·"> |
| | | <MaintenanceEquipmentSelect v-model="tableRowRecord.equipmentId" |
| | | :maintenanceCategory="'POINT_INSPECTION'" disabled |
| | | @autocompleteForm="autoCompleteForm"/> |
| | | :maintenanceCategory="'POINT_INSPECTION'" |
| | | disabled @autocompleteForm="autoCompleteForm"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="æ ååç§°"> |
| | | <a-input readOnly v-model="tableRowRecord.standardName"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="æ åç¼ç "> |
| | | <a-form-model-item label="è§èåç§°"> |
| | | <a-input readOnly v-model="tableRowRecord.standardName"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="è§èç¼ç "> |
| | | <a-input readOnly v-model="tableRowRecord.standardCode"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="ç¹æ£æ¥æ"> |
| | | <a-input v-model="tableRowRecord.inspectionDate" readOnly/> |
| | |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="span*3"> |
| | | <a-form-model-item label="夿³¨" :labelCol="{span:2}" :wrapperCol="{span:21}"> |
| | | <a-col :span="span*2"> |
| | | <a-form-model-item label="夿³¨" :labelCol="{span:4}" :wrapperCol="{span:20}"> |
| | | <a-textarea v-model="tableRowRecord.remark" rows="3" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-col> |
| | | |
| | | <a-row> |
| | | <a-form-model-item prop="imageFilesResult" label="ç¹æ£å¾ç" :labelCol="{span:2}" :wrapperCol="{span:21}"> |
| | | <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" |
| | | :disabled="isDisableOperation||!hasInspectionDateArrived" |
| | | v-model="tableRowRecord.fileList"/> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> |
| | | ä¿å
»é¡¹ä¿¡æ¯ |
| | | </a-divider> |
| | | |
| | | <a-col :span="disableSubmit||tableRowRecord.inspectionStatus=='UNDER_INSPECTION'?16:10"> |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane key="1" tab="ä¿å
»é¡¹æç»"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | | :rowNumber="false" |
| | | :rowSelection="true" |
| | | :bordered="true" |
| | | :alwaysEdit="true" |
| | | :toolbar="false" |
| | | keep-source |
| | | :height="300" |
| | | :loading="detail.loading" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns" |
| | | @selectRowChange="handleTableSelectRowChange" |
| | | > |
| | | <a-tab-pane key="1" tab="æ¥ç¹æ£"> |
| | | <j-vxe-table ref="editableDetailTable" :rowNumber="false" rowSelection bordered |
| | | alwaysEdit :toolbar="false" keep-source :height="300" :loading="detail.loading" |
| | | :dataSource="detail.dataSource" :columns="detail.columns" |
| | | @selectRowChange="handleTableSelectRowChange"> |
| | | <template v-slot:inspectionResult="props"> |
| | | <j-dict-select-tag v-model="props.row.inspectionResult" dictCode="eam_inspection_result" |
| | | :disabled="isDisableOperation" |
| | | placeholder="è¯·éæ©ç¹æ£ç»æ" |
| | | :disabled="isDisableOperation" placeholder="è¯·éæ©ç¹æ£ç»æ" |
| | | @change="handleInspectionResultSelectChange($event,props.row)" |
| | | style="width: 100%"/> |
| | | </template> |
| | |
| | | <j-dict-select-tag v-model="props.row.reportFlag" |
| | | :placeholder="props.row.inspectionResult==='2'?'è¯·éæ©å¼å¸¸æ¯å¦æ¥ä¿®':''" |
| | | :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult==='1'" |
| | | dictCode="yn" |
| | | dictCode="yn" style="width: 100%"/> |
| | | </template> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane key="2" tab="å¨ç¹æ£"> |
| | | <j-vxe-table ref="editableDetailTable" :rowNumber="false" rowSelection bordered |
| | | alwaysEdit :toolbar="false" keep-source :height="300" :loading="detail.loading" |
| | | :dataSource="detail.weekInspectionList" :columns="detail.columns" |
| | | @selectRowChange="handleTableSelectRowChange"> |
| | | <template v-slot:inspectionResult="props"> |
| | | <j-dict-select-tag v-model="props.row.inspectionResult" dictCode="eam_inspection_result" |
| | | :disabled="isDisableOperation" placeholder="è¯·éæ©ç¹æ£ç»æ" |
| | | @change="handleInspectionResultSelectChange($event,props.row)" |
| | | style="width: 100%"/> |
| | | </template> |
| | | |
| | | <template v-slot:exceptionDescription="props"> |
| | | <a-textarea style="height: 32px" v-model="props.row.exceptionDescription" |
| | | :placeholder="props.row.inspectionResult==='2'?'请è¾å
¥å¼å¸¸æè¿°':''" |
| | | :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult==='1'"/> |
| | | </template> |
| | | |
| | | <template v-slot:reportFlag="props"> |
| | | <j-dict-select-tag v-model="props.row.reportFlag" |
| | | :placeholder="props.row.inspectionResult==='2'?'è¯·éæ©å¼å¸¸æ¯å¦æ¥ä¿®':''" |
| | | :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult==='1'" |
| | | dictCode="yn" style="width: 100%"/> |
| | | </template> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | |
| | | <template v-if="selectShenpiData.procInstId"> |
| | | <a-tab-pane key='2' tab='æµç¨èç¹'> |
| | | <a-tab-pane key='3' tab='æµç¨èç¹'> |
| | | <a-card :bordered="false"> |
| | | <a-timeline> |
| | | <a-timeline-item v-for="(item,index) in hitaskDataSource" :key="index"> |
| | |
| | | </a-card> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane key='3' tab='æµç¨å¾'> |
| | | <img :src="imageSrc" alt="Fetched Image"/> |
| | | <a-tab-pane key='4' tab='æµç¨å¾'> |
| | | <img :src="imageSrc" width="100%" v-if="imageSrc"/> |
| | | </a-tab-pane> |
| | | </template> |
| | | |
| | | <a-button |
| | | v-if="selectedRowKeys.length>0&&!isDisableOperation&&hasInspectionDateArrived&&activeTabKey==='1'" |
| | | v-if="selectedRowKeys.length>0&&!isDisableOperation&&hasInspectionDateArrived&&activeTabKey==='1'&&activeTabKey==='2'" |
| | | slot="tabBarExtraContent" type="primary" |
| | | @click="handleSelectAllInspectionResult">æ¹éç¹æ£æ£å¸¸ |
| | | </a-button> |
| | | |
| | | <!--<a-dropdown slot="tabBarExtraContent" v-if="selectedRowKeys.length>0">--> |
| | | <!--<a-menu slot="overlay">--> |
| | | <!--<a-menu-item key="1" @click="handleSelectAllInspectionResult('æ£å¸¸')">æ£å¸¸</a-menu-item>--> |
| | | <!--<a-menu-item key="2" @click="handleSelectAllInspectionResult('å¼å¸¸')">å¼å¸¸</a-menu-item>--> |
| | | <!--</a-menu>--> |
| | | |
| | | <!--<a-button> æ¹ééæ©ç¹æ£ç»æ--> |
| | | <!--<a-icon type="down"/>--> |
| | | <!--</a-button>--> |
| | | <!--</a-dropdown>--> |
| | | </a-tabs> |
| | | </a-col> |
| | | |
| | | <template v-if="isDisplayConfirm"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 管çåç¡®è®¤ä¿¡æ¯ |
| | | </a-divider> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-col v-if="!disableSubmit&&isDisplayConfirm" :span="6"> |
| | | <a-tabs> |
| | | <a-tab-pane tab="维修工确认"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="confirmDealType" label="å¤çç±»å"> |
| | | <j-dict-select-tag type='radio' v-model='tableRowRecord.confirmDealType' dictCode='approved_rejected' |
| | | <j-dict-select-tag type='radio' v-model='tableRowRecord.confirmDealType' |
| | | dictCode='approved_rejected' |
| | | :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='WAIT_CONFIRM'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="confirmComment" label="å¤çæè§"> |
| | | <a-textarea placeholder="请è¾å
¥å¤çæè§" |
| | | :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='WAIT_CONFIRM'" |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </template> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@assets/less/TableExpand.less' |
| | | import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' |
| | | import { getAction, postAction, downFile } from '@api/manage' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | import moment from 'moment' |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | span: 8, |
| | | span: 12, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | tableRowRecord: {}, |
| | | assignFileStream: {}, |
| | | hitaskDataSource: [], |
| | | validatorRules: { |
| | | confirmDealType: [ |
| | |
| | | imageSrc: null, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | sm: { span: 9 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 30 }, |
| | | sm: { span: 16 } |
| | | sm: { span: 15 } |
| | | }, |
| | | visible: false, |
| | | // 表头 |
| | | url: { |
| | | // queryBomDataById: '/eam/eamInspectionOrder/selectVoById', |
| | | diagramView: '/assign/flow/diagramView', |
| | | queryHisTaskList: '/assign/flow/queryHisTaskList', |
| | | approve: '/eam/eamInspectionOrder/approval', |
| | | queryById: '/eam/eamInspectionOrder/queryById', |
| | | detailList: '/eam/eamInspectionOrderDetail/queryList' |
| | | detailList: '/eam/eamInspectionOrderDetail/queryList', |
| | | weekInspectionOrderList: '/eam/eamWeekInspectionDetail/queryStandardList' |
| | | }, |
| | | detail: { |
| | | loading: false, |
| | |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.normal, |
| | | width: '5%', |
| | | width: 60, |
| | | align: 'center', |
| | | fixed: 'left' |
| | | }, |
| | |
| | | title: 'ä¿å
»é¡¹', |
| | | key: 'itemName', |
| | | type: JVXETypes.normal, |
| | | width: '15%', |
| | | align: 'center', |
| | | fixed: 'left' |
| | | }, |
| | |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.normal, |
| | | width: '15%', |
| | | align: 'center', |
| | | fixed: 'left' |
| | | }, |
| | |
| | | key: 'inspectionResult', |
| | | type: JVXETypes.slot, |
| | | slotName: 'inspectionResult', |
| | | width: '15%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: '${title}ä¸è½ä¸ºç©ºï¼' } |
| | | { required: true, message: '${title}ä¸è½ä¸ºç©º' } |
| | | ] |
| | | }, |
| | | { |
| | |
| | | key: 'exceptionDescription', |
| | | type: JVXETypes.slot, |
| | | slotName: 'exceptionDescription', |
| | | width: '20%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { handler: this.customValidator } |
| | |
| | | key: 'reportFlag', |
| | | type: JVXETypes.slot, |
| | | slotName: 'reportFlag', |
| | | width: '20%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { handler: this.customValidator } |
| | | ] |
| | | } |
| | | ] |
| | | ], |
| | | weekInspectionList: [] |
| | | }, |
| | | selectedRowKeys: [], |
| | | disableSubmit: false, |
| | |
| | | this.detail.dataSource = [] |
| | | this.spinning = true |
| | | const param = { id: record.dataId } |
| | | let res = await getAction(this.url.queryById, param); |
| | | this.tableRowRecord = Object.assign({}, res.result); |
| | | if (this.tableRowRecord.imageFiles) { |
| | | let obj = JSON.parse(this.tableRowRecord.imageFiles) |
| | | this.tableRowRecord.fileList = [...obj] |
| | | } |
| | | await this.loadDetail(record.dataId) |
| | | let res = await getAction(this.url.queryById, param) |
| | | this.tableRowRecord = Object.assign({}, res.result) |
| | | this.loadDetail(record.dataId) |
| | | console.log('record', record) |
| | | this.getWeekInspectionOrderListByApi(this.tableRowRecord.standardId) |
| | | }, |
| | | |
| | | async submitForm() { |
| | |
| | | flowTaskVo.values = this.selectShenpiData.variables |
| | | flowTaskVo.confirmDealType = this.tableRowRecord.confirmDealType |
| | | flowTaskVo.confirmComment = this.tableRowRecord.confirmComment |
| | | flowTaskVo.fileList = this.tableRowRecord.fileList |
| | | flowTaskVo.tableDetailList = this.$refs.editableDetailTable.getTableData() |
| | | const that = this |
| | | console.log('表åæäº¤æ°æ®', flowTaskVo) |
| | | httpAction(this.url.approve, flowTaskVo, 'post') |
| | | postAction(this.url.approve, flowTaskVo) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | |
| | | this.selectedRowKeys = [] |
| | | this.visible = false |
| | | }, |
| | | //æ åéæ©åå |
| | | |
| | | /** |
| | | * è·åæ¥ç¹æ£æç» |
| | | * @param orderId |
| | | */ |
| | | loadDetail(orderId) { |
| | | if (orderId) { |
| | | getAction(this.url.detailList, { orderId: orderId }) |
| | | getAction(this.url.detailList, { orderId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * è·åç¹æ£å·¥åä¸çå¨ç¹æ£å表 |
| | | * @param standardId è§èid |
| | | */ |
| | | getWeekInspectionOrderListByApi(standardId) { |
| | | console.log('standardId-------------------------', standardId) |
| | | getAction(this.url.weekInspectionOrderList, { standardId, inspectionDate: this.tableRowRecord.inspectionDate }) |
| | | .then(res => { |
| | | if (res.success) this.detail.weekInspectionList = res.result |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | /deep/ .ant-select-dropdown-menu { |
| | | text-align: left; |
| | | } |
| | | |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :visible="visible" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | > |
| | | |
| | | <a-spin :spinning="loading"> |
| | | <!-- showLine --> |
| | | <a-form> |
| | | <a-form-item label="车é´å±çº§ï¼"> |
| | | <a-tree showLine ref="tree" :expandedKeys.sync="expandedKeys" |
| | | :treeData="treeDataSource" checkable @check="onCheck" v-model="checkedKeys" |
| | | @expand="onExpand"> |
| | | </a-tree> |
| | | </a-form-item> |
| | | </a-form> |
| | | |
| | | </a-spin> |
| | | |
| | | <template slot="footer"> |
| | | <div> |
| | | <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> |
| | | </template> |
| | | |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getAction, |
| | | postAction, |
| | | deleteAction |
| | | } from '@/api/manage' |
| | | import BaseTree from '@/views/mdc/common/BaseTree' |
| | | import DepartTree from '@/views/mdc/base/modules/DepartList/DepartListTree/DepartTree' |
| | | |
| | | export default { |
| | | name: 'selectEamDeviceModal', |
| | | components: { |
| | | BaseTree, DepartTree |
| | | }, |
| | | props: { |
| | | editDisable: { |
| | | type: Boolean, |
| | | default() { |
| | | return true |
| | | } |
| | | }, |
| | | title: { |
| | | type: String |
| | | }, |
| | | selectedProduction: { |
| | | type: String |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | treeDataSource: [], |
| | | expandedKeys: [], |
| | | checkedKeys: [], |
| | | url: { |
| | | getDeviceTree: '/eam/equipment/loadTreeListByEamCenterIds' |
| | | }, |
| | | selectedWorkshopIds: '', |
| | | dataList: [], |
| | | allTreeKeys: [], |
| | | visible: false, |
| | | dataSource: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.closeAll() |
| | | }, |
| | | methods: { |
| | | onExpand(expandedKeys) { |
| | | this.expandedKeys = expandedKeys |
| | | this.autoExpandParent = false |
| | | }, |
| | | queryTreeData(value) { |
| | | this.loading = true |
| | | this.selectedWorkshopIds = value |
| | | getAction(this.url.getDeviceTree, { ids: value }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.dataList = [] |
| | | this.allTreeKeys = [] |
| | | this.getTreeDataSouce(res.result) |
| | | this.treeDataSource = res.result |
| | | this.generateList(this.treeDataSource) |
| | | this.expandedKeys = this.allTreeKeys |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | this.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: err.message |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | generateList(data) { |
| | | 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(this.selectedWorkshopIds) |
| | | }, |
| | | onCheck(value, obj) { |
| | | this.checkedKeys = value |
| | | this.deviceNodes = obj.checkedNodes.filter(item => item.data.props.equipmentId).map(item => item.data.props.equipmentId) |
| | | }, |
| | | handleCancel() { |
| | | this.visible = false |
| | | }, |
| | | handleOk() { |
| | | this.$emit('selectFinished', this.deviceNodes) |
| | | this.visible = false |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | | /deep/ .ant-modal { |
| | | /*transform-origin: 337px 50px;*/ |
| | | } |
| | | |
| | | .ant-card-body .table-operator { |
| | | margin-bottom: 18px; |
| | | } |
| | | |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 15px; |
| | | padding-bottom: 15px; |
| | | } |
| | | |
| | | .anty-row-operator button { |
| | | margin: 0 5px |
| | | } |
| | | |
| | | .ant-btn-danger { |
| | | background-color: #ffffff |
| | | } |
| | | |
| | | .ant-modal-cust-warp { |
| | | height: 100% |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-body { |
| | | height: calc(100% - 110px) !important; |
| | | overflow-y: auto |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-content { |
| | | height: 90% !important; |
| | | overflow-y: hidden |
| | | } |
| | | |
| | | .drawer-bottom-button { |
| | | position: absolute; |
| | | bottom: 0; |
| | | width: 100%; |
| | | border-top: 1px solid #e8e8e8; |
| | | padding: 10px 16px; |
| | | text-align: right; |
| | | left: 0; |
| | | background: #fff; |
| | | border-radius: 0 0 2px 2px; |
| | | } |
| | | </style> |
| | |
| | | <a-input-search :readOnly="true" v-model="model.equipmentIds" @search="deviceSearch" enter-button placeholder="è¯·éæ©è®¾å¤" :disabled="!model.selectedProduction"/> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item label="EAMä¸å¿åé
" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="areaId"> |
| | | <j-multi-select-tag :triggerChange="true" v-model="model.eamFactoryIds" dictCode="mom_base_area,name,id,del_flag = 0 and type = 1" placeholder="请维æ¤ä¸å¿"/> |
| | | <a-form-model-item label="EAMä¸å¿åé
" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="eamFactoryIds"> |
| | | <JSelectBaseFactory v-model="model.selectedBaseFactory" :multi="true" @back="backBaseFactoryInfo" :backProduction="true" :treeProductOpera="true"/> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item label="EAM设å¤åé
" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!productionDisabled"> |
| | | <a-input-search :readOnly="true" v-model="model.eamEquipmentIds" @search="deviceSearch" enter-button placeholder="è¯·éæ©è®¾å¤" :disabled="!model.selectedProduction"/> |
| | | <a-input-search :readOnly="true" v-model="model.eamEquipmentIds" @search="eamDeviceSearch" enter-button placeholder="è¯·éæ©EAM设å¤" :disabled="!model.selectedBaseFactory"/> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item label="ç»´ä¿®é¨é¨/çç»åé
" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!repairDepartDisabled"> |
| | |
| | | </div> |
| | | |
| | | <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | |
| | | <select-eam-device-modal ref="selectEamDeviceModal" @selectFinished="selectEamOK" :title="'éæ©EAM设å¤'"/> |
| | | |
| | | </a-drawer> |
| | | </template> |
| | | |
| | |
| | | import { mapActions } from 'vuex' |
| | | import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
| | | import SelectDeviceModal from './SelectDeviceModal' |
| | | import SelectEamDeviceModal from './SelectEamDeviceModal' |
| | | import JSelectBaseFactory from "@comp/jeecgbiz/JSelectBaseFactory.vue"; |
| | | |
| | | export default { |
| | | name: 'UserModal', |
| | | components: { |
| | | JSelectBaseFactory, |
| | | SelectDeviceModal, |
| | | JSelectProduction, |
| | | JSelectRepairDepart |
| | | JSelectRepairDepart, |
| | | SelectEamDeviceModal |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | syncUserByUserName: '/act/process/extActProcess/doSyncUserByUserName',//åæ¥ç¨æ·å°å·¥ä½æµ |
| | | queryTenantList: '/sys/tenant/queryList', |
| | | userRepairDepartList: '/sys/user/userRepairDepartList', |
| | | userBaseFactoryList: '/sys/user/userBaseFactoryList', |
| | | repairDepartTreeList: '/eam/eamBaseRepairDepart/queryTreeList' |
| | | }, |
| | | tenantsOptions: [], |
| | | rolesOptions: [], |
| | | nextDepartOptions: [], |
| | | nextProductionOptions: [], |
| | | nextBaseFactoryOptions:[], |
| | | nextRepairDepartOptions: [], |
| | | isDepartType: '', |
| | | model: { |
| | | selectedProduction: '', |
| | | selectedRepairDeparts: '' |
| | | selectedRepairDeparts: '', |
| | | selectedBaseFactory:'', |
| | | } |
| | | } |
| | | }, |
| | |
| | | } |
| | | // 妿æ¸
空车é´å¼åéç½®éæ©è®¾å¤ |
| | | if (newVal === '') this.model.equipmentIds = '' |
| | | } |
| | | }, |
| | | 'model.selectedBaseFactory': { |
| | | handler(newVal, oldVal) { |
| | | if (newVal && this.$refs.selectEamDeviceModal) { |
| | | // å¦æè½¦é´éæ©ååä¸ä¸è´åéç½®éæ©è®¾å¤ |
| | | if ((oldVal && newVal !== oldVal)) this.model.eamEquipmentIds = '' |
| | | this.$refs.selectEamDeviceModal.queryTreeData(newVal) |
| | | } |
| | | // 妿æ¸
空车é´å¼åéç½®éæ©è®¾å¤ |
| | | if (newVal === '') this.model.eamEquipmentIds = '' |
| | | } |
| | | } |
| | | }, |
| | |
| | | selectedroles: '', |
| | | selecteddeparts: '', |
| | | selectedProduction: '', |
| | | selectedBaseFactory:'', |
| | | selectedRepairDeparts: '' |
| | | }) |
| | | }, |
| | |
| | | that.getUserDeparts(record.id) |
| | | that.getUserProductions(record.id) |
| | | that.getUserRepairDeparts(record.id) |
| | | this.getUserBaseFactorys(record.id) |
| | | } |
| | | }, |
| | | isDisabledAuth(code) { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | getUserBaseFactorys(userid) { |
| | | let that = this |
| | | // è·åEAMä¸å¿/å·¥åº/工段åé
|
| | | getAction(that.url.userBaseFactoryList, { userId: userid }).then((res) => { |
| | | if (res.success) { |
| | | let BaseFactoryOptions = [] |
| | | let selectedBaseFactoryOptionsKeys = [] |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | selectedBaseFactoryOptionsKeys.push(res.result[i].key) |
| | | //æ°å¢è´è´£ç»´ä¿®é¨é¨/çç»éæ©ä¸ææ¡ |
| | | BaseFactoryOptions.push({ |
| | | value: res.result[i].key, |
| | | label: res.result[i].title |
| | | }) |
| | | } |
| | | |
| | | this.$set(this.model, 'selectedBaseFactory', selectedBaseFactoryOptionsKeys.join(',')) |
| | | that.nextBaseFactoryOptions = BaseFactoryOptions |
| | | } |
| | | }) |
| | | }, |
| | | backDepartInfo(info) { |
| | | this.model.departIds = this.model.selecteddeparts |
| | | this.nextDepartOptions = info.map((item, index, arr) => { |
| | |
| | | backProductionInfo(info) { |
| | | this.model.productionIds = this.model.selectedProduction |
| | | this.nextProductionOptions = info.map((item, index, arr) => { |
| | | let c = { label: item.text, value: item.value + '' } |
| | | return c |
| | | }) |
| | | }, |
| | | backBaseFactoryInfo(info) { |
| | | this.model.eamFactoryIds = this.model.selectedBaseFactory |
| | | this.nextBaseFactoryOptions = info.map((item, index, arr) => { |
| | | let c = { label: item.text, value: item.value + '' } |
| | | return c |
| | | }) |
| | |
| | | this.userId = '' |
| | | this.nextDepartOptions = [] |
| | | this.nextProductionOptions = [] |
| | | this.nextBaseFactoryOptions = [] |
| | | this.nextRepairDepartOptions = [] |
| | | this.departIdShow = false |
| | | }, |
| | |
| | | this.visible = false |
| | | this.disableSubmit = false |
| | | this.nextDepartOptions = [] |
| | | this.nextProductionOptions = [] |
| | | this.nextProductionOptions = [] |
| | | this.nextRepairDepartOptions = [] |
| | | this.departIdShow = false |
| | |
| | | this.$refs.selectDeviceModal.checkedKeys = this.model.equipmentIds ? this.model.equipmentIds.split(',') : [] |
| | | }, |
| | | |
| | | eamDeviceSearch(){ |
| | | this.$refs.selectEamDeviceModal.visible = true |
| | | this.$refs.selectEamDeviceModal.selectedRowKeys = [] |
| | | this.$refs.selectEamDeviceModal.selectedRows = [] |
| | | this.$refs.selectEamDeviceModal.checkedKeys = this.model.eamEquipmentIds ? this.model.eamEquipmentIds.split(',') : [] |
| | | }, |
| | | |
| | | /** |
| | | * 鿩已æè®¾å¤åç¹å»ç¡®å®æ¶è§¦å |
| | | * @param data 已鿩çè®¾å¤æ°ç» |
| | |
| | | selectOK(data) { |
| | | console.log('data=', data) |
| | | this.$set(this.model, 'equipmentIds', data.join(',')) |
| | | }, |
| | | selectEamOK(data) { |
| | | console.log('data=', data) |
| | | this.$set(this.model, 'eamEquipmentIds', data.join(',')) |
| | | } |
| | | } |
| | | } |