From 6c7ca8b4290cd6afecb680c39be00fc2480a2dca Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期四, 21 九月 2023 14:30:58 +0800 Subject: [PATCH] 现场问题修改 --- src/views/eam/RiskPreventionList.vue | 213 +++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 165 insertions(+), 48 deletions(-) diff --git a/src/views/eam/RiskPreventionList.vue b/src/views/eam/RiskPreventionList.vue index 26a3f14..f6d052e 100644 --- a/src/views/eam/RiskPreventionList.vue +++ b/src/views/eam/RiskPreventionList.vue @@ -1,26 +1,65 @@ <template> - <a-card :bordered='false' title='鍗遍櫓闃叉帶'> + <a-card + :bordered='false' + title='鍗遍櫓闃叉帶' + > <!-- 鏌ヨ鍖哄煙 --> <div class='table-page-search-wrapper'> - <a-form layout='inline' @keyup.enter.native='searchQuery'> + <a-form + layout='inline' + @keyup.enter.native='searchQuery' + > <a-row :gutter='24'> - <a-col :xl='6' :lg='7' :md='8' :sm='24'> + <a-col + :xl='6' + :lg='7' + :md='8' + :sm='24' + > <a-form-item label='鍗遍櫓婧愮紪鐮�'> - <j-input placeholder='璇疯緭鍏ュ嵄闄╂簮缂栫爜' v-model='queryParam.num'></j-input> + <j-input + placeholder='璇疯緭鍏ュ嵄闄╂簮缂栫爜' + v-model='queryParam.num' + ></j-input> </a-form-item> </a-col> <template> - <a-col :xl='6' :lg='7' :md='8' :sm='24'> + <a-col + :xl='6' + :lg='7' + :md='8' + :sm='24' + > <a-form-item label='鍗遍櫓婧�'> - <j-input placeholder='璇疯緭鍏ュ嵄闄╂簮' v-model='queryParam.name'></j-input> + <j-input + placeholder='璇疯緭鍏ュ嵄闄╂簮' + v-model='queryParam.name' + ></j-input> </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-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'"/>--> @@ -34,16 +73,36 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <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-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-menu-item + key='1' + @click='batchDel' + > <a-icon type='delete' /> 鍒犻櫎 </a-menu-item> @@ -56,10 +115,15 @@ <!-- 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 + 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 @@ -74,25 +138,47 @@ :loading='loading' :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' class='j-table-force-nowrap' - @change='handleTableChange'> - <template slot="description" slot-scope="text" > - <a-tooltip placement="top" :title="text" trigger="hover"> + @change='handleTableChange' + > + <template + slot="description" + slot-scope="text" + > + <a-tooltip + placement="top" + :title="text" + trigger="hover" + > <div> <template slot="title"> </template> <p style="cusor:pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 130px;">{{ text }}</p> </div> </a-tooltip> </template> - <template slot="num" slot-scope="text" > - <a-tooltip placement="top" :title="text" trigger="hover"> + <template + slot="num" + slot-scope="text" + > + <a-tooltip + placement="top" + :title="text" + trigger="hover" + > <div> <template slot="title"> </template> <p style="cusor:pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 130px;">{{ text }}</p> </div> </a-tooltip> </template> - <template slot="measure" slot-scope="text" > - <a-tooltip placement="top" :title="text" trigger="hover"> + <template + slot="measure" + slot-scope="text" + > + <a-tooltip + placement="top" + :title="text" + trigger="hover" + > <div> <template slot="title"> </template> <p style="cusor:pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 130px;">{{ text }}</p> @@ -100,28 +186,53 @@ </a-tooltip> </template> - <template slot='htmlSlot' slot-scope='text'> + <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 + 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> + <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)'> + @click='downloadFile(text)' + > 涓嬭浇 </a-button> </template> - <span slot='action' slot-scope='text, record'> + <span + slot='action' + slot-scope='text, record' + > <a @click='handleEdit(record)'>缂栬緫</a> <a-divider type='vertical' /> @@ -132,7 +243,10 @@ <a @click='handleDetail(record)'>璇︽儏</a> </a-menu-item> <a-menu-item> - <a-popconfirm title='纭畾鍒犻櫎鍚�?' @confirm='() => handleDelete(record.id)'> + <a-popconfirm + title='纭畾鍒犻櫎鍚�?' + @confirm='() => handleDelete(record.id)' + > <a>鍒犻櫎</a> </a-popconfirm> </a-menu-item> @@ -143,7 +257,10 @@ </a-table> </div> - <risk-prevention-modal ref='modalForm' @ok='modalFormOk'></risk-prevention-modal> + <risk-prevention-modal + ref='modalForm' + @ok='modalFormOk' + ></risk-prevention-modal> </a-card> </template> @@ -171,7 +288,7 @@ key: 'rowIndex', width: 60, align: 'center', - customRender: function(t, r, index) { + customRender: function (t, r, index) { return parseInt(index) + 1 } }, @@ -179,8 +296,8 @@ title: ' 鍗遍櫓婧愮紪鐮�', align: 'center', dataIndex: 'num', - scopedSlots: { customRender: 'num' }, - ellipsis: true, + // scopedSlots: { customRender: 'num' }, + // ellipsis: true, }, { title: '鍗遍櫓婧愬悕绉�', @@ -191,17 +308,17 @@ title: '鍗遍櫓鎻忚堪', align: 'center', dataIndex: 'description', - scopedSlots: { customRender: 'description' }, - width: 100, - ellipsis: true, + // scopedSlots: { customRender: 'description' }, + // width: 100, + // ellipsis: true, }, { title: '闃叉帶鎺柦', align: 'center', dataIndex: 'measure', - scopedSlots: { customRender: 'measure' }, - width: 100, - ellipsis: true, + // scopedSlots: { customRender: 'measure' }, + // width: 100, + // ellipsis: true, }, { title: '鍒涘缓浜�', @@ -254,7 +371,7 @@ this.getSuperFieldList() }, computed: { - importExcelUrl: function() { + importExcelUrl: function () { return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` } }, -- Gitblit v1.9.3