| | |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | |
| | | <span |
| | | slot="num" |
| | | slot-scope="text, record" |
| | | > |
| | | <a |
| | | class="lot" |
| | | @click="handleShowDetail(record)" |
| | | >{{record.standardNum}}</a> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | <standard-detail-model :mainId="standardId" ref="standardDetail"></standard-detail-model> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import StandardDetailModel from './modules/maintenancePlan/StandardDetailModel.vue' |
| | | export default { |
| | | name: "EquipmentMaintenancePlanDetailList", |
| | | mixins:[JeecgListMixin], |
| | | components: {}, |
| | | components: {StandardDetailModel}, |
| | | props:{ |
| | | mainId:{ |
| | | type:String, |
| | |
| | | align:"center", |
| | | dataIndex: 'standardNum', |
| | | width:300, |
| | | scopedSlots: { customRender: 'num' } |
| | | }, |
| | | { |
| | | title:'设å¤ç»ä¸ç¼ç ', |
| | |
| | | importUrl: "/eam/equipmentMaintenancePlan/importEquipmentMaintenancePlanDetail", |
| | | }, |
| | | dictOptions:{ |
| | | } |
| | | }, |
| | | standardId:'' |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.dataSource=[] |
| | | this.selectedRowKeys=[] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | handleShowDetail(record){ |
| | | this.standardId = record.standardId |
| | | this.$refs.standardDetail.visible = true; |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="åæ®å·"> |
| | | <j-input placeholder="请è¾å
¥åæ®å·" v-model="queryParam.num"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ä¿å
»ç±»å"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©ä¿å
»ç±»å" v-model="queryParam.type" dictCode="maintenance_type" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :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="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-button @click="handleAdd" type="primary" icon="plus" v-has="'MaintenancePlan:add&edit&submit'">æ°å¢</a-button> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)" v-if="record.status==='created'||record.status==='rejected'">ç¼è¾</a> |
| | | <a @click="handleEdit(record)" v-if="record.status==='created'||record.status==='rejected'" v-has="'MaintenancePlan:add&edit&submit'">ç¼è¾</a> |
| | | <a-divider type="vertical" v-if="record.status==='created'||record.status==='rejected'"/> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)" v-if="record.status==='created'||record.status==='rejected'"> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)" v-if="record.status==='created'||record.status==='rejected'" v-has="'MaintenancePlan:add&edit&submit'"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | <a-divider type="vertical" v-if="record.status==='created'||record.status==='rejected'"/> |
| | | <a-popconfirm title="æäº¤åä¸å¯æ¤åï¼ç¡®å®æäº¤å?" @confirm="() => handleSubmit(record)" v-if="record.status==='created'||record.status==='rejected'"> |
| | | <a-divider type="vertical" v-if="record.status==='created'||record.status==='rejected'" v-has="'MaintenancePlan:add&edit&submit'"/> |
| | | <a-popconfirm title="æäº¤åä¸å¯æ¤åï¼ç¡®å®æäº¤å?" @confirm="() => handleSubmit(record)" v-if="record.status==='created'||record.status==='rejected'" v-has="'MaintenancePlan:add&edit&submit'"> |
| | | <a>æäº¤</a> |
| | | </a-popconfirm> |
| | | <a-divider type="vertical" v-if="record.status==='created'||record.status==='rejected'"/> |
| | | <a-popconfirm title="éè¿åä¸å¯æ¤éï¼ç¡®å®éè¿å?" @confirm="() => handleAudit(record)" v-if="record.status==='submitted'"> |
| | | <a-divider type="vertical" v-if="record.status==='created'||record.status==='rejected'" v-has="'MaintenancePlan:add&edit&submit'"/> |
| | | <a-popconfirm title="éè¿åä¸å¯æ¤éï¼ç¡®å®éè¿å?" @confirm="() => handleAudit(record)" v-if="record.status==='submitted'" v-has="'MaintenancePlan:audit&reject'"> |
| | | <a>éè¿</a> |
| | | </a-popconfirm> |
| | | <a-divider type="vertical" v-if="record.status==='submitted'"/> |
| | | <a-popconfirm title="ç¡®å®é©³åå?" @confirm="() => handleReject(record)" v-if="record.status==='submitted'"> |
| | | <a-divider type="vertical" v-if="record.status==='submitted'" v-has="'MaintenancePlan:audit&reject'"/> |
| | | <a-popconfirm title="ç¡®å®é©³åå?" @confirm="() => handleReject(record)" v-if="record.status==='submitted'" v-has="'MaintenancePlan:audit&reject'"> |
| | | <a>驳å</a> |
| | | </a-popconfirm> |
| | | <a-divider type="vertical" v-if="record.status==='submitted'"/> |
| | | <a-popconfirm title="ä¸ååä¸å¯æ¤éï¼ç¡®å®ä¸åå?" @confirm="() => handleDistrbute(record)" v-if="record.status==='passed'"> |
| | | <a-divider type="vertical" v-if="record.status==='submitted'" v-has="'MaintenancePlan:audit&reject'"/> |
| | | <a-popconfirm title="ä¸ååä¸å¯æ¤éï¼ç¡®å®ä¸åå?" @confirm="() => handleDistrbute(record)" v-if="record.status==='passed'" v-has="'MaintenancePlan:distribute'"> |
| | | <a>ä¸å</a> |
| | | </a-popconfirm> |
| | | <span v-if="record.status==='distributed'" style="font-size: 12px;font-style: italic;">å·²çæå·¥å</span> |
| | | </span> |
| | | |
| | | </a-table> |
| | |
| | | this.superFieldList = fieldList |
| | | }, |
| | | handleSubmit(record){ |
| | | this.loading = true; |
| | | putAction(this.url.submit,record).then(res=>{ |
| | | if(res.success){ |
| | | this.$message.success("æä½æå"); |
| | | }else{ |
| | | this.$message.success("æä½å¤±è´¥"); |
| | | |
| | | } |
| | | }) |
| | | }).finally(res=>{ |
| | | this.loadData(); |
| | | }) |
| | | }, |
| | | handleAudit(record){ |
| | | this.loading = true; |
| | | putAction(this.url.audit,record).then(res=>{ |
| | | if(res.success){ |
| | | this.$message.success("æä½æå"); |
| | | }else{ |
| | | this.$message.success("æä½å¤±è´¥"); |
| | | } |
| | | }) |
| | | }).finally(res=>{ |
| | | this.loadData(); |
| | | }) |
| | | }, |
| | | handleDistrbute(record){ |
| | | this.loading = true; |
| | | putAction(this.url.distrbute,record).then(res=>{ |
| | | if(res.success){ |
| | | this.$message.success("æä½æå"); |
| | | }else{ |
| | | this.$message.success("æä½å¤±è´¥"); |
| | | } |
| | | }) |
| | | }).finally(res=>{ |
| | | this.loadData(); |
| | | }) |
| | | }, |
| | | handleReject(record){ |
| | | this.loading = true; |
| | | putAction(this.url.reject,record).then(res=>{ |
| | | if(res.success){ |
| | | this.$message.success("æä½æå"); |
| | | }else{ |
| | | this.$message.success("æä½å¤±è´¥"); |
| | | } |
| | | }) |
| | | }).finally(res=>{ |
| | | this.loadData(); |
| | | }) |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | :class="'cust-erp-sub-tab'" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | <!-- <span |
| | | slot="photo" |
| | | slot-scope="text,record" |
| | | > |
| | | <Tooltip |
| | | placement="top" |
| | | title="é¢è§å¾ç" |
| | | > |
| | | <img |
| | | v-if=" record.upload.path && (record.upload.format.toLowerCase()=='jpg'||record.upload.format.toLowerCase()=='bmp'||record.upload.format.toLowerCase()=='png'||record.upload.format.toLowerCase()=='jpeg'||record.upload.format.toLowerCase()=='gif')" |
| | | width="30" |
| | | height="14" |
| | | border="1" |
| | | draggable="false" |
| | | preview="1" |
| | | :preview-text="''" |
| | | :src="record.upload.src" |
| | | /> |
| | | </Tooltip> |
| | | <a |
| | | v-if="record.upload.path && record.upload.format.toLowerCase()=='pdf'" |
| | | href="javascript:;" |
| | | @click="view(record.upload)" |
| | | > |
| | | é¢è§ |
| | | </a> |
| | | </span> --> |
| | | |
| | | <template |
| | | slot="photo" |
| | | slot-scope="text,record" |
| | | > |
| | | <span |
| | | v-if="!text" |
| | | style="font-size: 12px;font-style: italic;" |
| | | >æ å¾ç</span> |
| | | <img |
| | | v-else |
| | | :src="getImgView(text)" |
| | | :preview="record.id" |
| | | height="25px" |
| | | alt="" |
| | | style="max-width:80px;font-size: 12px;font-style: italic;" |
| | | /> |
| | | </template> |
| | | </a-table> |
| | | </div> |
| | | <pdf-view ref="pdfview"></pdf-view> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction } from '@/api/manage' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | import { preview } from 'vue-photo-preview' |
| | | import { ACCESS_TOKEN } from '@/store/mutation-types' |
| | | import Vue from 'vue' |
| | | import PdfView from '@views/common/PdfView' |
| | | import { getFileAccessHttpUrl } from '@/api/manage'; |
| | | |
| | | export default { |
| | | name: "MaintenanceStandardModal", |
| | | components: { |
| | | Tooltip, |
| | | PdfView, |
| | | preview, |
| | | }, |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | maintenanceStandardId: { |
| | | type: String, |
| | | default: '-1', |
| | | required: false |
| | | } |
| | | }, |
| | | watch: { |
| | | maintenanceStandardId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | if (!this.maintenanceStandardId) { |
| | | this.clearList() |
| | | } else { |
| | | this.queryParam['maintenanceStandardId'] = val; |
| | | this.queryParam['delFlag'] = 0; |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 50, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | { |
| | | title: 'é¨ä½', |
| | | align: "center", |
| | | dataIndex: 'location', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '示æå¾', |
| | | align: "center", |
| | | dataIndex: 'photo', |
| | | scopedSlots: { customRender: 'photo' }, |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹ç®', |
| | | align: "center", |
| | | dataIndex: 'name', |
| | | width: 150, |
| | | |
| | | }, |
| | | { |
| | | title: 'ä¿å
»æ å', |
| | | align: "center", |
| | | dataIndex: 'standard', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'æ¹æ³', |
| | | align: "center", |
| | | dataIndex: 'maintenanceMethodName', |
| | | width: 150, |
| | | |
| | | }, |
| | | { |
| | | title: 'å·¥å
·', |
| | | align: "center", |
| | | dataIndex: 'maintenanceTool', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'å®å
¨è¦æ±', |
| | | align: "center", |
| | | dataIndex: 'maintenanceRequire', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'å·¥æ¶å®é¢', |
| | | align: "center", |
| | | dataIndex: 'workingHourQuota', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'ä¿å
»å¨æ', |
| | | align: "center", |
| | | dataIndex: 'maintenanceCycleName', |
| | | width: 150, |
| | | }, |
| | | |
| | | ], |
| | | url: { |
| | | list: "/eam/maintenanceStandardDetail/getMaintenanceStandardList",//æ°æ®æ¥æºmom_eam_daily_inspection_standard_detail |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | }, |
| | | methods: { |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.selectedRowKeys = [] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error("请设置url.list屿§!") |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records || res.result; |
| | | for (let i = 0; i < this.dataSource.length; i++) { |
| | | let r = this.dataSource[i].upload; |
| | | r.src = this.getSrc(this.dataSource[i].upload); |
| | | } |
| | | 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 |
| | | }) |
| | | }, |
| | | |
| | | getSrc(record) { |
| | | |
| | | if (!record.path) { |
| | | return ''; |
| | | } |
| | | //æ¬å°ï¼local\Minioï¼minio\é¿éäºï¼alioss |
| | | if (record.uploadType == 'local') { |
| | | |
| | | let ssoLoginFlag = Vue.ls.get("ssoLoginFlag"); |
| | | let deployMode = Vue.ls.get("deployMode"); |
| | | |
| | | if (ssoLoginFlag && deployMode == "container") { |
| | | var baseProject = Vue.ls.get("baseProject"); |
| | | console.log("baseProject==>" + baseProject) |
| | | |
| | | var hostname = window.location.protocol + "//" + window.location.host; |
| | | var url = hostname + '/' + baseProject + '/sys/common/static'; |
| | | return getFileAccessHttpUrl(record.path + record.encodeName, url, window._CONFIG['hyperTextTransfer']) |
| | | } else { |
| | | //æ ¹æ®åå¸ç¶æä¿®æ¹https æ http |
| | | return getFileAccessHttpUrl(record.path + record.encodeName, this.url.urlDownload, window._CONFIG['hyperTextTransfer']) |
| | | } |
| | | |
| | | } else if (record.uploadType == 'alioss') { |
| | | |
| | | const OSS = require('ali-oss') |
| | | const client = new OSS({ |
| | | // region以æå·ä¸ºä¾ï¼oss-cn-hangzhouï¼ï¼å
¶ä»regionæå®é
æ
åµå¡«åã |
| | | region: window._CONFIG['region'], |
| | | // é¿éäºä¸»è´¦å·AccessKeyæ¥æææAPIçè®¿é®æéï¼é£é©å¾é«ã强ç建议æ¨å建并使ç¨RAMè´¦å·è¿è¡APIè®¿é®ææ¥å¸¸è¿ç»´ï¼è¯·ç»å½RAMæ§å¶å°å建RAMè´¦å·ã |
| | | accessKeyId: window._CONFIG['accessKeyId'], |
| | | accessKeySecret: window._CONFIG['accessKeySecret'], |
| | | bucket: window._CONFIG['bucket'], |
| | | }) |
| | | // object-key表示ä»OSSä¸è½½æä»¶æ¶éè¦æå®å
嫿件åç¼å¨å
ç宿´è·¯å¾ï¼ä¾å¦abc/efg/123.jpgã |
| | | return client.signatureUrl(record.path) |
| | | } |
| | | }, |
| | | |
| | | view(record) { |
| | | this.$refs.pdfview.showPdf(record.src); |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="'ä¿å
»æ åæç»'" |
| | | :width="1600" |
| | | :visible="visible" |
| | | :maskClosable="false" |
| | | switchFullscreen |
| | | @cancel="handleCancel" |
| | | > |
| | | <daily-maintenance-standard-detail :maintenanceStandardId="mainId"></daily-maintenance-standard-detail> |
| | | <template slot="footer"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleCancel" |
| | | > |
| | | å
³é |
| | | </a-button> |
| | | </template> |
| | | </j-modal> |
| | | </template> |
| | | <script> |
| | | import DailyMaintenanceStandardDetail from './DailyMaintenanceStandardDetail' |
| | | export default { |
| | | name: 'EquipmentMaintenancePlanModal', |
| | | components: { |
| | | DailyMaintenanceStandardDetail |
| | | }, |
| | | props:{ |
| | | mainId: { |
| | | type: String, |
| | | default: '-1', |
| | | required: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title:'', |
| | | width:800, |
| | | visible: false, |
| | | disableSubmit: false |
| | | } |
| | | }, |
| | | methods:{ |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |