¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | title="é¡¹ç®æ§ç»´ä¿®" |
| | | :bordered='false' |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class='table-page-search-wrapper'> |
| | | <a-form |
| | | layout='inline' |
| | | @keyup.enter.native='searchQuery' |
| | | > |
| | | <a-row :gutter='24'> |
| | | <a-col |
| | | :xl='6' |
| | | :lg='7' |
| | | :md='8' |
| | | :sm='24' |
| | | > |
| | | <a-form-item label='计ååç¼ç '> |
| | | <j-input |
| | | placeholder='请è¾å
¥è®¡ååç¼ç ' |
| | | v-model='queryParam.num' |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :xl='6' |
| | | :lg='7' |
| | | :md='8' |
| | | :sm='24' |
| | | > |
| | | <a-form-item label='审æ¹ç¶æ'> |
| | | <j-dict-select-tag |
| | | placeholder='è¯·éæ©å®¡æ¹ç¶æ' |
| | | v-model='queryParam.auditStatus' |
| | | dictCode='audit_status' |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if='toggleSearchStatus'> |
| | | |
| | | <a-col |
| | | :xl='10' |
| | | :lg='11' |
| | | :md='12' |
| | | :sm='24' |
| | | > |
| | | <a-form-item label='å建æ¶é´'> |
| | | <j-date |
| | | placeholder='è¯·éæ©å¼å§æ¥æ' |
| | | class='query-group-cust' |
| | | v-model='queryParam.createTime_begin' |
| | | ></j-date> |
| | | <span class='query-group-split-cust'></span> |
| | | <j-date |
| | | placeholder='è¯·éæ©ç»ææ¥æ' |
| | | class='query-group-cust' |
| | | v-model='queryParam.createTime_end' |
| | | ></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | | </template> |
| | | <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 |
| | | @click='handleToggleSearch' |
| | | style='margin-left: 8px' |
| | | > |
| | | {{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> |
| | | </a> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class='table-operator'> |
| | | <a-button |
| | | @click='handleAdd' |
| | | type='primary' |
| | | icon='plus' |
| | | >æ°å¢</a-button> |
| | | </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' |
| | | class='j-table-force-nowrap' |
| | | :scroll="{ x: 'calc(1500px + 50%)', y: 900 }" |
| | | :columns='columns' |
| | | :dataSource='dataSource' |
| | | :pagination='ipagination' |
| | | :loading='loading' |
| | | :customRow='clickThenSelect' |
| | | @change='handleTableChange' |
| | | > |
| | | <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}" --> |
| | | <template slot="imgSlot" slot-scope="text,record"> |
| | | <span v-if="!record.path" style="font-size: 12px;font-style: italic;">æ å¾ç</span> |
| | | <img v-else :src="getImgView(record.path)" :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-popconfirm |
| | | v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'Rejected'" |
| | | title="确认æäº¤å?" |
| | | @confirm="() =>handleCommit(record, 'commit')" |
| | | > |
| | | <a>æäº¤</a> |
| | | </a-popconfirm> |
| | | <a-popconfirm |
| | | v-if="record.auditStatus == 'pendingApproval'" |
| | | title="确认æ¤åå?" |
| | | @confirm="() =>handleCommit(record, 'back')" |
| | | > |
| | | <a>æ¤å</a> |
| | | </a-popconfirm> |
| | | |
| | | <a-divider |
| | | v-if="record.auditStatus == 'notSubmitted'|| record.auditStatus == 'Rejected' || record.auditStatus == 'pendingApproval'" |
| | | type="vertical" |
| | | /> |
| | | <a |
| | | v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'Rejected'" |
| | | @click="handleEdit(record)" |
| | | >ç¼è¾</a> |
| | | <a |
| | | v-if="record.auditStatus == 'pendingApproval'" |
| | | @click="handleApprove(record)" |
| | | >审æ¹</a> |
| | | <a-divider |
| | | v-if="record.auditStatus == 'notSubmitted'|| record.auditStatus == 'Rejected' || record.auditStatus == 'pendingApproval'" |
| | | type="vertical" |
| | | /> |
| | | <a-dropdown> |
| | | <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.auditStatus == 'notSubmitted'"> |
| | | <a-popconfirm |
| | | v-if="record.auditStatus == 'notSubmitted'" |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <a-tabs |
| | | type="card" |
| | | defaultActiveKey='1' |
| | | > |
| | | <a-tab-pane |
| | | tab='项ç®ç»´ä¿®æç»' |
| | | key='1' |
| | | > |
| | | <div |
| | | class="table-operator" |
| | | style="margin:-16px" |
| | | > |
| | | <project-maintenance-order-detail-list :mainId='equipmentSealDetailMainId' /> |
| | | </div> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <project-maintenance-order-modal |
| | | ref='modalForm' |
| | | @ok='modalFormOk' |
| | | ></project-maintenance-order-modal> |
| | | <approvel-modal |
| | | ref='approvalModalForm' |
| | | @ok='approvalModalFormOk' |
| | | @cancel='approvalModalFormOk' |
| | | ></approvel-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import ProjectMaintenanceOrderModal from './modules/projectMaintenanceOrder/ProjectMaintenanceOrderModal' |
| | | import { getAction, putAction } from '@/api/manage' |
| | | import ProjectMaintenanceOrderDetailList from './modules/projectMaintenanceOrder/ProjectMaintenanceOrderDetailList' |
| | | import { initDictOptions, filterMultiDictText } from '@/components/dict/JDictSelectUtil' |
| | | import '@/assets/less/TableExpand.less' |
| | | import ApprovelModal from './modules/projectMaintenanceOrder/ApprovelModal' |
| | | |
| | | export default { |
| | | name: 'ProjectMaintenanceOrderList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | ProjectMaintenanceOrderDetailList, |
| | | ProjectMaintenanceOrderModal, |
| | | ApprovelModal |
| | | }, |
| | | 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: 'auditStatus_dictText' |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'typeStatus_dictText' |
| | | }, |
| | | { |
| | | title: '计ååç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'num' |
| | | }, |
| | | // sorter: true, |
| | | { |
| | | title: '计ååç§°', |
| | | align: 'center', |
| | | dataIndex: 'name' |
| | | }, |
| | | { |
| | | title: '计åå¼å§æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'planStartTime', |
| | | // customRender: function(text) { |
| | | // return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | // } |
| | | }, |
| | | { |
| | | title: '计åç»ææ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'planEndTime', |
| | | // customRender: function(text) { |
| | | // return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | // } |
| | | }, |
| | | { |
| | | title: 'å®é
å¼å§æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'actualStartTime', |
| | | // customRender: function(text) { |
| | | // return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | // } |
| | | |
| | | }, |
| | | { |
| | | title: 'å®é
ç»ææ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'actualEndTime', |
| | | // customRender: function(text) { |
| | | // return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | // } |
| | | }, |
| | | { |
| | | title:'éä»¶', |
| | | align:"center", |
| | | dataIndex: 'annex', |
| | | scopedSlots: {customRender: 'fileSlot'} |
| | | }, |
| | | // { |
| | | // title:'å¾çé¢è§', |
| | | // align:"center", |
| | | // dataIndex: 'annex', |
| | | // scopedSlots: {customRender: 'imgSlot'} |
| | | // }, |
| | | // { |
| | | // title:'å卿¹å¼', |
| | | // align:"center", |
| | | // dataIndex: 'changeMethod' |
| | | // }, |
| | | { |
| | | title: '夿³¨', |
| | | align: 'center', |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | title: 'å建人', |
| | | align: 'center', |
| | | dataIndex: 'createBy' |
| | | }, |
| | | { |
| | | title: 'å建æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'createTime' |
| | | // customRender:function (text) { |
| | | // return !text?"":(text.length>10?text.substr(0,10):text) |
| | | // } |
| | | }, |
| | | { |
| | | title: 'ä¿®æ¹äºº', |
| | | align: 'center', |
| | | dataIndex: 'updateBy' |
| | | }, |
| | | { |
| | | title: 'ä¿®æ¹æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'updateTime' |
| | | // customRender:function (text) { |
| | | // return !text?"":(text.length>10?text.substr(0,10):text) |
| | | // } |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/projectMaintenanceOrder/list', |
| | | submit: 'eam/projectMaintenanceOrder/submit', |
| | | revocation: 'eam/projectMaintenanceOrder/revocation', |
| | | delete: '/eam/projectMaintenanceOrder/delete', |
| | | deleteBatch: '/eam/projectMaintenanceOrder/deleteBatch', |
| | | exportXlsUrl: '/eam/projectMaintenanceOrder/exportXls', |
| | | importExcelUrl: 'eam/projectMaintenanceOrder/importExcel', |
| | | edit: '/eam/projectMaintenanceOrder/edit', |
| | | commit: '/eam/projectMaintenanceOrder/commit' |
| | | }, |
| | | dictOptions: { |
| | | auditStatus: [] |
| | | }, |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '50'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | selectedMainId: '', |
| | | superFieldList: [], |
| | | equipmentSealDetailMainId: '' |
| | | } |
| | | }, |
| | | created() { |
| | | // this.getSuperFieldList() |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function () { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | methods: { |
| | | initDictConfig() { |
| | | }, |
| | | clickThenSelect(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(','), [record]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | onClearSelected() { |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | this.selectedMainId = '' |
| | | this.equipmentSealDetailMainId = '' |
| | | |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | if (selectedRowKeys.length == 1) { |
| | | |
| | | this.equipmentSealDetailMainId = selectionRows[0]['id'] |
| | | } else { |
| | | |
| | | this.equipmentSealDetailMainId = '' |
| | | } |
| | | this.selectedMainId = selectedRowKeys[0] |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.selectionRows = selectionRows |
| | | }, |
| | | |
| | | searchQuery() { |
| | | this.onClearSelected() |
| | | this.loadData(1) |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.equipmentSealDetailMainId = '' |
| | | this.queryParam = {} |
| | | this.loadData(1) |
| | | }, |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list屿§!') |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | this.onClearSelected() |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | // getSuperFieldList() { |
| | | // let fieldList = [] |
| | | // fieldList.push({ type: 'string', value: 'num', text: '计ååç¼å·', dictCode: '' }) |
| | | // fieldList.push({ type: 'string', value: 'name', text: '计ååç§°', dictCode: '' }) |
| | | // fieldList.push({ type: 'date', value: 'planStartTime', text: '计åå¼å§æ¶é´' }) |
| | | // fieldList.push({ type: 'date', value: 'planEndTime', text: '计åç»ææ¶é´' }) |
| | | // fieldList.push({ type: 'date', value: 'actualStartTime', text: 'å®é
å¼å§æ¶é´' }) |
| | | // fieldList.push({ type: 'date', value: 'actualEndTime', text: 'å®é
ç»ææ¶é´' }) |
| | | // fieldList.push({ |
| | | // type: 'string', |
| | | // value: 'auditStatus', |
| | | // text: '审æ¹ç¶æ(æªæäº¤-notSubmittedãå¾
å®¡æ¹ pendingApprovalã审æ¹ä¸-approvalProcessã已驳å-Rejectedãå·²éè¿-Approved)', |
| | | // dictCode: 'audit_status' |
| | | // }) |
| | | // /* fieldList.push({type:'string',value:'changeMethod',text:'å卿¹å¼(å°å-sealï¼å¯å°-unseal,æ¥åº-scrapï¼å¤ç½®-disposal)',dictCode:''})*/ |
| | | // fieldList.push({ type: 'string', value: 'remark', text: '夿³¨', dictCode: '' }) |
| | | // fieldList.push({ type: 'string', value: 'createBy', text: 'å建人', dictCode: 'sys_user,realname,username' }) |
| | | // fieldList.push({ type: 'date', value: 'createTime', text: 'å建æ¶é´' }) |
| | | // fieldList.push({ type: 'string', value: 'updateBy', text: 'ä¿®æ¹äºº', dictCode: 'sys_user,realname,username' }) |
| | | // fieldList.push({ type: 'date', value: 'updateTime', text: 'ä¿®æ¹æ¶é´' }) |
| | | |
| | | // this.superFieldList = fieldList |
| | | // }, |
| | | handleCommit(record, type) { |
| | | type == 'commit' ? record.auditStatus = 'pendingApproval' : record.auditStatus = 'notSubmitted' |
| | | putAction(this.url.commit, record).then(res => { |
| | | if (res.success) { |
| | | if (type === 'commit') { |
| | | this.$message.success("æäº¤æåï¼"); |
| | | } else { |
| | | this.$message.success("æ¤åæåï¼"); |
| | | } |
| | | |
| | | this.loadData(1); |
| | | } else { |
| | | this.$message.warning(res.message); |
| | | } |
| | | }) |
| | | }, |
| | | handleFinish(record, type) { |
| | | if (type == 'agree') { |
| | | record.auditStatus = 'Approved' |
| | | } else if (type == 'reject') { |
| | | record.auditStatus = 'Rejected' |
| | | } else if (type == 'revoke') { |
| | | record.auditStatus = 'pendingApproval' |
| | | } |
| | | putAction(this.url.edit, record).then(res => { |
| | | if (res.success) { |
| | | this.$message.success("确认æåï¼"); |
| | | this.loadData(); |
| | | } else { |
| | | this.$message.warning(res.message); |
| | | } |
| | | }) |
| | | }, |
| | | handleApprove: function (record) { |
| | | let edit |
| | | edit = this.url.commit |
| | | this.$refs.approvalModalForm.showModals(record, edit, 'Approved', 'Rejected') |
| | | this.$refs.approvalModalForm.title = '审æ¹' |
| | | this.$refs.approvalModalForm.disableSubmit = false |
| | | }, |
| | | approvalModalFormOk() { |
| | | // éè¿/驳忶ï¼éè½½å表 |
| | | this.loadData() |
| | | //æ¸
空å表éä¸ |
| | | this.onClearSelected() |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |