已添加2个文件
已修改11个文件
已删除14个文件
| | |
| | | return; |
| | | } |
| | | } |
| | | |
| | | export function templateXlsDownload(fileUrl) { |
| | | let downloadUrl = getFileAccessHttpUrl(fileUrl) |
| | | if (downloadUrl) { |
| | | window.open(downloadUrl) |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="components-input-demo-presuffix"> |
| | | <!----> |
| | | <a-input @click="openModal" placeholder="请ç¹å»éæ©ç»´ä¿®é¨é¨" v-model="textVals" readOnly :disabled="disabled"> |
| | | <a-icon slot="prefix" type="cluster" title="ç»´ä¿®é¨é¨éæ©æ§ä»¶"/> |
| | | <a-icon v-if="storeVals" slot="suffix" type="close-circle" @click="handleEmpty" title="æ¸
空"/> |
| | | </a-input> |
| | | <j-select-repair-depart-modal |
| | | ref="innerRepairDepartSelectModal" |
| | | :modal-width="modalWidth" |
| | | :multi="multi" |
| | | :rootOpened="rootOpened" |
| | | :repairDepartId="value" |
| | | :store="storeField" |
| | | :text="textField" |
| | | :treeRepairDepartOpera="treeRepairDepartOpera" |
| | | @ok="handleOK" |
| | | @initComp="initComp"> |
| | | |
| | | </j-select-repair-depart-modal> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import JSelectRepairDepartModal from './modal/JSelectRepairDepartModal' |
| | | import { underLinetoHump } from '@/components/_util/StringUtil' |
| | | export default { |
| | | name: 'JSelectRepairDepart', |
| | | components:{ |
| | | JSelectRepairDepartModal |
| | | }, |
| | | 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: '' |
| | | }, |
| | | backRepairDepart: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | }, |
| | | // åå¨å段 [key field] |
| | | store: { |
| | | type: String, |
| | | default: 'id', |
| | | required: false |
| | | }, |
| | | // æ¾ç¤ºå段 [label field] |
| | | text: { |
| | | type: String, |
| | | default: 'departName', |
| | | required: false |
| | | }, |
| | | treeRepairDepartOpera: { |
| | | 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 |
| | | }, |
| | | //è¿åéä¸ç车é´ä¿¡æ¯ |
| | | backRepairDepartInfo(){ |
| | | if(this.backRepairDepart===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.innerRepairDepartSelectModal.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.backRepairDepartInfo() |
| | | }, |
| | | getRepairDepartNames(){ |
| | | 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="éæ©ç»´ä¿®é¨é¨" |
| | | :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 { queryRepairDepartTreeList } from '@/api/api' |
| | | export default { |
| | | name: 'JSelectRepairDepartModal', |
| | | props:['modalWidth','multi','rootOpened','repairDepartId', 'store', 'text','treeOpera'], |
| | | data(){ |
| | | return { |
| | | visible:false, |
| | | confirmLoading:false, |
| | | treeData:[], |
| | | autoExpandParent:true, |
| | | expandedKeys:[], |
| | | dataList:[], |
| | | checkedKeys:[], |
| | | checkedRows:[], |
| | | searchValue:"", |
| | | checkStrictly: false, |
| | | fullscreen:false |
| | | } |
| | | }, |
| | | created(){ |
| | | this.loadRepairDepart(); |
| | | }, |
| | | watch:{ |
| | | repairDepartId(){ |
| | | this.initDepartComponent() |
| | | }, |
| | | visible: { |
| | | handler() { |
| | | this.initRepairDepartComponent(true) |
| | | } |
| | | } |
| | | }, |
| | | computed:{ |
| | | treeScreenClass() { |
| | | return { |
| | | 'my-dept-select-tree': true, |
| | | 'fullscreen': this.fullscreen, |
| | | } |
| | | }, |
| | | }, |
| | | methods:{ |
| | | show(){ |
| | | this.visible=true |
| | | this.checkedRows=[] |
| | | this.checkedKeys=[] |
| | | }, |
| | | loadRepairDepart(){ |
| | | // è¿ä¸ªæ¹æ³æ¯æ¾å°ææçé¨é¨ä¿¡æ¯ |
| | | queryRepairDepartTreeList().then(res=>{ |
| | | if(res.success){ |
| | | let arr = [...res.result] |
| | | this.reWriterWithSlot(arr) |
| | | this.treeData = arr |
| | | this.initRepairDepartComponent() |
| | | if(this.rootOpened){ |
| | | this.initExpandedKeys(res.result) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | initRepairDepartComponent(flag){ |
| | | let arr = [] |
| | | //è¯¥æ¹æ³ä¸¤ä¸ªå°æ¹ç¨ 1.visibleæ¹åäºä»¶éæ°è®¾ç½®éä¸é¡¹ 2.ç»ä»¶ç¼è¾é¡µé¢åæ¾ |
| | | let fieldName = flag==true?'key':this.text |
| | | if(this.repairDepartId){ |
| | | let arr2 = this.repairDepartId.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> |
| | |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.clearSelected() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | |
| | | <template v-if="isDisplayOperation"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æ åç¼ç "> |
| | | <a-input placeholder="请è¾å
¥æ åç¼ç " v-model="queryParam.standardCode"></a-input> |
| | | <a-form-item label="è§èç¼ç "> |
| | | <a-input placeholder="请è¾å
¥è§èç¼ç " v-model="queryParam.standardCode"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æ ååç§°"> |
| | | <a-input placeholder="请è¾å
¥æ ååç§°" v-model="queryParam.standardName"></a-input> |
| | | <a-form-item label="è§èåç§°"> |
| | | <a-input placeholder="请è¾å
¥è§èåç§°" v-model="queryParam.standardName"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <lx-search-equipment-select placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="queryParam.equipmentId"></lx-search-equipment-select> |
| | | <a-col :xl="5" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç»ä¸ç¼ç "> |
| | | <lx-search-equipment-select placeholder="请è¾å
¥ç»ä¸ç¼ç æåç§°æç´¢" v-model="queryParam.equipmentId"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ä¿å
»åç±»"> |
| | | <j-dict-select-tag dict-code="maintenance_category" placeholder="è¯·éæ©ä¿å
»åç±»" v-model="queryParam.maintenanceCategory" /> |
| | | <j-dict-select-tag dict-code="maintenance_category" placeholder="è¯·éæ©ä¿å
»åç±»" |
| | | v-model="queryParam.maintenanceCategory"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æ åç¶æ"> |
| | | <j-dict-select-tag dict-code="maintenance_standard_status" placeholder="è¯·éæ©æ åç¶æ" v-model="queryParam.standardStatus" /> |
| | | <a-form-item label="è§èç¶æ"> |
| | | <j-dict-select-tag dict-code="maintenance_standard_status" placeholder="è¯·éæ©è§èç¶æ" |
| | | v-model="queryParam.standardStatus"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="3" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" :action="inspectionImportExcel" |
| | | <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" |
| | | :action="inspectionImportExcel" |
| | | @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">ç¹æ£æ å导å
¥</a-button> |
| | | </a-upload> |
| | | <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.inspectionXlsDownloadUrl)">ç¹æ£æ 忍¡æ¿ä¸è½½</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" :action="secondMaintenanceImportExcel" |
| | | <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.inspectionXlsDownloadUrl)"> |
| | | ç¹æ£æ 忍¡æ¿ä¸è½½ |
| | | </a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" |
| | | :action="secondMaintenanceImportExcel" |
| | | @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">äºä¿æ å导å
¥</a-button> |
| | | </a-upload> |
| | | <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.secondMaintenanceXlsDownloadUrl)">äºä¿æ 忍¡æ¿ä¸è½½</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" :action="thirdMaintenanceImportExcel" |
| | | <a-button type="primary" icon="download" |
| | | @click="handleTemplateXlsDownload(url.secondMaintenanceXlsDownloadUrl)">äºä¿æ 忍¡æ¿ä¸è½½ |
| | | </a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" |
| | | :action="thirdMaintenanceImportExcel" |
| | | @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">ä¸ä¿æ å导å
¥</a-button> |
| | | </a-upload> |
| | | <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.thirdMaintenanceXlsDownloadUrl)">ä¸ä¿æ 忍¡æ¿ä¸è½½</a-button> |
| | | <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.thirdMaintenanceXlsDownloadUrl)"> |
| | | ä¸ä¿æ 忍¡æ¿ä¸è½½ |
| | | </a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"> |
| | |
| | | </a-dropdown> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation"> |
| | |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | :customRow='clickThenSelect' |
| | | @change="handleTableChange"> |
| | | <template slot="referenceFile" slot-scope="text, record, index"> |
| | | <a v-if="text && text !== ''" @click.stop="handlePreview(record)">é¢è§</a> |
| | | </template> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a v-if="record.standardStatus === 'NORMAL'" @click.stop="handleEdit(record)">ç¼è¾</a> |
| | | <a v-if="record.standardStatus === 'WAIT_SUBMIT'" @click.stop="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down"/></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item v-if="record.standardStatus === 'NORMAL'"> |
| | | <a @click.stop="handleUpgrade(record)">åç</a> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.standardStatus === 'NORMAL'"> |
| | | <a-popconfirm title="ç¡®å®ä½åºå?" @confirm="() => handleAbolish(record.id)"> |
| | | <a>ä½åº</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | <template v-if="record.standardStatus === 'START'"> |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a @click.stop="handleUpgrade(record)">åç</a> |
| | | </template> |
| | | |
| | | <template v-if="record.standardStatus === 'WAIT_SUBMIT'"> |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a @click="event=>event.stopPropagation()">å é¤</a> |
| | | </a-popconfirm> |
| | | </template> |
| | | </span> |
| | | |
| | | </a-table> |
| | | |
| | | <a-tabs defaultActiveKey="1"> |
| | |
| | | |
| | | <!-- 表ååºå --> |
| | | <eamMaintenanceStandard-modal ref="modalForm" @ok="modalFormOk"></eamMaintenanceStandard-modal> |
| | | <lx-file-preview ref="lxFilePreview" :fileUrl="fileUrl"></lx-file-preview> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@/assets/less/TableExpand.less' |
| | | import EamMaintenanceStandardModal from './modules/EamMaintenanceStandardModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EamMaintenanceStandardDetailList from '@views/eam/base/modules/EamMaintenanceStandardDetailList' |
| | | import { deleteAction, templateXlsDownload } from '@api/manage' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | import '@/assets/less/TableExpand.less' |
| | | import EamMaintenanceStandardModal from './modules/EamMaintenanceStandardModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EamMaintenanceStandardDetailList from '@views/eam/base/modules/EamMaintenanceStandardDetailList' |
| | | import { deleteAction, templateXlsDownload } from '@api/manage' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | |
| | | |
| | | export default { |
| | | name: 'EamMaintenanceStandardList', |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | isDisplayOperation: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | components: { |
| | | LxSearchEquipmentSelect, |
| | | EamMaintenanceStandardModal, |
| | | EamMaintenanceStandardDetailList |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'ä¿å
»æ å管ç页é¢', |
| | | disableMixinCreated: true, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: 'æ åç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'standardCode' |
| | | }, |
| | | { |
| | | title: 'æ ååç§°', |
| | | align: 'center', |
| | | dataIndex: 'standardName' |
| | | }, |
| | | { |
| | | title: 'æä»¶ç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'fileCode' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»å¨æ(天)', |
| | | align: 'center', |
| | | dataIndex: 'maintenancePeriod' |
| | | }, |
| | | { |
| | | title: 'åå§æ¥æ', |
| | | align: 'center', |
| | | dataIndex: 'initialDate' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»åç±»', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceCategory_dictText' |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'equipmentId_dictText' |
| | | }, |
| | | { |
| | | title: 'æ åç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'standardStatus_dictText' |
| | | }, |
| | | { |
| | | title: 'çæ¬', |
| | | align: 'center', |
| | | dataIndex: 'standardVersion' |
| | | }, |
| | | { |
| | | title: 'åèæä»¶', |
| | | align: 'center', |
| | | dataIndex: 'referenceFile', |
| | | scopedSlots: { customRender: 'referenceFile' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/maintenanceStandard/list', |
| | | delete: '/eam/maintenanceStandard/delete', |
| | | deleteBatch: '/eam/maintenanceStandard/deleteBatch', |
| | | exportXlsUrl: 'eam/maintenanceStandard/exportXls', |
| | | inspectionImportExcel: 'eam/maintenanceStandard/inspectionImportExcel', |
| | | weekMaintenanceImportExcel: 'eam/maintenanceStandard/weekMaintenanceImportExcel', |
| | | secondMaintenanceImportExcel: 'eam/maintenanceStandard/secondMaintenanceImportExcel', |
| | | thirdMaintenanceImportExcel: 'eam/maintenanceStandard/thirdMaintenanceImportExcel', |
| | | inspectionXlsDownloadUrl: '导å
¥æ¨¡æ¿/ç¹æ£æ å导å
¥æ¨¡æ¿_v1.0.xlsx', |
| | | weekMaintenanceXlsDownloadUrl: '导å
¥æ¨¡æ¿/å¨ä¿æ å导å
¥æ¨¡æ¿_v1.0.xlsx', |
| | | secondMaintenanceXlsDownloadUrl: '导å
¥æ¨¡æ¿/äºä¿æ å导å
¥æ¨¡æ¿_v1.0.xlsx', |
| | | thirdMaintenanceXlsDownloadUrl: '导å
¥æ¨¡æ¿/ä¸ä¿æ å导å
¥æ¨¡æ¿_v1.0.xlsx', |
| | | abolish: '/eam/maintenanceStandard/abolish', |
| | | }, |
| | | fileUrl: '', |
| | | standardId: '-1' |
| | | } |
| | | }, |
| | | computed: { |
| | | inspectionImportExcel: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.inspectionImportExcel}` |
| | | }, |
| | | weekMaintenanceImportExcel: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.weekMaintenanceImportExcel}` |
| | | }, |
| | | secondMaintenanceImportExcel: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.secondMaintenanceImportExcel}` |
| | | }, |
| | | thirdMaintenanceImportExcel: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.thirdMaintenanceImportExcel}` |
| | | } |
| | | }, |
| | | created() { |
| | | if (!this.isDisplayOperation) { |
| | | return |
| | | } |
| | | const operationColumn = { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | | this.loadData(1) |
| | | }, |
| | | methods: { |
| | | handlePreview: function(record) { |
| | | if (record.referenceFile) { |
| | | try { |
| | | let file = JSON.parse(record.referenceFile) |
| | | this.$refs.lxFilePreview.preview(file.filePath) |
| | | } catch (e) { |
| | | console.error(e) |
| | | this.$message.error(e.message) |
| | | } |
| | | } else { |
| | | this.$message.warning('åèæä»¶ä¸ºç©ºï¼') |
| | | export default { |
| | | name: 'EamMaintenanceStandardList', |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | isDisplayOperation: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | clickThenSelect(record) { |
| | | components: { |
| | | LxSearchEquipmentSelect, |
| | | EamMaintenanceStandardModal, |
| | | EamMaintenanceStandardDetailList |
| | | }, |
| | | data() { |
| | | return { |
| | | style: { |
| | | cursor: 'pointer' |
| | | }, |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(','), [record]) |
| | | description: 'ä¿å
»è§è页é¢', |
| | | disableMixinCreated: true, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: 'ç»ä¸ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'equipmentCode' |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '设å¤åå·', |
| | | align: 'center', |
| | | dataIndex: 'equipmentModel' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»åç±»', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceCategory_dictText', |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: 'è§èç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'standardCode', |
| | | width: 150 |
| | | }, |
| | | { |
| | | title: 'è§èåç§°', |
| | | align: 'center', |
| | | dataIndex: 'standardName' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»å¨æ', |
| | | align: 'center', |
| | | dataIndex: 'maintenancePeriod', |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: 'ä¿å
»å¨æåä½', |
| | | align: 'center', |
| | | dataIndex: 'periodUnit', |
| | | width: 120 |
| | | }, |
| | | { |
| | | title: 'åå§æ¥æ', |
| | | align: 'center', |
| | | dataIndex: 'initialDate', |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: 'è§èç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'standardStatus_dictText' |
| | | }, |
| | | { |
| | | title: 'è§èçæ¬', |
| | | align: 'center', |
| | | dataIndex: 'standardVersion', |
| | | width: 100 |
| | | } |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/maintenanceStandard/list', |
| | | delete: '/eam/maintenanceStandard/delete', |
| | | deleteBatch: '/eam/maintenanceStandard/deleteBatch', |
| | | exportXlsUrl: 'eam/maintenanceStandard/exportXls', |
| | | inspectionImportExcel: 'eam/maintenanceStandard/inspectionImportExcel', |
| | | weekMaintenanceImportExcel: 'eam/maintenanceStandard/weekMaintenanceImportExcel', |
| | | secondMaintenanceImportExcel: 'eam/maintenanceStandard/secondMaintenanceImportExcel', |
| | | thirdMaintenanceImportExcel: 'eam/maintenanceStandard/thirdMaintenanceImportExcel', |
| | | inspectionXlsDownloadUrl: '导å
¥æ¨¡æ¿/ç¹æ£æ å导å
¥æ¨¡æ¿_v1.0.xlsx', |
| | | weekMaintenanceXlsDownloadUrl: '导å
¥æ¨¡æ¿/å¨ä¿æ å导å
¥æ¨¡æ¿_v1.0.xlsx', |
| | | secondMaintenanceXlsDownloadUrl: '导å
¥æ¨¡æ¿/äºä¿æ å导å
¥æ¨¡æ¿_v1.0.xlsx', |
| | | thirdMaintenanceXlsDownloadUrl: '导å
¥æ¨¡æ¿/ä¸ä¿æ å导å
¥æ¨¡æ¿_v1.0.xlsx', |
| | | abolish: '/eam/maintenanceStandard/abolish' |
| | | }, |
| | | standardId: '-1' |
| | | } |
| | | }, |
| | | onClearSelected() { |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | this.standardId = '-1' |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.selectionRows = selectionRows |
| | | if (selectedRowKeys.length === 1) { |
| | | this.standardId = selectedRowKeys[0] |
| | | } else { |
| | | this.standardId = '-1' |
| | | computed: { |
| | | inspectionImportExcel: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.inspectionImportExcel}` |
| | | }, |
| | | weekMaintenanceImportExcel: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.weekMaintenanceImportExcel}` |
| | | }, |
| | | secondMaintenanceImportExcel: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.secondMaintenanceImportExcel}` |
| | | }, |
| | | thirdMaintenanceImportExcel: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.thirdMaintenanceImportExcel}` |
| | | } |
| | | }, |
| | | searchReset() { |
| | | this.standardId = '-1' |
| | | this.queryParam = {} |
| | | this.loadData(1) |
| | | }, |
| | | handleTemplateXlsDownload(url) { |
| | | templateXlsDownload(url) |
| | | }, |
| | | handleAbolish: function (id) { |
| | | if(!this.url.abolish){ |
| | | this.$message.error("请设置url.abolish屿§!") |
| | | created() { |
| | | if (!this.isDisplayOperation) { |
| | | return |
| | | } |
| | | var that = this; |
| | | deleteAction(that.url.abolish, {id: id}).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(1) |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | const operationColumn = { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | | this.loadData(1) |
| | | }, |
| | | methods: { |
| | | clickThenSelect(record) { |
| | | return { |
| | | style: { |
| | | cursor: 'pointer' |
| | | }, |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(','), [record]) |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | handleUpgrade(record) { |
| | | //åç |
| | | this.$refs.modalForm.upgrade(record); |
| | | this.$refs.modalForm.title = "åç"; |
| | | this.$refs.modalForm.disableSubmit = false; |
| | | }, |
| | | }, |
| | | |
| | | onClearSelected() { |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | this.standardId = '-1' |
| | | }, |
| | | |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.selectionRows = selectionRows |
| | | if (selectedRowKeys.length === 1) { |
| | | this.standardId = selectedRowKeys[0] |
| | | } else { |
| | | this.standardId = '-1' |
| | | } |
| | | }, |
| | | |
| | | handleTemplateXlsDownload(url) { |
| | | templateXlsDownload(url) |
| | | }, |
| | | |
| | | handleUpgrade(record) { |
| | | //åç |
| | | this.$refs.modalForm.upgrade(record) |
| | | this.$refs.modalForm.title = 'åç' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.standardId = '-1' |
| | | this.queryParam = {} |
| | | this.loadData(1) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import '@/assets/less/TableExpand.less' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction } from '@api/manage' |
| | | import '@/assets/less/TableExpand.less' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction } from '@api/manage' |
| | | |
| | | export default { |
| | | name: 'EamMaintenanceStandardDetailList', |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | standardId: { |
| | | type: String, |
| | | required: true, |
| | | default: '-1' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'ä¿å
»æ åæç»ç®¡ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | align: 'center', |
| | | dataIndex: 'itemCode', |
| | | width: 60, |
| | | }, |
| | | { |
| | | title: 'é¨ä½', |
| | | align: 'center', |
| | | dataIndex: 'itemPart', |
| | | width: 200, |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹', |
| | | align: 'center', |
| | | dataIndex: 'itemName', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | align: 'center', |
| | | dataIndex: 'itemDemandAlias', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'æ£æ¥æ åæè¦æ±', |
| | | align: 'center', |
| | | dataIndex: 'itemDemand', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'æ£æ¥æ¹æ³', |
| | | align: 'center', |
| | | dataIndex: 'checkMethod', |
| | | ellipsis: true, |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/eamMaintenanceStandardDetail/list' |
| | | export default { |
| | | name: 'EamMaintenanceStandardDetailList', |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | standardId: { |
| | | type: String, |
| | | required: true, |
| | | default: '-1' |
| | | } |
| | | } |
| | | }, |
| | | watch: { |
| | | standardId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | if(val) { |
| | | this.loadData(1) |
| | | }else { |
| | | this.clearList(); |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'ä¿å
»æ åæç»ç®¡ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | align: 'center', |
| | | dataIndex: 'itemCode', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: 'é¨ä½', |
| | | align: 'center', |
| | | dataIndex: 'itemPart', |
| | | ellipsis: true |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹åç±»', |
| | | align: 'center', |
| | | dataIndex: 'itemCategory_dictText', |
| | | ellipsis: true |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹ç®', |
| | | align: 'center', |
| | | dataIndex: 'itemName', |
| | | ellipsis: true |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è§èæè¦æ±', |
| | | align: 'center', |
| | | dataIndex: 'itemDemand', |
| | | ellipsis: true |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/eamMaintenanceStandardDetail/list' |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | }, |
| | | methods: { |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list屿§!') |
| | | return |
| | | }, |
| | | watch: { |
| | | standardId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | if (val) { |
| | | this.loadData(1) |
| | | } else { |
| | | this.clearList() |
| | | } |
| | | } |
| | | } |
| | | if(this.standardId && this.standardId === '-1'){ |
| | | this.clearList(); |
| | | return; |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list屿§!') |
| | | return |
| | | } |
| | | if (this.standardId && this.standardId === '-1') { |
| | | this.clearList() |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | let params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | if (!params) { |
| | | return false |
| | | } |
| | | this.dataSource = [] |
| | | params.standardId = this.standardId |
| | | this.loading = true |
| | | 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 (res.result.total) { |
| | | this.ipagination.total = res.result.total |
| | | } else { |
| | | this.ipagination.total = 0 |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.selectedRowKeys = [] |
| | | this.ipagination.current = 1 |
| | | } |
| | | let params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | if (!params) { |
| | | return false |
| | | } |
| | | this.dataSource = [] |
| | | params.standardId = this.standardId |
| | | this.loading = true |
| | | 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 (res.result.total) { |
| | | this.ipagination.total = res.result.total |
| | | } else { |
| | | this.ipagination.total = 0 |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.selectedRowKeys = [] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="standardCode" label="è§èç¼ç "> |
| | | <a-input placeholder="ç¼ç ç³»ç»èªå¨çæ" v-model="model.standardCode" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="standardName" label="è§èåç§°"> |
| | | <a-input placeholder="请è¾å
¥è§èåç§°" v-model="model.standardName"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="equipmentId" label="ç»ä¸ç¼ç "> |
| | | <lx-search-equipment-select placeholder="请è¾å
¥ç»ä¸ç¼ç æåç§°æç´¢" v-model="model.equipmentId" :disabled="!editable"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="æ åç¼ç "> |
| | | <a-input placeholder="ç¼ç ç³»ç»èªå¨çæ" v-model="model.standardCode" disabled /> |
| | | <a-form-model-item prop="maintenanceCategory" label="ä¿å
»åç±»"> |
| | | <j-dict-select-tag dict-code="maintenance_category" placeholder="è¯·éæ©ä¿å
»åç±»" |
| | | @change="handleMaintenanceCategoryChange" |
| | | v-model="model.maintenanceCategory" :disabled="!editable"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="æ ååç§°"> |
| | | <a-input placeholder="请è¾å
¥æ ååç§°" v-model="model.standardName" /> |
| | | <a-form-model-item label="ä¿å
»å¨æåä½"> |
| | | <a-input readOnly v-model="model.periodUnit" placeholder="æ ¹æ®ä¿å
»åç±»èªå¨å¸¦åº"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenanceCategory" label="ä¿å
»åç±»"> |
| | | <j-dict-select-tag dict-code="maintenance_category" placeholder="è¯·éæ©ä¿å
»åç±»" v-model="model.maintenanceCategory" :disabled="editable" /> |
| | | <a-form-model-item prop="maintenancePeriod" label="ä¿å
»å¨æ"> |
| | | <a-input-number v-model="model.maintenancePeriod" placeholder="请è¾å
¥ä¿å
»å¨æ" :min="1" :precision="0" |
| | | style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fileCode" label="æä»¶ç¼å·"> |
| | | <a-input placeholder="请è¾å
¥ä¿å
»æ åæä»¶ç¼å·" v-model="model.fileCode"/> |
| | | <a-form-model-item prop="initialDate" label="åå§æ¥æ"> |
| | | <a-date-picker placeholder="è¯·éæ©åå§æ¥æ" v-model="model.initialDate" value-format="YYYY-MM-DD" |
| | | style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialDate" label="åå§æ¥æ"> |
| | | <a-date-picker placeholder="è¯·éæ©åå§æ¥æ" v-model="model.initialDate" format="YYYY-MM-DD" style="width: 100%" :disabled="editable"/> |
| | | <a-form-model-item label="è§èç¶æ"> |
| | | <j-dict-select-tag dict-code="maintenance_standard_status" placeholder="æ ¹æ®æµç¨è¿åº¦èªå¨å¸¦åº" |
| | | v-model="model.standardStatus" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="ä¿å
»å¨æ"> |
| | | <a-input-number v-model="model.maintenancePeriod" :min="1" :precision="0" style="width: 100%"/> |
| | | <a-form-model-item label="è§èçæ¬"> |
| | | <a-input-number v-model="model.standardVersion" placeholder="æ ¹æ®æµç¨è¿åº¦èªå¨å¸¦åº" style="width: 100%" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="设å¤ç¼å·"> |
| | | <lx-search-equipment-select placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="model.equipmentId" :disabled="editable"></lx-search-equipment-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardStatus" label="æ åç¶æ"> |
| | | <j-dict-select-tag dict-code="maintenance_standard_status" v-model="model.standardStatus" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardVersion" label="æ åçæ¬"> |
| | | <a-input-number v-model="model.standardVersion" style="width: 100%" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item |
| | | label="åèæä»¶" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="fileList"> |
| | | <lx-upload :returnUrl="false" |
| | | :multiple="false" |
| | | v-model="model.fileList" |
| | | biz="EamMaintenanceStandard"> |
| | | </lx-upload> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | |
| | | :loading="detail.loading" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns" |
| | | style="margin-top: 8px;"/> |
| | | style="margin-top: 8px;"> |
| | | <template v-slot:itemPart="props"> |
| | | <a-textarea v-model="props.row.itemPart" allowClear @change="$refs.editableDetailTable.validateTable()" |
| | | :placeholder="model.maintenanceCategory!='THIRD_MAINTENANCE'?'ä»
ä¸ä¿éè¦ç»´æ¤':'请è¾å
¥é¨ä½'" :rows="1" |
| | | autoSize :disabled="model.maintenanceCategory!='THIRD_MAINTENANCE'"/> |
| | | </template> |
| | | |
| | | <template v-slot:itemCategory="props"> |
| | | <j-dict-select-tag v-model="props.row.itemCategory" :dict-code="encodedDictCode" |
| | | @change="$refs.editableDetailTable.validateTable()" |
| | | :placeholder="getItemCategoryPlaceholder" |
| | | :disabled="!Boolean(model.maintenanceCategory)||model.maintenanceCategory=='THIRD_MAINTENANCE'"/> |
| | | </template> |
| | | </j-vxe-table> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@/components/jeecg/JVxeTable' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect' |
| | | |
| | | export default { |
| | | name: "EamMaintenanceStandardModal", |
| | | name: 'EamMaintenanceStandardModal', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | LxSearchEquipmentSelect, |
| | | LxSearchEquipmentSelect |
| | | }, |
| | | data () { |
| | | data() { |
| | | return { |
| | | title:"æä½", |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | | editable: false, |
| | | editable: true, |
| | | upgradeFlag: false, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | sm: { span: 7 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | validatorRules: { |
| | | standardName: [ |
| | | { required: true, message: '请è¾å
¥æ ååç§°!' } |
| | | { required: true, message: '请è¾å
¥è§èåç§°', trigger: 'change' } |
| | | ], |
| | | maintenanceCategory: [ |
| | | { required: true, message: 'è¯·éæ©ä¿å
»åç±»!' } |
| | | { required: true, message: 'è¯·éæ©ä¿å
»åç±»', trigger: 'change' } |
| | | ], |
| | | initialDate: [ |
| | | { required: true, message: 'è¯·éæ©åå§æ¥æ!' } |
| | | { required: true, message: 'è¯·éæ©åå§æ¥æ', trigger: 'change' } |
| | | ], |
| | | maintenancePeriod: [ |
| | | { required: true, message: '请è¾å
¥ä¿å
»å¨æï¼åä½ï¼å¤©!' } |
| | | { required: true, message: '请è¾å
¥ä¿å
»å¨æ', trigger: 'change' } |
| | | ], |
| | | equipmentId: [ |
| | | { required: true, message: 'è¯·éæ©è®¾å¤!' } |
| | | { required: true, message: '请è¾å
¥ç»ä¸ç¼ç æåç§°æç´¢', trigger: 'change' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: "/eam/maintenanceStandard/add", |
| | | edit: "/eam/maintenanceStandard/edit", |
| | | detail: "/eam/eamMaintenanceStandardDetail/queryList", |
| | | upgrade: '/eam/maintenanceStandard/upgrade', |
| | | add: '/eam/maintenanceStandard/add', |
| | | edit: '/eam/maintenanceStandard/edit', |
| | | detail: '/eam/eamMaintenanceStandardDetail/queryList', |
| | | upgrade: '/eam/maintenanceStandard/upgrade' |
| | | }, |
| | | detail: { |
| | | loading: false, |
| | |
| | | { |
| | | title: 'ID', |
| | | key: 'id', |
| | | type: JVXETypes.hidden, |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'standardId', |
| | | key: 'standardId', |
| | | type: JVXETypes.hidden, |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'åºå·', |
| | | title: '项ç®åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.inputNumber, |
| | | align:"center", |
| | | width: 100, |
| | | align: 'center', |
| | | placeholder: '请è¾å
¥é¡¹ç®åºå·', |
| | | width: 150, |
| | | validateRules: [ |
| | | {required : true, unique: true, message: 'åºå·ä¸è½éå¤'} |
| | | { required: true, message: '请è¾å
¥é¡¹ç®åºå·' }, |
| | | { unique: true, message: '项ç®åºå·ä¸è½éå¤' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'é¨ä½', |
| | | key: 'itemPart', |
| | | type: JVXETypes.textarea, |
| | | align:"center", |
| | | type: JVXETypes.slot, |
| | | slotName: 'itemPart', |
| | | placeholder: '请è¾å
¥é¨ä½', |
| | | align: 'center', |
| | | validateRules: [{ handler: this.itemPartValidate }] |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹', |
| | | title: 'ä¿å
»é¡¹åç±»', |
| | | key: 'itemCategory', |
| | | type: JVXETypes.slot, |
| | | slotName: 'itemCategory', |
| | | align: 'center', |
| | | validateRules: [{ handler: this.itemCategoryValidate }] |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹ç®', |
| | | key: 'itemName', |
| | | placeholder: '请è¾å
¥ä¿å
»é¡¹ç®', |
| | | type: JVXETypes.textarea, |
| | | align:"center", |
| | | align: 'center', |
| | | validateRules: [ |
| | | {required : true, message: 'ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼'} |
| | | { required: true, message: '请è¾å
¥ä¿å
»é¡¹ç®' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemandAlias', |
| | | type: JVXETypes.textarea, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: 'æ£æ¥æ åæè¦æ±', |
| | | title: 'ä¿å
»è§èæè¦æ±', |
| | | key: 'itemDemand', |
| | | placeholder: '请è¾å
¥ä¿å
»è§èæè¦æ±', |
| | | type: JVXETypes.textarea, |
| | | align:"center", |
| | | align: 'center', |
| | | validateRules: [ |
| | | {required : true, message: "ä¿å
»è¦æ±ä¸è½ä¸ºç©ºï¼"} |
| | | { required: true, message: '请è¾å
¥ä¿å
»è§èæè¦æ±' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'æ£æ¥æ¹æ³', |
| | | key: 'checkMethod', |
| | | type: JVXETypes.textarea, |
| | | align:"center", |
| | | }, |
| | | } |
| | | ], |
| | | toolbarConfig: { |
| | | // prefix åç¼ï¼suffix åç¼ |
| | | slot: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | btn: ['add', 'remove', 'clearSelection'] |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | computed: { |
| | | getItemCategoryPlaceholder() { |
| | | if (!Boolean(this.model.maintenanceCategory)) return 'è¯·éæ©ä¿å
»åç±»' |
| | | else { |
| | | if (this.model.maintenanceCategory != 'THIRD_MAINTENANCE') return 'è¯·éæ©ä¿å
»é¡¹åç±»' |
| | | else return 'ä¸ä¿æ éç»´æ¤' |
| | | } |
| | | }, |
| | | |
| | | encodedDictCode() { |
| | | let suffix |
| | | if (!Boolean(this.model.maintenanceCategory) || this.model.maintenanceCategory === 'THIRD_MAINTENANCE') return |
| | | else suffix = this.model.maintenanceCategory.split('_')[1] |
| | | |
| | | const dictCode = `sys_dict_item,item_text,item_value,item_value like '%${suffix}' and dict_id='1940598438685134850'` |
| | | return encodeURIComponent(dictCode) |
| | | } |
| | | }, |
| | | methods: { |
| | | add () { |
| | | this.model = {}; |
| | | this.visible = true; |
| | | this.editable = false; |
| | | this.upgradeFlag = false; |
| | | this.detail.dataSource = []; |
| | | add() { |
| | | this.model = {} |
| | | this.visible = true |
| | | this.editable = true |
| | | this.upgradeFlag = false |
| | | this.detail.dataSource = [] |
| | | }, |
| | | edit (record) { |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | this.editable = true; |
| | | this.upgradeFlag = false; |
| | | this.detail.dataSource = []; |
| | | if(record && record.referenceFile) { |
| | | let obj = JSON.parse(record.referenceFile); |
| | | this.model.fileList = [obj]; |
| | | }else { |
| | | this.model.fieldList = []; |
| | | } |
| | | this.loadDetail(record.id); |
| | | }, |
| | | upgrade(record) { |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | this.editable = true; |
| | | this.upgradeFlag = true; |
| | | this.detail.dataSource = []; |
| | | if(record && record.referenceFile) { |
| | | let obj = JSON.parse(record.referenceFile); |
| | | this.model.fileList = [obj]; |
| | | }else { |
| | | this.model.fieldList = []; |
| | | } |
| | | this.loadDetail(record.id); |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | this.$refs.form.clearValidate(); |
| | | }, |
| | | async handleOk () { |
| | | const that = this; |
| | | let errMap = await that.$refs.editableDetailTable.validateTable(); |
| | | if(errMap){ |
| | | this.$message.warning("æ°æ®æ ¡éªå¤±è´¥ï¼"); |
| | | return; |
| | | } |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | let tableData = that.$refs.editableDetailTable.getTableData(); |
| | | let removeData = that.$refs.editableDetailTable.getDeleteData(); |
| | | that.model.tableDetailList = [...tableData]; |
| | | that.model.removeDetailList = [...removeData]; |
| | | |
| | | that.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | if(!this.model.id){ |
| | | httpurl+=this.url.add; |
| | | method = 'post'; |
| | | }else{ |
| | | if(this.upgradeFlag) { |
| | | httpurl+=this.url.upgrade; |
| | | }else { |
| | | httpurl+=this.url.edit; |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.editable = false |
| | | this.upgradeFlag = false |
| | | this.detail.dataSource = [] |
| | | this.loadDetail(record.id) |
| | | }, |
| | | |
| | | upgrade(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.editable = false |
| | | this.upgradeFlag = true |
| | | this.detail.dataSource = [] |
| | | this.loadDetail(record.id) |
| | | }, |
| | | |
| | | /** |
| | | * ä¿å
»åç±»å¼æ¹åæ¶åæ¶æ¹åä¿å
»å¨æåä½ä»¥åä¿å
»é¡¹åç±» |
| | | * @param value ä¿å
»åç±»å¼ |
| | | */ |
| | | handleMaintenanceCategoryChange(value) { |
| | | switch (value) { |
| | | case 'THIRD_MAINTENANCE': |
| | | this.model.periodUnit = 'å¹´' |
| | | break |
| | | case 'SECOND_MAINTENANCE': |
| | | this.model.periodUnit = 'æ' |
| | | break |
| | | case 'POINT_INSPECTION': |
| | | this.model.periodUnit = '天' |
| | | break |
| | | default: |
| | | delete this.model.periodUnit |
| | | } |
| | | |
| | | const tableData = this.$refs.editableDetailTable.getTableData() |
| | | tableData.forEach(item => { |
| | | if (value !== 'THIRD_MAINTENANCE') delete item.itemPart |
| | | delete item.itemCategory |
| | | }) |
| | | this.detail.dataSource = [...tableData] |
| | | console.log('tableData', tableData) |
| | | }, |
| | | |
| | | /** |
| | | * ä¿å
»é¨ä½æ ¡éª |
| | | * @param cellValue è¾å
¥å¼ |
| | | * @param callback åè°å½æ° |
| | | */ |
| | | itemPartValidate({ cellValue }, callback) { |
| | | if (this.model.maintenanceCategory === 'THIRD_MAINTENANCE') { |
| | | if (cellValue) callback(true) |
| | | else callback(false, 'è¯·éæ©${title}') |
| | | } else { |
| | | callback(true) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * ä¿å
»é¡¹åç±»æ ¡éª |
| | | * @param cellValue è¾å
¥å¼ |
| | | * @param callback åè°å½æ° |
| | | */ |
| | | itemCategoryValidate({ cellValue }, callback) { |
| | | if (this.model.maintenanceCategory === 'THIRD_MAINTENANCE') { |
| | | callback(true) |
| | | } else { |
| | | if (cellValue) callback(true) |
| | | else callback(false, 'è¯·éæ©${title}') |
| | | } |
| | | }, |
| | | |
| | | // æäº¤äºä»¶ |
| | | async handleOk() { |
| | | const that = this |
| | | let errMap = await that.$refs.editableDetailTable.validateTable() |
| | | if (errMap) return false |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | let tableData = that.$refs.editableDetailTable.getTableData() |
| | | let removeData = that.$refs.editableDetailTable.getDeleteData() |
| | | that.model.tableDetailList = [...tableData] |
| | | that.model.removeDetailList = [...removeData] |
| | | |
| | | that.confirmLoading = that.spinning = true |
| | | let httpUrl = '' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpUrl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | if (this.upgradeFlag) { |
| | | httpUrl += this.url.upgrade |
| | | } else { |
| | | httpUrl += this.url.edit |
| | | } |
| | | method = 'put'; |
| | | method = 'put' |
| | | } |
| | | httpAction(httpurl,this.model,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | that.close(); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | }) |
| | | }else{ |
| | | return false; |
| | | httpAction(httpUrl, this.model, method) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.$emit('ok') |
| | | that.close() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.confirmLoading = that.spinning = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel () { |
| | | |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.$refs.form.clearValidate() |
| | | }, |
| | | |
| | | //å 载详æ
æ°æ® |
| | | loadDetail(standardId) { |
| | | this.detail.dataSource = []; |
| | | this.spinning = true |
| | | this.detail.dataSource = [] |
| | | if (standardId) { |
| | | getAction(this.url.detail, { standardId: standardId }).then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result]; |
| | | } |
| | | }) |
| | | getAction(this.url.detail, { standardId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | <style scoped lang="less"> |
| | | /deep/ .ant-select-dropdown-menu { |
| | | text-align: left; |
| | | } |
| | | |
| | | /deep/ textarea.ant-input { |
| | | resize: none; |
| | | } |
| | | </style> |
| | |
| | | style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onSelectChange([])">æ¸
空</a> |
| | | </div> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :scroll="{ x: 'max-content' }" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange" |
| | | > |
| | | <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" |
| | | :pagination="ipagination" :loading="loading" :scroll="{ x: 'max-content' }" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> |
| | | <!--ç»ä¸ç¼ç --> |
| | | <template slot="equipmentCode" slot-scope="text"> |
| | | <a href="#" @click="handleDetail(record)" style="display: inline-block;height: 100%">{{text}}</a> |
| | |
| | | <a @click.stop="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down"/></a> |
| | | <a-menu slot="overlay"> |
| | |
| | | { |
| | | title: 'ç»´ä¿®çç»', |
| | | align: 'center', |
| | | dataIndex: 'repairDepartOrgCode' |
| | | dataIndex: 'repairDepartOrgCode_dictText' |
| | | }, |
| | | { |
| | | title: 'å®å
¨é
ç½®', |
| | |
| | | { |
| | | title: 'å·å´ç³»ç»', |
| | | align: 'center', |
| | | dataIndex: 'coolSystem' |
| | | dataIndex: 'coolSystem_dictText' |
| | | }, |
| | | { |
| | | title: 'çç«å¨', |
| | |
| | | dataIndex: 'nextThirdMaintenance' |
| | | }, |
| | | { |
| | | title: 'ä¸ä¿å¨æ', |
| | | title: 'ä¸ä¿å¨æï¼å¹´ï¼', |
| | | align: 'center', |
| | | dataIndex: 'thirdMaintenancePeriod' |
| | | }, |
| | |
| | | dataIndex: 'nextTechnologyCheck' |
| | | }, |
| | | { |
| | | title: 'ææ¯é´å®å¨æ', |
| | | title: 'ææ¯é´å®å¨æï¼å¹´ï¼', |
| | | align: 'center', |
| | | dataIndex: 'technologyCheckPeriod' |
| | | }, |
| | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | | </script> |
| | |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item prop="equipmentCode" label="ç»ä¸ç¼ç "> |
| | | <a-input placeholder="请è¾å
¥ç»ä¸ç¼ç " v-model="model.equipmentCode"/> |
| | | <a-input placeholder="请è¾å
¥ç»ä¸ç¼ç " v-model="model.equipmentCode" :disabled="!editable"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item prop="factoryOrgCode" label="使ç¨é¨é¨"> |
| | | <a-tree-select v-model="model.factoryOrgCode" style="width: 100%" show-search |
| | | :tree-data="productionTreeData" |
| | | :tree-data="productionTreeData" :disabled="!editable" |
| | | :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" |
| | | placeholder="è¯·éæ©ä½¿ç¨é¨é¨" allow-clear treeNodeFilterProp="title" |
| | | :replaceFields="{key:'orgCode',value:'orgCode'}" |
| | |
| | | <a-row> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item prop="equipmentCategory" label="æå±åç±»"> |
| | | <j-dict-select-tag dict-code="equipment_category" placeholder="è¯·éæ©æå±åç±»" |
| | | <j-dict-select-tag dict-code="equipment_category" placeholder="è¯·éæ©æå±åç±»" :disabled="!editable" |
| | | v-model="model.equipmentCategory"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | <a-row> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="æ¬æ¬¡ä¸ä¿æ¥æ"> |
| | | <a-date-picker v-model="model.latestThirdMaintenance" value-format="YYYY-MM-DD" style="width:100%"/> |
| | | <a-date-picker v-model="model.latestThirdMaintenance" value-format="YYYY-MM-DD" |
| | | :disabled="!editable" style="width:100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="ä¸ä¿å¨æ"> |
| | | <a-input-number placeholder="请è¾å
¥ä¸ä¿å¨æ" v-model="model.thirdMaintenancePeriod" :min="0" |
| | | <a-form-model-item label="ä¸ä¿å¨æï¼å¹´ï¼"> |
| | | <a-input-number placeholder="请è¾å
¥ä¸ä¿å¨æï¼å¹´ï¼" v-model="model.thirdMaintenancePeriod" :min="1" |
| | | style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="æ¬æ¬¡ææ¯é´å®æ¥æ"> |
| | | <a-date-picker v-model="model.latestTechnologyCheck" value-format="YYYY-MM-DD" style="width:100%"/> |
| | | <a-date-picker v-model="model.latestTechnologyCheck" value-format="YYYY-MM-DD" |
| | | :disabled="!editable" style="width:100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="ææ¯é´å®å¨æ"> |
| | | <a-input-number placeholder="请è¾å
¥ææ¯é´å®å¨æ" v-model="model.technologyCheckPeriod" :min="0" |
| | | <a-form-model-item label="ææ¯é´å®å¨æï¼å¹´ï¼"> |
| | | <a-input-number placeholder="请è¾å
¥ææ¯é´å®å¨æï¼å¹´ï¼" v-model="model.technologyCheckPeriod" :min="1" |
| | | style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.editable = false |
| | | this.editable = true |
| | | //åå§åé»è®¤å¼ |
| | | this.model = { |
| | | operationSystem: 1, |
| | |
| | | }, |
| | | |
| | | edit(record) { |
| | | this.editable = true |
| | | this.editable = false |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | }, |
| | |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true |
| | | let httpurl = '' |
| | | let httpUrl = '' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpurl += this.url.add |
| | | httpUrl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | httpurl += this.url.edit |
| | | httpUrl += this.url.edit |
| | | method = 'put' |
| | | } |
| | | httpAction(httpurl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.$emit('ok') |
| | | that.close() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | }) |
| | | httpAction(httpUrl, this.model, method) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.$emit('ok') |
| | | that.close() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.confirmLoading = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | <a-col |
| | | :xl="4" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å·¥åå·"> |
| | | <a-input |
| | | placeholder="请è¾å
¥å·¥åå·" |
| | |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :xl="4" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <lx-search-equipment-select |
| | | placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" |
| | | v-model="queryParam.equipmentId" |
| | | ></lx-search-equipment-select> |
| | | <a-col :xl="5" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç»ä¸ç¼ç "> |
| | | <lx-search-equipment-select placeholder="请è¾å
¥ç»ä¸ç¼ç æåç§°æç´¢" v-model="queryParam.equipmentId"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :xl="6" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="计åç¹æ£æ¥æ"> |
| | | <a-range-picker |
| | | v-model="queryParam.inspectionDateRange" |
| | | @change="onInspectionDateChange" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | /> |
| | | <a-range-picker v-model="queryParam.inspectionDateRange" @change="onInspectionDateChange" |
| | | format="YYYY-MM-DD" value-format="YYYY-MM-DD"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :xl="4" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç¹æ£ç¶æ"> |
| | | <j-dict-select-tag |
| | | placeholder="è¯·éæ©ç¹æ£ç¶æ" |
| | | dict-code="inspection_status" |
| | | v-model="queryParam.inspectionStatus" |
| | | /> |
| | | <j-dict-select-tag placeholder="è¯·éæ©ç¹æ£ç¶æ" dict-code="inspection_status" |
| | | v-model="queryParam.inspectionStatus"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :xl="4" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <span |
| | | style="float: left;overflow: hidden;" |
| | | class="table-page-search-submitButtons" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | type="info" |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left: 8px" |
| | | >éç½®</a-button> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div |
| | | class="table-operator" |
| | | v-if="isDisplayOperation" |
| | | > |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | v-if="isShowAuth('eam:inspection:add')" |
| | | >æ°å¢</a-button> |
| | | <div class="table-operator" v-if="isDisplayOperation"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item |
| | | key="1" |
| | | v-if="isShowAuth('eam:inspection:abolish')" |
| | | @click="batchZf('ABOLISH')" |
| | | > |
| | | <a-icon type="snippets" /> |
| | | <a-menu-item key="1" @click="batchZf('ABOLISH')"> |
| | | <a-icon type="snippets"/> |
| | | ä½åº |
| | | </a-menu-item> |
| | | <a-menu-item |
| | | key="2" |
| | | v-if="isShowAuth('eam:inspection:collect')" |
| | | @click="batchLq('UNDER_INSPECTION')" |
| | | > |
| | | <a-icon type="form" /> |
| | | <a-menu-item key="2" @click="batchLq('UNDER_INSPECTION')"> |
| | | <a-icon type="form"/> |
| | | é¢å |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ |
| | | <a-icon type="down" /> |
| | | <a-icon type="down"/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div |
| | | class="ant-alert ant-alert-info" |
| | | style="margin-bottom: 16px;" |
| | | v-if="isDisplayOperation" |
| | | > |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a style="font-weight: 600">{{ |
| | | selectedRowKeys.length }}</a>项 |
| | | <a |
| | | style="margin-left: 24px" |
| | | @click="onClearSelected" |
| | | >æ¸
空</a> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a style="font-weight: 600">{{selectedRowKeys.length |
| | | }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | :scroll="{x:true}" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange" |
| | | > |
| | | <a-table ref="table" size="middle" :scroll="{x:true}" bordered rowKey="id" :columns="columns" |
| | | :dataSource="dataSource" :pagination="ipagination" :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <template v-if=" record.inspectionStatus === 'WAIT_INSPECTION'"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a |
| | | @click="handleEdit(record)" |
| | | v-if="isShowAuth('eam:inspection:edit') && record.inspectionStatus === 'WAIT_INSPECTION'" |
| | | >ç¼è¾</a> |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a-divider |
| | | type="vertical" |
| | | v-if="isShowAuth('eam:inspection:edit') && record.inspectionStatus === 'WAIT_INSPECTION'" |
| | | /> |
| | | |
| | | <a-popconfirm |
| | | title="ç¡®å®é¢åå?" |
| | | v-if="isShowAuth('eam:inspection:collect') && record.inspectionStatus === 'WAIT_INSPECTION'" |
| | | @confirm="() => handleInspection(record.id)" |
| | | > |
| | | <a-popconfirm title="ç¡®å®é¢åå?" @confirm="() => handleInspection(record.id)"> |
| | | <a>é¢å</a> |
| | | </a-popconfirm> |
| | | |
| | | <a-divider |
| | | type="vertical" |
| | | v-if="isShowAuth('eam:inspection:collect') && record.inspectionStatus === 'WAIT_INSPECTION'" |
| | | /> |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down"/></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="isShowAuth('eam:inspection:abolish') && record.inspectionStatus === 'WAIT_INSPECTION'"> |
| | | <a-popconfirm |
| | | title="ç¡®å®ä½åºå?" |
| | | @confirm="() => handleOrReceive(record.id)" |
| | | > |
| | | |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®ä½åºå?" @confirm="() => handleOrReceive(record.id)"> |
| | | <a>ä½åº</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </template> |
| | | |
| | | <a-divider |
| | | v-if="record.inspectionStatus === 'COMPLETE'" |
| | | type="vertical" |
| | | /> |
| | | <a |
| | | v-if="record.inspectionStatus === 'COMPLETE'" |
| | | @click="handlePrint(record)" |
| | | >æå°</a> |
| | | <a v-else @click="handleDetail(record)">详æ
</a> |
| | | |
| | | <template v-if="record.inspectionStatus === 'COMPLETE'"> |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a @click="handlePrint(record)">æå°</a> |
| | | </template> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | |
| | | <eam-inspection-order-modal |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></eam-inspection-order-modal> |
| | | <eam-inspection-order-modal ref="modalForm" @ok="modalFormOk"/> |
| | | |
| | | <inspection-order-handle |
| | | ref="modalFormXq" |
| | | :selectShenpiData="selectInspectionOrderXqData" |
| | | /> |
| | | <inspection-order-handle ref="modalFormXq" :selectShenpiData="selectInspectionOrderXqData"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EamInspectionOrderModal from './modules/EamInspectionOrderModal' |
| | | import { deleteAction, getAction } from '@api/manage' |
| | | import InspectionOrderHandle from '../../flowable/workflow/InspectionOrder/InspectionOrderHandle' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EamInspectionOrderModal from './modules/EamInspectionOrderModal' |
| | | import { deleteAction, getAction } from '@api/manage' |
| | | import InspectionOrderHandle from '../../flowable/workflow/InspectionOrder/InspectionOrderHandle' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | |
| | | export default { |
| | | name: 'EamInspectionOrderList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | InspectionOrderHandle, |
| | | EamInspectionOrderModal, |
| | | LxSearchEquipmentSelect, |
| | | }, |
| | | props: { |
| | | isDisplayOperation: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'eam_inspection_order管ç页é¢', |
| | | disableMixinCreated: true, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | export default { |
| | | name: 'EamInspectionOrderList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | InspectionOrderHandle, |
| | | EamInspectionOrderModal, |
| | | LxSearchEquipmentSelect |
| | | }, |
| | | props: { |
| | | isDisplayOperation: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'eam_inspection_order管ç页é¢', |
| | | disableMixinCreated: true, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'å·¥åå·', |
| | | align: 'center', |
| | | dataIndex: 'orderNum' |
| | | }, |
| | | { |
| | | title: 'ç»ä¸ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'equipmentCode' |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: 'è§èåç§°', |
| | | align: 'center', |
| | | dataIndex: 'standardId_dictText' |
| | | }, |
| | | { |
| | | title: 'ç¹æ£æ¥æ', |
| | | align: 'center', |
| | | dataIndex: 'inspectionDate', |
| | | customRender: function(text) { |
| | | return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | } |
| | | }, |
| | | { |
| | | title: 'ç¹æ£è¿ææ¥æ', |
| | | align: 'center', |
| | | dataIndex: 'expirationTime', |
| | | customRender: function(text) { |
| | | return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | } |
| | | }, |
| | | { |
| | | title: 'å建æ¹å¼', |
| | | align: 'center', |
| | | dataIndex: 'creationMethod_dictText' |
| | | }, |
| | | { |
| | | title: 'ç¹æ£ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'inspectionStatus_dictText' |
| | | }, |
| | | { |
| | | title: 'ç¹æ£äºº', |
| | | align: 'center', |
| | | dataIndex: 'operator_dictText' |
| | | }, |
| | | { |
| | | title: 'ç¹æ£æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'operateTime' |
| | | }, |
| | | { |
| | | title: '管çå确认', |
| | | align: 'center', |
| | | dataIndex: 'confirmUser_dictText' |
| | | }, |
| | | { |
| | | title: '确认æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'confirmTime' |
| | | }, |
| | | { |
| | | title: '确认æè§', |
| | | align: 'center', |
| | | dataIndex: 'confirmComment' |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/eamInspectionOrder/list', |
| | | cancelInspectionOrder: '/eam/eamInspectionOrder/cancelInspectionOrder', |
| | | deleteBatch: '/eam/eamInspectionOrder/deleteBatch', |
| | | exportXlsUrl: '/eam/eamInspectionOrder/exportXls', |
| | | importExcelUrl: 'eam/eamInspectionOrder/importExcel', |
| | | receiveInspectionOrder: 'eam/eamInspectionOrder/receiveInspectionOrder', |
| | | cancelOrReceive: 'eam/eamInspectionOrder/cancelOrReceive' |
| | | }, |
| | | { |
| | | title: 'å·¥åå·', |
| | | align: 'center', |
| | | dataIndex: 'orderNum' |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'equipmentCode' |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: 'æ ååç§°', |
| | | align: 'center', |
| | | dataIndex: 'standardId_dictText' |
| | | }, |
| | | { |
| | | title: 'ç¹æ£æ¥æ', |
| | | align: 'center', |
| | | dataIndex: 'inspectionDate', |
| | | customRender: function (text) { |
| | | return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | } |
| | | }, |
| | | { |
| | | title: 'ç¹æ£è¿ææ¥æ', |
| | | align: 'center', |
| | | dataIndex: 'expirationTime', |
| | | customRender: function (text) { |
| | | return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | } |
| | | }, |
| | | { |
| | | title: 'å建æ¹å¼', |
| | | align: 'center', |
| | | dataIndex: 'creationMethod_dictText' |
| | | }, |
| | | { |
| | | title: 'ç¹æ£ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'inspectionStatus_dictText' |
| | | }, |
| | | { |
| | | title: 'ç¹æ£äºº', |
| | | align: 'center', |
| | | dataIndex: 'operator_dictText' |
| | | }, |
| | | { |
| | | title: 'ç¹æ£æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'operateTime', |
| | | }, |
| | | { |
| | | title: '管çå确认', |
| | | align: 'center', |
| | | dataIndex: 'confirmUser_dictText' |
| | | }, |
| | | { |
| | | title: '确认æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'confirmTime', |
| | | }, |
| | | { |
| | | title: '确认æè§', |
| | | align: 'center', |
| | | dataIndex: 'confirmComment', |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/eamInspectionOrder/list', |
| | | cancelInspectionOrder: '/eam/eamInspectionOrder/cancelInspectionOrder', |
| | | deleteBatch: '/eam/eamInspectionOrder/deleteBatch', |
| | | exportXlsUrl: '/eam/eamInspectionOrder/exportXls', |
| | | importExcelUrl: 'eam/eamInspectionOrder/importExcel', |
| | | receiveInspectionOrder: 'eam/eamInspectionOrder/receiveInspectionOrder', |
| | | cancelOrReceive: 'eam/eamInspectionOrder/cancelOrReceive' |
| | | dictOptions: {}, |
| | | superFieldList: [], |
| | | selectInspectionOrderXqData: {} |
| | | } |
| | | }, |
| | | created() { |
| | | if (!this.isDisplayOperation) { |
| | | return |
| | | } |
| | | const operationColumn = { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | | this.loadData(1) |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | methods: { |
| | | initDictConfig() { |
| | | }, |
| | | dictOptions: {}, |
| | | superFieldList: [], |
| | | selectInspectionOrderXqData: {} |
| | | } |
| | | }, |
| | | created() { |
| | | if (!this.isDisplayOperation) { |
| | | return |
| | | } |
| | | const operationColumn = { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | | this.loadData(1) |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function () { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | methods: { |
| | | initDictConfig() { |
| | | }, |
| | | //详æ
|
| | | handleDetail: function (record) { |
| | | this.selectInspectionOrderXqData = Object.assign({}, record) |
| | | this.$refs.modalFormXq.visible = true |
| | | this.$refs.modalFormXq.title = '详æ
' |
| | | this.$refs.modalFormXq.disableSubmit = true |
| | | this.$refs.modalFormXq.getAllApproveData(record) |
| | | this.$refs.modalFormXq.getBasicInformation({ ...record, dataId: record.id }) |
| | | }, |
| | | handleInspection(id) { |
| | | if (!this.url.receiveInspectionOrder) { |
| | | this.$message.error('请设置url.receiveInspectionOrder!') |
| | | return |
| | | } |
| | | var that = this |
| | | getAction(that.url.receiveInspectionOrder, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleOrReceive(id) { |
| | | if (!this.url.cancelInspectionOrder) { |
| | | this.$message.error('请设置url.cancelInspectionOrder!') |
| | | return |
| | | } |
| | | var that = this |
| | | getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | batchZf(type) { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©ä¸æ¡è®°å½' |
| | | }) |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ',' |
| | | //详æ
|
| | | handleDetail: function(record) { |
| | | this.selectInspectionOrderXqData = Object.assign({}, record) |
| | | this.$refs.modalFormXq.visible = true |
| | | this.$refs.modalFormXq.title = '详æ
' |
| | | this.$refs.modalFormXq.disableSubmit = true |
| | | this.$refs.modalFormXq.getAllApproveData(record) |
| | | this.$refs.modalFormXq.getBasicInformation({ ...record, dataId: record.id }) |
| | | }, |
| | | handleInspection(id) { |
| | | if (!this.url.receiveInspectionOrder) { |
| | | this.$message.error('请设置url.receiveInspectionOrder!') |
| | | return |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认ä½åº', |
| | | content: 'æ¯å¦ä½åºé䏿°æ®ï¼åªæå¾
ç¹æ£ç¶æçæ°æ®æå¯ä½åºæå?', |
| | | onOk: function () { |
| | | that.loading = true |
| | | getAction(that.url.cancelOrReceive, { ids: ids, type: type }).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | that.onClearSelected() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false |
| | | getAction(that.url.receiveInspectionOrder, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | batchLq(type) { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©ä¸æ¡è®°å½' |
| | | }) |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ',' |
| | | }, |
| | | handleOrReceive(id) { |
| | | if (!this.url.cancelInspectionOrder) { |
| | | this.$message.error('请设置url.cancelInspectionOrder!') |
| | | return |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认é¢å', |
| | | content: 'æ¯å¦é¢åé䏿°æ®ï¼åªæå¾
ç¹æ£ç¶æçæ°æ®æå¯é¢åæå?', |
| | | onOk: function () { |
| | | that.loading = true |
| | | getAction(that.url.cancelOrReceive, { ids: ids, type: type }).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | that.onClearSelected() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false |
| | | getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | onInspectionDateChange: function (value, dateString) { |
| | | this.queryParam.inspectionDateBegin = dateString[0] |
| | | this.queryParam.inspectionDateEnd = dateString[1] |
| | | }, |
| | | }, |
| | | batchZf(type) { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©ä¸æ¡è®°å½' |
| | | }) |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ',' |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认ä½åº', |
| | | content: 'æ¯å¦ä½åºé䏿°æ®ï¼åªæå¾
ç¹æ£ç¶æçæ°æ®æå¯ä½åºæå?', |
| | | onOk: function() { |
| | | that.loading = true |
| | | getAction(that.url.cancelOrReceive, { ids: ids, type: type }).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | that.onClearSelected() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | batchLq(type) { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©ä¸æ¡è®°å½' |
| | | }) |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ',' |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认é¢å', |
| | | content: 'æ¯å¦é¢åé䏿°æ®ï¼åªæå¾
ç¹æ£ç¶æçæ°æ®æå¯é¢åæå?', |
| | | onOk: function() { |
| | | that.loading = true |
| | | getAction(that.url.cancelOrReceive, { ids: ids, type: type }).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | that.onClearSelected() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | onInspectionDateChange: function(value, dateString) { |
| | | this.queryParam.inspectionDateBegin = dateString[0] |
| | | this.queryParam.inspectionDateEnd = dateString[1] |
| | | }, |
| | | |
| | | handlePrint(record) { |
| | | let href = `${window._CONFIG['domianURL']}/jmreport/view/1094871242505912320?id=` + record.id + `&equipmentId=` + record.equipmentId + `&inspectionDate=` + record.inspectionDate; //ç½ç«é¾æ¥ |
| | | window.open(href, "_blank"); |
| | | }, |
| | | handlePrint(record) { |
| | | let href = `${window._CONFIG['domianURL']}/jmreport/view/1094871242505912320?id=` + record.id + `&equipmentId=` + record.equipmentId + `&inspectionDate=` + record.inspectionDate //ç½ç«é¾æ¥ |
| | | window.open(href, '_blank') |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="1200" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | centered |
| | | :mask-closable="false" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen centered |
| | | :mask-closable="false" @ok="handleOk" @cancel="handleCancel" cancelText="å
³é"> |
| | | |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="standardCode" label="å·¥åå·"> |
| | | <a-input placeholder="å·¥åå·èªå¨çæ" v-model="model.orderNum" readOnly/> |
| | | <a-input placeholder="å·¥åå·èªå¨çæ" v-model="model.orderNum" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="equipmentId" label="设å¤ç¼å·"> |
| | | <MaintenanceEquipmentSelect placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="model.equipmentId" |
| | | <a-form-model-item prop="equipmentId" label="ç»ä¸ç¼ç "> |
| | | <MaintenanceEquipmentSelect placeholder="请è¾å
¥ç»ä¸ç¼ç æåç§°æç´¢" v-model="model.equipmentId" |
| | | :maintenanceCategory="maintenanceCategory" :disabled="disabled" |
| | | @autocompleteForm="autocompleteForm"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="standardName" label="æ ååç§°"> |
| | | <a-form-model-item prop="standardName" label="è§èåç§°"> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" readOnly v-model="model.standardName"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="standardCode" label="æ åç¼ç "> |
| | | <a-form-model-item prop="standardCode" label="è§èç¼ç "> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" readOnly v-model="model.standardCode"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | | :rowNumber="true" |
| | | :rowSelection="true" |
| | | :bordered="true" |
| | | :alwaysEdit="true" |
| | | :toolbar="true" |
| | | keep-source |
| | | :height="300" |
| | | :loading="detail.loading" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns" |
| | | style="margin-top: 8px;"/> |
| | | <j-vxe-table ref="editableDetailTable" :rowNumber="true" :rowSelection="true" :bordered="true" |
| | | :alwaysEdit="true" :toolbar="true" keep-source :height="300" :loading="detail.loading" |
| | | :dataSource="detail.dataSource" :columns="detail.columns" style="margin-top: 8px;"/> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | |
| | | disabled: false, |
| | | validatorRules: { |
| | | // standardName: [ |
| | | // { required: true, message: '请è¾å
¥æ ååç§°!' } |
| | | // { required: true, message: '请è¾å
¥è§èåç§°!' } |
| | | // ], |
| | | inspectionDate: [ |
| | | { required: true, message: 'è¯·éæ©ç¹æ£æ¥æ!' } |
| | | { required: true, message: 'è¯·éæ©ç¹æ£æ¥æ', trigger: 'change' } |
| | | ], |
| | | // maintenancePeriod: [ |
| | | // { required: true, message: '请è¾å
¥ä¿å
»å¨æï¼åä½ï¼å¤©!' } |
| | | // ], |
| | | equipmentId: [ |
| | | { required: true, message: 'è¯·éæ©è®¾å¤!' } |
| | | { required: true, message: 'è¯·éæ©è®¾å¤', trigger: 'change' } |
| | | ] |
| | | }, |
| | | url: { |
| | |
| | | width: '10%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, unique: true, message: 'åºå·ä¸è½éå¤' } |
| | | { required: true, message: '请è¾å
¥${title}' }, |
| | | { unique: true, message: 'åºå·ä¸è½éå¤' } |
| | | ] |
| | | }, |
| | | { |
| | |
| | | width: '20%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼' } |
| | | { required: true, message: '请è¾å
¥${title}' } |
| | | ] |
| | | }, |
| | | { |
| | |
| | | width: '30%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»è¦æ±ä¸è½ä¸ºç©ºï¼' } |
| | | { required: true, message: '请è¾å
¥${title}' } |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®é¨é¨', |
| | | align: "center", |
| | | width: 240, |
| | | dataIndex: 'repairDepartName', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | | align: "center", |
| | | width: 80, |
| | |
| | | /> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item |
| | | label="ç»´ä¿®é¨é¨/çç»åé
" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | v-show="!repairDepartDisabled" |
| | | > |
| | | <j-select-repair-depart |
| | | v-model="model.selectedRepairDeparts" |
| | | :multi="true" |
| | | @back="backRepairDepartInfo" |
| | | :backRepairDepart="true" |
| | | :treeRepairDepartOpera="true" |
| | | ></j-select-repair-depart> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item |
| | | label="è´è´£é¨é¨" |
| | |
| | | import { disabledAuthFilter } from '@/utils/authFilter' |
| | | import { duplicateCheck } from '@/api/api' |
| | | import JSelectProduction from '../../../components/jeecgbiz/JSelectProduction' |
| | | import JSelectRepairDepart from '../../../components/jeecgbiz/JSelectRepairDepart' |
| | | import { mapActions } from 'vuex' |
| | | import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
| | | import SelectDeviceModal from './SelectDeviceModal' |
| | |
| | | name: 'UserModal', |
| | | components: { |
| | | SelectDeviceModal, |
| | | JSelectProduction |
| | | JSelectProduction, |
| | | JSelectRepairDepart |
| | | }, |
| | | data() { |
| | | return { |
| | | departDisabled: false, //æ¯å¦æ¯æçé¨é¨è°ç¨è¯¥é¡µé¢ |
| | | productionDisabled: false, //æ¯å¦æ¯æç车é´è°ç¨è¯¥é¡µé¢ |
| | | roleDisabled: false, //æ¯å¦æ¯è§è²ç»´æ¤è°ç¨è¯¥é¡µé¢ |
| | | repairDepartDisabled: false, //æ¯å¦æ¯æçç»´ä¿®é¨é¨çç»è°ç¨è¯¥é¡µé¢ |
| | | modalWidth: 800, |
| | | drawerWidth: 700, |
| | | modaltoggleFlag: true, |
| | |
| | | userProductionList: '/sys/user/userProductionList', |
| | | userId: '/sys/user/generateUserId', // å¼å
¥çææ·»å ç¨æ·æ
åµä¸çurl |
| | | syncUserByUserName: '/act/process/extActProcess/doSyncUserByUserName',//åæ¥ç¨æ·å°å·¥ä½æµ |
| | | queryTenantList: '/sys/tenant/queryList' |
| | | queryTenantList: '/sys/tenant/queryList', |
| | | userRepairDepartList: '/sys/user/userRepairDepartList', |
| | | repairDepartTreeList: '/eam/eamBaseRepairDepart/queryTreeList' |
| | | }, |
| | | tenantsOptions: [], |
| | | rolesOptions: [], |
| | | nextDepartOptions: [], |
| | | nextProductionOptions: [], |
| | | nextRepairDepartOptions: [], |
| | | isDepartType: '', |
| | | model: { |
| | | selectedProduction: '' |
| | | selectedProduction: '', |
| | | selectedRepairDeparts: '' |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.initRoleList() |
| | | this.initTenantList() |
| | | this.queryTreeData() |
| | | this.getRepairDepartTreeDataByApi() |
| | | }, |
| | | computed: { |
| | | uploadAction: function() { |
| | |
| | | }).finally(() => { |
| | | }) |
| | | }, |
| | | // è·åç»´ä¿®çç»æ |
| | | getRepairDepartTreeDataByApi() { |
| | | getAction(this.url.repairDepartTreeList) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.repairDepartTreeData = res.result |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | add() { |
| | | this.refresh() |
| | | this.edit({ |
| | |
| | | userIdentity: 1, |
| | | selectedroles: '', |
| | | selecteddeparts: '', |
| | | selectedProduction: '' |
| | | selectedProduction: '', |
| | | selectedRepairDeparts: '' |
| | | }) |
| | | }, |
| | | edit(record) { |
| | |
| | | if (record.hasOwnProperty('id')) { |
| | | that.getUserRoles(record.id) |
| | | that.getUserDeparts(record.id) |
| | | that.getUserProductions(record.id) |
| | | that.getUserRepairDeparts(record.id) |
| | | } |
| | | }, |
| | | isDisabledAuth(code) { |
| | |
| | | that.nextDepartOptions = departOptions |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | getUserProductions(userid) { |
| | | let that = this |
| | | // è·å车é´åé
|
| | | getAction(that.url.userProductionList, { userId: userid }).then((res) => { |
| | | if (res.success) { |
| | |
| | | that.nextProductionOptions = ProductionOptions |
| | | } |
| | | }) |
| | | //车é´çurl |
| | | }, |
| | | getUserRepairDeparts(userid) { |
| | | let that = this |
| | | // è·åç»´ä¿®é¨é¨/çç»åé
|
| | | getAction(that.url.userRepairDepartList, { userId: userid }).then((res) => { |
| | | if (res.success) { |
| | | let repairDepartOptions = [] |
| | | let selectedRepairDepartKeys = [] |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | selectedRepairDepartKeys.push(res.result[i].key) |
| | | //æ°å¢è´è´£ç»´ä¿®é¨é¨/çç»éæ©ä¸ææ¡ |
| | | repairDepartOptions.push({ |
| | | value: res.result[i].key, |
| | | label: res.result[i].title |
| | | }) |
| | | } |
| | | |
| | | this.$set(this.model, 'selectedRepairDeparts', selectedRepairDepartKeys.join(',')) |
| | | that.nextRepairDepartOptions = repairDepartOptions |
| | | } |
| | | }) |
| | | }, |
| | | backDepartInfo(info) { |
| | | this.model.departIds = this.model.selecteddeparts |
| | |
| | | return c |
| | | }) |
| | | }, |
| | | backRepairDepartInfo(info) { |
| | | this.model.repairDepartIds = this.model.selectedRepairDeparts |
| | | this.nextRepairDepartOptions = info.map((item, index, arr) => { |
| | | let c = { label: item.text, value: item.value + '' } |
| | | return c |
| | | }) |
| | | }, |
| | | |
| | | refresh() { |
| | | this.userId = '' |
| | | this.nextDepartOptions = [] |
| | | this.nextProductionOptions = [] |
| | | this.nextRepairDepartOptions = [] |
| | | this.departIdShow = false |
| | | }, |
| | | close() { |
| | |
| | | this.disableSubmit = false |
| | | this.nextDepartOptions = [] |
| | | this.nextProductionOptions = [] |
| | | this.nextRepairDepartOptions = [] |
| | | this.departIdShow = false |
| | | this.$refs.form.resetFields() |
| | | }, |