¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="åæ®å·"> |
| | | <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> |
| | | <!-- <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> |
| | | |
| | | <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" |
| | | > |
| | | <span slot="num" slot-scope="text"> |
| | | <j-ellipsis :value="text" :length="15" /> |
| | | </span> |
| | | <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" |
| | | > |
| | | <equipment-seal-detail-list :mainId="equipmentSealDetailMainId" /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <equipmentSeal-modal |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></equipmentSeal-modal> |
| | | <approvel-modal |
| | | ref="approvalModalForm" |
| | | @ok='approvalModalFormOk' |
| | | @cancel='approvalModalFormOk' |
| | | ></approvel-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EquipmentSealModal from './modules/equipmentSeal/EquipmentSealModal' |
| | | import { getAction, postAction } from '@/api/manage' |
| | | import EquipmentSealDetailList from './modules/equipmentSeal/EquipmentSealDetailList' |
| | | import { initDictOptions, filterMultiDictText } from '@/components/dict/JDictSelectUtil' |
| | | import '@/assets/less/TableExpand.less' |
| | | import ApprovelModal from './modules/equipmentSeal/ApprovelModal' |
| | | |
| | | export default { |
| | | name: "EquipmentSealList", |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EquipmentSealDetailList, |
| | | EquipmentSealModal, |
| | | 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", |
| | | sorter: true, |
| | | dataIndex: 'num', |
| | | scopedSlots: { customRender: 'num' }, |
| | | width: 100, |
| | | ellipsis: true |
| | | }, |
| | | { |
| | | 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/equipmentSeal/list", |
| | | approve: '/eam/equipmentSeal/approve', |
| | | delete: "/eam/equipmentSeal/delete", |
| | | deleteBatch: "/eam/equipmentSeal/deleteBatch", |
| | | exportXlsUrl: "/eam/equipmentSeal/exportXls", |
| | | importExcelUrl: "eam/equipmentSeal/importExcel", |
| | | submit: 'eam/equipmentSeal/submit', |
| | | revocation: 'eam/equipmentSeal/revocation' |
| | | }, |
| | | 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 = '' |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedMainId = selectedRowKeys[0] |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | this.equipmentSealDetailMainId = 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.equipmentSealDetailMainId = '' |
| | | }, |
| | | 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 |
| | | }, |
| | | 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() |
| | | }, |
| | | searchQuery() { |
| | | this.loadData(1) |
| | | //this.equipmentSealDetailMainId='' |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | //this.equipmentSealDetailMainId='' |
| | | this.loadData(1) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |