From fd268e6d3d6a310e0d35d0cec53e018b8c4ac4d8 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期四, 24 七月 2025 10:19:15 +0800 Subject: [PATCH] 基础样式添加按钮权限 --- src/views/eam/repair/EamReportProductHazardsList.vue | 117 +++++++++++++++++++++++++++++++++++----------------------- 1 files changed, 71 insertions(+), 46 deletions(-) diff --git a/src/views/eam/repair/EamReportProductHazardsList.vue b/src/views/eam/repair/EamReportProductHazardsList.vue index 542d88e..2bbfd70 100644 --- a/src/views/eam/repair/EamReportProductHazardsList.vue +++ b/src/views/eam/repair/EamReportProductHazardsList.vue @@ -50,11 +50,11 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator"> - <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 @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-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item> @@ -79,7 +79,7 @@ :dataSource="dataSource" :pagination="ipagination" :loading="loading" - class="j-table-force-nowrap" + :scroll="{x:'max-content'}" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> @@ -119,89 +119,104 @@ components: { EamReportProductHazardsModal }, + props: { + isDisplayOperation: { + type: Boolean, + default: true + }, + propsQueryParam: { + type: Object + } + }, data () { return { description: '浜у搧瀹夊叏闅愭偅纭绠$悊椤甸潰', + disableMixinCreated: true, // 琛ㄥご columns: [ { title: '#', dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; - } - }, - { - title: '鎶ヤ慨ID', - align:"center", - dataIndex: 'reportId' - }, - { - title: '璁惧ID', - align:"center", - dataIndex: 'equipmentId' - }, - { + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 + }, + fixed: 'left' + }, + { + title: '缁熶竴缂栫爜', + align: 'center', + dataIndex: 'equipmentCode', + fixed: 'left', + scopedSlots: { customRender: 'equipmentCode' } + }, + { + title: '璁惧鍚嶇О', + align: 'center', + dataIndex: 'equipmentName', + fixed: 'left' + }, + { + title: '璁惧鍨嬪彿', + align: 'center', + dataIndex: 'equipmentModel', + fixed: 'left' + }, + { title: '鎿嶄綔宸�', align:"center", dataIndex: 'confirmer' }, - { + { title: '鎿嶄綔宸ョ‘璁ゆ椂闂�', align:"center", dataIndex: 'confirmTime' }, - { + { title: '浜у搧鎹熷け鎯呭喌;鏄� 鍚�', align:"center", dataIndex: 'productLoss' }, - { + { title: '浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽', align:"center", dataIndex: 'qualityAnalysis' }, - { + { title: '涓荤宸ヨ壓', align:"center", dataIndex: 'technologist' }, - { + { title: '涓荤宸ヨ壓纭鏃堕棿', align:"center", dataIndex: 'technologistTime' }, - { + { title: '涓荤宸ヨ壓纭鎰忚', align:"center", dataIndex: 'technologistComment' }, - { + { title: '閮ㄧ骇棰嗗', align:"center", dataIndex: 'deputyDepartment' }, - { + { title: '閮ㄧ骇棰嗗纭鏃堕棿', align:"center", dataIndex: 'deputyDepartmentTime' }, - { + { title: '閮ㄧ骇棰嗗纭鎰忚', align:"center", dataIndex: 'deputyDepartmentComment' }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align:"center", - scopedSlots: { customRender: 'action' }, - } ], - url: { + selectRepairOrderData: {}, + url: { list: "/eam/eamReportProductHazards/list", delete: "/eam/eamReportProductHazards/delete", deleteBatch: "/eam/eamReportProductHazards/deleteBatch", @@ -210,13 +225,23 @@ }, } }, - computed: { - importExcelUrl: function(){ - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - } - }, + created() { + if (!this.isDisplayOperation) this.queryParam = Object.assign({}, this.propsQueryParam) + else { + const operationColumn = { + title: '鎿嶄綔', + dataIndex: 'action', + align: 'center', + scopedSlots: { customRender: 'action' }, + width: 200, + fixed: 'right' + } + this.columns = [...this.columns, operationColumn] + } + this.loadData(1) + }, methods: { - + } } </script> -- Gitblit v1.9.3