| | |
| | | import Vue from 'vue' |
| | | //设置å
¨å±API_BASE_URL |
| | | Vue.prototype.API_BASE_URL = window._CONFIG.VUE_APP_API_BASE_URL?window._CONFIG.VUE_APP_API_BASE_URL:process.env.VUE_APP_API_BASE_URL |
| | | window._CONFIG['domianURL'] = Vue.prototype.API_BASE_URL |
| | | window._CONFIG['domianURL'] = '/jeecg-boot' |
| | | //åç¹ç»å½å°å |
| | | window._CONFIG['casPrefixUrl'] = window._CONFIG.VUE_APP_CAS_BASE_URL?window._CONFIG.VUE_APP_CAS_BASE_URL:process.env.VUE_APP_CAS_BASE_URL |
| | | window._CONFIG['onlinePreviewDomainURL'] = window._CONFIG.VUE_APP_ONLINE_BASE_URL?window._CONFIG.VUE_APP_ONLINE_BASE_URL:process.env.VUE_APP_ONLINE_BASE_URL |
| | | window._CONFIG['staticDomainURL'] = Vue.prototype.API_BASE_URL + '/sys/common/static' |
| | | window._CONFIG['pdfDomainURL'] = Vue.prototype.API_BASE_URL+ '/sys/common/pdf/pdfPreviewIframe' |
| | | window._CONFIG['staticDomainURL'] = '/jeecg-boot/sys/common/static' |
| | | window._CONFIG['pdfDomainURL'] = '/jeecg-boot/sys/common/pdf/pdfPreviewIframe' |
| | |
| | | * åæ å°å端ååï¼éè¿ vue.config.js |
| | | * @type {*|string} |
| | | */ |
| | | let apiBaseUrl = window._CONFIG['domianURL'] || "/jeecg-boot"; |
| | | let apiBaseUrl = "/jeecg-boot"; |
| | | //console.log("apiBaseUrl= ",apiBaseUrl) |
| | | // å建 axios å®ä¾ |
| | | const service = axios.create({ |
| | |
| | | <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" |
| | | @change="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="weekMaintenanceImportExcel" |
| | | @change="weekMaintenanceImportExcel"> |
| | | @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">å¨ä¿æ å导å
¥</a-button> |
| | | </a-upload> |
| | | <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.weekMaintenanceXlsDownloadUrl)">å¨ä¿æ 忍¡æ¿ä¸è½½</a-button> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button v-if="queryParam.equipmentId" @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"> |
| | | <a-icon type="delete" /> |
| | | å é¤ |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ |
| | | <a-icon type="down" /> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a |
| | | style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="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> |
| | | <a @click="handlePreview(record)">é¢è§</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®ä¸è½½æä»¶å?" @confirm="() => handleDownload(record)"> |
| | | <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> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <eamEquipmentAttachment-modal ref="modalForm" @ok="modalFormOk" :equipmentId="queryParam.equipmentId"></eamEquipmentAttachment-modal> |
| | | <lx-file-preview ref="lxFilePreview" :fileUrl="fileUrl"></lx-file-preview> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@/assets/less/TableExpand.less' |
| | | import EamEquipmentAttachmentModal from './modules/EamEquipmentAttachmentModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { downFile } from '@api/manage' |
| | | |
| | | export default { |
| | | name: 'EamEquipmentAttachmentList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EamEquipmentAttachmentModal |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'è®¾å¤ææ¡£å°è´¦ä½¿ç¨ç®¡ç页é¢', |
| | | disableMixinCreated: true, |
| | | fileUrl: '', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'æä»¶å å¯å', |
| | | align: 'center', |
| | | dataIndex: 'fileEncodeName', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'æä»¶åç§°', |
| | | align: 'center', |
| | | dataIndex: 'fileName', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'æä»¶è·¯å¾', |
| | | align: 'center', |
| | | dataIndex: 'filePath', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'æä»¶åç¼å', |
| | | align: 'center', |
| | | dataIndex: 'fileSuffix' |
| | | }, |
| | | { |
| | | title: 'æä»¶å¤§å°', |
| | | align: 'center', |
| | | dataIndex: 'fileSize' |
| | | }, |
| | | { |
| | | title: 'æè¿°', |
| | | align: 'center', |
| | | dataIndex: 'description', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/equipmentAttachment/list', |
| | | delete: '/eam/equipmentAttachment/delete', |
| | | deleteBatch: '/eam/equipmentAttachment/deleteBatch', |
| | | download: '/eam/equipmentAttachment/downloadFile', |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | }, |
| | | methods: { |
| | | handleDownload(record) { |
| | | downFile(this.url.download, { id: record.id }).then((res) => { |
| | | if (!res) { |
| | | this.$message.warning('æä»¶ä¸è½½å¤±è´¥') |
| | | return |
| | | } else { |
| | | let fileName = record.fileName; |
| | | if (typeof window.navigator.msSaveBlob !== 'undefined') { |
| | | window.navigator.msSaveBlob(new Blob([res]), fileName); |
| | | } else { |
| | | let url = window.URL.createObjectURL(new Blob([res])); |
| | | let link = document.createElement('a'); |
| | | link.style.display = 'none'; |
| | | link.href = url; |
| | | link.setAttribute('download', fileName); |
| | | document.body.appendChild(link); |
| | | link.click() |
| | | document.body.removeChild(link) //ä¸è½½å®æç§»é¤å
ç´ |
| | | window.URL.revokeObjectURL(url) //éæ¾æblob对象 |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | handlePreview: function (record) { |
| | | this.$refs.lxFilePreview.preview(record.filePath); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | <a-button type="primary" icon="download" @click="handleTemplateXlsDownload">导å
¥æ¨¡æ¿ä¸è½½</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"> |
| | | <a-icon type="delete"/> |
| | | å é¤ |
| | | </a-menu-item> |
| | | <a-menu-item key="2" @click="handleOpenNameplateModal(selectionRows)"> |
| | | <a-menu-item key="1" @click="handleOpenNameplateModal(selectionRows)"> |
| | | <a-icon type="printer"/> |
| | | æå°éç |
| | | </a-menu-item> |
| | | <a-menu-item key="2" @click="batchDel" v-if="isShowAuth('eam:equipment:delete')"> |
| | | <a-icon type="delete"/> |
| | | å é¤ |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ |
| | |
| | | style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onSelectChange([])">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | |
| | | <a-menu-item> |
| | | <a href="javascript:;" @click="handleDetail(record)">详æ
</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-menu-item v-if="isShowAuth('eam:equipment:delete')"> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | |
| | | <!-- tableåºå-end --> |
| | | |
| | | <a-tabs v-model="activeTabKey" @change="handleTabChange"> |
| | | <a-tab-pane tab="ä¿å
»æ å" :key="1"> |
| | | <eam-maintenance-standard-list ref="tabPaneTableListRef1" :isDisplayOperation="false"/> |
| | | <a-tab-pane tab="è®¾å¤ææ¡£" :key="1"> |
| | | <eam-equipment-attachment-list ref="tabPaneTableListRef1"/> |
| | | </a-tab-pane> |
| | | <a-tab-pane tab="维修工å" :key="2"> |
| | | <eam-repair-order-list ref="tabPaneTableListRef2" :isDisplayOperation="false"/> |
| | | <a-tab-pane tab="ç¹æ£å·¥å" :key="2"> |
| | | <eam-inspection-order-list ref="tabPaneTableListRef2" :isDisplayOperation="false"/> |
| | | </a-tab-pane> |
| | | <a-tab-pane tab="å¨ä¿å·¥å" :key="3"> |
| | | <eam-week-maintenance-order-list ref="tabPaneTableListRef3" :isDisplayOperation="false"/> |
| | | </a-tab-pane> |
| | | <a-tab-pane tab="维修工å" :key="4"> |
| | | <eam-repair-order-list ref="tabPaneTableListRef4" :isDisplayOperation="false"/> |
| | | </a-tab-pane> |
| | | <a-tab-pane tab="ä¿å
»æ å" :key="5"> |
| | | <eam-maintenance-standard-list ref="tabPaneTableListRef5" :isDisplayOperation="false"/> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | |
| | | <!--éçå¼¹çª--> |
| | | <nameplate-modal ref="nameplateModalRef" :printedRows="printedRows"/> |
| | | <!--å±¥åå¼¹çª--> |
| | | <resume-drawer ref="resumeDrawerRef"/> |
| | | <resume-drawer ref="resumeDrawerRef" :currentTableRowRecord="currentTableRowRecord"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import ResumeDrawer from '@views/eam/equipment/modules/ResumeDrawer.vue' |
| | | import EamMaintenanceStandardList from '@views/eam/base/EamMaintenanceStandardList.vue' |
| | | import EamRepairOrderList from '../repair/EamRepairOrderList' |
| | | import EamInspectionOrderList from '../maintenance/EamInspectionOrderList' |
| | | import EamEquipmentAttachmentList from '@views/eam/equipment/EamEquipmentAttachmentList.vue' |
| | | import EamWeekMaintenanceOrderList from '@views/eam/maintenance/EamWeekMaintenanceOrderList.vue' |
| | | |
| | | export default { |
| | | name: 'EamEquipmentList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EamInspectionOrderList, |
| | | EamRepairOrderList, |
| | | EamMaintenanceStandardList, |
| | | ResumeDrawer, |
| | | NameplateModal, |
| | | EamEquipmentModal |
| | | EamEquipmentModal, |
| | | EamEquipmentAttachmentList, |
| | | EamWeekMaintenanceOrderList |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | { |
| | | title: '设å¤åç±»', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'equipmentCategory_dictText' |
| | | }, |
| | | { |
| | |
| | | width: 100, |
| | | dataIndex: 'installationPosition' |
| | | }, |
| | | |
| | | { |
| | | title: 'ç«é¡¹å¡å·', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'cardNumber' |
| | | }, |
| | | { |
| | | title: 'åºåç¼å·', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'factoryNumber' |
| | | }, |
| | | { |
| | | title: 'æºåºåå®¶', |
| | | align: 'center', |
| | | width: 100, |
| | | width: 300, |
| | | dataIndex: 'manufacturingEnterprise' |
| | | }, |
| | | { |
| | |
| | | { |
| | | title: '设å¤ç«¯å£', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'equipmentPort' |
| | | }, |
| | | { |
| | | title: 'åæ æ°é', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'coordinateNum' |
| | | }, |
| | | { |
| | | title: 'å建人', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'createBy_dictText' |
| | | }, |
| | | { |
| | | title: 'å建æ¶é´', |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'createTime' |
| | | }, |
| | | { |
| | |
| | | { |
| | | title: '夿³¨', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | |
| | | treeData: [], |
| | | printedRows: [], |
| | | activeTabKey: 1, |
| | | appHomeUrl: '' |
| | | appHomeUrl: '', |
| | | currentTableRowRecord: {} |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | * @param record è¡¨æ ¼è¡ä¿¡æ¯ |
| | | */ |
| | | handleOpenResumeDrawer(record) { |
| | | this.currentTableRowRecord = Object.assign({}, record) |
| | | this.$refs.resumeDrawerRef.title = '设å¤å±¥å' + `ï¼${record.equipmentCode}ï¼` |
| | | this.$refs.resumeDrawerRef.dataSource = [] |
| | | this.$refs.resumeDrawerRef.visible = true |
| | | this.$nextTick(() => this.$refs.resumeDrawerRef.getEquipmentResumeByApi()) |
| | | }, |
| | | |
| | | /** |
| | |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.selectionRows = selectionRows |
| | | this.$refs['tabPaneTableListRef' + this.activeTabKey].queryParam.equipmentId = null |
| | | this.$refs['tabPaneTableListRef' + this.activeTabKey].dataSource = [] |
| | | this.$refs['tabPaneTableListRef' + this.activeTabKey].onClearSelected() |
| | | if (selectedRowKeys.length === 1) this.loadTabPaneTableData(selectedRowKeys[0]) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="800" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-form-model-item |
| | | label="ä¸ä¼ " |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | v-if="!editable" |
| | | prop="fileList"> |
| | | <lx-upload :returnUrl="false" |
| | | :isMultiple="false" |
| | | v-model="model.fileList" |
| | | biz="test"> |
| | | </lx-upload> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fileName" label="æä»¶åç§°" v-if="editable"> |
| | | <a-input placeholder="请è¾å
¥æä»¶åç§°" v-model="model.fileName" /> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description" label="æè¿°"> |
| | | <a-textarea placeholder="请è¾å
¥æè¿°" v-model="model.description" /> |
| | | </a-form-model-item> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: "EamEquipmentAttachmentModal", |
| | | props: { |
| | | equipmentId: { |
| | | type: String, |
| | | required: true, |
| | | default: '-1' |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | title:"æä½", |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | | validatorRules:{ |
| | | fileName: [ |
| | | { required: true, message: '请è¾å
¥æä»¶åç§°!' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: "/eam/equipmentAttachment/add", |
| | | edit: "/eam/equipmentAttachment/edit", |
| | | }, |
| | | editable: false, |
| | | } |
| | | }, |
| | | created () { |
| | | }, |
| | | methods: { |
| | | add () { |
| | | this.editable = false; |
| | | //åå§åé»è®¤å¼ |
| | | this.model = {}; |
| | | this.visible = true |
| | | }, |
| | | edit (record) { |
| | | this.editable = true; |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | this.$refs.form.clearValidate(); |
| | | }, |
| | | handleOk () { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | if(!this.model.id){ |
| | | httpurl+=this.url.add; |
| | | method = 'post'; |
| | | }else{ |
| | | httpurl+=this.url.edit; |
| | | method = 'put'; |
| | | } |
| | | that.model.equipmentId = that.equipmentId; |
| | | httpAction(httpurl, that.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; |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | |
| | | </style> |
| | |
| | | { required: true, message: 'è¯·éæ©åºåæ¥æ' } |
| | | ], |
| | | acceptanceCheckDate: [ |
| | | { required: true, message: 'è¯·éæ©éªæ¶æ¥æ' } |
| | | { required: false, message: 'è¯·éæ©éªæ¶æ¥æ' } |
| | | ], |
| | | technologyStatus: [ |
| | | { required: true, message: 'è¯·éæ©ææ¯ç¶æ' } |
| | |
| | | if (!this.selectedAsyncValue || !this.selectedAsyncValue.key || this.selectedAsyncValue.key != this.value || !this.maintenanceCategory) { |
| | | console.log('è¿æè¯·æ±åå°') |
| | | getAction(`/eam/maintenanceStandard/listByUser`, { |
| | | id: this.value, |
| | | equipmentId: this.value, |
| | | maintenanceCategory: this.maintenanceCategory |
| | | }).then(res => { |
| | | if (res.success) { |
| | |
| | | |
| | | <tbody> |
| | | <tr> |
| | | <td rowspan="3"> |
| | | <QrcodeVue :value="httpUrl+item.equipmentCode"/> |
| | | <td rowspan="3" align="center"> |
| | | <div style="height: 80%;width: 50%"> |
| | | <QrcodeVue :value="httpUrl+item.id" :size="50"/> |
| | | </div> |
| | | </td> |
| | | <td>设å¤ç¼å·</td> |
| | | <td>{{ item.equipmentCode }}</td> |
| | |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td rowspan="3"> |
| | | <QrcodeVue :value="item.equipmentCode"/> |
| | | <td rowspan="3" align="center"> |
| | | <div style="height: 80%;width: 50%"> |
| | | <QrcodeVue :value="item.equipmentCode" :size="50"/> |
| | | </div> |
| | | </td> |
| | | <td>åºåç¼å·</td> |
| | | <td>{{ item.factoryNumber }}</td> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import QrcodeVue from 'qrcode.vue' |
| | | import QrcodeVue from 'qrcode.vue' |
| | | |
| | | export default { |
| | | name: 'NameplateModal', |
| | | components: { QrcodeVue }, |
| | | props: { |
| | | printedRows: { |
| | | type: Array |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'éç', |
| | | visible: false, |
| | | httpUrl: '' |
| | | } |
| | | }, |
| | | methods: { |
| | | handleCancel() { |
| | | this.visible = false |
| | | export default { |
| | | name: 'NameplateModal', |
| | | components: { QrcodeVue }, |
| | | props: { |
| | | printedRows: { |
| | | type: Array |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'éç', |
| | | visible: false, |
| | | httpUrl: '' |
| | | } |
| | | }, |
| | | methods: { |
| | | handleCancel() { |
| | | this.visible = false |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | /deep/ .ant-modal { |
| | | height: 75%; |
| | | overflow: hidden; |
| | | |
| | | .ant-modal-content { |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | /deep/ .ant-modal { |
| | | height: 75%; |
| | | overflow: hidden; |
| | | |
| | | ::-webkit-scrollbar { |
| | | width: 8px; |
| | | height: 8px; |
| | | } |
| | | .ant-modal-content { |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | overflow: hidden; |
| | | |
| | | .ant-modal-body { |
| | | flex: 1; |
| | | overflow: auto; |
| | | ::-webkit-scrollbar { |
| | | width: 8px; |
| | | height: 8px; |
| | | } |
| | | |
| | | .ant-modal-body { |
| | | flex: 1; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | table { |
| | | font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软é
é»", Arial, sans-serif; |
| | | color: #000; |
| | | text-align: center; |
| | | table { |
| | | font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软é
é»", Arial, sans-serif; |
| | | color: #000; |
| | | text-align: center; |
| | | |
| | | &:not(:last-child) { |
| | | margin-bottom: 10px; |
| | | &:not(:last-child) { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | th { |
| | | font-size: 24px; |
| | | letter-spacing: 3px; |
| | | padding: 12px; |
| | | } |
| | | |
| | | td { |
| | | font-size: 14px; |
| | | width: 33%; |
| | | padding: 6px; |
| | | } |
| | | } |
| | | |
| | | th { |
| | | font-size: 28px; |
| | | letter-spacing: 3px; |
| | | padding: 20px; |
| | | } |
| | | |
| | | td { |
| | | font-size: 18px; |
| | | width: 33%; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <a-drawer title="设å¤å±¥å" placement="right" :width="500" :closable="false" :visible="visible" @close="onClose"> |
| | | <a-timeline mode="alternate"> |
| | | <a-timeline-item>Create a services site 2015-09-01</a-timeline-item> |
| | | <a-timeline-item color="green"> |
| | | Solve initial network problems 2015-09-01 |
| | | </a-timeline-item> |
| | | <a-timeline-item> |
| | | <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/> |
| | | Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque |
| | | laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto |
| | | beatae vitae dicta sunt explicabo. |
| | | </a-timeline-item> |
| | | <a-timeline-item color="red"> |
| | | Network problems being solved 2015-09-01 |
| | | </a-timeline-item> |
| | | <a-timeline-item>Create a services site 2015-09-01</a-timeline-item> |
| | | <a-timeline-item> |
| | | <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/> |
| | | Technical testing 2015-09-01 |
| | | </a-timeline-item> |
| | | <a-timeline-item>Create a services site 2015-09-01</a-timeline-item> |
| | | <a-timeline-item color="green"> |
| | | Solve initial network problems 2015-09-01 |
| | | </a-timeline-item> |
| | | <a-timeline-item> |
| | | <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/> |
| | | Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque |
| | | laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto |
| | | beatae vitae dicta sunt explicabo. |
| | | </a-timeline-item> |
| | | <a-timeline-item color="red"> |
| | | Network problems being solved 2015-09-01 |
| | | </a-timeline-item> |
| | | <a-timeline-item>Create a services site 2015-09-01</a-timeline-item> |
| | | <a-timeline-item> |
| | | <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/> |
| | | Technical testing 2015-09-01 |
| | | </a-timeline-item> |
| | | <a-timeline-item>Create a services site 2015-09-01</a-timeline-item> |
| | | <a-timeline-item color="green"> |
| | | Solve initial network problems 2015-09-01 |
| | | </a-timeline-item> |
| | | <a-timeline-item> |
| | | <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/> |
| | | Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque |
| | | laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto |
| | | beatae vitae dicta sunt explicabo. |
| | | </a-timeline-item> |
| | | <a-timeline-item color="red"> |
| | | Network problems being solved 2015-09-01 |
| | | </a-timeline-item> |
| | | <a-timeline-item>Create a services site 2015-09-01</a-timeline-item> |
| | | <a-timeline-item> |
| | | <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/> |
| | | Technical testing 2015-09-01 |
| | | </a-timeline-item> |
| | | </a-timeline> |
| | | <a-drawer :title="title" placement="right" :width="600" :closable="false" :visible="visible" @close="onClose"> |
| | | <a-spin :spinning="spinning"> |
| | | <a-skeleton :title="false" :paragraph="{ rows: 30}" v-if="spinning&&dataSource.length===0"/> |
| | | |
| | | <template v-if="dataSource.length>0"> |
| | | <a-timeline mode="alternate"> |
| | | <a-timeline-item v-for="item in dataSource" :key="item.id"> |
| | | <span>æä½äººï¼{{item.operator_dictText}}</span><br/> |
| | | <span>æä½ï¼{{item.operationTag_dictText}}</span><br/> |
| | | <!--<span>æè¿°ï¼{{item.description}}</span>--> |
| | | <span>æä½æ¶é´ï¼{{item.createTime}}</span> |
| | | </a-timeline-item> |
| | | </a-timeline> |
| | | |
| | | <div style="text-align: center"> |
| | | <a v-if="dataSource.length>0&&pageConfig.pageNo===1&&pageConfig.pageNo!==pageConfig.totalPage" |
| | | @click="loadNextPageData"> |
| | | ç¹å»å è½½æ´å¤ |
| | | <a-icon type="down"/> |
| | | </a> |
| | | |
| | | <span v-if="isNoMoreData">- å·²ç»å°åºäº -</span> |
| | | |
| | | <a-empty v-if="dataSource.length===0"/> |
| | | </div> |
| | | </template> |
| | | </a-spin> |
| | | </a-drawer> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'ResumeDrawer', |
| | | data() { |
| | | return { |
| | | visible: false |
| | | } |
| | | }, |
| | | methods: { |
| | | getEquipmentResumeByApi() { |
| | | import { getAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'ResumeDrawer', |
| | | props: { |
| | | currentTableRowRecord: { |
| | | type: Object |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title: '设å¤å±¥å', |
| | | visible: false, |
| | | spinning: false, |
| | | dataSource: [], |
| | | url: { |
| | | list: '/eam/equipmentHistoryLog/list' |
| | | }, |
| | | pageConfig: { |
| | | pageNo: 1, |
| | | pageSize: 10, |
| | | totalPage: 0 |
| | | }, |
| | | drawerBodyElement: null, |
| | | isNoMoreData: false |
| | | } |
| | | }, |
| | | methods: { |
| | | getEquipmentResumeByApi(pageNo = 1) { |
| | | this.pageConfig.pageNo = pageNo |
| | | const params = Object.assign({}, this.pageConfig, { equipmentId: this.currentTableRowRecord.id }) |
| | | const that = this |
| | | this.spinning = true |
| | | getAction(this.url.list, params) |
| | | .then(res => { |
| | | if (res.success) { |
| | | console.log('res.result', res.result) |
| | | if (!this.pageConfig.totalPage) this.pageConfig.totalPage = res.result.pages |
| | | res.result.records.forEach(item => that.dataSource.push(item)) |
| | | if (this.pageConfig.totalPage !== this.pageConfig.pageNo) { |
| | | if (res.result.current === 2) { |
| | | if (!this.drawerBodyElement) this.drawerBodyElement = document.querySelector('.ant-drawer-body') |
| | | this.drawerBodyElement.addEventListener('scroll', this.handleDrawerBodyScroll) |
| | | } |
| | | } else this.isNoMoreData = true |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.spinning = false |
| | | }) |
| | | }, |
| | | |
| | | onClose() { |
| | | this.visible = false |
| | | // å è½½ä¸ä¸é¡µæ°æ® |
| | | loadNextPageData() { |
| | | const current = this.pageConfig.pageNo + 1 |
| | | this.getEquipmentResumeByApi(current) |
| | | }, |
| | | |
| | | // æ½å±å
ç´ æ»å¨äºä»¶ |
| | | handleDrawerBodyScroll() { |
| | | if (this.pageConfig.totalPage === this.pageConfig.pageNo) return |
| | | const { scrollTop, clientHeight, scrollHeight } = this.drawerBodyElement |
| | | if (scrollTop + clientHeight + 1 >= scrollHeight) this.loadNextPageData() |
| | | }, |
| | | |
| | | onClose() { |
| | | this.visible = false |
| | | this.pageConfig.totalPage = 0 |
| | | this.isNoMoreData = false |
| | | if (this.drawerBodyElement) this.drawerBodyElement.removeEventListener('scroll', this.handleDrawerBodyScroll) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | /deep/ .ant-drawer-wrapper-body { |
| | | overflow: hidden; |
| | | display: flex; |
| | | flex-direction: column; |
| | | /deep/ .ant-drawer-wrapper-body { |
| | | overflow: hidden; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | ::-webkit-scrollbar { |
| | | width: 8px; |
| | | height: 8px; |
| | | } |
| | | ::-webkit-scrollbar { |
| | | width: 8px; |
| | | height: 8px; |
| | | } |
| | | |
| | | .ant-drawer-body { |
| | | flex: 1; |
| | | overflow: auto; |
| | | .ant-drawer-body { |
| | | flex: 1; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <div class="table-page-search-wrapper" v-if="isDisplayOperation"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å·¥åå·"> |
| | | <a-input placeholder="请è¾å
¥å·¥åå·" v-model="queryParam.orderNum"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="设å¤ID"> |
| | | <a-input placeholder="请è¾å
¥è®¾å¤ID" v-model="queryParam.equipmentId"></a-input> |
| | | <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-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç¹æ£æ¥æ"> |
| | | <j-date placeholder="è¯·éæ©ç¹æ£æ¥æ" v-model="queryParam.inspectionDate"></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç¹æ£æ¶é´"> |
| | | <j-date placeholder="è¯·éæ©ç¹æ£æ¶é´" v-model="queryParam.operateTime"></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | | </template> |
| | | <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-form-item> |
| | | </a-col> |
| | | <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" /> |
| | | </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="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <a @click="handleToggleSearch" style="margin-left: 8px"> |
| | | {{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <div class="table-operator" v-if="isDisplayOperation"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus" v-if="isShowAuth('eam:inspection:add')">æ°å¢</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchZf(5)"><a-icon type="snippets"/>ä½åº</a-menu-item> |
| | | <a-menu-item key="2" @click="batchLq(2)"><a-icon type="form"/>é¢å</a-menu-item> |
| | | <a-menu-item key="1" v-if="isShowAuth('eam:inspection:abolish')" @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> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ <a-icon type="down" /></a-button> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ |
| | | <a-icon type="down"/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <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="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template slot="imgSlot" 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> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span> |
| | | <a-button |
| | | v-else |
| | | :ghost="true" |
| | | type="primary" |
| | | icon="download" |
| | | size="small" |
| | | @click="downloadFile(text)"> |
| | | ä¸è½½ |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a v-if="record.inspectionStatus === '1'" @click="handleEdit(record)">ç¼è¾</a> |
| | | <a @click="handleEdit(record)" v-if="isShowAuth('eam:inspection:edit') && record.inspectionStatus === 'WAIT_INSPECTION'" >ç¼è¾</a> |
| | | |
| | | <a-divider v-if="record.inspectionStatus === '1'" type="vertical" /> |
| | | <a-divider type="vertical" v-if="isShowAuth('eam:inspection:edit') && record.inspectionStatus === 'WAIT_INSPECTION'" /> |
| | | |
| | | <a-popconfirm v-if="record.inspectionStatus === '1'" title="ç¡®å®é¢åå?" @confirm="() => handleInspection(record.id)"> |
| | | <a-popconfirm title="ç¡®å®é¢åå?" v-if="isShowAuth('eam:inspection:collect') && record.inspectionStatus === 'WAIT_INSPECTION'" |
| | | @confirm="() => handleInspection(record.id)"> |
| | | <a>é¢å</a> |
| | | </a-popconfirm> |
| | | |
| | | <a-divider v-if="record.inspectionStatus === '1'" type="vertical" /> |
| | | <a-divider type="vertical" v-if="isShowAuth('eam:inspection:collect') && record.inspectionStatus === 'WAIT_INSPECTION'" /> |
| | | |
| | | <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="record.inspectionStatus === '1'" > |
| | | <a-menu-item v-if="isShowAuth('eam:inspection:abolish') && record.inspectionStatus === 'WAIT_INSPECTION'"> |
| | | <a-popconfirm title="ç¡®å®ä½åºå?" @confirm="() => handleOrReceive(record.id)"> |
| | | <a>ä½åº</a> |
| | | </a-popconfirm> |
| | |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <eam-inspection-order-modal ref="modalForm" @ok="modalFormOk"></eam-inspection-order-modal> |
| | | <EamInspectionOrderModalXq ref="modalFormXq" @ok="modalFormOk"></EamInspectionOrderModalXq> |
| | | |
| | | <inspection-order-handle ref="modalFormXq" :selectShenpiData="selectInspectionOrderXqData"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EamInspectionOrderModal from './modules/EamInspectionOrderModal' |
| | | import EamInspectionOrderModalXq from './modules/EamInspectionOrderModalXq.vue' |
| | | 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], |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | InspectionOrderHandle, |
| | | EamInspectionOrderModal, |
| | | EamInspectionOrderModalXq |
| | | LxSearchEquipmentSelect, |
| | | }, |
| | | data () { |
| | | 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; |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title:'å·¥åå·', |
| | | align:"center", |
| | | title: 'å·¥åå·', |
| | | align: 'center', |
| | | dataIndex: 'orderNum' |
| | | }, |
| | | { |
| | | title:'设å¤ç¼å·', |
| | | align:"center", |
| | | dataIndex: 'equipmentId_dictText' |
| | | title: '设å¤ç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'equipmentCode' |
| | | }, |
| | | { |
| | | title:'æ åç¼ç ', |
| | | align:"center", |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: 'æ ååç§°', |
| | | align: 'center', |
| | | dataIndex: 'standardId_dictText' |
| | | }, |
| | | { |
| | | title:'ç¹æ£æ¥æ', |
| | | align:"center", |
| | | title: 'ç¹æ£æ¥æ', |
| | | align: 'center', |
| | | dataIndex: 'inspectionDate', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | customRender: function(text) { |
| | | return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | } |
| | | }, |
| | | { |
| | | title:'ç¹æ£è¿ææ¶é´', |
| | | align:"center", |
| | | title: 'ç¹æ£è¿ææ¥æ', |
| | | align: 'center', |
| | | dataIndex: 'expirationTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | customRender: function(text) { |
| | | return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | } |
| | | }, |
| | | { |
| | | title:'å建æ¹å¼', |
| | | align:"center", |
| | | title: 'å建æ¹å¼', |
| | | align: 'center', |
| | | dataIndex: 'creationMethod_dictText' |
| | | }, |
| | | { |
| | | title:'ç¹æ£ç¶æ', |
| | | align:"center", |
| | | title: 'ç¹æ£ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'inspectionStatus_dictText' |
| | | }, |
| | | { |
| | | title:'ç¹æ£æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'operateTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title:'ç¹æ£äºº', |
| | | align:"center", |
| | | title: 'ç¹æ£äºº', |
| | | align: 'center', |
| | | dataIndex: 'operator_dictText' |
| | | }, |
| | | { |
| | | title:'çç»é¿ç¡®è®¤', |
| | | align:"center", |
| | | dataIndex: 'confirmUser' |
| | | title: 'ç¹æ£æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'operateTime', |
| | | }, |
| | | { |
| | | title:'确认æ¶é´', |
| | | align:"center", |
| | | title: 'çç»é¿ç¡®è®¤', |
| | | align: 'center', |
| | | dataIndex: 'confirmUser_dictText' |
| | | }, |
| | | { |
| | | title: '确认æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'confirmTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | 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" |
| | | 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:[], |
| | | dictOptions: {}, |
| | | superFieldList: [], |
| | | selectInspectionOrderXqData: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | 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}`; |
| | | }, |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | methods: { |
| | | initDictConfig(){ |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'string',value:'orderNum',text:'å·¥åå·',dictCode:''}) |
| | | fieldList.push({type:'string',value:'equipmentId',text:'设å¤ID',dictCode:''}) |
| | | fieldList.push({type:'string',value:'standardId',text:'æ åID',dictCode:''}) |
| | | fieldList.push({type:'date',value:'inspectionDate',text:'ç¹æ£æ¥æ'}) |
| | | fieldList.push({type:'date',value:'operateTime',text:'ç¹æ£æ¶é´'}) |
| | | fieldList.push({type:'string',value:'operator',text:'ç¹æ£äºº',dictCode:''}) |
| | | fieldList.push({type:'date',value:'expirationTime',text:'ç¹æ£è¿ææ¶é´'}) |
| | | fieldList.push({type:'string',value:'creationMethod',text:'å建æ¹å¼',dictCode:''}) |
| | | fieldList.push({type:'string',value:'inspectionStatus',text:'ç¹æ£ç¶æ',dictCode:''}) |
| | | fieldList.push({type:'string',value:'confirmUser',text:'设å¤ç®¡çå确认',dictCode:''}) |
| | | fieldList.push({type:'date',value:'confirmTime',text:'确认æ¶é´'}) |
| | | fieldList.push({type:'string',value:'remark',text:'夿³¨',dictCode:''}) |
| | | fieldList.push({type:'string',value:'imageFiles',text:'ç
§çæä»¶ids;id以éå·åé',dictCode:''}) |
| | | this.superFieldList = fieldList |
| | | initDictConfig() { |
| | | }, |
| | | //详æ
|
| | | handleDetail: function(record) { |
| | | this.$refs.modalFormXq.edit(record); |
| | | this.$refs.modalFormXq.title = "详æ
"; |
| | | this.$refs.modalFormXq.disableSubmit = true; |
| | | 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!") |
| | | this.$message.error('请设置url.receiveInspectionOrder!') |
| | | return |
| | | } |
| | | var that = this; |
| | | var that = this |
| | | getAction(that.url.receiveInspectionOrder, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | that.loadData(); |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | }) |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | handleOrReceive(id){ |
| | | handleOrReceive(id) { |
| | | if (!this.url.cancelInspectionOrder) { |
| | | this.$message.error("请设置url.cancelInspectionOrder!") |
| | | this.$message.error('请设置url.cancelInspectionOrder!') |
| | | return |
| | | } |
| | | var that = this; |
| | | var that = this |
| | | getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | that.loadData(); |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | }) |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | batchZf(type){ |
| | | batchZf(type) { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"è¯·éæ©ä¸æ¡è®°å½" |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©ä¸æ¡è®°å½' |
| | | }) |
| | | } else { |
| | | var ids = ""; |
| | | var ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ","; |
| | | ids += this.selectedRowKeys[a] + ',' |
| | | } |
| | | var that = this; |
| | | var that = this |
| | | this.$confirm({ |
| | | title: "确认ä½åº", |
| | | content: "æ¯å¦ä½åºé䏿°æ®ï¼åªæå¾
ç¹æ£ç¶æçæ°æ®æå¯ä½åºæå?", |
| | | onOk: function () { |
| | | that.loading = true; |
| | | getAction(that.url.cancelOrReceive, {ids: ids,type:type}).then((res) => { |
| | | 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(); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | that.onClearSelected() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | | }); |
| | | that.loading = false |
| | | }) |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | }, |
| | | batchLq(type){ |
| | | batchLq(type) { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"è¯·éæ©ä¸æ¡è®°å½" |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©ä¸æ¡è®°å½' |
| | | }) |
| | | } else { |
| | | var ids = ""; |
| | | var ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ","; |
| | | ids += this.selectedRowKeys[a] + ',' |
| | | } |
| | | var that = this; |
| | | var that = this |
| | | this.$confirm({ |
| | | title: "确认é¢å", |
| | | content: "æ¯å¦é¢åé䏿°æ®ï¼åªæå¾
ç¹æ£ç¶æçæ°æ®æå¯é¢åæå?", |
| | | onOk: function () { |
| | | that.loading = true; |
| | | getAction(that.url.cancelOrReceive, {ids: ids,type:type}).then((res) => { |
| | | 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(); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | that.onClearSelected() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | | }); |
| | | that.loading = false |
| | | }) |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | }, |
| | | onInspectionDateChange: function(value, dateString) { |
| | | this.queryParam.inspectionDateBegin = dateString[0] |
| | | this.queryParam.inspectionDateEnd = dateString[1] |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <a-card :bordered="false"> |
| | | |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <div class="table-page-search-wrapper" v-if="isDisplayOperation"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | |
| | | </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> |
| | | <lx-search-equipment-select placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" |
| | | v-model="queryParam.equipmentId"></lx-search-equipment-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="计åä¿å
»æ¥æ"> |
| | | <a-range-picker v-model="queryParam.maintenanceDateRange" @change="onMaintenanceDateChange" format="YYYY-MM-DD" value-format="YYYY-MM-DD" /> |
| | | <a-range-picker v-model="queryParam.maintenanceDateRange" @change="onMaintenanceDateChange" |
| | | 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-form-item label="ä¿å
»ç¶æ"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©ä¿å
»ç¶æ" dict-code="week_maintenance_status" v-model="queryParam.maintenanceStatus" /> |
| | | <j-dict-select-tag placeholder="è¯·éæ©ä¿å
»ç¶æ" dict-code="week_maintenance_status" |
| | | v-model="queryParam.maintenanceStatus"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <div class="table-operator" v-if="isDisplayOperation"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus" v-if="isShowAuth('eam:weekMaintenance:add')">æ°å¢</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="handlerBatchAbolish"> |
| | | <a-icon type="delete" /> |
| | | <a-menu-item key="1" @click="handlerBatchAbolish" v-if="isShowAuth('eam:weekMaintenance:abolish')"> |
| | | <a-icon type="delete"/> |
| | | ä½åº |
| | | </a-menu-item> |
| | | <a-menu-item key="1" @click="handlerBatchCollect"> |
| | | <a-icon type="delete" /> |
| | | <a-menu-item key="2" @click="handlerBatchCollect" v-if="isShowAuth('eam:weekMaintenance:collect')"> |
| | | <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;"> |
| | | <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> |
| | |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :scroll="{x:'max-content'}" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'" @click="handleEdit(record)">ç¼è¾</a> |
| | | <a-divider type="vertical" /> |
| | | <template v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE' && isShowAuth('eam:weekMaintenance:edit')"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a-popconfirm title="ç¡®å®é¢åå?" @confirm="() => handlerCollect(record.id)"> |
| | | <a>é¢å</a> |
| | | </a-popconfirm> |
| | | |
| | | <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 v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'"> |
| | | <a-popconfirm title="ç¡®å®é¢åå?" @confirm="() => handlerCollect(record.id)"> |
| | | <a>é¢å</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'"> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®ä½åºå?" @confirm="() => handlerAbolish(record.id)"> |
| | | <a>ä½åº</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item > |
| | | <a-menu-item> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | </template> |
| | | |
| | | <template v-else> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </template> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <eamWeekMaintenanceOrder-modal ref="modalForm" @ok="modalFormOk"></eamWeekMaintenanceOrder-modal> |
| | | <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" |
| | | :selectShenpiData="selectWeekMaintenanceData"></week-maintenance-approval-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@/assets/less/TableExpand.less' |
| | | import EamWeekMaintenanceOrderModal from './modules/EamWeekMaintenanceOrderModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | import { deleteAction, getAction } from '@api/manage' |
| | | import '@/assets/less/TableExpand.less' |
| | | import EamWeekMaintenanceOrderModal from './modules/EamWeekMaintenanceOrderModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | import { deleteAction, getAction } from '@api/manage' |
| | | import WeekMaintenanceApprovalModal from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal' |
| | | |
| | | export default { |
| | | name: 'EamWeekMaintenanceOrderList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | LxSearchEquipmentSelect, |
| | | EamWeekMaintenanceOrderModal |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'å¨ä¿å·¥å管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | export default { |
| | | name: 'EamWeekMaintenanceOrderList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | LxSearchEquipmentSelect, |
| | | EamWeekMaintenanceOrderModal, |
| | | WeekMaintenanceApprovalModal |
| | | }, |
| | | props: { |
| | | isDisplayOperation: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'å¨ä¿å·¥å管ç页é¢', |
| | | disableMixinCreated: true, |
| | | selectWeekMaintenanceData: {}, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | fixed: 'left', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'å·¥åå·', |
| | | align: 'center', |
| | | dataIndex: 'orderNum', |
| | | fixed: 'left', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'equipmentCode', |
| | | fixed: 'left', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | dataIndex: 'equipmentName', |
| | | fixed: 'left', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: 'æ ååç§°', |
| | | align: 'center', |
| | | dataIndex: 'standardId_dictText', |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: '计åä¿å
»æ¥æ', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceDate', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: 'å®é
å¼å§æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'actualStartTime', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: 'å®é
ç»ææ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'actualEndTime', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: 'ä¿å
»äºº', |
| | | align: 'center', |
| | | dataIndex: 'operator_dictText', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: 'ä¿å
»ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceStatus_dictText', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: 'å建æ¹å¼', |
| | | align: 'center', |
| | | dataIndex: 'creationMethod_dictText', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: '确认人', |
| | | align: 'center', |
| | | dataIndex: 'confirmUser_dictText', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: '确认æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'confirmTime', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: '确认æè§', |
| | | align: 'center', |
| | | dataIndex: 'confirmComment', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: 'åéªæ¶äºº', |
| | | align: 'center', |
| | | dataIndex: 'initialAcceptanceUser_dictText', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: 'åéªæ¶æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'initialAcceptanceTime', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: 'åéªæ¶æè§', |
| | | align: 'center', |
| | | dataIndex: 'initialAcceptanceComment', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: 'ç»éªæ¶äºº', |
| | | align: 'center', |
| | | dataIndex: 'finalAcceptanceUser_dictText', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: 'ç»éªæ¶æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'finalAcceptanceTime', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: 'ç»éªæ¶æè§', |
| | | align: 'center', |
| | | dataIndex: 'finalAcceptanceComment', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: '夿³¨', |
| | | align: 'center', |
| | | dataIndex: 'remark', |
| | | width: 60 |
| | | } |
| | | }, |
| | | { |
| | | 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: 'maintenanceDate' |
| | | }, |
| | | { |
| | | title: 'å®é
å¼å§æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'actualStartTime' |
| | | }, |
| | | { |
| | | title: 'å®é
ç»ææ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'actualEndTime' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»äºº', |
| | | align: 'center', |
| | | dataIndex: 'operator_dictText' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceStatus_dictText' |
| | | }, |
| | | { |
| | | title: 'å建æ¹å¼', |
| | | align: 'center', |
| | | dataIndex: 'creationMethod_dictText' |
| | | }, |
| | | { |
| | | title: '确认人', |
| | | align: 'center', |
| | | dataIndex: 'confirmUser_dictText' |
| | | }, |
| | | { |
| | | title: '确认æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'confirmTime' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»å¾ç', |
| | | align: 'center', |
| | | dataIndex: 'imageFiles' |
| | | }, |
| | | { |
| | | title: '夿³¨', |
| | | align: 'center', |
| | | dataIndex: 'remark', |
| | | editable: true, |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' } |
| | | // { |
| | | // title: 'æä½', |
| | | // dataIndex: 'action', |
| | | // align: 'center', |
| | | // fixed: 'right', |
| | | // width: 100, |
| | | // scopedSlots: { customRender: 'action' } |
| | | // } |
| | | ], |
| | | url: { |
| | | list: '/eam/weekMaintenanceOrder/list', |
| | | abolish: '/eam/weekMaintenanceOrder/abolish', |
| | | abolishBatch: '/eam/weekMaintenanceOrder/abolishBatch', |
| | | collect: '/eam/weekMaintenanceOrder/collect', |
| | | collectBatch: '/eam/weekMaintenanceOrder/collectBatch' |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/weekMaintenanceOrder/list', |
| | | abolish: '/eam/weekMaintenanceOrder/abolish', |
| | | abolishBatch: '/eam/weekMaintenanceOrder/abolishBatch', |
| | | collect: '/eam/weekMaintenanceOrder/collect', |
| | | } |
| | | } |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | onMaintenanceDateChange: function(value, dateString) { |
| | | this.queryParam.maintenanceDateBegin = dateString[0] |
| | | this.queryParam.maintenanceDateEnd = dateString[1] |
| | | }, |
| | | handlerAbolish(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 |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | handlerBatchAbolish() { |
| | | if(!this.url.abolishBatch){ |
| | | this.$message.error("请设置url.abolishBatch屿§!") |
| | | return |
| | | const operationColumn = { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | // this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼'); |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"è¯·éæ©ä¸æ¡è®°å½" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ","; |
| | | this.columns = [...this.columns, operationColumn] |
| | | this.loadData(1) |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | onMaintenanceDateChange: function(value, dateString) { |
| | | this.queryParam.maintenanceDateBegin = dateString[0] |
| | | this.queryParam.maintenanceDateEnd = dateString[1] |
| | | }, |
| | | handlerAbolish(id) { |
| | | if (!this.url.abolish) { |
| | | this.$message.error('请设置url.abolish屿§!') |
| | | return |
| | | } |
| | | var that = this; |
| | | this.$confirm({ |
| | | title: "确认ä½åº", |
| | | content: "æ¯å¦ä½åºé䏿°æ®ï¼åªæå¾
ä¿å
»ç¶æçæ°æ®æå¯ä½åºæå?", |
| | | onOk: function () { |
| | | that.loading = true; |
| | | deleteAction(that.url.abolishBatch, {ids: ids}).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | | }); |
| | | 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 |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | //å个é¢å |
| | | handlerCollect(id) { |
| | | if(!this.url.collect){ |
| | | this.$message.error("请设置url.collect屿§!") |
| | | return |
| | | } |
| | | var that = this; |
| | | getAction(that.url.collect, {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 |
| | | }); |
| | | }) |
| | | }, |
| | | handlerBatchAbolish() { |
| | | if (!this.url.abolishBatch) { |
| | | this.$message.error('请设置url.abolishBatch屿§!') |
| | | return |
| | | } |
| | | }); |
| | | }, |
| | | //æ¹éé¢å |
| | | handlerBatchCollect(){ |
| | | |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | // this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼'); |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©ä¸æ¡è®°å½' |
| | | }) |
| | | return |
| | | } 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 |
| | | deleteAction(that.url.abolishBatch, { ids: ids }).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | that.onClearSelected() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | //å个é¢å |
| | | handlerCollect(id) { |
| | | if (!this.url.collect) { |
| | | this.$message.error('请设置url.collect屿§!') |
| | | return |
| | | } |
| | | let that = this |
| | | getAction(that.url.collect, { 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 |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | //æ¹éé¢å |
| | | handlerBatchCollect() { |
| | | if (!this.url.collectBatch) { |
| | | this.$message.error('请设置url.abolishBatch屿§!') |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | // this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼'); |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©ä¸æ¡è®°å½' |
| | | }) |
| | | return |
| | | } 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 |
| | | deleteAction(that.url.collectBatch, { ids: ids }).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | that.onClearSelected() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | handleDetail(record) { |
| | | this.selectWeekMaintenanceData = Object.assign({}, record) |
| | | this.$refs.weekMaintenanceApprovalModal.recordDetail(record) |
| | | this.$refs.weekMaintenanceApprovalModal.title = '详æ
' |
| | | this.$refs.weekMaintenanceApprovalModal.disableSubmit = true |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | centered |
| | | :mask-closable="false" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <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 :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="å·¥åå·"> |
| | | <a-input placeholder="å·¥åå·èªå¨çæ" v-model="model.orderNum" disabled /> |
| | | <a-form-model-item prop="standardCode" label="å·¥åå·"> |
| | | <a-input placeholder="å·¥åå·èªå¨çæ" v-model="model.orderNum" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="设å¤ç¼å·"> |
| | | <a-form-model-item prop="equipmentId" label="设å¤ç¼å·"> |
| | | <MaintenanceEquipmentSelect placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="model.equipmentId" |
| | | :maintenanceCategory="maintenanceCategory" :disabled="editable" |
| | | @autocompleteForm="autocompleteForm"></MaintenanceEquipmentSelect> |
| | | :maintenanceCategory="maintenanceCategory" :disabled="disabled" |
| | | @autocompleteForm="autocompleteForm"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="æ ååç§°"> |
| | | <a-input placeholder="请è¾å
¥æ ååç§°" disabled v-model="model.standardName" /> |
| | | <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 :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="æ åç¼ç "> |
| | | <a-input placeholder="请è¾å
¥æ åç¼ç " disabled v-model="model.standardCode" /> |
| | | <a-form-model-item prop="standardCode" label="æ åç¼ç "> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" readOnly v-model="model.standardCode"/> |
| | | </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" disabled style="width: 100%" /> |
| | | <a-form-model-item label="ä¿å
»å¨æ"> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" v-model="model.maintenancePeriod" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="ç¹æ£äºº"> |
| | | <j-dict-select-tag v-model="model.operator" placeholder="è¯·éæ©ç¨æ·" dictCode="sys_user,realname,username,username!='admin' order by create_time"/> |
| | | <a-form-model-item prop="operator" label="ç¹æ£äºº"> |
| | | <j-search-select-tag v-model="model.operator" placeholder="è¯·éæ©ç¹æ£äºº" :disabled="!model.equipmentId" |
| | | :dictOptions="maintenanceOperatorOptions"/> |
| | | </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="inspectionDate"> |
| | | <j-date placeholder="è¯·éæ©ç¹æ£æ¥æ" v-model="model.inspectionDate" @change="expirationTimeFrom(model.inspectionDate)" style="width: 100%" /> |
| | | <a-form-model-item label="ç¹æ£æ¥æ" prop="inspectionDate"> |
| | | <j-date :placeholder="!model.maintenancePeriod?'请填åä¿å
»å¨æ':'è¯·éæ©ç¹æ£æ¥æ'" v-model="model.inspectionDate" |
| | | :disabled="!model.maintenancePeriod" |
| | | @change="expirationTimeFrom(model.inspectionDate)" style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="ç¹æ£è¿ææ¶é´" :labelCol="{span:6}" :wrapperCol="{span:15}" prop="expirationTime"> |
| | | <j-date placeholder="è¯·éæ©ç¹æ£è¿ææ¶é´" v-model="model.expirationTime" disabled style="width: 100%" /> |
| | | </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="imageFiles"> |
| | | <lx-upload :returnUrl="false" |
| | | :multiple="false" |
| | | v-model="model.imageFiles" |
| | | biz="EamMaintenanceStandard"> |
| | | </lx-upload> |
| | | <a-form-model-item label="ç¹æ£è¿ææ¶é´"> |
| | | <j-date placeholder="éæ©ç¹æ£æ¥æåèªå¨å¸¦åº" v-model="model.expirationTime" disabled style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="夿³¨" :labelCol="{span:1}" :wrapperCol="{span:22}" prop="remark"> |
| | | <a-textarea v-model="model.remark" rows="3" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | <a-form-model-item label="夿³¨" :labelCol="{span:2}" :wrapperCol="{span:21}" prop="remark"> |
| | | <a-textarea v-model="model.remark" rows="3" placeholder="请è¾å
¥å¤æ³¨"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | :loading="detail.loading" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns" |
| | | style="margin-top: 8px;" /> |
| | | style="margin-top: 8px;"/> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@/components/jeecg/JVxeTable' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' |
| | | import moment from 'dayjs' |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@/components/jeecg/JVxeTable' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' |
| | | import moment from 'dayjs' |
| | | |
| | | export default { |
| | | name: 'EamMaintenanceStandardModal', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | MaintenanceEquipmentSelect |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | | editable: false, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | standardName: [ |
| | | { required: true, message: '请è¾å
¥æ ååç§°!' } |
| | | ], |
| | | maintenanceCategory: [ |
| | | { required: true, message: 'è¯·éæ©ä¿å
»åç±»!' } |
| | | ], |
| | | initialDate: [ |
| | | { required: true, message: 'è¯·éæ©åå§æ¥æ!' } |
| | | ], |
| | | maintenancePeriod: [ |
| | | { required: true, message: '请è¾å
¥ä¿å
»å¨æï¼åä½ï¼å¤©!' } |
| | | ], |
| | | equipmentId: [ |
| | | { required: true, message: 'è¯·éæ©è®¾å¤!' } |
| | | ], |
| | | }, |
| | | url: { |
| | | add: '/eam/eamInspectionOrder/add', |
| | | edit: '/eam/eamInspectionOrder/edit', |
| | | detail: '/eam/eamMaintenanceStandardDetail/queryList', |
| | | detailOrder: '/eam/eamInspectionOrderDetail/queryList' |
| | | }, |
| | | maintenanceCategory: 'POINT_INSPECTION', |
| | | standardId:"", |
| | | standardType:false, |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.inputNumber, |
| | | width: '10%', |
| | | align:"center", |
| | | validateRules: [ |
| | | {required : true, unique: true, message: 'åºå·ä¸è½éå¤'} |
| | | ] |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹', |
| | | key: 'itemName', |
| | | type: JVXETypes.textarea, |
| | | width: '20%', |
| | | align:"center", |
| | | validateRules: [ |
| | | {required : true, message: 'ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼'} |
| | | ] |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.textarea, |
| | | width: '30%', |
| | | align:"center", |
| | | validateRules: [ |
| | | {required : true, message: "ä¿å
»è¦æ±ä¸è½ä¸ºç©ºï¼"} |
| | | ] |
| | | }, |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.model = {} |
| | | this.detail.dataSource = []; |
| | | this.visible = true |
| | | this.editable = false |
| | | this.standardType=false; |
| | | export default { |
| | | name: 'EamMaintenanceStandardModal', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | MaintenanceEquipmentSelect |
| | | }, |
| | | edit(record) { |
| | | console.log(record) |
| | | this.model = Object.assign({}, record) |
| | | this.standardId=record.standardId |
| | | this.standardType=true; |
| | | this.visible = true |
| | | this.editable = true |
| | | this.detail.dataSource = [] |
| | | if (record && record.referenceFile) { |
| | | let obj = JSON.parse(record.referenceFile) |
| | | this.model.fileList = [obj] |
| | | } else { |
| | | this.model.fieldList = [] |
| | | } |
| | | this.loadDetailOrder(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 { |
| | | httpurl += this.url.edit |
| | | method = 'put' |
| | | } |
| | | this.model.standardId=this.standardId |
| | | 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) |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 15 } |
| | | }, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | disabled: false, |
| | | validatorRules: { |
| | | // standardName: [ |
| | | // { required: true, message: '请è¾å
¥æ ååç§°!' } |
| | | // ], |
| | | inspectionDate: [ |
| | | { required: true, message: 'è¯·éæ©ç¹æ£æ¥æ!' } |
| | | ], |
| | | // maintenancePeriod: [ |
| | | // { required: true, message: '请è¾å
¥ä¿å
»å¨æï¼åä½ï¼å¤©!' } |
| | | // ], |
| | | equipmentId: [ |
| | | { required: true, message: 'è¯·éæ©è®¾å¤!' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/eam/eamInspectionOrder/add', |
| | | edit: '/eam/eamInspectionOrder/edit', |
| | | detail: '/eam/eamMaintenanceStandardDetail/queryList', |
| | | detailOrder: '/eam/eamInspectionOrderDetail/queryList', |
| | | userSelect: '/eam/user_select/list' |
| | | }, |
| | | maintenanceCategory: 'POINT_INSPECTION', |
| | | maintenanceOperatorOptions: [], |
| | | standardId: '', |
| | | standardType: false, |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.inputNumber, |
| | | width: '10%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, unique: true, message: 'åºå·ä¸è½éå¤' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹', |
| | | key: 'itemName', |
| | | type: JVXETypes.textarea, |
| | | width: '20%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.textarea, |
| | | width: '30%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»è¦æ±ä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | }) |
| | | } else { |
| | | return false |
| | | ] |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | autocompleteForm(selectObj) { |
| | | this.model.standardName = selectObj.standardName |
| | | this.model.maintenancePeriod=selectObj.maintenancePeriod |
| | | this.model.standardCode=selectObj.standardCode |
| | | if (!this.standardType) { |
| | | this.standardId=selectObj.id |
| | | this.loadDetail(selectObj.id) |
| | | } |
| | | }, |
| | | expirationTimeFrom(date) { |
| | | //è¿ææ¶é´æ¯åå§æ¶é´+ä¿å
»å¨æ |
| | | if (date && this.model.maintenancePeriod) { |
| | | // 转æ¢ä¸ºæ¶é´æ³åç¬¦ä¸²ï¼ææå®æ ¼å¼ï¼ |
| | | this.model.expirationTime = moment(date) |
| | | .add(this.model.maintenancePeriod, 'days') |
| | | .format('YYYY-MM-DD') |
| | | } else { |
| | | this.model.expirationTime = null; // æ¸
ç©ºæ æå¼ |
| | | } |
| | | created() { |
| | | }, |
| | | //å 载详æ
æ°æ® |
| | | loadDetail(standardId) { |
| | | if (standardId) { |
| | | getAction(this.url.detail, { standardId: standardId }).then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | this.standardType=false; |
| | | methods: { |
| | | add() { |
| | | this.model = {} |
| | | this.detail.dataSource = [] |
| | | this.visible = true |
| | | this.disabled = false |
| | | this.standardType = false |
| | | }, |
| | | |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.standardId = record.standardId |
| | | this.disabled = true |
| | | this.standardType = true |
| | | this.visible = true |
| | | this.detail.dataSource = [] |
| | | if (record && record.referenceFile) { |
| | | let obj = JSON.parse(record.referenceFile) |
| | | this.model.fileList = [obj] |
| | | } else { |
| | | this.model.fieldList = [] |
| | | } |
| | | this.loadDetailOrder(record.id) |
| | | }, |
| | | |
| | | 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 = that.spinning = true |
| | | let httpurl = '' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpurl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | httpurl += this.url.edit |
| | | method = 'put' |
| | | } |
| | | this.model.standardId = this.standardId |
| | | 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 = that.spinning = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | loadDetailOrder(orderId){ |
| | | if (orderId) { |
| | | getAction(this.url.detailOrder, { orderId: orderId }).then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | autocompleteForm(selectObj) { |
| | | this.model.standardName = selectObj.standardName |
| | | this.model.maintenancePeriod = selectObj.maintenancePeriod |
| | | this.model.standardCode = selectObj.standardCode |
| | | // è¥åæ¶è®¾å¤éæ©åä¿å
»å¨æä¸ºç©ºå鿏
ç©ºç¹æ£æ¥æåç¹æ£è¿ææ¶é´ |
| | | if (!this.model.equipmentId) { |
| | | delete this.model.inspectionDate |
| | | delete this.model.expirationTime |
| | | } else { |
| | | // å¦æç¹æ£æ¥æåå¨ï¼åå¨éæ°éæ©è®¾å¤åå³ä¿å
»å¨æå¯è½åçæ¹ååéæ°è®¡ç®è¿ææ¶é´ |
| | | if (this.model.inspectionDate) this.expirationTimeFrom(this.model.inspectionDate) |
| | | } |
| | | if (!this.standardType) { |
| | | console.log('this.standardType', this.standardType) |
| | | this.standardId = selectObj.id |
| | | this.loadDetail(selectObj.id) |
| | | } |
| | | this.$nextTick(() => this.loadMaintenanceOperatorList(this.model.equipmentId)) |
| | | }, |
| | | |
| | | expirationTimeFrom(date) { |
| | | //è¿ææ¶é´æ¯åå§æ¶é´+ä¿å
»å¨æ |
| | | if (date && this.model.maintenancePeriod) { |
| | | // 转æ¢ä¸ºæ¶é´æ³åç¬¦ä¸²ï¼ææå®æ ¼å¼ï¼ |
| | | this.model.expirationTime = moment(date) |
| | | .add(this.model.maintenancePeriod, 'days') |
| | | .format('YYYY-MM-DD') |
| | | } else { |
| | | this.model.expirationTime = null // æ¸
ç©ºæ æå¼ |
| | | } |
| | | }, |
| | | |
| | | //å 载详æ
æ°æ® |
| | | loadDetail(standardId) { |
| | | this.detail.dataSource = [] |
| | | if (standardId) { |
| | | console.log('standardId', standardId) |
| | | this.spinning = true |
| | | getAction(this.url.detail, { standardId: standardId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | loadDetailOrder(orderId) { |
| | | if (orderId) { |
| | | this.spinning = true |
| | | getAction(this.url.detailOrder, { orderId: orderId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | loadMaintenanceOperatorList(equipmentId) { |
| | | this.maintenanceOperatorOptions = [] |
| | | let params = { positionCode: 'PCR0001' } |
| | | if (equipmentId) { |
| | | params.equipmentId = equipmentId |
| | | } else { |
| | | delete this.model.operator |
| | | return |
| | | } |
| | | const that = this |
| | | getAction(this.url.userSelect, params) |
| | | .then(res => { |
| | | if (res.success) { |
| | | that.maintenanceOperatorOptions = res.result.map(item => ({ |
| | | key: item.id, |
| | | value: item.username, |
| | | text: item.realname |
| | | })) |
| | | if (!that.maintenanceOperatorOptions.find(item => item.value === that.model.operator)) delete that.model.operator |
| | | } else { |
| | | if (that.model.operator) delete that.model.operator |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | if (that.model.operator) delete that.model.operator |
| | | }) |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | :mask-closable="false" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <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 :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderNum" label="å·¥åå·"> |
| | | <a-input placeholder="å·¥åå·ç³»ç»èªå¨çæ" v-model="model.orderNum" disabled /> |
| | | <a-form-model-item prop="orderNum" label="å·¥åå·"> |
| | | <a-input placeholder="å·¥åå·ç³»ç»èªå¨çæ" v-model="model.orderNum" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="设å¤ç¼ç "> |
| | | <a-form-model-item prop="equipmentId" label="设å¤ç¼ç "> |
| | | <maintenance-equipment-select placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="model.equipmentId" |
| | | :maintenanceCategory="maintenanceCategory" |
| | | @autocompleteForm="autocompleteForm" :disabled="editable"></maintenance-equipment-select> |
| | | @autocompleteForm="autocompleteForm" |
| | | :disabled="editable"></maintenance-equipment-select> |
| | | </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" disabled /> |
| | | <a-form-model-item prop="standardName" label="æ ååç§°"> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" v-model="model.standardName" 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="maintenanceDate" label="ä¿å
»æ¥æ"> |
| | | <a-form-model-item prop="maintenanceDate" label="ä¿å
»æ¥æ"> |
| | | <a-date-picker placeholder="è¯·éæ©è®¡åä¿å
»æ¥æ" v-model="model.maintenanceDate" format="YYYY-MM-DD" |
| | | style="width: 100%" /> |
| | | style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="ä¿å
»äºº"> |
| | | <j-search-select-tag v-model="model.operator" placeholder="è¯·éæ©ä¿å
»äºº" |
| | | :dictOptions="maintenanceOperatorOptions" /> |
| | | <a-form-model-item prop="operator" label="ä¿å
»äºº"> |
| | | <j-search-select-tag v-model="model.operator" placeholder="è¯·éæ©ä¿å
»äºº" :disabled="!model.equipmentId" |
| | | :dictOptions="maintenanceOperatorOptions"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="ä¿å
»å¨æ"> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" v-model="model.maintenancePeriod" disabled /> |
| | | <a-form-model-item prop="maintenancePeriod" label="ä¿å
»å¨æ"> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" v-model="model.maintenancePeriod" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="夿³¨"> |
| | | <a-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.remark" /> |
| | | <a-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.remark"/> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | | :rowNumber="true" |
| | | :rowSelection="true" |
| | | :bordered="true" |
| | | :alwaysEdit="true" |
| | | :toolbar="true" |
| | | :toolbarConfig="detail.toolbarConfig" |
| | | keep-source |
| | | :height="300" |
| | | :loading="detail.loading" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns" |
| | | style="margin-top: 8px;" /> |
| | | <a-spin :spinning="detail.loading"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | | :rowNumber="true" |
| | | :rowSelection="true" |
| | | :bordered="true" |
| | | :alwaysEdit="true" |
| | | :toolbar="true" |
| | | :toolbarConfig="detail.toolbarConfig" |
| | | keep-source |
| | | :height="300" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns" |
| | | style="margin-top: 8px;"/> |
| | | </a-spin> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' |
| | | |
| | | export default { |
| | | name: 'EamWeekMaintenanceOrderModal', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | MaintenanceEquipmentSelect |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | editable: false, |
| | | model: {}, |
| | | maintenanceCategory: 'WEEK_MAINTENANCE', |
| | | maintenanceOperatorOptions: [], |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 2 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 21 } |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | equipmentId: [ |
| | | { required: true, message: 'è¯·éæ©è®¾å¤!' } |
| | | ], |
| | | maintenanceDate: [ |
| | | { required: true, message: 'è¯·éæ©è®¡åä¿å
»æ¥æ!' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/eam/weekMaintenanceOrder/add', |
| | | edit: '/eam/weekMaintenanceOrder/edit', |
| | | standardDetail: '/eam/eamMaintenanceStandardDetail/queryList', |
| | | detail: '/eam/weekMaintenanceOrderDetail/queryList', |
| | | userSelect: '/eam/user_select/list', |
| | | }, |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ID', |
| | | key: 'id', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'orderId', |
| | | key: 'orderId', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.inputNumber, |
| | | width: '10%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, unique: true, message: 'åºå·ä¸è½éå¤' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹', |
| | | key: 'itemName', |
| | | type: JVXETypes.textarea, |
| | | width: '20%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'åä¿å
»é¡¹', |
| | | key: 'subItemName', |
| | | type: JVXETypes.textarea, |
| | | width: '25%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.textarea, |
| | | width: '30%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»è¦æ±ä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | } |
| | | ], |
| | | toolbarConfig: { |
| | | // prefix åç¼ï¼suffix åç¼ |
| | | slot: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | btn: ['add', 'remove', 'clearSelection'] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | //åå§åé»è®¤å¼ |
| | | this.model = {} |
| | | this.visible = true |
| | | this.editable = false |
| | | this.detail.dataSource = [] |
| | | this.loadMaintenanceOperatorList(); |
| | | export default { |
| | | name: 'EamWeekMaintenanceOrderModal', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | MaintenanceEquipmentSelect |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.editable = true |
| | | this.detail.dataSource = [] |
| | | 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 { |
| | | httpurl += this.url.edit |
| | | 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) |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | editable: false, |
| | | model: {}, |
| | | maintenanceCategory: 'WEEK_MAINTENANCE', |
| | | maintenanceOperatorOptions: [], |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 2 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 21 } |
| | | }, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | validatorRules: { |
| | | equipmentId: [ |
| | | { required: true, message: 'è¯·éæ©è®¾å¤!' } |
| | | ], |
| | | maintenanceDate: [ |
| | | { required: true, message: 'è¯·éæ©è®¡åä¿å
»æ¥æ!' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/eam/weekMaintenanceOrder/add', |
| | | edit: '/eam/weekMaintenanceOrder/edit', |
| | | standardDetail: '/eam/eamMaintenanceStandardDetail/queryList', |
| | | detail: '/eam/weekMaintenanceOrderDetail/queryList', |
| | | userSelect: '/eam/user_select/list' |
| | | }, |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ID', |
| | | key: 'id', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'orderId', |
| | | key: 'orderId', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.inputNumber, |
| | | width: '10%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, unique: true, message: 'åºå·ä¸è½éå¤' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹', |
| | | key: 'itemName', |
| | | type: JVXETypes.textarea, |
| | | width: '20%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'åä¿å
»é¡¹', |
| | | key: 'subItemName', |
| | | type: JVXETypes.textarea, |
| | | width: '25%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.textarea, |
| | | width: '30%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»è¦æ±ä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | autocompleteForm(selectObj) { |
| | | //æ ååç§°ï¼ä¿å
»å¨æä¸å·æ°è§£å³åæ³ |
| | | //åæ³ä¸ validatorRules equipmentId è¿æ¯æé®é¢ |
| | | // const newObj = { |
| | | // standardName: selectObj.standardName, |
| | | // maintenancePeriod: selectObj.maintenancePeriod, |
| | | // standardId : selectObj.id, |
| | | // equipmentId: selectObj.equipmentId, |
| | | // }; |
| | | // this.model = Object.assign({}, newObj, this.model) |
| | | //åæ³äº |
| | | this.$set(this.model, 'standardName', selectObj.standardName) |
| | | this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) |
| | | this.$set(this.model, 'standardId', selectObj.id) |
| | | this.$set(this.model, 'equipmentId', selectObj.equipmentId) |
| | | // console.log('model', this.model) |
| | | if (!this.model.id) { |
| | | this.loadStandardDetail(selectObj.id) |
| | | } |
| | | this.loadMaintenanceOperatorList(this.model.equipmentId); |
| | | }, |
| | | //å 载详æ
æ°æ® |
| | | loadStandardDetail(standardId) { |
| | | if (standardId) { |
| | | getAction(this.url.standardDetail, { standardId: standardId }).then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = res.result.map(item => ({ |
| | | itemCode: item.itemCode, |
| | | itemName: item.itemName, |
| | | subItemName: item.subItemName, |
| | | itemDemand: item.itemDemand |
| | | })) |
| | | ], |
| | | toolbarConfig: { |
| | | // prefix åç¼ï¼suffix åç¼ |
| | | slot: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | btn: ['add', 'remove', 'clearSelection'] |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | //æ åéæ©åå |
| | | loadDetail(orderId) { |
| | | if (orderId) { |
| | | getAction(this.url.detail, { orderId: orderId }).then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | loadMaintenanceOperatorList(equipmentId) { |
| | | this.maintenanceOperatorOptions = [] |
| | | let params = { positionCode: 'PCR0001' } |
| | | if (equipmentId) { |
| | | params.equipmentId = equipmentId |
| | | } |
| | | getAction(this.url.userSelect, params).then(res => { |
| | | if (res.success) { |
| | | this.maintenanceOperatorOptions = res.result.map(item => ({ |
| | | key: item.id, |
| | | value: item.username, |
| | | text: item.realname |
| | | })) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | //åå§åé»è®¤å¼ |
| | | this.model = {} |
| | | this.visible = true |
| | | this.editable = false |
| | | this.detail.dataSource = [] |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.editable = true |
| | | this.detail.dataSource = [] |
| | | 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 { |
| | | httpurl += this.url.edit |
| | | 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 |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | autocompleteForm(selectObj) { |
| | | //æ ååç§°ï¼ä¿å
»å¨æä¸å·æ°è§£å³åæ³ |
| | | //åæ³ä¸ validatorRules equipmentId è¿æ¯æé®é¢ |
| | | // const newObj = { |
| | | // standardName: selectObj.standardName, |
| | | // maintenancePeriod: selectObj.maintenancePeriod, |
| | | // standardId : selectObj.id, |
| | | // equipmentId: selectObj.equipmentId, |
| | | // }; |
| | | // this.model = Object.assign({}, newObj, this.model) |
| | | //åæ³äº |
| | | this.$set(this.model, 'standardName', selectObj.standardName) |
| | | this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) |
| | | this.$set(this.model, 'standardId', selectObj.id) |
| | | this.$set(this.model, 'equipmentId', selectObj.equipmentId) |
| | | // console.log('model', this.model) |
| | | if (!this.model.equipmentId) delete this.model.operator |
| | | if (!this.model.id) { |
| | | this.loadStandardDetail(selectObj.id) |
| | | } |
| | | this.loadMaintenanceOperatorList(this.model.equipmentId) |
| | | }, |
| | | //å 载详æ
æ°æ® |
| | | loadStandardDetail(standardId) { |
| | | this.detail.dataSource = [] |
| | | if (standardId) { |
| | | this.spinning = true |
| | | getAction(this.url.standardDetail, { standardId: standardId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = res.result.map(item => ({ |
| | | itemCode: item.itemCode, |
| | | itemName: item.itemName, |
| | | subItemName: item.subItemName, |
| | | itemDemand: item.itemDemand |
| | | })) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | } |
| | | }, |
| | | //æ åéæ©åå |
| | | loadDetail(orderId) { |
| | | if (orderId) { |
| | | getAction(this.url.detail, { orderId: orderId }).then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | loadMaintenanceOperatorList(equipmentId) { |
| | | this.maintenanceOperatorOptions = [] |
| | | let params = { positionCode: 'PCR0001' } |
| | | if (equipmentId) { |
| | | params.equipmentId = equipmentId |
| | | } |
| | | else return |
| | | const that = this |
| | | getAction(this.url.userSelect, params) |
| | | .then(res => { |
| | | if (res.success) { |
| | | that.maintenanceOperatorOptions = res.result.map(item => ({ |
| | | key: item.id, |
| | | value: item.username, |
| | | text: item.realname |
| | | })) |
| | | if (!that.maintenanceOperatorOptions.find(item => item.value === that.model.operator)) delete that.model.operator |
| | | } else { |
| | | if (that.model.operator) delete that.model.operator |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | if (that.model.operator) delete that.model.operator |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" v-if="isDisplayOperation"> |
| | | <a-button @click="handleOpenReceiveFaultModal" type="primary" icon="plus">é¢å</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('维修工å')">导åº</a-button> |
| | | <!--<a-button type="primary" icon="download" @click="handleExportXls('维修工å')">导åº</a-button>--> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"> |
| | |
| | | @change="handleTableChange" |
| | | :scroll="{x:'max-content'}" |
| | | > |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleOpenApplySparePartsModal(record)">ç³è¯·å¤ä»¶</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a @click="handleOpenRepairCompletedModal(record)">å®æç»´ä¿®</a> |
| | | |
| | | <!--<a @click="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>--> |
| | | <!--<a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)">--> |
| | | <!--<a>å é¤</a>--> |
| | | <!--</a-popconfirm>--> |
| | | <!--</a-menu-item>--> |
| | | <!--</a-menu>--> |
| | | <!--</a-dropdown>--> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <receive-fault-modal ref="receiveFaultModalRef" @ok="loadData"/> |
| | | |
| | | <repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectRepairOrderData"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import ReceiveFaultModal from './modules/EamRepairOrderList/ReceiveFaultModal' |
| | | import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
| | | import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect' |
| | | import RepairOrderApprovalModal from '../../flowable/workflow/repairOrder/RepairOrderApprovalModal' |
| | | |
| | | export default { |
| | | name: 'EamRepairOrderList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | RepairOrderApprovalModal, |
| | | LxSearchEquipmentSelect, |
| | | ReceiveFaultModal |
| | | }, |
| | | props:{ |
| | | isDisplayOperation:{ |
| | | type:Boolean, |
| | | default:true |
| | | props: { |
| | | isDisplayOperation: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®è´è´£äºº', |
| | | align: 'center', |
| | | dataIndex: 'repairer', |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®å¼å§æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'actualStartTime', |
| | |
| | | { |
| | | title: 'æ
éåå ', |
| | | align: 'center', |
| | | dataIndex: 'faultReason', |
| | | width: 150 |
| | | dataIndex: 'faultReason' |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®ç»ææè¿°', |
| | | align: 'center', |
| | | dataIndex: 'repairDescription', |
| | | width: 300 |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®å¾ç', |
| | | align: 'center', |
| | | dataIndex: 'imageFiles', |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®è´è´£äºº', |
| | | align: 'center', |
| | | dataIndex: 'repairer' |
| | | }, |
| | | dataIndex: 'repairDescription' |
| | | // width: 300 |
| | | } |
| | | // { |
| | | // title: 'ç»´ä¿®å¾ç', |
| | | // align: 'center', |
| | | // dataIndex: 'imageFiles', |
| | | // width: 100 |
| | | // }, |
| | | // { |
| | | // title: 'æ¯å¦å§å¤', |
| | | // align: 'center', |
| | |
| | | // }, |
| | | ], |
| | | report_repair_status_list: [], |
| | | selectRepairOrderData: {}, |
| | | url: { |
| | | list: '/eam/eamRepairOrder/list', |
| | | delete: '/eam/eamRepairOrder/delete', |
| | |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | width: 100, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | |
| | | // å¼å¯é¢åæ
éä¿ä¿®åå¼¹çª |
| | | handleOpenReceiveFaultModal() { |
| | | this.$refs.receiveFaultModalRef.visible = true |
| | | this.$refs.receiveFaultModalRef.loadData() |
| | | }, |
| | | |
| | | /** |
| | | * å¼å¯ç³è¯·å¤ä»¶å¼¹çª |
| | | * ç¹å»è¯¦æ
触å |
| | | * @param record è¡¨æ ¼è¡ä¿¡æ¯ |
| | | */ |
| | | handleOpenApplySparePartsModal(record) { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * å¼å¯å®æç»´ä¿®å¼¹çª |
| | | * @param record è¡¨æ ¼è¡ä¿¡æ¯ |
| | | */ |
| | | handleOpenRepairCompletedModal(record) { |
| | | |
| | | handleDetail(record) { |
| | | this.selectRepairOrderData = Object.assign({}, record) |
| | | this.$refs.repairOrderApprovalModal.visible = true |
| | | this.$refs.repairOrderApprovalModal.title = '详æ
' |
| | | this.$refs.repairOrderApprovalModal.disableSubmit = true |
| | | this.$refs.repairOrderApprovalModal.getAllApproveData(record) |
| | | this.$refs.repairOrderApprovalModal.getBasicInformation({ ...record, dataId: record.id }) |
| | | } |
| | | } |
| | | } |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24" v-if="isDisplayOperation"> |
| | | <a-form-item label="åæ®ç¶æ"> |
| | | <a-select placeholder="è¯·éæ©åæ®ç¶æ" v-model="queryParam.reportStatus" allow-clear> |
| | | <a-form-item label="æ¥ä¿®ç¶æ"> |
| | | <a-select placeholder="è¯·éæ©æ¥ä¿®ç¶æ" v-model="queryParam.reportStatus" allow-clear> |
| | | <a-select-option v-for="item in report_repair_status_list" :key="item.value">{{ item.label }} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æ
éç®ç§°"> |
| | | <!-- <a-select placeholder="è¯·éæ©æ
éç®ç§°" v-model="queryParam.faultName" allow-clear>--> |
| | | <!-- <a-select-option v-for="item in faultReasonList" :key="item.faultName">--> |
| | | <!-- {{ item.faultName }}--> |
| | | <!-- </a-select-option>--> |
| | | <!-- </a-select>--> |
| | | <a-input placeholder="请è¾å
¥æ
éç®ç§°" v-model="queryParam.faultName" allow-clear/> |
| | | <a-form-item label="æ
éæè¿°"> |
| | | <a-input placeholder="请è¾å
¥æ
éæè¿°" v-model="queryParam.faultDescription" allow-clear/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> |
| | | <!-- <a-form-item label="æ
éåç±»">--> |
| | | <!-- <a-input placeholder="请è¾å
¥æ
éåç±»" v-model="queryParam.faultType"></a-input>--> |
| | | <!-- </a-form-item>--> |
| | | <!-- </a-col>--> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æ
éæ¶é´"> |
| | | <a-range-picker showTime v-model="faultTimeRange" value-format="YYYY-MM-DD HH:mm:ss" |
| | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" v-if="isDisplayOperation"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('æ
éæ¥ä¿®')">导åº</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" |
| | | @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | </a-upload> |
| | | <!--<a-button type="primary" icon="download" @click="handleExportXls('æ
éæ¥ä¿®')">导åº</a-button>--> |
| | | <!--<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"--> |
| | | <!--@change="handleImportExcel">--> |
| | | <!--<a-button type="primary" icon="import">导å
¥</a-button>--> |
| | | <!--</a-upload>--> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"> |
| | |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:isDisplayOperation?'checkbox':'radio'}" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:isDisplayOperation?'checkbox':'radio',getCheckboxProps:getCheckboxProps}" |
| | | @change="handleTableChange"> |
| | | |
| | | <template slot="imageFiles" slot-scope="text, record" v-if="text"> |
| | |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | | title: 'æ¥ä¿®ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'reportStatus_dictText', |
| | | width: 100 |
| | |
| | | created() { |
| | | this.initDictData('breakdown_flag') |
| | | this.initDictData('report_repair_status') |
| | | this.getFaultReasonListByApi() |
| | | if (!this.isDisplayOperation) this.queryParam = Object.assign({} ,this.propsQueryParam) |
| | | if (!this.isDisplayOperation) this.queryParam = Object.assign({}, this.propsQueryParam) |
| | | else { |
| | | const operationColumn = { |
| | | title: 'æä½', |
| | |
| | | width: 150 |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | | this.getFaultReasonListByApi() |
| | | } |
| | | this.loadData(1) |
| | | }, |
| | |
| | | this.$refs.imagesPreviewModalRef.visible = true |
| | | }, |
| | | |
| | | getCheckboxProps(record) { |
| | | return { |
| | | props: { |
| | | disabled: record.reportStatus !== 'WAIT_REPAIR' |
| | | } |
| | | } |
| | | }, |
| | | |
| | | searchReset() { |
| | | if (this.isDisplayOperation) this.queryParam = {} |
| | | else this.queryParam = Object.assign({}, this.propsQueryParam) |
| | |
| | | components: { EamReportRepairList }, |
| | | data() { |
| | | return { |
| | | title: 'æ
éä¿ä¿®å', |
| | | title: 'æ
éæ¥ä¿®å', |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | |
| | | created() { |
| | | }, |
| | | methods: { |
| | | loadData() { |
| | | this.$nextTick(() => { |
| | | // this.$refs.reportRepairListRef.queryParam.reportStatus = 'WAIT_REPAIR' |
| | | // this.$refs.reportRepairListRef.loadData(1) |
| | | }) |
| | | handleOk() { |
| | | const reportId = this.$refs.reportRepairListRef.selectedRowKeys[0] |
| | | if (!reportId) { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©éé¢åçæ
éæ¥ä¿®å' |
| | | }) |
| | | return |
| | | } |
| | | this.confirmLoading = true |
| | | httpAction(this.url.receiveFault, { reportId }, 'post') |
| | | .then((res) => { |
| | | if (res.success) { |
| | | this.$message.success(res.message) |
| | | this.$emit('ok') |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.confirmLoading = false |
| | | this.close() |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | }, |
| | | handleOk() { |
| | | console.log('rowKey', this.$refs.reportRepairListRef.selectedRowKeys[0]) |
| | | const reportId = this.$refs.reportRepairListRef.selectedRowKeys[0] |
| | | this.confirmLoading = true |
| | | httpAction(this.url.receiveFault, { reportId }, 'post').then((res) => { |
| | | if (res.success) { |
| | | this.$message.success(res.message) |
| | | this.$emit('ok') |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.confirmLoading = false |
| | | this.close() |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | |
| | | <a-input placeholder="请è¾å
¥æ
éåç±»" v-model="model.faultType_dictText" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="æ
éæè¿°"> |
| | | <a-input placeholder="请è¾å
¥æ
éæè¿°" v-model="model.faultDescription" readOnly/> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="æ
éæè¿°" prop="faultDescription" :labelCol="labelColLong" |
| | | :wrapperCol="wrapperColLong"> |
| | | <a-textarea placeholder="请è¾å
¥æ
éæè¿°" v-model="model.faultDescription"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="faultStartTime" label="æ
éå¼å§æ¶é´"> |
| | | <a-date-picker showTime placeholder="è¯·éæ©æ
éå¼å§æ¶é´" v-model="model.faultStartTime" |
| | | :allow-clear="false" value-format="YYYY-MM-DD HH:mm:ss"/> |
| | | :allow-clear="false" value-format="YYYY-MM-DD HH:mm:ss" :disabledDate="disabledDate" |
| | | :disabledTime="disabledTime"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="imageFiles" label="æ¥ä¿®å¾ç" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <j-image-upload v-model="model.imageFiles" :is-multiple="true" :number="3"/> |
| | | <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" |
| | | v-model="model.imageFilesResult"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <!-- <a-form-model-item prop="reportStatus" label="æ¥ä¿®ç¶æ">--> |
| | | <!-- <a-input placeholder="请è¾å
¥æ¥ä¿®ç¶æ" v-model="model.reportStatus" />--> |
| | | <!-- </a-form-model-item>--> |
| | | |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction } from '@/api/manage' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | import { httpAction } from '@/api/manage' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | import moment from 'moment' |
| | | |
| | | export default { |
| | | name: 'EamReportRepairModal', |
| | | components: { LxSearchEquipmentSelect }, |
| | | props: { |
| | | breakdownFlagList: { |
| | | type: Array |
| | | export default { |
| | | name: 'EamReportRepairModal', |
| | | components: { LxSearchEquipmentSelect }, |
| | | props: { |
| | | breakdownFlagList: { |
| | | type: Array |
| | | }, |
| | | faultReasonList: { |
| | | type: Array |
| | | } |
| | | }, |
| | | faultReasonList: { |
| | | type: Array |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 8 } |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 8 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 12 } |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 4 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 } |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | faultStartTime: [ |
| | | { required: true, message: 'è¯·éæ©æ
éå¼å§æ¶é´' } |
| | | ], |
| | | breakdownFlag: [ |
| | | { required: true, message: 'è¯·éæ©æ¯å¦åæº' } |
| | | ], |
| | | equipmentId: [ |
| | | { required: true, message: '请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢' } |
| | | ], |
| | | faultName: [ |
| | | { required: true, message: 'è¯·éæ©æ
éç®ç§°' } |
| | | ], |
| | | faultDescription: [ |
| | | { required: true, message: '请è¾å
¥æ
éæè¿°' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/eam/eamReportRepair/add', |
| | | edit: '/eam/eamReportRepair/edit' |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | add() { |
| | | //åå§åé»è®¤å¼ |
| | | this.edit({ |
| | | faultDescription: '', |
| | | breakdownFlag: this.breakdownFlagList.find(item => item.label === 'å¦').value |
| | | }) |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 12 } |
| | | |
| | | edit(record) { |
| | | this.model = Object.assign({}, record, { imageFilesResult: record.imageFiles && this.isJSON(record.imageFiles) ? JSON.parse(record.imageFiles) : null }) |
| | | this.visible = true |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 4 } |
| | | |
| | | handleFaultNameChange(value) { |
| | | const faultReasonItem = this.faultReasonList.find(item => item.faultName === value) |
| | | this.model.faultType = faultReasonItem.faultCategory |
| | | this.model.faultType_dictText = faultReasonItem.faultCategory_dictText |
| | | this.model.faultDescription = faultReasonItem.faultDescription |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 } |
| | | |
| | | handleOk() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | console.log('model---------------', that.model) |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true |
| | | let httpUrl = '' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpUrl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | httpUrl += this.url.edit |
| | | method = 'put' |
| | | } |
| | | httpAction(httpUrl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | faultStartTime: [ |
| | | { required: true, message: 'è¯·éæ©æ
éå¼å§æ¶é´' } |
| | | ], |
| | | breakdownFlag: [ |
| | | { required: true, message: 'è¯·éæ©æ¯å¦åæº' } |
| | | ], |
| | | equipmentId: [ |
| | | { required: true, message: '请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢' } |
| | | ], |
| | | faultName: [ |
| | | { required: true, message: 'è¯·éæ©æ
éç®ç§°' } |
| | | ] |
| | | |
| | | // 夿æ¯ä¸æ¯JSONå符串 |
| | | isJSON(str) { |
| | | try { |
| | | JSON.parse(str) |
| | | return true // 妿è¿é没ææåºå¼å¸¸ï¼è¯´ææ¯JSONæ ¼å¼çå符串 |
| | | } catch (e) { |
| | | return false // 妿æåºå¼å¸¸ï¼è¯´æä¸æ¯JSONæ ¼å¼çå符串 |
| | | } |
| | | }, |
| | | url: { |
| | | add: '/eam/eamReportRepair/add', |
| | | edit: '/eam/eamReportRepair/edit' |
| | | |
| | | /** |
| | | * ç¦ç¨æ¥æ |
| | | * @params current 被ç¦ç¨çæ¶é´ |
| | | */ |
| | | disabledDate(current) { |
| | | // Can not select days after today |
| | | return current > moment().endOf('day') |
| | | }, |
| | | |
| | | /** |
| | | * ç¦ç¨æ¥æä¸çæ¶é´ |
| | | * @returns {{disabledHours: (function(): Array), disabledMinutes: (function(): Array)}} |
| | | */ |
| | | disabledTime() { |
| | | function range(start, end) { |
| | | const result = [] |
| | | for (let i = start; i < end; i++) { |
| | | result.push(i) |
| | | } |
| | | return result |
| | | } |
| | | |
| | | return { |
| | | disabledHours: () => range(moment().hour() + 1, 24), |
| | | disabledMinutes: () => range(moment().minute() + 1, 60), |
| | | disabledSeconds: () => range(moment().second() + 1, 60) |
| | | } |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | if (this.$refs.form) this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | //åå§åé»è®¤å¼ |
| | | this.edit({ |
| | | breakdownFlag: this.breakdownFlagList.find(item => item.label === 'æ¯').value |
| | | }) |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | }, |
| | | handleFaultNameChange(value) { |
| | | const faultReasonItem = this.faultReasonList.find(item => item.faultName === value) |
| | | this.model.faultType = faultReasonItem.faultCategory |
| | | this.model.faultType_dictText = faultReasonItem.faultCategory_dictText |
| | | this.model.faultDescription = faultReasonItem.faultDescription |
| | | }, |
| | | |
| | | handleOk() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | console.log('model---------------', that.model) |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true |
| | | let httpUrl = '' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpUrl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | httpUrl += this.url.edit |
| | | method = 'put' |
| | | } |
| | | httpAction(httpUrl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | |
| | | <template> |
| | | <a-modal title="é¢è§" :visible="visible" width="50%" :footer="null" @cancel="visible=false"> |
| | | <template v-for="(item,index) in imageListUrl.split(',')"> |
| | | <template v-for="(item,index) in imageUrlArr"> |
| | | <img :src="getImageItemUrl(item)" width="100%;"/> |
| | | |
| | | <a-divider v-if="index+1<imageListUrl.split(',').length" style="margin:20px 0;background-color: #000"></a-divider> |
| | | <a-divider v-if="index+1<imageUrlArr.length" style="margin:20px 0;background-color: #000"></a-divider> |
| | | </template> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'ImagesPreviewModal', |
| | | props: { |
| | | imageListUrl: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | visible: false |
| | | } |
| | | }, |
| | | methods: { |
| | | getImageItemUrl(imageItemSrcSuffix) { |
| | | return `${window._CONFIG['domianURL']}/${imageItemSrcSuffix}` |
| | | export default { |
| | | name: 'ImagesPreviewModal', |
| | | props: { |
| | | imageListUrl: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | visible: false |
| | | } |
| | | }, |
| | | computed: { |
| | | imageUrlArr() { |
| | | return JSON.parse(this.imageListUrl).map(item => item.filePath) |
| | | } |
| | | }, |
| | | methods: { |
| | | getImageItemUrl(imageItemSrcSuffix) { |
| | | return `${window._CONFIG['domianURL']}/${imageItemSrcSuffix}` |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | /deep/ .ant-modal { |
| | | height: 70%; |
| | | overflow: hidden; |
| | | |
| | | .ant-modal-content { |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | /deep/ .ant-modal { |
| | | height: 70%; |
| | | overflow: hidden; |
| | | |
| | | ::-webkit-scrollbar { |
| | | width: 8px; |
| | | height: 8px; |
| | | } |
| | | .ant-modal-content { |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | overflow: hidden; |
| | | |
| | | .ant-modal-body { |
| | | flex: 1; |
| | | overflow: auto; |
| | | ::-webkit-scrollbar { |
| | | width: 8px; |
| | | height: 8px; |
| | | } |
| | | |
| | | .ant-modal-body { |
| | | flex: 1; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æµç¨åç±»"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©æµç¨åç±»" v-model="queryParam.category" dictCode="flow_type"></j-dict-select-tag> |
| | | <j-dict-select-tag placeholder="è¯·éæ©æµç¨åç±»" v-model="queryParam.category" |
| | | dictCode="flow_type"></j-dict-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="10" :lg="11" :md="12" :sm="24"> |
| | | <a-form-item label="æä½æ¶é´"> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©å¼å§æ¶é´" class="query-group-cust" v-model="queryParam.startTime"></j-date> |
| | | <span class="query-group-split-cust"></span> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©ç»ææ¶é´" class="query-group-cust" v-model="queryParam.endTime"></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="10" :lg="11" :md="12" :sm="24"> |
| | | <a-form-item label="æä½æ¶é´"> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©å¼å§æ¶é´" class="query-group-cust" |
| | | v-model="queryParam.startTime"></j-date> |
| | | <span class="query-group-split-cust"></span> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©ç»ææ¶é´" class="query-group-cust" |
| | | v-model="queryParam.endTime"></j-date> |
| | | </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> |
| | | <a-button @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | | <!-- å符串è¶
é¿æªåçç¥å·æ¾ç¤º--> |
| | | <span slot="description" slot-scope="text"> |
| | | <j-ellipsis :value="text" :length="25" /> |
| | | </span> |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template slot="imgSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span> |
| | | <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | <img v-else :src="getImgView(text)" height="25px" alt="" |
| | | style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | </template> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span> |
| | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <AssignFileStreamXq ref="modalFormApproval" :selectShenpiData="selectShenpiData"></AssignFileStreamXq> |
| | | <inspection-order-handle ref="modalFormInspectionOrderXq" :selectShenpiData="selectInspectionOrderXqData"/> |
| | | |
| | | <DispatchFileXq ref="modalFormDispatchFileXq" :selectShenpiData="selectDispatchFileXqData"></DispatchFileXq> |
| | | <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" :selectShenpiData="selectWeekMaintenanceData"/> |
| | | |
| | | <InspectionOrderXq ref="modalFormInspectionOrderXq" :selectShenpiData="selectInspectionOrderXqData"></InspectionOrderXq> |
| | | |
| | | <repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectRepairOrderData"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' |
| | | import AssignFileStreamXq from '@views/flowable/workflow/assignFileStream/AssignFileStreamXq.vue' |
| | | import DispatchFileXq from '@views/flowable/workflow/dispatchFile/DispatchFileXq.vue' |
| | | import InspectionOrderXq from '@views/flowable/workflow/InspectionOrder/InspectionOrderXq.vue' |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' |
| | | import InspectionOrderHandle from './InspectionOrder/InspectionOrderHandle' |
| | | import WeekMaintenanceApprovalModal from './weekMaintenance/WeekMaintenanceApprovalModal' |
| | | import RepairOrderApprovalModal from './repairOrder/RepairOrderApprovalModal' |
| | | |
| | | export default { |
| | | name: 'NcDeviceCharactersList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | InspectionOrderXq, |
| | | DispatchFileXq, |
| | | AssignFileStreamXq: AssignFileStreamXq, |
| | | JDictSelectTag, |
| | | }, |
| | | data () { |
| | | return { |
| | | description: '工使µ-å·²å', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:200, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title: 'æµç¨åç±»', |
| | | align: "center", |
| | | dataIndex: 'category_dictText', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: 'æµç¨åç§°', |
| | | align: "center", |
| | | dataIndex: 'procDefName', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title:'æµç¨ä¸å¡ç®è¦æè¿°', |
| | | align:"center", |
| | | dataIndex: 'description', |
| | | width:300, |
| | | scopedSlots: {customRender: 'description'}, |
| | | }, |
| | | { |
| | | title: 'æµç¨å起人åç§°', |
| | | align: "center", |
| | | dataIndex: 'startUserName', |
| | | width: 250, |
| | | }, |
| | | { |
| | | title: 'ä»»å¡åç§°', |
| | | align: "center", |
| | | dataIndex: 'taskName', |
| | | width:250 |
| | | }, |
| | | { |
| | | title: 'æä½æ¶é´', |
| | | align: "center", |
| | | dataIndex: 'finishTime', |
| | | width:300 |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 200, |
| | | fixed: 'right' |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/assign/flow/finishedList", |
| | | }, |
| | | dictOptions:{}, |
| | | selectShenpiData: {}, |
| | | selectDispatchFileXqData:{}, |
| | | selectInspectionOrderXqData:{} |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | export default { |
| | | name: 'NcDeviceCharactersList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | RepairOrderApprovalModal, |
| | | WeekMaintenanceApprovalModal, |
| | | InspectionOrderHandle, |
| | | JDictSelectTag |
| | | }, |
| | | }, |
| | | methods: { |
| | | handelDetial(item, index) { |
| | | console.log('ç¹å»äºè¯¦æ
') |
| | | console.log('item----->', item) |
| | | console.log('index----->', index) |
| | | let approcesstype = this.splitAprocessType(item.category) |
| | | console.log('approcesstype--->', approcesstype) |
| | | switch (approcesstype) { |
| | | case 'drApproval': |
| | | this.handDrDetial(item) |
| | | break |
| | | case 'ggApproval': |
| | | this.handDispatchFileDetial(item) |
| | | break |
| | | case 'sbdjApproval': |
| | | this.handInspectionOrder(item) |
| | | break |
| | | default: |
| | | alert('没æ¾å°è¯¥æµç¨') |
| | | data() { |
| | | return { |
| | | description: '设å¤ç¹æ®å符管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 200, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'æµç¨åç±»', |
| | | align: 'center', |
| | | dataIndex: 'category_dictText', |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'æµç¨åç§°', |
| | | align: 'center', |
| | | dataIndex: 'procDefName', |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'æµç¨ä¸å¡ç®è¦æè¿°', |
| | | align: 'center', |
| | | dataIndex: 'description', |
| | | width: 300 |
| | | }, |
| | | { |
| | | title: 'æµç¨å起人åç§°', |
| | | align: 'center', |
| | | dataIndex: 'startUserName', |
| | | width: 250 |
| | | }, |
| | | { |
| | | title: 'ä»»å¡åç§°', |
| | | align: 'center', |
| | | dataIndex: 'taskName', |
| | | width: 250 |
| | | }, |
| | | { |
| | | title: 'æä½æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'finishTime', |
| | | width: 300 |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 200, |
| | | fixed: 'right' |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/assign/flow/finishedList' |
| | | }, |
| | | dictOptions: {}, |
| | | selectWeekMaintenanceData: {}, |
| | | selectInspectionOrderXqData: {}, |
| | | selectRepairOrderData: {} |
| | | } |
| | | }, |
| | | splitAprocessType(title) { |
| | | let parts = title.split('ï¼') // 注æåå·æ¯å
¨è§å符ï¼ä½¿ç¨å¯¹åºçåè¿è¡åå² |
| | | let result = parts[0] |
| | | return result |
| | | created() { |
| | | }, |
| | | handDrDetial(item) { |
| | | this.selectShenpiData = item |
| | | this.selectShenpiData.assignee_dictText=item.todoUsers_dictText |
| | | this.selectShenpiData.procInstId=item.procInsId |
| | | this.selectShenpiData.title=item.description |
| | | this.$refs.modalFormApproval.clearTableSource() |
| | | this.$refs.modalFormApproval.getAllApproveData(item) |
| | | computed: { |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | handDispatchFileDetial(item){ |
| | | console.log('item----->', item) |
| | | this.selectDispatchFileXqData = item |
| | | this.selectDispatchFileXqData.assignee_dictText=item.todoUsers_dictText |
| | | this.selectDispatchFileXqData.procInstId=item.procInsId |
| | | this.selectDispatchFileXqData.processInstanceId=item.procInsId |
| | | this.selectDispatchFileXqData.title=item.description |
| | | this.$refs.modalFormDispatchFileXq.clearTableSource() |
| | | this.$refs.modalFormDispatchFileXq.getAllApproveData(item) |
| | | }, |
| | | handInspectionOrder(item) { |
| | | console.log('item----->', item) |
| | | this.selectInspectionOrderXqData = item |
| | | this.selectInspectionOrderXqData.assignee_dictText=item.todoUsers_dictText |
| | | this.selectInspectionOrderXqData.procInstId=item.procInsId |
| | | this.selectInspectionOrderXqData.processInstanceId=item.procInsId |
| | | this.selectInspectionOrderXqData.title=item.description |
| | | this.$refs.modalFormInspectionOrderXq.clearTableSource() |
| | | this.$refs.modalFormInspectionOrderXq.getAllApproveData(item) |
| | | methods: { |
| | | handelDetial(item, index) { |
| | | console.log('ç¹å»äºè¯¦æ
') |
| | | console.log('item----->', item) |
| | | console.log('index----->', index) |
| | | let approcesstype = this.splitAprocessType(item.category) |
| | | console.log('approcesstype--->', approcesstype) |
| | | switch (approcesstype) { |
| | | case 'sbdjApproval': |
| | | this.handInspectionOrder(item) |
| | | break |
| | | case 'WEEK_MAINTENANCE': |
| | | this.handleWeekMaintenance(item) |
| | | break |
| | | case 'eam_repair': |
| | | this.handleRepairOrder(item) |
| | | break |
| | | default: |
| | | alert('没æ¾å°è¯¥æµç¨') |
| | | } |
| | | }, |
| | | |
| | | splitAprocessType(title) { |
| | | let parts = title.split('ï¼') // 注æåå·æ¯å
¨è§å符ï¼ä½¿ç¨å¯¹åºçåè¿è¡åå² |
| | | let result = parts[0] |
| | | return result |
| | | }, |
| | | |
| | | handleWeekMaintenance(record) { |
| | | this.selectWeekMaintenanceData = Object.assign({}, record) |
| | | this.$refs.weekMaintenanceApprovalModal.handleDetail(record) |
| | | this.$refs.weekMaintenanceApprovalModal.title = '详æ
' |
| | | this.$refs.weekMaintenanceApprovalModal.disableSubmit = true |
| | | }, |
| | | |
| | | handInspectionOrder(record) { |
| | | console.log('record----->', record) |
| | | this.selectInspectionOrderXqData = Object.assign({}, record) |
| | | const { todoUsers_dictText, procInsId, description, taskName } = this.selectInspectionOrderXqData |
| | | this.selectInspectionOrderXqData.assignee_dictText = todoUsers_dictText |
| | | this.selectInspectionOrderXqData.procInstId = procInsId |
| | | this.selectInspectionOrderXqData.processInstanceId = procInsId |
| | | this.selectInspectionOrderXqData.title = description |
| | | this.$refs.modalFormInspectionOrderXq.visible = true |
| | | this.$refs.modalFormInspectionOrderXq.title = taskName |
| | | this.$refs.modalFormInspectionOrderXq.disableSubmit = true |
| | | this.$refs.modalFormInspectionOrderXq.getAllApproveData({ |
| | | ...record, |
| | | procInstId: procInsId, |
| | | processInstanceId: procInsId |
| | | }) |
| | | this.$refs.modalFormInspectionOrderXq.getBasicInformation(record) |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»è®¾å¤ç»´ä¿®åç±»æµç¨è¯¦æ
æ¶è§¦å |
| | | * @param record |
| | | */ |
| | | handleRepairOrder(record) { |
| | | this.selectRepairOrderData = Object.assign({}, record) |
| | | const { procInsId, taskName } = this.selectRepairOrderData |
| | | this.$refs.repairOrderApprovalModal.visible = true |
| | | this.$refs.repairOrderApprovalModal.disableSubmit = true |
| | | this.$refs.repairOrderApprovalModal.title = taskName |
| | | this.$refs.modalFormInspectionOrderXq.getAllApproveData({ |
| | | ...record, |
| | | procInstId: procInsId, |
| | | processInstanceId: procInsId |
| | | }) |
| | | this.$refs.repairOrderApprovalModal.getBasicInformation(record) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | <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-dict-select-tag placeholder="è¯·éæ©æµç¨åç±»" v-model="queryParam.category" dictCode="flow_type"></j-dict-select-tag> |
| | | </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.category" |
| | | dictCode="flow_type"></j-dict-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æµç¨åç§°"> |
| | | <a-input placeholder="请è¾å
¥æµç¨åç§°" v-model="queryParam.flowName"></a-input> |
| | |
| | | <a-input placeholder="请è¾å
¥ç®è¦æè¿°" v-model="queryParam.title"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="10" :lg="11" :md="12" :sm="24"> |
| | | <a-form-item label="æä½æ¶é´"> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©å¼å§æ¶é´" class="query-group-cust" v-model="queryParam.startTime"></j-date> |
| | | <span class="query-group-split-cust"></span> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©ç»ææ¶é´" class="query-group-cust" v-model="queryParam.endTime"></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="10" :lg="11" :md="12" :sm="24"> |
| | | <a-form-item label="æä½æ¶é´"> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©å¼å§æ¶é´" class="query-group-cust" |
| | | v-model="queryParam.startTime"></j-date> |
| | | <span class="query-group-split-cust"></span> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©ç»ææ¶é´" class="query-group-cust" |
| | | v-model="queryParam.endTime"></j-date> |
| | | </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> |
| | | <a-button @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | | <!-- å符串è¶
é¿æªåçç¥å·æ¾ç¤º--> |
| | | <span slot="description" slot-scope="text"> |
| | | <j-ellipsis :value="text" :length="25" /> |
| | | </span> |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template slot="imgSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span> |
| | | <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | </template> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span> |
| | | <a-button |
| | | v-else |
| | | :ghost="true" |
| | | type="primary" |
| | | icon="download" |
| | | size="small" |
| | | @click="downloadFile(text)"> |
| | | ä¸è½½ |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handelDetial(record,text)">详æ
</a> |
| | | <a @click="handelDetail(record,text)">详æ
</a> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <AssignFileStreamXq ref="modalFormApproval" :selectShenpiData="selectShenpiData"></AssignFileStreamXq> |
| | | |
| | | <DispatchFileXq ref="modalFormDispatchFileXq" :selectShenpiData="selectDispatchFileXqData"></DispatchFileXq> |
| | | |
| | | <InspectionOrderXq ref="modalFormInspectionOrderXq" :selectShenpiData="selectInspectionOrderXqData"></InspectionOrderXq> |
| | | <inspection-order-handle ref="modalFormInspectionOrderXq" :selectShenpiData="selectInspectionOrderXqData"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' |
| | | import AssignFileStreamXq from '@views/flowable/workflow/assignFileStream/AssignFileStreamXq.vue' |
| | | import DispatchFileXq from '@views/flowable/workflow/dispatchFile/DispatchFileXq.vue' |
| | | import InspectionOrderXq from '@views/flowable/workflow/InspectionOrder/InspectionOrderXq.vue' |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' |
| | | import InspectionOrderHandle from './InspectionOrder/InspectionOrderHandle' |
| | | |
| | | export default { |
| | | name: 'NcDeviceCharactersList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | DispatchFileXq, |
| | | AssignFileStreamXq: AssignFileStreamXq, |
| | | JDictSelectTag, |
| | | InspectionOrderXq |
| | | }, |
| | | data () { |
| | | return { |
| | | description: '设å¤ç¹æ®å符管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title: 'æµç¨åç±»', |
| | | align: "center", |
| | | dataIndex: 'category_dictText', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title:'æµç¨åç§°', |
| | | align:"center", |
| | | dataIndex: 'flowName' |
| | | }, |
| | | { |
| | | title:'æµç¨ä¸å¡ç®è¦æè¿°', |
| | | align:"center", |
| | | dataIndex: 'description', |
| | | width: '30%', |
| | | scopedSlots: {customRender: 'description'}, |
| | | }, |
| | | { |
| | | title:'ç³è¯·äºº', |
| | | align:"center", |
| | | dataIndex: 'proposer_dictText' |
| | | }, |
| | | { |
| | | title: 'å驱èç¹', |
| | | align: "center", |
| | | dataIndex: 'preNode', |
| | | }, |
| | | { |
| | | title:'å½åèç¹', |
| | | align:"center", |
| | | dataIndex: 'taskName' |
| | | }, |
| | | { |
| | | title:'æµç¨å¼å§æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'startTime' |
| | | }, |
| | | { |
| | | title:'æµç¨ç»ææ¶é´', |
| | | align:"center", |
| | | dataIndex: 'endTime' |
| | | }, |
| | | { |
| | | title:'å¤çæ¶é¿', |
| | | align:"center", |
| | | dataIndex: 'duration' |
| | | }, |
| | | { |
| | | title:'å½åä»»å¡äºº', |
| | | align:"center", |
| | | dataIndex: 'todoUsers_dictText' |
| | | }, |
| | | { |
| | | title:'å¤çè¿ç人', |
| | | align:"center", |
| | | dataIndex: 'doneUsers_dictText' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 200, |
| | | fixed: 'right' |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/assign/flow/list", |
| | | }, |
| | | dictOptions:{}, |
| | | selectShenpiData: {}, |
| | | selectDispatchFileXqData:{}, |
| | | selectInspectionOrderXqData:{} |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | export default { |
| | | name: 'FlowLedger', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | InspectionOrderHandle, |
| | | JDictSelectTag |
| | | }, |
| | | }, |
| | | methods: { |
| | | handelDetial(item, index) { |
| | | console.log('ç¹å»äºè¯¦æ
') |
| | | console.log('item----->', item) |
| | | console.log('index----->', index) |
| | | let approcesstype = this.splitAprocessType(item.category) |
| | | console.log('approcesstype--->', approcesstype) |
| | | switch (approcesstype) { |
| | | case 'drApproval': |
| | | item.description=item.title |
| | | this.handDrDetial(item) |
| | | break |
| | | case 'ggApproval': |
| | | item.description=item.title |
| | | this.handDispatchFileDetial(item) |
| | | break |
| | | case 'sbdjApproval': |
| | | item.description=item.title |
| | | this.handInspectionOrderDetial(item) |
| | | break |
| | | default: |
| | | alert('没æ¾å°è¯¥æµç¨') |
| | | data() { |
| | | return { |
| | | description: 'æµç¨ç®¡ç', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'æµç¨åç±»', |
| | | align: 'center', |
| | | dataIndex: 'category_dictText', |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'æµç¨åç§°', |
| | | align: 'center', |
| | | dataIndex: 'flowName' |
| | | }, |
| | | { |
| | | title: 'æµç¨ä¸å¡ç®è¦æè¿°', |
| | | align: 'center', |
| | | dataIndex: 'title' |
| | | }, |
| | | { |
| | | title: 'ç³è¯·äºº', |
| | | align: 'center', |
| | | dataIndex: 'proposer_dictText' |
| | | }, |
| | | { |
| | | title: 'å驱èç¹', |
| | | align: 'center', |
| | | dataIndex: 'preNode' |
| | | }, |
| | | { |
| | | title: 'å½åèç¹', |
| | | align: 'center', |
| | | dataIndex: 'taskName' |
| | | }, |
| | | { |
| | | title: 'æµç¨å¼å§æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'startTime' |
| | | }, |
| | | { |
| | | title: 'æµç¨ç»ææ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'endTime' |
| | | }, |
| | | { |
| | | title: 'å¤çæ¶é¿', |
| | | align: 'center', |
| | | dataIndex: 'duration' |
| | | }, |
| | | { |
| | | title: 'å½åä»»å¡äºº', |
| | | align: 'center', |
| | | dataIndex: 'todoUsers_dictText' |
| | | }, |
| | | { |
| | | title: 'å¤çè¿ç人', |
| | | align: 'center', |
| | | dataIndex: 'doneUsers_dictText' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 200, |
| | | fixed: 'right' |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/assign/flow/list' |
| | | }, |
| | | dictOptions: {}, |
| | | selectShenpiData: {}, |
| | | selectDispatchFileXqData: {}, |
| | | selectInspectionOrderXqData: {} |
| | | } |
| | | }, |
| | | splitAprocessType(title) { |
| | | let parts = title.split('ï¼') // 注æåå·æ¯å
¨è§å符ï¼ä½¿ç¨å¯¹åºçåè¿è¡åå² |
| | | let result = parts[0] |
| | | return result |
| | | created() { |
| | | }, |
| | | handDrDetial(item) { |
| | | this.selectShenpiData = item |
| | | this.selectShenpiData.assignee_dictText=item.todoUsers_dictText |
| | | this.selectShenpiData.createTime=item.startTime |
| | | this.selectShenpiData.procInstId=item.processInstanceId |
| | | this.$refs.modalFormApproval.clearTableSource() |
| | | this.$refs.modalFormApproval.getAllApproveData(item) |
| | | computed: { |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | handDispatchFileDetial(item){ |
| | | this.selectDispatchFileXqData = item |
| | | this.selectDispatchFileXqData.assignee_dictText=item.todoUsers_dictText |
| | | this.selectDispatchFileXqData.createTime=item.startTime |
| | | this.selectDispatchFileXqData.procInstId=item.processInstanceId |
| | | this.$refs.modalFormDispatchFileXq.clearTableSource() |
| | | this.$refs.modalFormDispatchFileXq.getAllApproveData(item) |
| | | }, |
| | | handInspectionOrderDetial(item){ |
| | | this.selectInspectionOrderXqData = item |
| | | this.selectInspectionOrderXqData.assignee_dictText=item.todoUsers_dictText |
| | | this.selectInspectionOrderXqData.createTime=item.startTime |
| | | this.selectInspectionOrderXqData.procInstId=item.processInstanceId |
| | | this.$refs.modalFormInspectionOrderXq.clearTableSource() |
| | | this.$refs.modalFormInspectionOrderXq.getAllApproveData(item) |
| | | methods: { |
| | | handelDetail(item, index) { |
| | | console.log('ç¹å»äºè¯¦æ
') |
| | | console.log('item----->', item) |
| | | console.log('index----->', index) |
| | | let approcesstype = this.splitAprocessType(item.category) |
| | | console.log('approcesstype--->', approcesstype) |
| | | switch (approcesstype) { |
| | | case 'sbdjApproval': |
| | | item.description = item.title |
| | | this.handInspectionOrderDetail(item) |
| | | break |
| | | default: |
| | | alert('没æ¾å°è¯¥æµç¨') |
| | | } |
| | | }, |
| | | splitAprocessType(title) { |
| | | let parts = title.split('ï¼') // 注æåå·æ¯å
¨è§å符ï¼ä½¿ç¨å¯¹åºçåè¿è¡åå² |
| | | let result = parts[0] |
| | | return result |
| | | }, |
| | | |
| | | handInspectionOrderDetail(item) { |
| | | this.selectInspectionOrderXqData = item |
| | | this.selectInspectionOrderXqData.assignee_dictText = item.todoUsers_dictText |
| | | this.selectInspectionOrderXqData.createTime = item.startTime |
| | | this.selectInspectionOrderXqData.procInstId = item.processInstanceId |
| | | this.$refs.modalFormInspectionOrderXq.visible = true |
| | | this.$refs.modalFormInspectionOrderXq.disableSubmit = true |
| | | this.$refs.modalFormInspectionOrderXq.getAllApproveData(item) |
| | | this.$refs.modalFormInspectionOrderXq.getBasicInformation(item) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | <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-col :xl="4" :lg="6" :md="8" :sm="24"> |
| | | <a-form-item label="æµç¨åç±»"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©æµç¨åç±»" v-model="queryParam.category" dictCode="flow_type"></j-dict-select-tag> |
| | | <j-dict-select-tag placeholder="è¯·éæ©æµç¨åç±»" v-model="queryParam.category" |
| | | dictCode="flow_type"></j-dict-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="4" :lg="6" :md="8" :sm="24"> |
| | | <a-form-item label="æµç¨åç§°"> |
| | | <a-input placeholder="请è¾å
¥æµç¨åç§°" v-model="queryParam.flowName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="4" :lg="6" :md="8" :sm="24"> |
| | | <a-form-item label="å½åèç¹"> |
| | | <a-input placeholder="请è¾å
¥å½åèç¹ç²¾ç¡®æ¥è¯¢" v-model="queryParam.name"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="6" :md="8" :sm="24"> |
| | | <a-form-item label="ç®è¦æè¿°"> |
| | | <a-input placeholder="请è¾å
¥ç®è¦æè¿°" v-model="queryParam.title"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="10" :lg="11" :md="12" :sm="24"> |
| | | <a-form-item label="å½åæä½æ¶é´"> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©å¼å§æ¶é´" class="query-group-cust" v-model="queryParam.startTime"></j-date> |
| | | <span class="query-group-split-cust"></span> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©ç»ææ¶é´" class="query-group-cust" v-model="queryParam.endTime"></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="8" :lg="8" :md="12" :sm="24"> |
| | | <a-form-item label="任塿¶é´èå´"> |
| | | <j-date :show-time="false" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©å¼å§æ¶é´" class="query-group-cust" |
| | | v-model="queryParam.startTime"></j-date> |
| | | <span class="query-group-split-cust"></span> |
| | | <j-date :show-time="false" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©ç»ææ¶é´" class="query-group-cust" |
| | | v-model="queryParam.endTime"></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | | </template> |
| | | |
| | | <a-col :xl="4" :lg="6" :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> |
| | | <a-button @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <a @click="handleToggleSearch" style="margin-left: 8px"> |
| | | {{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0 "> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchHandle"><a-icon type="delete"/>æ¹éå¤ç</a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ <a-icon type="down" /></a-button> |
| | | </a-dropdown> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0 "> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchHandle"> |
| | | <a-icon type="delete"/> |
| | | æ¹éå¤ç |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ |
| | | <a-icon type="down"/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i>已鿩 <a style="font-weight: 600">{{ |
| | | selectedRowKeys.length }}</a>项 |
| | | selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | |
| | | bordered |
| | | size="middle" |
| | | rowKey="id" |
| | | :scroll="{x:'max-content',y:465}" |
| | | :scroll="{x:getTableColumnsTotalWidth,y:465}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | |
| | | <!-- å符串è¶
é¿æªåçç¥å·æ¾ç¤º--> |
| | | <span slot="description" slot-scope="text"> |
| | | <j-ellipsis :value="text" :length="25" /> |
| | | </span> |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template slot="imgSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span> |
| | | <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | </template> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span> |
| | | <a-button |
| | | v-else |
| | | :ghost="true" |
| | | type="primary" |
| | | icon="download" |
| | | size="small" |
| | | @click="downloadFile(text)"> |
| | | ä¸è½½ |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handelDetial(record,text)">æ¥ç详æ
</a> |
| | | <a @click="handelDetail(record,text)">æ§è¡/审æ¹</a> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <AssignFileStreamHandle ref="modalFormApproval" :selectShenpiData="selectShenpiData" @searchReset="searchReset"></AssignFileStreamHandle> |
| | | <DispatchFileHandle ref="modalFormDispatchFileXq" :selectShenpiData="selectDispatchFileXqData" @searchReset="searchReset"></DispatchFileHandle> |
| | | <DispatchFileBachHandleStyle ref="modalFormDispatchFileBatch" @searchReset="searchReset" @ok="modalFormOk"></DispatchFileBachHandleStyle> |
| | | <InspectionOrderHandle ref="modalFormInspectionOrder" :selectShenpiData="selectInspectionOrderData" @searchReset="searchReset"></InspectionOrderHandle> |
| | | <InspectionOrderHandleBzz ref="modalFormInspectionOrderBzz" :selectShenpiData="selectInspectionOrderDataBzz" @searchReset="searchReset"></InspectionOrderHandleBzz> |
| | | <week-maintenance-approval-modal ref = "weekMaintenanceApprovalModal" ></week-maintenance-approval-modal> |
| | | <repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectRepairOrderData" ></repair-order-approval-modal> |
| | | <InspectionOrderHandle ref="modalFormInspectionOrder" :selectShenpiData="selectInspectionOrderData" |
| | | @searchReset="searchReset"></InspectionOrderHandle> |
| | | <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" :selectShenpiData="selectWeekMaintenanceData" |
| | | @searchReset="searchReset"></week-maintenance-approval-modal> |
| | | <repair-order-approval-modal ref="repairOrderApprovalModal" @searchReset="searchReset" |
| | | :selectShenpiData="selectRepairOrderData"></repair-order-approval-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' |
| | | import AssignFileStreamHandle from '@views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue' |
| | | import DispatchFileHandle from '@views/flowable/workflow/dispatchFile/DispatchFileHandle.vue' |
| | | import DispatchFileBachHandleStyle from '@views/flowable/workflow/dispatchFile/DispatchFileBachHandleStyle#Drawer.vue' |
| | | import WeekMaintenanceApprovalModal from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal' |
| | | import RepairOrderApprovalModal from '@views/flowable/workflow/repairOrder/RepairOrderApprovalModal' |
| | | import InspectionOrderHandle from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue' |
| | | import InspectionOrderHandleBzz from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandleBzz.vue' |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' |
| | | import WeekMaintenanceApprovalModal from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal' |
| | | import RepairOrderApprovalModal from '@views/flowable/workflow/repairOrder/RepairOrderApprovalModal' |
| | | import InspectionOrderHandle from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue' |
| | | |
| | | import { getAction } from '@api/manage' |
| | | export default { |
| | | name: 'NcDeviceCharactersList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | AssignFileStreamHandle, |
| | | JDictSelectTag, |
| | | DispatchFileHandle, |
| | | DispatchFileBachHandleStyle, |
| | | WeekMaintenanceApprovalModal, |
| | | RepairOrderApprovalModal, |
| | | InspectionOrderHandle, |
| | | InspectionOrderHandleBzz, |
| | | }, |
| | | data () { |
| | | return { |
| | | description: '工使µ-æçå¾
å', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:100, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | import { getAction } from '@api/manage' |
| | | |
| | | export default { |
| | | name: 'NcDeviceCharactersList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | JDictSelectTag, |
| | | WeekMaintenanceApprovalModal, |
| | | RepairOrderApprovalModal, |
| | | InspectionOrderHandle |
| | | }, |
| | | data() { |
| | | return { |
| | | description: '工使µ-æçå¾
å', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'æµç¨åç±»', |
| | | align: 'center', |
| | | dataIndex: 'category_dictText', |
| | | }, |
| | | { |
| | | title: 'æµç¨åç§°', |
| | | align: 'center', |
| | | dataIndex: 'flowName', |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'æµç¨ä¸å¡ç®è¦æè¿°', |
| | | align: 'center', |
| | | dataIndex: 'title', |
| | | width: 350, |
| | | ellipsis: true |
| | | |
| | | }, |
| | | { |
| | | title: 'ä¸ä¸æ¥å¤ç人', |
| | | align: 'center', |
| | | dataIndex: 'preNodeAssignee_dictText', |
| | | width: 150 |
| | | }, |
| | | { |
| | | title: 'å驱èç¹', |
| | | align: 'center', |
| | | dataIndex: 'preNode', |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'å½åèç¹', |
| | | align: 'center', |
| | | dataIndex: 'name', |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'å½åèç¹å¼å§æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'createTime', |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 150, |
| | | fixed: 'right' |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/assign/flow/toTaskBySelf', |
| | | isSameNode: '/assign/flow/isSameNode' |
| | | }, |
| | | { |
| | | title: 'æµç¨åç±»', |
| | | align: "center", |
| | | dataIndex: 'category_dictText', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: 'æµç¨åç§°', |
| | | align: "center", |
| | | dataIndex: 'flowName', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title:'æµç¨ä¸å¡ç®è¦æè¿°', |
| | | align:"center", |
| | | dataIndex: 'description', |
| | | width:300, |
| | | scopedSlots: {customRender: 'description'}, |
| | | }, |
| | | { |
| | | title: 'ä¸ä¸æ¥å¤ç人', |
| | | align: "center", |
| | | dataIndex: 'preNodeAssignee_dictText', |
| | | width:100 |
| | | }, |
| | | { |
| | | title: 'å驱èç¹', |
| | | align: "center", |
| | | dataIndex: 'preNode', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'å½åèç¹', |
| | | align: "center", |
| | | dataIndex: 'name', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'å½åèç¹å¼å§æ¶é´', |
| | | align: "center", |
| | | dataIndex: 'createTime', |
| | | width:300 |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 200, |
| | | fixed: 'right' |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/assign/flow/toTaskBySelf', |
| | | isSameNode: '/assign/flow/isSameNode' |
| | | dictOptions: {}, |
| | | selectInspectionOrderData: {}, |
| | | selectWeekMaintenanceData: {}, |
| | | selectBachData: {}, |
| | | selectRepairOrderData: {}, |
| | | //ä¸å¡ä¿¡æ¯ID |
| | | dataId: undefined |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | }, |
| | | dictOptions:{}, |
| | | selectShenpiData: {}, |
| | | selectDispatchFileXqData:{}, |
| | | selectInspectionOrderData:{}, |
| | | selectInspectionOrderDataBzz:{}, |
| | | selectBachData:{}, |
| | | selectRepairOrderData: {}, |
| | | //ä¸å¡ä¿¡æ¯ID |
| | | dataId: undefined, |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | }, |
| | | methods: { |
| | | handelDetial(item, index) { |
| | | console.log('ç¹å»äºè¯¦æ
') |
| | | console.log('item----->', item) |
| | | console.log('index----->', index) |
| | | let approcesstype = this.splitAprocessType(item.category) |
| | | console.log('approcesstype--->', approcesstype) |
| | | switch (approcesstype) { |
| | | case 'drApproval': |
| | | this.handDrDetial(item) |
| | | break |
| | | case 'ggApproval': |
| | | this.handDispatchFileDetial(item) |
| | | break |
| | | case 'sbdjApproval': |
| | | this.handInspectionOrder(item) |
| | | break |
| | | case 'WEEK_MAINTENANCE': |
| | | this.handleWeekMaintenance(item) |
| | | break |
| | | case 'eam_repair': |
| | | this.handleRepairOrder(item) |
| | | break |
| | | default: |
| | | alert('没æ¾å°è¯¥æµç¨') |
| | | getTableColumnsTotalWidth() { |
| | | return this.columns.reduce((total, item) => total + item.width, 0) |
| | | } |
| | | }, |
| | | splitAprocessType(title) { |
| | | let parts = title.split('ï¼') // 注æåå·æ¯å
¨è§å符ï¼ä½¿ç¨å¯¹åºçåè¿è¡åå² |
| | | let result = parts[0] |
| | | return result |
| | | }, |
| | | handDrDetial(item) { |
| | | this.selectShenpiData = item |
| | | this.$refs.modalFormApproval.clearTableSource() |
| | | this.$refs.modalFormApproval.getAllApproveData(item) |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.loadData(1); |
| | | }, |
| | | handDispatchFileDetial(item){ |
| | | console.log('item----->', item) |
| | | this.selectDispatchFileXqData = item |
| | | this.$refs.modalFormDispatchFileXq.clearTableSource() |
| | | this.$refs.modalFormDispatchFileXq.getAllApproveData(item) |
| | | }, |
| | | handInspectionOrder(item) { |
| | | console.log('item----->', item) |
| | | if (item.taskDefKey ==='Confirmed_completed'){ |
| | | this.selectInspectionOrderDataBzz = item |
| | | this.$refs.modalFormInspectionOrderBzz .clearTableSource() |
| | | this.$refs.modalFormInspectionOrderBzz .getAllApproveData(item) |
| | | }else { |
| | | this.selectInspectionOrderData = item |
| | | this.$refs.modalFormInspectionOrder.clearTableSource() |
| | | this.$refs.modalFormInspectionOrder.getAllApproveData(item) |
| | | } |
| | | }, |
| | | batchHandle() { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: "è¯·éæ©ä¸æ¡è®°å½" |
| | | }); |
| | | return; |
| | | } else { |
| | | let ids = ""; |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ","; |
| | | methods: { |
| | | handelDetail(item, index) { |
| | | console.log('ç¹å»äºè¯¦æ
') |
| | | console.log('item----->', item) |
| | | console.log('index----->', index) |
| | | let processType = this.splitAprocessType(item.category) |
| | | console.log('processType--->', processType) |
| | | switch (processType) { |
| | | case 'sbdjApproval': |
| | | this.handInspectionOrder(item) |
| | | break |
| | | case 'WEEK_MAINTENANCE': |
| | | this.handleWeekMaintenance(item) |
| | | break |
| | | case 'eam_repair': |
| | | this.handleRepairOrder(item) |
| | | break |
| | | default: |
| | | alert('没æ¾å°è¯¥æµç¨') |
| | | } |
| | | getAction(this.url.isSameNode+"?taskIds="+ids).then((res)=>{ |
| | | if(res.success){ |
| | | let taskDefKey=res.result |
| | | this.selectBachData.taskIds = ids |
| | | this.selectBachData.taskDefKey = taskDefKey |
| | | this.$refs.modalFormDispatchFileBatch.title="æ¹éå¤ç"; |
| | | this.$refs.modalFormDispatchFileBatch.edit(this.selectBachData) |
| | | this.$refs.modalFormDispatchFileBatch.disableSubmit = false; |
| | | }else{ |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | }, |
| | | splitAprocessType(title) { |
| | | let parts = title.split('ï¼') // 注æåå·æ¯å
¨è§å符ï¼ä½¿ç¨å¯¹åºçåè¿è¡åå² |
| | | let result = parts[0] |
| | | return result |
| | | }, |
| | | |
| | | handInspectionOrder(record) { |
| | | console.log('record----->', record) |
| | | this.selectInspectionOrderData = Object.assign({}, record) |
| | | this.$refs.modalFormInspectionOrder.visible = true |
| | | this.$refs.modalFormInspectionOrder.title = record.name |
| | | this.$refs.modalFormInspectionOrder.getAllApproveData(record) |
| | | this.$refs.modalFormInspectionOrder.getBasicInformation(record) |
| | | }, |
| | | |
| | | batchHandle() { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©ä¸æ¡è®°å½' |
| | | }) |
| | | return |
| | | } else { |
| | | let ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ',' |
| | | } |
| | | }) |
| | | getAction(this.url.isSameNode + '?taskIds=' + ids).then((res) => { |
| | | if (res.success) { |
| | | let taskDefKey = res.result |
| | | this.selectBachData.taskIds = ids |
| | | this.selectBachData.taskDefKey = taskDefKey |
| | | this.$refs.modalFormDispatchFileBatch.title = 'æ¹éå¤ç' |
| | | this.$refs.modalFormDispatchFileBatch.edit(this.selectBachData) |
| | | this.$refs.modalFormDispatchFileBatch.disableSubmit = false |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | handleWeekMaintenance(item) { |
| | | if (item && item.dataId) { |
| | | this.selectWeekMaintenanceData = Object.assign({}, item) |
| | | this.$refs.weekMaintenanceApprovalModal.handleDetail(item) |
| | | this.$refs.weekMaintenanceApprovalModal.title = item.name |
| | | this.$refs.weekMaintenanceApprovalModal.disableSubmit = false |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»è®¾å¤ç»´ä¿®åç±»æµç¨è¯¦æ
æ¶è§¦å |
| | | * @param record |
| | | */ |
| | | handleRepairOrder(record) { |
| | | this.selectRepairOrderData = Object.assign({}, record) |
| | | this.$refs.repairOrderApprovalModal.visible = true |
| | | this.$refs.repairOrderApprovalModal.title = record.name |
| | | this.$refs.repairOrderApprovalModal.getAllApproveData(record) |
| | | this.$refs.repairOrderApprovalModal.getBasicInformation(record) |
| | | } |
| | | }, |
| | | handleWeekMaintenance(item) { |
| | | if(item && item.dataId) { |
| | | this.$refs.weekMaintenanceApprovalModal.handleDetail(item.dataId) |
| | | this.$refs.weekMaintenanceApprovalModal.title = item.name; |
| | | this.$refs.weekMaintenanceApprovalModal.disableSubmit = false; |
| | | } |
| | | }, |
| | | handleRepairOrder(item) { |
| | | this.selectRepairOrderData = item |
| | | this.$refs.repairOrderApprovalModal.clearTableSource() |
| | | this.$refs.repairOrderApprovalModal.getAllApproveData(item) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | <!-- |
| | | Description: 工使µ-设å¤ç¹æ£å¤çé¡µé¢ List |
| | | Author: ä½è
liuyh |
| | | Date: 2025-02-27 |
| | | --> |
| | | <template> |
| | | <a-modal |
| | | <j-modal |
| | | :title="title" |
| | | :width="width" |
| | | :width="1200" |
| | | :visible="visible" |
| | | :footer="null" |
| | | @cancel="handCancel" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit||!hasInspectionDateArrived} }" |
| | | @ok="submitForm" |
| | | @cancel="handleCancel" |
| | | :mask-closable="false" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | centered |
| | | > |
| | | <a-card :bordered="false"> |
| | | <div> |
| | | <b>{{ selectShenpiData.description }}</b> |
| | | <br> |
| | | <br> |
| | | <a-tag color="blue"> |
| | | å½åå¤ç人 {{ selectShenpiData.assignee_dictText }} |
| | | </a-tag> |
| | | <a-tag color="blue"> |
| | | ä»»å¡å建æ¶é´ {{ selectShenpiData.createTime }} |
| | | </a-tag> |
| | | <br> |
| | | <br> |
| | | <button @click="fetchAndShowBmp" class="btn-custom">æå¼æµç¨å¾</button> |
| | | <div v-if="imageSrc"> |
| | | <img :src="imageSrc" alt="Fetched Image" /> |
| | | </div> |
| | | <hr class="shallow-hr"> |
| | | </div> |
| | | <div> |
| | | <b>ç¹æ£å·¥å详æ
</b> |
| | | <br> |
| | | <a-form :form='form'> |
| | | <a-spin :spinning="spinning"> |
| | | <a-tabs default-active-key='1' @change='callback'> |
| | | <a-tab-pane key='1' tab='åºæ¬ä¿¡æ¯'> |
| | | <a-form-model ref='form' :model='tableRowRecord' :rules='validatorRules'> |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="å·¥åå·"> |
| | | <a-input placeholder="å·¥åå·èªå¨çæ" :disabled="true" v-model="tableRowRecord.orderNum" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="设å¤ç¼å·"> |
| | | <MaintenanceEquipmentSelect placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="tableRowRecord.equipmentId" |
| | | :maintenanceCategory="maintenanceCategory" :disabled="true" |
| | | @autocompleteForm="autocompleteForm"></MaintenanceEquipmentSelect> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref='form' :model='tableRowRecord' :labelCol="labelCol" :wrapperCol="wrapperCol" |
| | | :rules="validatorRules"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ç¹æ£åºç¡ä¿¡æ¯</a-divider> |
| | | |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="æ ååç§°"> |
| | | <a-input placeholder="请è¾å
¥æ ååç§°" disabled v-model="this.standardName" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="æ åç¼ç "> |
| | | <a-input placeholder="请è¾å
¥æ åç¼ç " disabled v-model="this.standardCode" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="ä¿å
»å¨æ"> |
| | | <a-input-number v-model="this.maintenancePeriod" :min="1" :precision="0" disabled style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="ç¹æ£äºº"> |
| | | <j-dict-select-tag v-model="tableRowRecord.operator" placeholder="è¯·éæ©ç¨æ·" disabled dictCode="sys_user,realname,username,username!='admin' order by create_time"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="ç¹æ£æ¥æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionDate"> |
| | | <j-date placeholder="è¯·éæ©ç¹æ£æ¥æ" v-model="tableRowRecord.inspectionDate" disabled style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="ç¹æ£è¿ææ¶é´" :labelCol="{span:6}" :wrapperCol="{span:15}" prop="expirationTime"> |
| | | <j-date placeholder="è¯·éæ©ç¹æ£è¿ææ¶é´" v-model="tableRowRecord.expirationTime" disabled style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row > |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="夿³¨" :labelCol="{span:1}" :wrapperCol="{span:22}" prop="remark"> |
| | | <a-textarea v-model="tableRowRecord.remark" rows="3" placeholder="请è¾å
¥å¤æ³¨" disabled /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-tab-pane> |
| | | <a-tab-pane key='2' tab='æµç¨èç¹'> |
| | | <a-card> |
| | | <a-timeline style="padding:0 1% 0 12%" > |
| | | <a-timeline-item color='white' v-for="(item,index1) in hitaskDataSource" :key="index1"> |
| | | <div class="bottom"> |
| | | <p>å¤ç人ï¼{{item.assignee_dictText}}</p> |
| | | <p v-if="index1 !==0">å¤çæ¶é¿ï¼{{item.duration}}</p> |
| | | <p v-if="item.name !== 'æäº¤ç³è¯·'">å¤çç±»åï¼{{item.sequenceFlowName}}</p> |
| | | <p v-if="item.description != null">å¤çæè§ï¼{{item.description}}</p> |
| | | <div class="left_qiu"><span>{{item.taskName}}</span></div> |
| | | </div> |
| | | </a-timeline-item> |
| | | </a-timeline> |
| | | </a-card> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-spin> |
| | | </a-form> |
| | | </div> |
| | | <div> |
| | | <hr class="shallow-hr"> |
| | | <br> |
| | | <b>ä¿å
»é¡¹æç»</b> |
| | | <br> |
| | | <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail"> |
| | | <a-row :gutter="24"> |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="å·¥åå·"> |
| | | <a-input readOnly v-model="tableRowRecord.orderNum"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="设å¤ç¼å·"> |
| | | <MaintenanceEquipmentSelect v-model="tableRowRecord.equipmentId" |
| | | :maintenanceCategory="'POINT_INSPECTION'" disabled |
| | | @autocompleteForm="autoCompleteForm"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="æ ååç§°"> |
| | | <a-input readOnly v-model="tableRowRecord.standardName"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="æ åç¼ç "> |
| | | <a-input readOnly v-model="tableRowRecord.standardCode"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="ç¹æ£æ¥æ"> |
| | | <a-input v-model="tableRowRecord.inspectionDate" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="ç¹æ£è¿ææ¶é´"> |
| | | <a-input v-model="tableRowRecord.expirationTime" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="ä¿å
»å¨æ"> |
| | | <a-input v-model="tableRowRecord.maintenancePeriod" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="ç¹æ£äºº"> |
| | | <a-input v-model="tableRowRecord.operator_dictText" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="span*3"> |
| | | <a-form-model-item label="夿³¨" :labelCol="{span:2}" :wrapperCol="{span:21}"> |
| | | <a-textarea v-model="tableRowRecord.remark" rows="3" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-form-model-item prop="imageFilesResult" label="ç¹æ£å¾ç" :labelCol="{span:2}" :wrapperCol="{span:21}"> |
| | | <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" |
| | | :disabled="isDisableOperation||!hasInspectionDateArrived" |
| | | v-model="tableRowRecord.fileList"/> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> |
| | | ä¿å
»é¡¹ä¿¡æ¯ |
| | | </a-divider> |
| | | |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane key="1" tab="ä¿å
»é¡¹æç»"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | | :rowNumber="false" |
| | | :rowSelection="false" |
| | | :rowSelection="true" |
| | | :bordered="true" |
| | | :alwaysEdit="true" |
| | | :toolbar="false" |
| | |
| | | :loading="detail.loading" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns" |
| | | style="margin-top: 8px;" /> |
| | | @selectRowChange="handleTableSelectRowChange" |
| | | > |
| | | <template v-slot:inspectionResult="props"> |
| | | <j-dict-select-tag v-model="props.row.inspectionResult" dictCode="eam_inspection_result" |
| | | :disabled="isDisableOperation" |
| | | placeholder="è¯·éæ©ç¹æ£ç»æ" |
| | | @change="handleInspectionResultSelectChange($event,props.row)" |
| | | style="width: 100%"/> |
| | | </template> |
| | | |
| | | <template v-slot:exceptionDescription="props"> |
| | | <a-textarea style="height: 32px" v-model="props.row.exceptionDescription" |
| | | :placeholder="props.row.inspectionResult==='2'?'请è¾å
¥å¼å¸¸æè¿°':''" |
| | | :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult==='1'"/> |
| | | </template> |
| | | |
| | | <template v-slot:reportFlag="props"> |
| | | <j-dict-select-tag v-model="props.row.reportFlag" |
| | | :placeholder="props.row.inspectionResult==='2'?'è¯·éæ©å¼å¸¸æ¯å¦æ¥ä¿®':''" |
| | | :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult==='1'" |
| | | dictCode="yn" |
| | | style="width: 100%"/> |
| | | </template> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | |
| | | <template v-if="selectShenpiData.procInstId"> |
| | | <a-tab-pane key='2' tab='æµç¨èç¹'> |
| | | <a-card :bordered="false"> |
| | | <a-timeline> |
| | | <a-timeline-item v-for="(item,index) in hitaskDataSource" :key="index"> |
| | | <div> |
| | | <h3 style="font-weight: bold;">{{item.taskName}}</h3> |
| | | <div>å¤ç人ï¼{{item.assignee_dictText}}</div> |
| | | <div v-if="index !==0">å¤çæ¶é¿ï¼{{item.duration}}</div> |
| | | <div v-if="item.name !== 'æäº¤ç³è¯·'">å¤çç±»åï¼{{item.sequenceFlowName}}</div> |
| | | <div v-if="item.description">å¤çæè§ï¼{{item.description}}</div> |
| | | </div> |
| | | </a-timeline-item> |
| | | </a-timeline> |
| | | </a-card> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane key='3' tab='æµç¨å¾'> |
| | | <img :src="imageSrc" alt="Fetched Image"/> |
| | | </a-tab-pane> |
| | | </template> |
| | | |
| | | <a-button |
| | | v-if="selectedRowKeys.length>0&&!isDisableOperation&&hasInspectionDateArrived&&activeTabKey==='1'" |
| | | slot="tabBarExtraContent" type="primary" |
| | | @click="handleSelectAllInspectionResult">æ¹éç¹æ£æ£å¸¸ |
| | | </a-button> |
| | | |
| | | <!--<a-dropdown slot="tabBarExtraContent" v-if="selectedRowKeys.length>0">--> |
| | | <!--<a-menu slot="overlay">--> |
| | | <!--<a-menu-item key="1" @click="handleSelectAllInspectionResult('æ£å¸¸')">æ£å¸¸</a-menu-item>--> |
| | | <!--<a-menu-item key="2" @click="handleSelectAllInspectionResult('å¼å¸¸')">å¼å¸¸</a-menu-item>--> |
| | | <!--</a-menu>--> |
| | | |
| | | <!--<a-button> æ¹ééæ©ç¹æ£ç»æ--> |
| | | <!--<a-icon type="down"/>--> |
| | | <!--</a-button>--> |
| | | <!--</a-dropdown>--> |
| | | </a-tabs> |
| | | |
| | | <template v-if="isDisplayConfirm"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> çç»é¿ç¡®è®¤ä¿¡æ¯ |
| | | </a-divider> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="confirmDealType" label="å¤çç±»å"> |
| | | <j-dict-select-tag type='radio' v-model='tableRowRecord.confirmDealType' dictCode='approved_rejected' |
| | | :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='WAIT_CONFIRM'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="confirmComment" label="å¤çæè§"> |
| | | <a-textarea placeholder="请è¾å
¥å¤çæè§" |
| | | :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='WAIT_CONFIRM'" |
| | | v-model="tableRowRecord.confirmComment"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <div class="table-operator" style="text-align: right;"> |
| | | <a-button @click="handleQueXiaoTask" type="primary" icon="close">åæ¶</a-button> |
| | | <a-button @click="submitForm">æ 交</a-button> |
| | | </div> |
| | | </a-form-model> |
| | | </div> |
| | | </a-card> |
| | | |
| | | |
| | | </a-modal> |
| | | </template> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@assets/less/TableExpand.less' |
| | | import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | import moment from 'moment' |
| | | |
| | | import '@assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | export default { |
| | | name: 'FlowShenPi', |
| | | components: { MaintenanceEquipmentSelect }, |
| | | mixins: [mixinDevice], |
| | | props: { |
| | | selectShenpiData: { |
| | | type: Object, |
| | | required: true |
| | | } |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | form: this.$form.createForm(this), |
| | | span: 12, |
| | | span1: 8, |
| | | coldisabled: true, |
| | | spinning: false, |
| | | tableRowRecord: {}, |
| | | assignFileStream:{}, |
| | | tableDataSource: [], |
| | | usageDataSource: [], |
| | | hitaskDataSource:[], |
| | | bomForm: {}, |
| | | approveContent:"", |
| | | imageSrc: null, |
| | | drawerVisible: true, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 30 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | validatorRules: { |
| | | status: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©å®¡æ¹ç¶æ!'}, |
| | | export default { |
| | | name: 'InspectionOrderHandle', |
| | | components: { MaintenanceEquipmentSelect }, |
| | | props: { |
| | | selectShenpiData: { |
| | | type: Object |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | span: 8, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | tableRowRecord: {}, |
| | | assignFileStream: {}, |
| | | hitaskDataSource: [], |
| | | validatorRules: { |
| | | confirmDealType: [ |
| | | { required: true, message: 'è¯·éæ©å¤çç±»å' } |
| | | ], |
| | | confirmComment: [ |
| | | { required: true, message: '请è¾å
¥å¤çæè§' } |
| | | ] |
| | | }, |
| | | }, |
| | | approveData: {}, |
| | | flowData: {}, |
| | | title: '详æ
页é¢', |
| | | width: 1000, |
| | | visible: false, |
| | | // 表头 |
| | | url: { |
| | | queryBomDataById: '/eam/eamInspectionOrder/selectVoById', |
| | | diagramView: '/assign/flow/diagramView', |
| | | queryHisTaskList:'/dncFlow/dispatchFile/queryHisTaskList', |
| | | approve:"/eam/eamInspectionOrder/approval", |
| | | saveDispatchFile:"/dncFlow/dispatchFile/saveDispatchFile" |
| | | }, |
| | | dictOptions: {}, |
| | | superFieldList: [], |
| | | workflowSource: [], |
| | | maintenanceCategory: 'POINT_INSPECTION', |
| | | standardName:"", |
| | | maintenancePeriod:"", |
| | | standardCode:"", |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.normal, |
| | | width: '10%', |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹', |
| | | key: 'itemName', |
| | | type: JVXETypes.normal, |
| | | width: '20%', |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.normal, |
| | | width: '30%', |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: "ç¹æ£ç»æ" |
| | | ,key: 'inspectionResult' |
| | | ,type: JVXETypes.selectSearch |
| | | ,dictCode:'eam_inspection_result' |
| | | ,width: '20%' |
| | | ,align:"center" |
| | | }, |
| | | { |
| | | title: 'å¼å¸¸æè¿°', |
| | | key: 'exceptionDescription', |
| | | type: JVXETypes.textarea, |
| | | width: '30%', |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: 'å¼å¸¸æ¯å¦æ¥ä¿®', |
| | | key: 'reportFlag', |
| | | type: JVXETypes.selectSearch, |
| | | dictCode:'yn', |
| | | width: '20%', |
| | | align:"center", |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | callback() { |
| | | }, |
| | | handCancel() { |
| | | this.visible = false |
| | | }, |
| | | clearTableSource() { |
| | | this.tableDataSource = [] |
| | | this.usageDataSource = [] |
| | | }, |
| | | fetchAndShowBmp() { |
| | | console.log('flowData----->', this.flowData) |
| | | try { |
| | | let parm = { |
| | | processDefinitionId: this.flowData.processDefinitionId, |
| | | processInstanceId:this.flowData.processInstanceId, |
| | | TaskDefinitionKey:this.flowData.processDefinitionKey |
| | | } |
| | | downFile(this.url.diagramView,parm,'get').then((res=>{ |
| | | console.log('Pica------>',res) |
| | | const urlObject = window.URL.createObjectURL(new Blob([res])) |
| | | this.imageSrc = urlObject |
| | | })) |
| | | } catch (error) { |
| | | console.error('Error fetching image blob:', error) |
| | | alert('æ æ³å è½½å¾çï¼è¯·ç¨ååè¯ã') |
| | | } |
| | | }, |
| | | handleQueXiaoTask(){ |
| | | this.visible = false |
| | | this.routeReload() |
| | | }, |
| | | autocompleteForm(selectObj) { |
| | | this.standardName = selectObj.standardName |
| | | this.maintenancePeriod=selectObj.maintenancePeriod |
| | | this.standardCode=selectObj.standardCode |
| | | }, |
| | | submitForm () { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let url=this.url.approve |
| | | let method = 'post'; |
| | | let flowTaskVo = {} |
| | | let tableData = that.$refs.editableDetailTable.getTableData() |
| | | flowTaskVo.comment =that.assignFileStream.approveContent; |
| | | flowTaskVo.dataId = this.selectShenpiData.dataId |
| | | flowTaskVo.taskId = this.selectShenpiData.id |
| | | flowTaskVo.userId = this.selectShenpiData.assignee |
| | | flowTaskVo.instanceId = this.selectShenpiData.procInstId |
| | | flowTaskVo.values = this.selectShenpiData.variables |
| | | flowTaskVo.tableDetailList=tableData |
| | | console.log("表åæäº¤æ°æ®",flowTaskVo) |
| | | httpAction(url,flowTaskVo,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | that.visible = false |
| | | //å·æ°è¡¨æ ¼ |
| | | that.$emit('searchReset') |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | imageSrc: null, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 30 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | visible: false, |
| | | // 表头 |
| | | url: { |
| | | // queryBomDataById: '/eam/eamInspectionOrder/selectVoById', |
| | | diagramView: '/assign/flow/diagramView', |
| | | queryHisTaskList: '/assign/flow/queryHisTaskList', |
| | | approve: '/eam/eamInspectionOrder/approval', |
| | | queryById: '/eam/eamInspectionOrder/queryById', |
| | | detailList: '/eam/eamInspectionOrderDetail/queryList' |
| | | }, |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.normal, |
| | | width: '5%', |
| | | align: 'center', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹', |
| | | key: 'itemName', |
| | | type: JVXETypes.normal, |
| | | width: '15%', |
| | | align: 'center', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.normal, |
| | | width: '15%', |
| | | align: 'center', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: 'ç¹æ£ç»æ', |
| | | key: 'inspectionResult', |
| | | type: JVXETypes.slot, |
| | | slotName: 'inspectionResult', |
| | | width: '15%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: '${title}ä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'å¼å¸¸æè¿°', |
| | | key: 'exceptionDescription', |
| | | type: JVXETypes.slot, |
| | | slotName: 'exceptionDescription', |
| | | width: '20%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { handler: this.customValidator } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'å¼å¸¸æ¯å¦æ¥ä¿®', |
| | | key: 'reportFlag', |
| | | type: JVXETypes.slot, |
| | | slotName: 'reportFlag', |
| | | width: '20%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { handler: this.customValidator } |
| | | ] |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | }) |
| | | } |
| | | }) |
| | | ] |
| | | }, |
| | | selectedRowKeys: [], |
| | | disableSubmit: false, |
| | | activeTabKey: '1', |
| | | title: '' |
| | | } |
| | | }, |
| | | getAllApproveData(item) { |
| | | console.log('selectShenpiData----->', this.selectShenpiData) |
| | | this.flowData = item |
| | | let param = { |
| | | 'id': item.dataId |
| | | computed: { |
| | | hasInspectionDateArrived() { |
| | | return moment(this.tableRowRecord.inspectionDate).diff(moment(), 'hours') <= 0 |
| | | }, |
| | | isDisplayConfirm() { |
| | | return ['WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.inspectionStatus) |
| | | }, |
| | | isDisableOperation() { |
| | | return this.disableSubmit || this.tableRowRecord.inspectionStatus !== 'UNDER_INSPECTION' |
| | | } |
| | | let parmhis={ |
| | | 'procInstId': item.procInstId |
| | | } |
| | | getAction(this.url.queryHisTaskList,parmhis).then(res=>{ |
| | | this.hitaskDataSource=res.result |
| | | getAction(this.url.queryBomDataById, param).then((res => { |
| | | if (res.success) { |
| | | this.tableRowRecord = res.result[0] |
| | | this.detail.dataSource=res.result[0].tableDetailList |
| | | console.log('this.tableRowRecord----->', this.tableRowRecord[0]) |
| | | }, |
| | | methods: { |
| | | /** |
| | | * è·åæµç¨èç¹åæµç¨å¾ |
| | | * @param record å¾
åè®°å½ä¿¡æ¯ |
| | | */ |
| | | getAllApproveData(record) { |
| | | if (record.procInstId) { |
| | | const { processDefinitionId, processInstanceId, processDefinitionKey, procInstId } = record |
| | | const param = { procInstId } |
| | | const imageParam = { processDefinitionId, processInstanceId, TaskDefinitionKey: processDefinitionKey } |
| | | const that = this |
| | | |
| | | getAction(this.url.queryHisTaskList, param) |
| | | .then(res => { |
| | | that.hitaskDataSource = res.result |
| | | }) |
| | | |
| | | downFile(this.url.diagramView, imageParam, 'get') |
| | | .then((res => { |
| | | const urlObject = window.URL.createObjectURL(new Blob([res])) |
| | | that.imageSrc = urlObject |
| | | })) |
| | | .catch(err => { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * è·åå¾
åè®°å½çåºæ¬ä¿¡æ¯ |
| | | * @param record å¾
åè®°å½ä¿¡æ¯ |
| | | */ |
| | | async getBasicInformation(record) { |
| | | this.activeTabKey = '1' |
| | | this.detail.dataSource = [] |
| | | this.spinning = true |
| | | const param = { id: record.dataId } |
| | | let res = await getAction(this.url.queryById, param); |
| | | this.tableRowRecord = Object.assign({}, res.result); |
| | | if (this.tableRowRecord.imageFiles) { |
| | | let obj = JSON.parse(this.tableRowRecord.imageFiles) |
| | | this.tableRowRecord.fileList = [...obj] |
| | | } |
| | | await this.loadDetail(record.dataId) |
| | | }, |
| | | |
| | | async submitForm() { |
| | | let errMap = await this.$refs.editableDetailTable.validateTable() |
| | | if (errMap) { |
| | | console.log('err', errMap) |
| | | return |
| | | } |
| | | |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | this.confirmLoading = this.spinning = true |
| | | const flowTaskVo = {} |
| | | flowTaskVo.dataId = this.selectShenpiData.dataId |
| | | flowTaskVo.taskId = this.selectShenpiData.id |
| | | flowTaskVo.userId = this.selectShenpiData.assignee |
| | | flowTaskVo.instanceId = this.selectShenpiData.procInstId |
| | | flowTaskVo.values = this.selectShenpiData.variables |
| | | flowTaskVo.confirmDealType = this.tableRowRecord.confirmDealType |
| | | flowTaskVo.confirmComment = this.tableRowRecord.confirmComment |
| | | flowTaskVo.fileList = this.tableRowRecord.fileList |
| | | flowTaskVo.tableDetailList = this.$refs.editableDetailTable.getTableData() |
| | | const that = this |
| | | console.log('表åæäº¤æ°æ®', flowTaskVo) |
| | | httpAction(this.url.approve, flowTaskVo, 'post') |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | //å·æ°è¡¨æ ¼ |
| | | that.$emit('searchReset') |
| | | that.handleCancel() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.confirmLoading = this.spinning = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | })) |
| | | }).finally( |
| | | this.visible = true, |
| | | console.log('this.approveData---->', this.approveData) |
| | | ) |
| | | }) |
| | | }, |
| | | |
| | | autoCompleteForm({ standardName, maintenancePeriod, standardCode }) { |
| | | this.$set(this.tableRowRecord, 'standardName', standardName) |
| | | this.$set(this.tableRowRecord, 'maintenancePeriod', maintenancePeriod) |
| | | this.$set(this.tableRowRecord, 'standardCode', standardCode) |
| | | }, |
| | | |
| | | // æ¹ééæ©ææç¹æ£ç»æ |
| | | handleSelectAllInspectionResult() { |
| | | this.selectedRowKeys.forEach(key => { |
| | | const dataItem = this.detail.dataSource.find(item => item.id === key) |
| | | if (dataItem && dataItem.inspectionResult !== '1') { |
| | | delete dataItem.exceptionDescription |
| | | delete dataItem.reportFlag |
| | | dataItem.inspectionResult = '1' |
| | | } |
| | | }) |
| | | this.$refs.editableDetailTable.clearCheckboxRow() |
| | | this.selectedRowKeys = [] |
| | | }, |
| | | |
| | | /** |
| | | * è¡¨æ ¼å¤éæ¡åçæ¹åæ¶è§¦å |
| | | * @param {selectedRowIds} è¡¨æ ¼ä¸å·²éæ©çIDå表 |
| | | */ |
| | | handleTableSelectRowChange({ selectedRowIds }) { |
| | | this.selectedRowKeys = selectedRowIds |
| | | }, |
| | | |
| | | /** |
| | | * ç¹æ£ç»æéæ©å¨åçæ¹åæ¶è§¦å |
| | | * @param value æ¹ååçå¼ |
| | | * @param record ä¿å
»æç»è¡è®°å½ |
| | | */ |
| | | handleInspectionResultSelectChange(value, record) { |
| | | if (record.exceptionDescription) delete record.exceptionDescription |
| | | if (record.reportFlag) delete record.reportFlag |
| | | }, |
| | | |
| | | customValidator({ cellValue, row }, callback) { |
| | | if (row.inspectionResult === '2') { |
| | | if (!cellValue) { |
| | | callback(false, '${title}ä¸è½ä¸ºç©ºï¼') // false = æªéè¿ï¼å¯ä»¥è·èªå®ä¹æç¤º |
| | | } else { |
| | | callback(true) // true = éè¿éªè¯ |
| | | } |
| | | } else { |
| | | callback(true) |
| | | } |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.selectedRowKeys = [] |
| | | this.visible = false |
| | | }, |
| | | //æ åéæ©åå |
| | | loadDetail(orderId) { |
| | | if (orderId) { |
| | | getAction(this.url.detailList, { orderId: orderId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .shallow-hr { |
| | | border: 0; |
| | | height: 1px; /* åç线çé«åº¦ */ |
| | | background-color: rgba(0, 0, 0, 0.1); /* ä½¿ç¨ RGBA é¢è²ï¼å¹¶è®¾ç½®è¾ä½çéæåº¦ */ |
| | | margin: 20px 0; /* åç线ä¸ä¸çå¤è¾¹è· */ |
| | | } |
| | | .btn-custom { |
| | | background-color: #4CAF50; /* 绿è²èæ¯ */ |
| | | color: white; /* ç½è²æå */ |
| | | border: none; /* æ è¾¹æ¡ */ |
| | | padding: 5px 15px; /* å
è¾¹è· */ |
| | | text-align: center; /* æåå±
ä¸ */ |
| | | text-decoration: none; /* æ ä¸å线 */ |
| | | display: inline-block; /* è¡å
åå
ç´ */ |
| | | font-size: 12px; /* åä½å¤§å° */ |
| | | margin: 4px 2px; /* å¤è¾¹è· */ |
| | | cursor: pointer; /* é¼ æ æ¬åæ¶æ¾ç¤ºæå */ |
| | | border-radius: 4px; /* åè§è¾¹æ¡ */ |
| | | } |
| | | /deep/ .ant-select-dropdown-menu { |
| | | text-align: left; |
| | | } |
| | | |
| | | .bold-large-label { |
| | | font-weight: bold; |
| | | font-size: 20px; /* æä½ éè¦çä»»ä½å¤§å° */ |
| | | } |
| | | .left_qiu{ |
| | | position: absolute; |
| | | left: -74px; |
| | | top: 0; |
| | | width:54px; |
| | | border-radius: 50%; |
| | | height:54px; |
| | | font-size: 13px; |
| | | margin: auto; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | align-items: center; |
| | | justify-content: center; |
| | | background: #0099ff; |
| | | transform: translate(0, 0); |
| | | } |
| | | /deep/ .ant-timeline-item-tail{ |
| | | left: -29px !important; |
| | | } |
| | | .left_qiu span{ |
| | | width: 3em; |
| | | display: block; |
| | | color: #fff; |
| | | text-align: center; |
| | | } |
| | | .img{ |
| | | width: 75%; |
| | | } |
| | | |
| | | .wrap{ |
| | | clear: both; |
| | | width: 100%; |
| | | display: flex; |
| | | height: 50px; |
| | | border: 1px solid #ccc; |
| | | /* background-color: aqua; */ |
| | | } |
| | | .box{ |
| | | width:21%; |
| | | height:50px; |
| | | border-right: 1px solid #ccc; |
| | | line-height: 50px; |
| | | /* background: red; */ |
| | | text-align:center; |
| | | margin: auto; |
| | | } |
| | | |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="width" |
| | | <j-modal |
| | | :width="1200" |
| | | :visible="visible" |
| | | :footer="null" |
| | | :title="title" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handCancel" |
| | | @ok="submitForm" |
| | | :mask-closable="false" |
| | | :confirmLoading="confirmLoading" |
| | | centered |
| | | > |
| | | <a-card :bordered="false"> |
| | | <div> |
| | | <b>{{ selectShenpiData.title }}</b> |
| | | <br> |
| | | <br> |
| | | <a-tag color="blue"> |
| | | å¤ç人 {{ selectShenpiData.assignee }} |
| | | </a-tag> |
| | | <a-tag color="blue"> |
| | | å建æ¶é´ {{ selectShenpiData.createTime }} |
| | | </a-tag> |
| | | <br> |
| | | <br> |
| | | <button @click="fetchAndShowBmp" class="btn-custom">æå¼æµç¨å¾</button> |
| | | <div v-if="imageSrc"> |
| | | <img :src="imageSrc" alt="Fetched Image" /> |
| | | </div> |
| | | <hr class="shallow-hr"> |
| | | </div> |
| | | <div> |
| | | <b>ææ´¾è¯¦æ
</b> |
| | | <br> |
| | | <a-form :form='form'> |
| | | <a-spin :spinning="spinning"> |
| | | <a-tabs default-active-key='1' @change='callback'> |
| | | <a-tab-pane key='1' tab='åºæ¬ä¿¡æ¯'> |
| | | <a-form-model ref='form' :model='tableRowRecord' :rules='validatorRules'> |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label='产ååç§°' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='productName'> |
| | | <a-input :disabled='coldisabled' v-model='tableRowRecord.productName'></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label='é¨ä»¶åç§°' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='componentId'> |
| | | <a-input :disabled='coldisabled' v-model='tableRowRecord.componentName'></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-tab-pane> |
| | | <a-tab-pane key='2' tab='æµç¨èç¹'> |
| | | <a-card> |
| | | <a-timeline style="padding:0 1% 0 12%" > |
| | | <a-timeline-item color='white' v-for="(item,index1) in hitaskDataSource" :key="index1"> |
| | | <div class="bottom"> |
| | | <p>å¼å§æ¶é´ï¼{{item.startTime}}</p> |
| | | <p>ç»ææ¶é´ï¼{{item.endTime}}</p> |
| | | <p>å¤ç人ï¼{{item.assignee}}</p> |
| | | <p>åçç±»åï¼{{item.bllx_dictText}}</p> |
| | | <p v-if="item.name == 'æäº¤ç³è¯·'">ææ´¾åå ï¼{{item.cause}}</p> |
| | | <p v-else >å¤çæè§ï¼{{item.cause}}</p> |
| | | <div class="left_qiu"><span>{{item.name}}</span></div> |
| | | </div> |
| | | </a-timeline-item> |
| | | </a-timeline> |
| | | </a-card> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-spin> |
| | | </a-form> |
| | | </div> |
| | | <div> |
| | | <hr class="shallow-hr"> |
| | | <br> |
| | | <b>审æ¹è¯¦æ
</b> |
| | | <br> |
| | | <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail"> |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model='tableRowRecord' :rules='validatorRules' :labelCol='labelCol' |
| | | :wrapperCol='wrapperCol'> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">æ¥ä¿®åºç¡ä¿¡æ¯</a-divider> |
| | | |
| | | <a-row> |
| | | <a-col :span='threeColSpan'> |
| | | <a-form-model-item label='å·¥åç¼å·'> |
| | | <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.repairCode'/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='threeColSpan'> |
| | | <a-form-model-item label='设å¤ç¼å·'> |
| | | <lx-search-equipment-select disabled v-model='tableRowRecord.equipmentId'/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='threeColSpan'> |
| | | <a-form-model-item label='ç»´ä¿®è´è´£äºº'> |
| | | <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.repairer'/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="threeColSpan"> |
| | | <a-form-model-item label="æ
éå¼å§æ¶é´"> |
| | | <a-input :readOnly='inputReadOnly' v-model="tableRowRecord.faultStartTime"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="threeColSpan"> |
| | | <a-form-model-item label="æ¯å¦åæº"> |
| | | <j-dict-select-tag type='radio' v-model='tableRowRecord.breakdownFlag' dictCode='breakdown_flag' |
| | | disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span='threeColSpan*3'> |
| | | <a-form-model-item label='æ¥ä¿®å¾ç' :labelCol='labelColLong' :wrapperCol='wrapperColLong'> |
| | | <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" disabled :number="3" |
| | | v-model="tableRowRecord.reportImageFiles"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">æ¯å¦éè¦é¢ç¨å¤ä»¶</a-divider> |
| | | |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane key="1" tab="é¢ç¨å¤ä»¶"> |
| | | <a-row> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="æ¯å¦éè¦é¢ç¨å¤ä»¶" prop="isUseSpare"> |
| | | <a-radio-group v-model="tableRowRecord.isUseSpare" |
| | | :disabled="isDisableUseSpare"> |
| | | <a-radio :value="1">æ¯</a-radio> |
| | | <a-radio :value="0">å¦</a-radio> |
| | | </a-radio-group> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <template v-if="tableRowRecord.isUseSpare===0"> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="æ
éåå " prop="faultReason"> |
| | | <a-input :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_REPAIR'" |
| | | v-model="tableRowRecord.faultReason" rows="4" |
| | | placeholder="请è¾å
¥æ
éåå "/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="ç»´ä¿®ç»ææè¿°" prop="repairDescription"> |
| | | <a-textarea :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_REPAIR'" |
| | | v-model="tableRowRecord.repairDescription" |
| | | placeholder="请è¾å
¥ç»´ä¿®ç»ææè¿°"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="ç»´ä¿®å¾ç"> |
| | | <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" |
| | | :disabled="disableSubmit||tableRowRecord.repairStatus!=='UNDER_REPAIR'" |
| | | v-model="tableRowRecord.imageFiles"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </template> |
| | | </a-row> |
| | | </a-tab-pane> |
| | | |
| | | <template v-if="selectShenpiData.procInstId"> |
| | | <a-tab-pane key='2' tab='æµç¨èç¹'> |
| | | <a-card :bordered="false"> |
| | | <a-timeline> |
| | | <a-timeline-item v-for="(item,index) in hitaskDataSource" :key="index"> |
| | | <div> |
| | | <h3 style="font-weight: bold;">{{item.taskName}}</h3> |
| | | <div>å¤ç人ï¼{{item.assignee_dictText}}</div> |
| | | <div v-if="index !==0">å¤çæ¶é¿ï¼{{item.duration}}</div> |
| | | <div v-if="item.name !== 'æäº¤ç³è¯·'">å¤çç±»åï¼{{item.sequenceFlowName}}</div> |
| | | <div v-if="item.description">å¤çæè§ï¼{{item.description}}</div> |
| | | </div> |
| | | </a-timeline-item> |
| | | </a-timeline> |
| | | </a-card> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane key='3' tab='æµç¨å¾'> |
| | | <img :src="imageSrc" alt="Fetched Image"/>--> |
| | | </a-tab-pane> |
| | | </template> |
| | | </a-tabs> |
| | | |
| | | <template v-if="tableRowRecord.isUseSpare===1&&isDisableUseSpare"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">管çåé¢ç¨å¤ä»¶ |
| | | </a-divider> |
| | | |
| | | <a-row> |
| | | <a-col :span="24" class="btxx"> |
| | | <a-form-item label="审æ¹ç¶æ" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag type='list' v-model='assignFileStream.status' dictCode='dnc_assign_stream_status' placeholder="è¯·éæ©å®¡æ¹ç¶æ" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24" class="btxx"> |
| | | <a-form-model-item label="å®¡æ¹æè§" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-textarea v-model="assignFileStream.approveContent" rows="4" placeholder="请è¾å
¥å®¡æ¹æè§"/> |
| | | </a-form-model-item > |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item prop="sparePartDescription" label="å¤ä»¶æè¿°"> |
| | | <a-textarea placeholder="请è¾å
¥å¤ä»¶æè¿°" :readOnly="disableSubmit||tableRowRecord.repairStatus!=='WAIT_SPARES'" |
| | | v-model="tableRowRecord.sparePartDescription"></a-textarea> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <div class="table-operator" style="text-align: right;"> |
| | | <a-button @click="handleQueXiaoTask" type="primary" icon="close">åæ¶</a-button> |
| | | <a-button @click="submitForm">æ 交</a-button> |
| | | </div> |
| | | </a-form-model> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <template v-if="Boolean(tableRowRecord.sparePartDescription)&&isDisplayRepairResult"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">ç»´ä¿®ç»æä¸æ¥</a-divider> |
| | | <a-row> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="æ
éåå " prop="faultReason"> |
| | | <a-input :readOnly="disableSubmit||isDisableSubmitRepairResult" v-model="tableRowRecord.faultReason" |
| | | rows="4" placeholder="请è¾å
¥æ
éåå "/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | </a-modal> |
| | | <a-row> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="ç»´ä¿®ç»ææè¿°" prop="repairDescription"> |
| | | <a-textarea :readOnly="disableSubmit||isDisableSubmitRepairResult" |
| | | v-model="tableRowRecord.repairDescription" |
| | | placeholder="请è¾å
¥ç»´ä¿®ç»ææè¿°"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="ç»´ä¿®å¾ç"> |
| | | <lx-upload :disabled="disableSubmit||isDisableSubmitRepairResult" :returnUrl="false" :isMultiple="true" |
| | | file-type="image" :number="3" |
| | | v-model="tableRowRecord.imageFiles"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </template> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@assets/less/TableExpand.less' |
| | | import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' |
| | | import LxSearchEquipmentSelect from '../../../eam/equipment/modules/LxSearchEquipmentSelect' |
| | | |
| | | import '@assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' |
| | | |
| | | export default { |
| | | name: 'RepairOrderApprovalModal', |
| | | mixins: [mixinDevice], |
| | | props: { |
| | | selectShenpiData: { |
| | | type: Object, |
| | | required: true |
| | | } |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | form: this.$form.createForm(this), |
| | | span: 12, |
| | | span1: 8, |
| | | coldisabled: true, |
| | | spinning: false, |
| | | tableRowRecord: {}, |
| | | assignFileStream:{}, |
| | | tableDataSource: [], |
| | | usageDataSource: [], |
| | | hitaskDataSource:[], |
| | | bomForm: {}, |
| | | approveContent:"", |
| | | imageSrc: null, |
| | | drawerVisible: true, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 30 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | validatorRules: { |
| | | }, |
| | | approveData: {}, |
| | | flowData: {}, |
| | | title: '', |
| | | width: 1000, |
| | | visible: false, |
| | | // 表头 |
| | | url: { |
| | | queryBomDataById: '/eam/eamRepairOrder/queryById', |
| | | diagramView: '/assign/flow/diagramView', |
| | | queryHisTaskList:'/dncFlow/dispatchFile/queryHisTaskList', |
| | | approve:"/activit/assign/file/approve", |
| | | }, |
| | | dictOptions: {}, |
| | | superFieldList: [], |
| | | workflowSource: [] |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | callback() { |
| | | export default { |
| | | name: 'RepairOrderApprovalModal', |
| | | components: { LxSearchEquipmentSelect }, |
| | | props: { |
| | | selectShenpiData: { |
| | | type: Object, |
| | | required: true |
| | | } |
| | | }, |
| | | handCancel() { |
| | | this.visible = false |
| | | }, |
| | | clearTableSource() { |
| | | this.tableDataSource = [] |
| | | this.usageDataSource = [] |
| | | }, |
| | | fetchAndShowBmp() { |
| | | console.log('flowData----->', this.flowData) |
| | | try { |
| | | let parm = { |
| | | processDefinitionId: this.flowData.processDefinitionId, |
| | | processInstanceId:this.flowData.processInstanceId, |
| | | TaskDefinitionKey:this.flowData.processDefinitionKey |
| | | data() { |
| | | return { |
| | | title: '', |
| | | threeColSpan: 8, |
| | | twoColSpan: 12, |
| | | inputReadOnly: true, |
| | | disableSubmit: false, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | tableRowRecord: {}, |
| | | hitaskDataSource: [], |
| | | imageSrc: null, |
| | | activeTabKey: '1', |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 2 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 20 } |
| | | }, |
| | | validatorRules: { |
| | | isUseSpare: [ |
| | | { required: true, message: 'è¯·éæ©æ¯å¦éè¦é¢ç¨å¤ä»¶' } |
| | | ], |
| | | sparePartDescription: [ |
| | | { required: true, message: '请è¾å
¥å¤ä»¶æè¿°' } |
| | | ], |
| | | faultReason: [ |
| | | { required: true, message: '请è¾å
¥æ
éåå ' } |
| | | ], |
| | | repairDescription: [ |
| | | { required: true, message: '请è¾å
¥ç»´ä¿®ç»ææè¿°' } |
| | | ] |
| | | }, |
| | | approveData: {}, |
| | | visible: false, |
| | | // 表头 |
| | | url: { |
| | | queryBomDataById: '/eam/eamRepairOrder/queryById', |
| | | diagramView: '/assign/flow/diagramView', |
| | | queryHisTaskList: '/assign/flow/queryHisTaskList', |
| | | approve: '/eam/eamRepairOrder/perform' |
| | | } |
| | | downFile(this.url.diagramView,parm,'get').then((res=>{ |
| | | console.log('Pica------>',res) |
| | | const urlObject = window.URL.createObjectURL(new Blob([res])) |
| | | this.imageSrc = urlObject |
| | | })) |
| | | } catch (error) { |
| | | console.error('Error fetching image blob:', error) |
| | | alert('æ æ³å è½½å¾çï¼è¯·ç¨ååè¯ã') |
| | | } |
| | | }, |
| | | handleQueXiaoTask(){ |
| | | this.visible = false |
| | | this.routeReload() |
| | | computed: { |
| | | isDisableUseSpare() { |
| | | return this.disableSubmit || this.tableRowRecord.repairStatus !== 'UNDER_REPAIR' || Boolean(this.tableRowRecord.sparePartDescription) |
| | | }, |
| | | isDisplayRepairResult() { |
| | | return ['UNDER_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) |
| | | }, |
| | | isDisableSubmitRepairResult() { |
| | | return ['WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) |
| | | } |
| | | }, |
| | | submitForm () { |
| | | const that = this; |
| | | if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){ |
| | | this.$message.warning('è¯·éæ©å®¡æ¹ç¶æï¼') |
| | | return false; |
| | | } |
| | | if (!that.assignFileStream.approveContent==null || that.assignFileStream.approveContent===undefined) { |
| | | this.$message.warning('请è¾å
¥å®¡æ¹æè§ï¼') |
| | | return false; |
| | | } |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let url=this.url.approve |
| | | let method = 'post'; |
| | | let flowTaskVo = {} |
| | | flowTaskVo.status=that.assignFileStream.status; |
| | | flowTaskVo.approveContent =that.assignFileStream.approveContent; |
| | | flowTaskVo.comment =that.assignFileStream.approveContent; |
| | | flowTaskVo.secretLevel = that.assignFileStream.secretLevel; |
| | | flowTaskVo.dataId = this.selectShenpiData.dataId |
| | | flowTaskVo.taskId = this.selectShenpiData.id |
| | | flowTaskVo.userId = this.selectShenpiData.assignee |
| | | flowTaskVo.instanceId = this.selectShenpiData.procInstId |
| | | flowTaskVo.targetKey = this.selectShenpiData.taskDefKey |
| | | flowTaskVo.values = this.selectShenpiData.variables |
| | | flowTaskVo.assignee = this.selectShenpiData.assignee |
| | | flowTaskVo.secretLevel = that.assignFileStream.secretLevel; |
| | | console.log("表åæäº¤æ°æ®",flowTaskVo) |
| | | httpAction(url,flowTaskVo,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | methods: { |
| | | /** |
| | | * è·åæµç¨èç¹åæµç¨å¾ |
| | | * @param record å¾
åè®°å½ä¿¡æ¯ |
| | | */ |
| | | getAllApproveData(record) { |
| | | if (!record.procInstId) return |
| | | console.log('record----->', record) |
| | | const { procInstId, processDefinitionId, processInstanceId, processDefinitionKey } = record |
| | | const param = { procInstId } |
| | | const imageParam = { processDefinitionId, processInstanceId, TaskDefinitionKey: processDefinitionKey } |
| | | const that = this |
| | | |
| | | getAction(this.url.queryHisTaskList, param) |
| | | .then(res => { |
| | | that.hitaskDataSource = res.result |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | getAllApproveData(item) { |
| | | console.log('selectShenpiData----->', this.selectShenpiData) |
| | | this.flowData = item |
| | | let param = { |
| | | 'id': item.dataId |
| | | } |
| | | let parmhis={ |
| | | 'procInstId': item.dataId |
| | | } |
| | | getAction(this.url.queryHisTaskList,parmhis).then(res=>{ |
| | | this.hitaskDataSource=res.result |
| | | getAction(this.url.queryBomDataById, param).then((res => { |
| | | if (res.success) { |
| | | this.tableRowRecord = res.result |
| | | console.log('this.tableRowRecord----->', this.tableRowRecord) |
| | | downFile(this.url.diagramView, imageParam, 'get') |
| | | .then((res => { |
| | | const urlObject = window.URL.createObjectURL(new Blob([res])) |
| | | that.imageSrc = urlObject |
| | | })) |
| | | .catch(err => { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * è·åå¾
åè®°å½çåºæ¬ä¿¡æ¯ |
| | | * @param record å¾
åè®°å½ä¿¡æ¯ |
| | | */ |
| | | getBasicInformation(record) { |
| | | this.spinning = true |
| | | const that = this |
| | | const param = { id: record.dataId } |
| | | this.tableRowRecord = {} |
| | | this.activeTabKey = '1' |
| | | getAction(this.url.queryBomDataById, param) |
| | | .then((res => { |
| | | if (res.success) { |
| | | that.tableRowRecord = Object.assign({}, res.result, { |
| | | isUseSpare: res.result.isUseSpare === null ? 0 : res.result.isUseSpare, |
| | | imageFiles: JSON.parse(res.result.imageFiles), |
| | | reportImageFiles: JSON.parse(res.result.reportImageFiles) |
| | | }) |
| | | console.log('this.tableRowRecord----->', that.tableRowRecord) |
| | | } |
| | | })) |
| | | .finally(() => { |
| | | that.spinning = false |
| | | }) |
| | | }, |
| | | |
| | | submitForm() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = that.spinning = true |
| | | const { isUseSpare, faultReason, repairDescription, sparePartDescription, imageFiles, equipmentId } = that.tableRowRecord |
| | | const { dataId, id, procInstId, taskDefKey, variables } = that.selectShenpiData |
| | | |
| | | const flowTaskVo = {} |
| | | flowTaskVo.isUseSpare = isUseSpare |
| | | flowTaskVo.faultReason = faultReason |
| | | flowTaskVo.repairDescription = repairDescription |
| | | flowTaskVo.sparePartDescription = sparePartDescription |
| | | flowTaskVo.imageFilesResult = imageFiles |
| | | flowTaskVo.equipmentId = equipmentId |
| | | flowTaskVo.id = dataId |
| | | flowTaskVo.dataId = dataId |
| | | flowTaskVo.taskId = id |
| | | flowTaskVo.instanceId = procInstId |
| | | flowTaskVo.targetKey = taskDefKey |
| | | flowTaskVo.values = variables |
| | | console.log('表åæäº¤æ°æ®', flowTaskVo) |
| | | httpAction(this.url.approve, flowTaskVo, 'post') |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.handCancel() |
| | | that.$emit('searchReset') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = that.spinning = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | })) |
| | | }).finally( |
| | | this.visible = true, |
| | | console.log('this.approveData---->', this.approveData) |
| | | ) |
| | | }) |
| | | }, |
| | | |
| | | handCancel() { |
| | | this.visible = false |
| | | if (this.$refs.form) this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .shallow-hr { |
| | | border: 0; |
| | | height: 1px; /* åç线çé«åº¦ */ |
| | | background-color: rgba(0, 0, 0, 0.1); /* ä½¿ç¨ RGBA é¢è²ï¼å¹¶è®¾ç½®è¾ä½çéæåº¦ */ |
| | | margin: 20px 0; /* åç线ä¸ä¸çå¤è¾¹è· */ |
| | | } |
| | | .btn-custom { |
| | | background-color: #4CAF50; /* 绿è²èæ¯ */ |
| | | color: white; /* ç½è²æå */ |
| | | border: none; /* æ è¾¹æ¡ */ |
| | | padding: 5px 15px; /* å
è¾¹è· */ |
| | | text-align: center; /* æåå±
ä¸ */ |
| | | text-decoration: none; /* æ ä¸å线 */ |
| | | display: inline-block; /* è¡å
åå
ç´ */ |
| | | font-size: 12px; /* åä½å¤§å° */ |
| | | margin: 4px 2px; /* å¤è¾¹è· */ |
| | | cursor: pointer; /* é¼ æ æ¬åæ¶æ¾ç¤ºæå */ |
| | | border-radius: 4px; /* åè§è¾¹æ¡ */ |
| | | } |
| | | |
| | | .bold-large-label { |
| | | font-weight: bold; |
| | | font-size: 20px; /* æä½ éè¦çä»»ä½å¤§å° */ |
| | | } |
| | | .left_qiu{ |
| | | position: absolute; |
| | | left: -74px; |
| | | top: 0; |
| | | width:54px; |
| | | border-radius: 50%; |
| | | height:54px; |
| | | font-size: 13px; |
| | | margin: auto; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | align-items: center; |
| | | justify-content: center; |
| | | background: #0099ff; |
| | | transform: translate(0, 0); |
| | | } |
| | | /deep/ .ant-timeline-item-tail{ |
| | | left: -29px !important; |
| | | } |
| | | .left_qiu span{ |
| | | width: 3em; |
| | | display: block; |
| | | color: #fff; |
| | | text-align: center; |
| | | } |
| | | .img{ |
| | | width: 75%; |
| | | } |
| | | |
| | | .wrap{ |
| | | clear: both; |
| | | width: 100%; |
| | | display: flex; |
| | | height: 50px; |
| | | border: 1px solid #ccc; |
| | | /* background-color: aqua; */ |
| | | } |
| | | .box{ |
| | | width:21%; |
| | | height:50px; |
| | | border-right: 1px solid #ccc; |
| | | line-height: 50px; |
| | | /* background: red; */ |
| | | text-align:center; |
| | | margin: auto; |
| | | } |
| | | |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | | </script> |
| | |
| | | :width="1200" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | centered |
| | | cancelText="å
³é"> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ä¿å
»åºç¡ä¿¡æ¯ |
| | | </a-divider> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderNum" label="å·¥åå·"> |
| | | <a-input placeholder="å·¥åå·ç³»ç»èªå¨çæ" v-model="model.orderNum" disabled /> |
| | | <a-input placeholder="å·¥åå·ç³»ç»èªå¨çæ" v-model="model.orderNum" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="设å¤ç¼ç "> |
| | | <maintenance-equipment-select placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="model.equipmentId" |
| | | :maintenanceCategory="maintenanceCategory" |
| | | @autocompleteForm="autocompleteForm" disabled></maintenance-equipment-select> |
| | | @autocompleteForm="autocompleteForm" |
| | | disabled></maintenance-equipment-select> |
| | | </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" disabled /> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" v-model="model.standardName" 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="maintenanceDate" label="ä¿å
»æ¥æ"> |
| | | <a-date-picker placeholder="è¯·éæ©è®¡åä¿å
»æ¥æ" v-model="model.maintenanceDate" format="YYYY-MM-DD" disabled |
| | | style="width: 100%" /> |
| | | <a-date-picker placeholder="è¯·éæ©è®¡åä¿å
»æ¥æ" v-model="model.maintenanceDate" format="YYYY-MM-DD" |
| | | disabled |
| | | style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="ä¿å
»äºº"> |
| | | <j-search-select-tag v-model="model.operator" placeholder="è¯·éæ©ä¿å
»äºº" disabled |
| | | :dictOptions="maintenanceOperatorOptions" /> |
| | | :dictOptions="maintenanceOperatorOptions"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="ä¿å
»å¨æ"> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" v-model="model.maintenancePeriod" disabled /> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" v-model="model.maintenancePeriod" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="夿³¨"> |
| | | <a-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.remark" disabled /> |
| | | <a-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.remark" disabled/> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="ä¿å
»å¾ç"> |
| | | <lx-upload :returnUrl="false" |
| | | :isMultiple="true" |
| | | file-type="image" |
| | | :disabled="confirmDisable" |
| | | :number="3" |
| | | v-model="model.imageFilesResult"/> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ä¿å
»é¡¹ä¿¡æ¯ |
| | | </a-divider> |
| | | <a-row :gutter="24"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | | :rowNumber="true" |
| | | :rowSelection="true" |
| | | :bordered="true" |
| | | :alwaysEdit="true" |
| | | :toolbar="true" |
| | | :toolbarConfig="detail.toolbarConfig" |
| | | keep-source |
| | | :height="300" |
| | | :loading="detail.loading" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns" |
| | | style="margin-top: 8px;" /> |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane key="1" tab="ä¿å
»é¡¹æç»"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | | :rowNumber="false" |
| | | :rowSelection="true" |
| | | :bordered="true" |
| | | :alwaysEdit="true" |
| | | :toolbar="false" |
| | | keep-source |
| | | :height="300" |
| | | :loading="detail.loading" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns" |
| | | @selectRowChange="handleTableSelectRowChange" |
| | | > |
| | | <template v-slot:maintenanceResult="props"> |
| | | <j-dict-select-tag v-model="props.row.maintenanceResult" dictCode="eam_inspection_result" |
| | | placeholder="è¯·éæ©ä¿å
ȍȾ" |
| | | :disabled="disableSubmit || confirmDisable" |
| | | @change="handleInspectionResultSelectChange($event,props.row)" |
| | | style="width: 100%"/> |
| | | </template> |
| | | |
| | | <template v-slot:exceptionDescription="props"> |
| | | <a-textarea style="height: 32px" v-model="props.row.exceptionDescription" |
| | | :disabled="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'"/> |
| | | </template> |
| | | |
| | | <template v-slot:reportFlag="props"> |
| | | <j-dict-select-tag v-model="props.row.reportFlag" |
| | | :disabled="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'" |
| | | dictCode="yn" |
| | | style="width: 100%"/> |
| | | </template> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | <template v-if="selectShenpiData.procInstId"> |
| | | <a-tab-pane key='2' tab='æµç¨èç¹'> |
| | | <a-card :bordered="false"> |
| | | <a-timeline> |
| | | <a-timeline-item v-for="(item,index) in taskData" :key="index"> |
| | | <div> |
| | | <h3 style="font-weight: bold;">{{item.taskName}}</h3> |
| | | <div>å¤ç人ï¼{{item.assignee_dictText}}</div> |
| | | <div v-if="index !==0">å¤çæ¶é¿ï¼{{item.duration}}</div> |
| | | <div v-if="item.name !== 'æäº¤ç³è¯·'">å¤çç±»åï¼{{item.sequenceFlowName}}</div> |
| | | <div v-if="item.description">å¤çæè§ï¼{{item.description}}</div> |
| | | </div> |
| | | </a-timeline-item> |
| | | </a-timeline> |
| | | </a-card> |
| | | </a-tab-pane> |
| | | <a-tab-pane key='3' tab='æµç¨å¾'> |
| | | <img :src="imageSrc" alt="Fetched Image"/>--> |
| | | </a-tab-pane> |
| | | </template> |
| | | <a-button v-if="!disableSubmit &&!confirmDisable&& selectedRowKeys.length > 0" slot="tabBarExtraContent" |
| | | type="primary" @click="handleSelectAllInspectionResult">ä¿å
»æ£å¸¸ |
| | | </a-button> |
| | | </a-tabs> |
| | | </a-row> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> çç»é¿ç¡®è®¤ä¿¡æ¯ |
| | | </a-divider> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> åéªæ¶ä¿¡æ¯ |
| | | </a-divider> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ç»éªæ¶ä¿¡æ¯ |
| | | </a-divider> |
| | | <div v-if="confirmDisable"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> çç»é¿ç¡®è®¤ä¿¡æ¯ |
| | | </a-divider> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmDealType" label="确认类å"> |
| | | <j-dict-select-tag type='radio' v-model='model.confirmDealType' dictCode='approved_rejected' |
| | | placeholder="è¯·éæ©å¤çç±»å" :disabled="disableSubmit || initialAcceptanceDisable"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmComment" label="确认æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="model.confirmComment" |
| | | :disabled="disableSubmit || initialAcceptanceDisable"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | <div v-if="initialAcceptanceDisable"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> åéªæ¶ä¿¡æ¯ |
| | | </a-divider> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAcceptanceComment" |
| | | label="åéªæ¶æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="model.initialAcceptanceComment" |
| | | :disabled="disableSubmit || finalAcceptanceDisable"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAcceptanceFilesResult" |
| | | label="åéªæ¶éä»¶"> |
| | | <lx-upload :returnUrl="false" |
| | | :isMultiple="true" |
| | | :disabled="disableSubmit || finalAcceptanceDisable" |
| | | v-model="model.initialAcceptanceFilesResult"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | <div v-if="finalAcceptanceDisable"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ç»éªæ¶ä¿¡æ¯ |
| | | </a-divider> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="finalAcceptanceComment" |
| | | label="ç»éªæ¶æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="model.finalAcceptanceComment" |
| | | :disabled="disableSubmit || completionDisable"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="finalAcceptanceFilesResult" |
| | | label="ç»éªæ¶éä»¶"> |
| | | <lx-upload :returnUrl="false" |
| | | :isMultiple="true" |
| | | :disabled="disableSubmit || completionDisable" |
| | | v-model="model.finalAcceptanceFilesResult"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' |
| | | import { downFile, getAction, httpAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' |
| | | |
| | | export default { |
| | | name: 'WeekMaintenanceApprovalModal', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | MaintenanceEquipmentSelect |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | //ç¶ææ§å¶ |
| | | //ä¿å
»ä¸ ä¸å¯ç¼è¾ |
| | | underMaintenanceDisable : false, |
| | | confirmDisable : false, |
| | | initialAcceptanceDisable : false, |
| | | finalAcceptanceDisable : false, |
| | | editable: false, |
| | | model: {}, |
| | | maintenanceCategory: 'WEEK_MAINTENANCE', |
| | | maintenanceOperatorOptions: [], |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 2 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 21 } |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | }, |
| | | url: { |
| | | queryById: '/eam/weekMaintenanceOrder/queryById', |
| | | detail: '/eam/weekMaintenanceOrderDetail/queryList', |
| | | approval : '/eam/weekMaintenanceOrder/approval', |
| | | userSelect: '/eam/user_select/list', |
| | | }, |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ID', |
| | | key: 'id', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'orderId', |
| | | key: 'orderId', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.normal, |
| | | width: '10%', |
| | | align: 'center', |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹', |
| | | key: 'itemName', |
| | | type: JVXETypes.normal, |
| | | width: '20%', |
| | | align: 'center', |
| | | }, |
| | | { |
| | | title: 'åä¿å
»é¡¹', |
| | | key: 'subItemName', |
| | | type: JVXETypes.normal, |
| | | width: '25%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.normal, |
| | | width: '30%', |
| | | align: 'center', |
| | | } |
| | | ], |
| | | toolbarConfig: { |
| | | // prefix åç¼ï¼suffix åç¼ |
| | | slot: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | btn: ['clearSelection'] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | async handleDetail(dataId) { |
| | | this.loading = true; |
| | | this.visible = true; |
| | | this.detail.dataSource = [] |
| | | let res = await getAction(this.url.queryById, {id: dataId}); |
| | | this.model = Object.assign({}, res.result); |
| | | await this.loadDetail(dataId); |
| | | this.loading = false; |
| | | export default { |
| | | name: 'WeekMaintenanceApprovalModal', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | MaintenanceEquipmentSelect |
| | | }, |
| | | 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 |
| | | props: { |
| | | selectShenpiData: { |
| | | type: Object |
| | | } |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | let tableData = that.$refs.editableDetailTable.getTableData() |
| | | that.model.tableDetailList = [...tableData] |
| | | |
| | | that.confirmLoading = true |
| | | let httpurl = this.url.approval |
| | | let 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) |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | //ç¶ææ§å¶ |
| | | //ä¿å
»ä¸ ä¸å¯ç¼è¾ |
| | | // confirmDisable: false, |
| | | // initialAcceptanceDisable: false, |
| | | // finalAcceptanceDisable: false, |
| | | editable: false, |
| | | model: {}, |
| | | maintenanceCategory: 'WEEK_MAINTENANCE', |
| | | maintenanceOperatorOptions: [], |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 2 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 21 } |
| | | }, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | imageSrc: null, |
| | | activeTabKey: '1', |
| | | validatorRules: { |
| | | confirmDealType: [ |
| | | { required: true, message: 'è¯·éæ©éè¿æé©³å!' } |
| | | ], |
| | | confirmComment: [ |
| | | { required: true, message: '请è¾å
¥ç¡®è®¤æè§!' } |
| | | ], |
| | | initialAcceptanceComment: [ |
| | | { required: true, message: '请è¾å
¥åéªæ¶æè§!' } |
| | | ], |
| | | finalAcceptanceComment: [ |
| | | { required: true, message: '请è¾å
¥ç»éªæ¶æè§!' } |
| | | ] |
| | | }, |
| | | url: { |
| | | queryById: '/eam/weekMaintenanceOrder/queryById', |
| | | detail: '/eam/weekMaintenanceOrderDetail/queryList', |
| | | approval: '/eam/weekMaintenanceOrder/approval', |
| | | userSelect: '/eam/user_select/list', |
| | | queryHisTaskList: '/assign/flow/queryHisTaskList', |
| | | diagramView: '/assign/flow/diagramView' |
| | | }, |
| | | disableSubmit: false, |
| | | taskData: [], |
| | | isDisplayBmp: false, |
| | | showBmpButtonLoading: false, |
| | | selectedRowKeys: [], |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ID', |
| | | key: 'id', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'orderId', |
| | | key: 'orderId', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.normal, |
| | | width: '5%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹', |
| | | key: 'itemName', |
| | | type: JVXETypes.normal, |
| | | width: '10%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'åä¿å
»é¡¹', |
| | | key: 'subItemName', |
| | | type: JVXETypes.normal, |
| | | width: '10%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.normal, |
| | | width: '20%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
ȍȾ', |
| | | key: 'maintenanceResult', |
| | | type: JVXETypes.slot, |
| | | width: '10%', |
| | | align: 'center', |
| | | slotName: 'maintenanceResult', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»ç»æä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'å¼å¸¸æè¿°', |
| | | key: 'exceptionDescription', |
| | | type: JVXETypes.slot, |
| | | width: '20%', |
| | | align: 'center', |
| | | slotName: 'exceptionDescription', |
| | | validateRules: [ |
| | | { handler: this.customValidator } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'æ¯å¦æ¥ä¿®', |
| | | key: 'reportFlag', |
| | | type: JVXETypes.slot, |
| | | width: '10%', |
| | | align: 'center', |
| | | slotName: 'reportFlag', |
| | | validateRules: [ |
| | | { handler: this.customValidator } |
| | | ] |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | }) |
| | | } else { |
| | | return false |
| | | ], |
| | | toolbarConfig: { |
| | | // prefix åç¼ï¼suffix åç¼ |
| | | slot: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | btn: ['clearSelection'] |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | autocompleteForm(selectObj) { |
| | | this.$set(this.model, 'standardName', selectObj.standardName) |
| | | this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) |
| | | this.$set(this.model, 'standardId', selectObj.id) |
| | | this.$set(this.model, 'equipmentId', selectObj.equipmentId) |
| | | // console.log('model', this.model) |
| | | if (!this.model.id) { |
| | | this.loadStandardDetail(selectObj.id) |
| | | } |
| | | debugger |
| | | this.loadMaintenanceOperatorList(this.model.equipmentId); |
| | | }, |
| | | //æ åéæ©åå |
| | | loadDetail(orderId) { |
| | | if (orderId) { |
| | | getAction(this.url.detail, { orderId: orderId }).then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | created() { |
| | | }, |
| | | computed: { |
| | | confirmDisable: function() { |
| | | return ['WAIT_CONFIRM', 'WAIT_INITIAL_ACCEPTANCE', 'WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | }, |
| | | initialAcceptanceDisable: function() { |
| | | return ['WAIT_INITIAL_ACCEPTANCE', 'WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | }, |
| | | finalAcceptanceDisable: function() { |
| | | return ['WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | }, |
| | | completionDisable: function() { |
| | | return ['COMPLETE', 'ABOLISH'].includes(this.model.maintenanceStatus) |
| | | } |
| | | }, |
| | | methods: { |
| | | async handleDetail(item) { |
| | | this.initParams() |
| | | this.model = {} |
| | | if (item.procInstId) { |
| | | const { processDefinitionId, processInstanceId, processDefinitionKey, procInstId } = item |
| | | |
| | | let taskDataList = await getAction(this.url.queryHisTaskList, { procInstId }) |
| | | this.taskData = [...taskDataList.result] |
| | | |
| | | downFile(this.url.diagramView, { |
| | | processDefinitionId, |
| | | processInstanceId, |
| | | TaskDefinitionKey: processDefinitionKey |
| | | }, 'get') |
| | | .then((res => { |
| | | const urlObject = window.URL.createObjectURL(new Blob([res])) |
| | | this.imageSrc = urlObject |
| | | })) |
| | | .catch(err => { |
| | | this.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | }) |
| | | } |
| | | let res = await getAction(this.url.queryById, { id: item.dataId }) |
| | | this.model = Object.assign({}, res.result) |
| | | if (this.model.imageFiles) { |
| | | let obj = JSON.parse(this.model.imageFiles) |
| | | this.model.imageFilesResult = [...obj] |
| | | } |
| | | if (this.model.initialAcceptanceFiles) { |
| | | let obj = JSON.parse(this.model.initialAcceptanceFiles) |
| | | this.model.initialAcceptanceFilesResult = [...obj] |
| | | } |
| | | if (this.model.finalAcceptanceFiles) { |
| | | let obj = JSON.parse(this.model.finalAcceptanceFiles) |
| | | this.model.finalAcceptanceFilesResult = [...obj] |
| | | } |
| | | this.model.dataId = item.dataId |
| | | this.model.taskId = item.id |
| | | this.model.userId = item.assignee |
| | | this.model.instanceId = item.procInstId |
| | | this.model.values = item.variables |
| | | await this.loadDetail(item.dataId) |
| | | }, |
| | | |
| | | recordDetail(record) { |
| | | console.log('record', record) |
| | | this.initParams() |
| | | this.model = Object.assign({}, record) |
| | | if (this.model.imageFiles) { |
| | | let obj = JSON.parse(this.model.imageFiles) |
| | | this.model.imageFilesResult = [...obj] |
| | | } |
| | | if (this.model.initialAcceptanceFiles) { |
| | | let obj = JSON.parse(this.model.initialAcceptanceFiles) |
| | | this.model.initialAcceptanceFilesResult = [...obj] |
| | | } |
| | | if (this.model.finalAcceptanceFiles) { |
| | | let obj = JSON.parse(this.model.finalAcceptanceFiles) |
| | | this.model.finalAcceptanceFilesResult = [...obj] |
| | | } |
| | | this.loadDetail(record.id) |
| | | }, |
| | | |
| | | initParams() { |
| | | this.detail.dataSource = [] |
| | | this.visible = true |
| | | this.activeTabKey = '1' |
| | | this.spinning = true |
| | | }, |
| | | |
| | | 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) { |
| | | that.confirmLoading = that.spinning = true |
| | | let tableData = that.$refs.editableDetailTable.getTableData() |
| | | that.model.tableDetailList = [...tableData] |
| | | let httpurl = this.url.approval |
| | | let method = 'put' |
| | | |
| | | httpAction(httpurl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('searchReset') |
| | | that.close() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = that.spinning = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | loadMaintenanceOperatorList(equipmentId) { |
| | | this.maintenanceOperatorOptions = [] |
| | | let params = { positionCode: 'PCR0001' } |
| | | if (equipmentId) { |
| | | params.equipmentId = equipmentId |
| | | } |
| | | getAction(this.url.userSelect, params).then(res => { |
| | | if (res.success) { |
| | | this.maintenanceOperatorOptions = res.result.map(item => ({ |
| | | key: item.id, |
| | | value: item.username, |
| | | text: item.realname |
| | | })) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | autocompleteForm(selectObj) { |
| | | this.$set(this.model, 'standardName', selectObj.standardName) |
| | | this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) |
| | | this.$set(this.model, 'standardId', selectObj.id) |
| | | this.$set(this.model, 'equipmentId', selectObj.equipmentId) |
| | | // console.log('model', this.model) |
| | | if (!this.model.id) { |
| | | this.loadStandardDetail(selectObj.id) |
| | | } |
| | | this.loadMaintenanceOperatorList(this.model.equipmentId) |
| | | }, |
| | | |
| | | //æ åéæ©åå |
| | | loadDetail(orderId) { |
| | | if (orderId) { |
| | | getAction(this.url.detail, { orderId: orderId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | loadMaintenanceOperatorList(equipmentId) { |
| | | this.maintenanceOperatorOptions = [] |
| | | let params = { positionCode: 'PCR0001' } |
| | | if (equipmentId) { |
| | | params.equipmentId = equipmentId |
| | | } |
| | | getAction(this.url.userSelect, params).then(res => { |
| | | if (res.success) { |
| | | this.maintenanceOperatorOptions = res.result.map(item => ({ |
| | | key: item.id, |
| | | value: item.username, |
| | | text: item.realname |
| | | })) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleInspectionResultSelectChange(value, record) { |
| | | if (record.exceptionDescription) delete record.exceptionDescription |
| | | if (record.reportFlag) delete record.reportFlag |
| | | }, |
| | | |
| | | // æ¹ééæ©ææç¹æ£ç»æ |
| | | handleSelectAllInspectionResult() { |
| | | this.selectedRowKeys.forEach(key => { |
| | | const dataItem = this.detail.dataSource.find(item => item.id === key) |
| | | if (dataItem && dataItem.maintenanceResult !== '1') { |
| | | console.log('dataItem', dataItem) |
| | | delete dataItem.exceptionDescription |
| | | delete dataItem.reportFlag |
| | | dataItem.maintenanceResult = '1' |
| | | } |
| | | }) |
| | | this.$refs.editableDetailTable.clearCheckboxRow() |
| | | this.selectedRowKeys = [] |
| | | }, |
| | | |
| | | /** |
| | | * è¡¨æ ¼å¤éæ¡åçæ¹åæ¶è§¦å |
| | | * @param {selectedRowIds} è¡¨æ ¼ä¸å·²éæ©çIDå表 |
| | | */ |
| | | handleTableSelectRowChange({ selectedRowIds }) { |
| | | this.selectedRowKeys = selectedRowIds |
| | | }, |
| | | |
| | | customValidator({ cellValue, row }, callback) { |
| | | if (row.maintenanceResult === '2') { |
| | | if (!cellValue) { |
| | | callback(false, '${title}ä¸è½ä¸ºç©ºï¼') // false = æªéè¿ï¼å¯ä»¥è·èªå®ä¹æç¤º |
| | | } else { |
| | | callback(true) // true = éè¿éªè¯ |
| | | } |
| | | } else { |
| | | callback(true) |
| | | } |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | |
| | | expandedKeys: [], |
| | | checkedKeys: [], |
| | | autoExpandParent: true, |
| | | searchValue: '', |
| | | url: { |
| | | getBaseTree: '/mdc/mdcEquipment/queryTreeListByProduction' |
| | | }, |
| | |
| | | |
| | | devServer: { |
| | | port: 3000, |
| | | open:true, |
| | | open: true, |
| | | // hot: true, |
| | | // disableHostCheck: true, |
| | | // overlay: { |
| | |
| | | /* 注æï¼jeecgbootå端åäºæ¹é ï¼æ¤å¤ä¸éè¦é
置跨åååå°æ¥å£ï¼åªéè¦æ¹.envç¸å
³é
ç½®æä»¶å³å¯ï¼ |
| | | issues/3462 å¾å¤äººæ¤å¤åäºé
ç½®ï¼å¯¼è´å·æ°å端404é®é¢ï¼è¯·ä¸å®æ³¨æ*/ |
| | | '/jeecg-boot': { |
| | | target: 'http://localhost:8080', // è¯·æ±æ¬å° éè¦jeecg-bootåå°é¡¹ç® |
| | | target: 'http://localhost:9999', // è¯·æ±æ¬å° éè¦jeecg-bootåå°é¡¹ç® |
| | | ws: false, |
| | | changeOrigin: true |
| | | } |