From ba15d76ff0ec80ee759913511158d4333f6e6c59 Mon Sep 17 00:00:00 2001 From: cuijian <cuijian@xalxzn.com> Date: 星期五, 29 八月 2025 18:21:22 +0800 Subject: [PATCH] 日常业务问题修改、工具参数查询增加 --- src/views/dashboard/SyncProcessList.vue | 228 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 228 insertions(+), 0 deletions(-) diff --git a/src/views/dashboard/SyncProcessList.vue b/src/views/dashboard/SyncProcessList.vue new file mode 100644 index 0000000..3800ad6 --- /dev/null +++ b/src/views/dashboard/SyncProcessList.vue @@ -0,0 +1,228 @@ +<template> + <div class="sync-process-container"> + <a-spin :spinning="loading"> + <a-table + :columns="columns" + :data-source="syncProcessList" + rowKey="id" + :pagination="false" + class="process-table" + :scroll="{ y: 400 }" + > + + <span slot="action" slot-scope="text, record"> + <a-popconfirm title="纭畾棰嗗彇鍚�?" @confirm="() => handleInspection(record.id)"> + <a>棰嗗彇</a> + </a-popconfirm> + </span> + </a-table> + </a-spin> + + <!-- 琛ㄥ崟鍖哄煙 --> + <syncProcessSpecificationInfo-modal ref="modalForm" @ok="modalFormOk"></syncProcessSpecificationInfo-modal> + </div> +</template> + +<script> +import '@/assets/less/TableExpand.less' +import SyncProcessSpecificationInfoModal from '../dnc/base/modules/SyncProcessSpecificationInfo/SyncProcessSpecificationInfoModal.vue' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { getAction } from '@api/manage' + +export default { + name: "SyncProcessSpecificationInfoList", + mixins: [JeecgListMixin], + components: { + SyncProcessSpecificationInfoModal + }, + data() { + return { + syncProcessList: [], + url: { + list: '/dnc/home/syncProcessSpecificationInfo', + isSameNode: '/assign/flow/isSameNode', + receiveInspectionOrder:"/dnc/home/receiveTree" + }, + // 琛ㄦ牸鍒楅厤缃� + columns: [ + { + title: '浜у搧浠e彿', + align: "center", + dataIndex: 'productCode', + scopedSlots: { customRender: 'productCode' }, + width: '10%' + }, + { + title: '閮ㄤ欢鍚嶇О', + align: "center", + dataIndex: 'partName', + }, + { + title: '閮ㄤ欢缂栧彿', + align: "center", + dataIndex: 'partNumber', + }, + { + title: '閮ㄤ欢鐗堟湰', + align: "center", + dataIndex: 'partVersion', + }, + { + title: '宸ヨ壓瑙勭▼缂栧彿', + align: "center", + dataIndex: 'planNumber', + }, + { + title: '宸ヨ壓瑙勭▼鐗堟湰', + align: "center", + dataIndex: 'planVersion', + }, + { + title: '鍙戝竷鏃堕棿', + align: "center", + dataIndex: 'createTime' + }, + { + title: '鎿嶄綔', + align: "center", + scopedSlots: { customRender: 'action' }, + } + ] + }; + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + } + }, + methods: { + handleReceive(item) { + console.log('棰嗗彇浠诲姟', item); + // 瀹為檯涓氬姟涓皟鐢ㄩ鍙栨帴鍙� + this.$message.success('浠诲姟棰嗗彇鎴愬姛'); + // 鏇存柊鏈湴鏁版嵁鐘舵�� + this.syncProcessList = this.syncProcessList.map(i => + i.id === item.id ? {...i, isReceive: true} : i + ); + }, + loadData() { + this.syncProcessList = []; + if (!this.url.list) { + this.$message.error('璇疯缃畊rl.list灞炴��!'); + return; + } + this.loading = true; + getAction(this.url.list).then((res) => { + if (res.success) { + // 浣跨敤鐪熷疄鎺ュ彛鏁版嵁 + this.syncProcessList = res.result.records || res.result; + } else { + this.$message.warning(res.message); + } + }).finally(() => { + this.loading = false; + }); + }, + /** + * 棰嗗彇 + * @param id + */ + handleInspection(id) { + var that = this + this.loading = true + getAction(that.url.receiveInspectionOrder, { id }) + .then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + this.loading = false + } + }) + }, + }, + mounted() { + this.loadData(); + } +} +</script> + +<style scoped> +@import '~@assets/less/common.less'; + +.sync-process-container { + padding: 16px; + background-color: #fff; + border-radius: 8px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09); + height: 500px; + display: flex; + flex-direction: column; +} + +.table-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 16px; + flex-shrink: 0; +} + +.table-title { + font-size: 16px; + font-weight: 600; + color: #1d2129; +} + +.more-button { + background-color: #1890ff; + border-color: #1890ff; + font-weight: 500; +} + +.more-button:hover { + background-color: #40a9ff; + border-color: #40a9ff; +} + +/* 琛ㄦ牸鏍峰紡 */ +.process-table { + flex: 1; + overflow: hidden; +} + +/* 浜у搧浠e彿閾炬帴鏍峰紡 */ +.process-table >>> .ant-table-tbody a { + color: #1890ff; + transition: color 0.3s; + font-weight: 500; +} + +.process-table >>> .ant-table-tbody a:hover { + color: #40a9ff; + text-decoration: underline; +} + +/* 鎿嶄綔鎸夐挳鏍峰紡 */ +.process-table >>> .ant-btn-link { + padding: 0 4px; +} + +/* 琛ㄦ牸琛屾偓鍋滄晥鏋� */ +.process-table >>> .ant-table-row:hover td { + background-color: #f0f8ff !important; + cursor: pointer; +} + +/* 琛ㄦ牸婊氬姩鍖哄煙鏍峰紡 */ +.process-table >>> .ant-table-body { + overflow-y: auto !important; +} +</style> \ No newline at end of file -- Gitblit v1.9.3