From 1e653db94c24389cc7615fd4a7ef1d63b00af534 Mon Sep 17 00:00:00 2001 From: cuilei <ray_tsu1@163.com> Date: 星期五, 13 六月 2025 11:39:32 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/tms/requirement/ToolSharpeningList .vue | 111 +++++++++++++++++-------------------------------------- 1 files changed, 35 insertions(+), 76 deletions(-) diff --git a/src/views/tms/requirement/ToolSharpeningList .vue b/src/views/tms/requirement/ToolSharpeningList .vue index cf8841a..abaa2ab 100644 --- a/src/views/tms/requirement/ToolSharpeningList .vue +++ b/src/views/tms/requirement/ToolSharpeningList .vue @@ -1,5 +1,6 @@ <template> <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> @@ -16,7 +17,7 @@ </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="鍒冪(鏃堕棿"> - <a-range-picker v-model="queryParam.sharpeningTime" @change="onInspectionDateChange" format="YYYY-MM-DD" value-format="YYYY-MM-DD" /> + <a-range-picker v-model="queryParam.sharpeningTime" @change="onToolSharpeningDateChange" format="YYYY-MM-DD" value-format="YYYY-MM-DD" /> </a-form-item> </a-col> <a-col :xl="4" :lg="7" :md="8" :sm="24"> @@ -28,78 +29,86 @@ </a-row> </a-form> </div> - <!-- 鏌ヨ鍖哄煙-END --> <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator"> - <div class="table-operator"> - <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - </div> + <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> + <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" - :scroll="{x:true}" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" - :rowSelection="null" class="j-table-force-nowrap" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> - - <span slot="action" slot-scope="text, record"> - <a @click="handleDetail(record)">璇︽儏</a> + <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="handleEdit(record)">缂栬緫</a> + <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> + <!-- table鍖哄煙-end --> <tools-sharpening-modal ref="modalForm" @ok="modalFormOk"></tools-sharpening-modal> </a-card> </template> <script> - import '@/assets/less/TableExpand.less' -import { mixinDevice } from '@/utils/mixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import ToolsSharpeningModal from './modules/ToolsSharpeningModal' import { getAction, putAction, deleteAction } from '../../../api/manage' - export default { - name: 'ToolSharpeningList ', - mixins:[JeecgListMixin, mixinDevice], + name: 'ToolSharpeningList', + mixins: [JeecgListMixin], components: { ToolsSharpeningModal }, - data () { + data() { return { - description: '鍒�鍏峰垉纾�', + description: '鍒�鍏峰垉纾ㄩ〉闈�', // 琛ㄥご columns: [ { @@ -178,72 +187,22 @@ exportXlsUrl: "/tms/toolSharpening/exportXls", importExcelUrl: "tms/toolSharpening/importExcel", }, - dictOptions:{}, - superFieldList:[], - } }, - created() {}, computed: { - importExcelUrl: function(){ - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - }, + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } }, - methods: { - onInspectionDateChange: function(value, dateString) { - this.queryParam.sharpeningTimeBegin = dateString[0] - this.queryParam.sharpeningTimeEnd = dateString[1] - }, - - - handleEdit: function (record) { - console.log('record:', record) - this.$refs.modalForm.title = '缂栬緫' - this.$refs.modalForm.disableSubmit = false - this.$refs.modalForm.edit(record) - - }, - handleDetail:function(record){ - this.$refs.modalForm.title="璇︽儏"; - this.$refs.modalForm.disableSubmit = true; - this.$refs.modalForm.edit(record); - }, - - - handleDelete: function (id) { - if (!this.url.delete) { - this.$message.error('璇疯缃畊rl.delete灞炴��!') - return - } - deleteAction(this.url.delete, { id: id }).then((res) => { - if (res.success) { - //閲嶆柊璁$畻鍒嗛〉闂 - this.$message.success(res.message) - this.ipagination.current = 1 - this.loadData() // 寮哄埗浠庣涓�椤靛姞杞� - } else { - this.$message.warning(res.message) - } - }) - }, - searchReset() { - this.loadData(1) - }, - modalFormOk() { - this.loadData() - }, - + onToolSharpeningDateChange: function(value, dateString) { + this.queryParam.sharpeningTimeBegin = dateString[0] + this.queryParam.sharpeningTimeEnd = dateString[1] + }, } } </script> <style scoped> @import '~@assets/less/common.less'; -.enable { - color: green; -} -.disable { - color: red; -} </style> \ No newline at end of file -- Gitblit v1.9.3