¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false" title="设å¤å¤ç½®"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <!-- v-show="false" hidden="true"--> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24" v-show="false" > |
| | | <!-- defaultValue="disposal"--> |
| | | <a-form-item label="å卿¹å¼" > |
| | | <a-input type ="hidden" placeholder="请è¾å
¥å卿¹å¼" v-model="queryParam.changeMethod" defaultValue="disposal"></a-input> |
| | | </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.num"></a-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> |
| | | <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> |
| | | <!-- <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].auditStatus==='notSubmitted'" @click="handleSubmit" type="primary" icon="check">æäº¤</a-button> |
| | | <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].auditStatus === 'pendingApproval'" @click="handleRevocation" type="primary" icon="rollback">æ¤å</a-button> --> |
| | | |
| | | <!-- <a-button @click="showProcess" type="primary" icon="plus">æµç¨</a-button>--> |
| | | <!-- <a-button @click="handleJointQuery" 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>--> |
| | | <!-- é«çº§æ¥è¯¢åºå --> |
| | | <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> |
| | | <!-- <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" |
| | | class="j-table-force-nowrap" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" |
| | | :customRow="clickThenSelect" |
| | | @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-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 == 'pendingApproval'||record.auditStatus =='Rejected'" |
| | | 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 == 'pendingApproval'||record.auditStatus =='Rejected'" |
| | | 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> |
| | | |
| | | <!-- <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="handleDetail(record)">详æ
</a> |
| | | </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> |
| | | |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tab-pane tab="设å¤å¤ç½®æç»" key="1"> |
| | | <EquipmentDisposalDetailList :mainId="equipmentDisposalDetailMainId" /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <equipment-disposal-modal ref="modalForm" @ok="modalFormOk" /> |
| | | <approvel-modal ref="approvalModalForm" @ok='approvalModalFormOk' @cancel='approvalModalFormOk'></approvel-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EquipmentDisposalModal from './modules/equipmentDisposal/EquipmentDisposalModal' |
| | | import { getAction,postAction } from '@/api/manage' |
| | | import EquipmentDisposalDetailList from './modules/equipmentDisposal/EquipmentDisposalDetailList' |
| | | import { initDictOptions, filterMultiDictText } from '@/components/dict/JDictSelectUtil' |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import ApprovelModal from './modules/equipmentSeal/ApprovelModal' |
| | | |
| | | export default { |
| | | name: 'EquipmentDisposalList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EquipmentDisposalDetailList, |
| | | EquipmentDisposalModal, |
| | | 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', |
| | | sorter: true, |
| | | dataIndex: 'num' |
| | | }, |
| | | { |
| | | title: '审æ¹ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'auditStatus_dictText' |
| | | }, |
| | | { |
| | | 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: '夿³¨', |
| | | align: 'center', |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/equipmentDisposal/list', |
| | | approve: '/eam/equipmentDisposal/approve', |
| | | delete: '/eam/equipmentDisposal/delete', |
| | | deleteBatch: '/eam/equipmentDisposal/deleteBatch', |
| | | exportXlsUrl: '/eam/equipmentDisposal/exportXls', |
| | | importExcelUrl: 'eam/equipmentDisposal/importExcel', |
| | | submit: '/eam/equipmentDisposal/submit', |
| | | revocation: '/eam/equipmentDisposal/revocation', |
| | | submitBatch: '/eam/equipmentDisposal/submitBatch', |
| | | revocationBatch: '/eam/equipmentDisposal/revocationBatch' |
| | | |
| | | }, |
| | | 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: [], |
| | | equipmentDisposalDetailMainId: '' |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | // this.getSuperFieldList(); |
| | | this.queryParam.changeMethod="disposal"; |
| | | }, |
| | | 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 = '' |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedMainId = selectedRowKeys[0] |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.selectionRows = selectionRows |
| | | this.equipmentDisposalDetailMainId = selectionRows[0]['id'] |
| | | }, |
| | | 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 |
| | | }) |
| | | this.equipmentDisposalDetailMainId = "" |
| | | }, |
| | | handleCommit(record, type) { |
| | | let url |
| | | type == 'commit' ? record.auditStatus = 'pendingApproval' : record.auditStatus = 'notSubmitted' |
| | | type == 'commit' ? url = this.url.submit : url = this.url.revocation |
| | | postAction(url, 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); |
| | | } |
| | | }) |
| | | }, |
| | | handleApprove: function(record) { |
| | | let approve |
| | | approve = this.url.approve |
| | | this.$refs.approvalModalForm.showModals(record, approve,'Approved','Rejected') |
| | | this.$refs.approvalModalForm.title = '审æ¹' |
| | | this.$refs.approvalModalForm.disableSubmit = false |
| | | |
| | | }, |
| | | approvalModalFormOk() { |
| | | // éè¿/驳忶ï¼éè½½å表 |
| | | this.loadData() |
| | | //æ¸
空å表éä¸ |
| | | this.onClearSelected() |
| | | }, |
| | | // getSuperFieldList(){ |
| | | // let fieldList=[]; |
| | | // fieldList.push({type:'string',value:'num',text:'åæ®å·',dictCode:''}) |
| | | // 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 |
| | | // } |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |