From 16d99a3f6da4cebed2376fa42e025b53c2891818 Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期二, 12 十二月 2023 15:26:08 +0800
Subject: [PATCH] 维修履历
---
src/views/eam/OperationCertificateList.vue | 122 ++++++++++++++++++++++++++++++++--------
1 files changed, 97 insertions(+), 25 deletions(-)
diff --git a/src/views/eam/OperationCertificateList.vue b/src/views/eam/OperationCertificateList.vue
index 5792dfa..53b4262 100644
--- a/src/views/eam/OperationCertificateList.vue
+++ b/src/views/eam/OperationCertificateList.vue
@@ -44,8 +44,8 @@
<!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
<div class='table-operator'>
- <a-button @click='handleAdd' type='primary' icon='plus'>鏂板</a-button>
-<!-- <a-button @click='handleChangeCertificate' type='primary' icon='plus'>鍙樻洿鎿嶄綔璇�</a-button>-->
+<!-- <a-button @click='handleAdd' type='primary' icon='plus'>鏂板</a-button>-->
+ <a-button @click='handleChangeCertificate' 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'>
@@ -80,8 +80,11 @@
:dataSource='dataSource'
:pagination='ipagination'
:loading='loading'
- :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
+ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange ,type:'radio'}"
+ :customRow='clickThenSelect'
@change='handleTableChange'>
+
+
<template slot='htmlSlot' slot-scope='text'>
<div v-html='text'></div>
@@ -106,8 +109,8 @@
<span slot='action' slot-scope='text, record'>
<!-- <a @click='handleEdit(record)'>缂栬緫</a>-->
-<!-- <a-divider type='vertical' />-->
- <a @click='handleDetail(record)'>璇︽儏</a>
+ <!-- <a-divider type='vertical' />-->
+<!-- <a @click='handleDetail(record)'>璇︽儏</a>-->
<!-- <a-divider type="vertical" />-->
<!-- <a-dropdown>-->
<!-- <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>-->
@@ -126,7 +129,11 @@
</a-table>
</div>
-
+ <a-tabs defaultActiveKey="1">
+ <a-tab-pane tab="鎿嶄綔璇佺鐞嗘槑缁�" key="1" >
+ <OperationCertificateDetailList :mainId="operationCertificateDetailMainId" />
+ </a-tab-pane>
+ </a-tabs>
<operation-certificate-modal ref='modalForm' @ok='modalFormOk' />
</a-card>
</template>
@@ -135,14 +142,16 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import OperationCertificateModal from './modules/operationCertificate/OperationCertificateModal'
+import OperationCertificateDetailList from './modules/operationCertificate/OperationCertificateDetailList'
import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
import '@/assets/less/TableExpand.less'
-
+import { getAction } from '@/api/manage'
export default {
name: 'OperationCertificateList',
mixins: [JeecgListMixin],
components: {
- OperationCertificateModal
+ OperationCertificateModal,
+ OperationCertificateDetailList
},
data() {
return {
@@ -213,25 +222,40 @@
align: 'center',
dataIndex: 'status_dictText'
},
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- align: 'center',
- fixed: 'right',
- width: 147,
- scopedSlots: { customRender: 'action' }
- }
+ // {
+ // title: '鎿嶄綔',
+ // dataIndex: 'action',
+ // align: 'center',
+ // fixed: 'right',
+ // width: 147,
+ // scopedSlots: { customRender: 'action' }
+ // }
],
url: {
list: '/eam/operationCertificate/list',
delete: '/eam/operationCertificate/delete',
deleteBatch: '/eam/operationCertificate/deleteBatch',
exportXlsUrl: '/eam/operationCertificate/exportXls',
- importExcelUrl: 'eam/operationCertificate/importExcel'
+ importExcelUrl: '/eam/operationCertificate/importExcel'
},
dictOptions: {},
- superFieldList: []
+ superFieldList: [],
+ /* 鍒嗛〉鍙傛暟 */
+ 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:'',
+
+ operationCertificateDetailMainId: '',
}
},
created() {
@@ -245,13 +269,61 @@
methods: {
initDictConfig() {
},
-
- // handleChangeCertificate: function (record) {
- // this.$refs.modalForm.edit(record)
- // this.$refs.modalForm.title = '鍙樻洿鎿嶄綔璇�'
- // this.$refs.modalForm.disableSubmit = false
- // // this.$refs.modalForm.isRevise = false;
- // },
+ clickThenSelect(record) {
+ return {
+ on: {
+ click: () => {
+ this.onSelectChange(record.id.split(","), [record]);
+ }
+ }
+ }
+ },
+ handleChangeCertificate: function() {
+ if (this.selectionRows.length <= 0) {
+ this.$message.warning('璇烽�夋嫨涓�鏉¤褰�')
+ return
+ }
+ const record = this.selectionRows[0]
+ this.$refs.modalForm.edit(record)
+ this.$refs.modalForm.title = '鍙樻洿鎿嶄綔璇�'
+ this.$refs.modalForm.disableSubmit = false
+ this.$refs.modalForm.loadSubTableDataFlag = false
+ // this.$refs.modalForm.isRevise = false;
+ },
+ onClearSelected() {
+ this.selectedRowKeys = [];
+ this.selectionRows = [];
+ this.selectedMainId=''
+ },
+ onSelectChange(selectedRowKeys, selectionRows) {
+ this.selectedMainId=selectedRowKeys[0]
+ this.selectedRowKeys = selectedRowKeys;
+ this.selectionRows = selectionRows;
+ this.operationCertificateDetailMainId = selectionRows[0]['id']
+ },
+ loadData(arg) {
+ if(!this.url.list){
+ this.$message.error("璇疯缃畊rl.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: '' })
--
Gitblit v1.9.3