From a8a13515268a04e05af3f36d6b40b694d34b5622 Mon Sep 17 00:00:00 2001 From: yaowanxin <3588231647@qq.com> Date: 星期一, 08 九月 2025 18:02:06 +0800 Subject: [PATCH] 用印管理页面调整,接口 --- src/views/collaborativeApproval/knowledgeBase/index.vue | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/views/collaborativeApproval/knowledgeBase/index.vue b/src/views/collaborativeApproval/knowledgeBase/index.vue index f199321..ba572f5 100644 --- a/src/views/collaborativeApproval/knowledgeBase/index.vue +++ b/src/views/collaborativeApproval/knowledgeBase/index.vue @@ -28,7 +28,7 @@ <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button> </div> </div> - + <div class="table_list"> <PIMTable rowKey="id" @@ -283,11 +283,11 @@ currentKnowledge: {} }); -const { - searchForm, - tableLoading, - page, - tableData, +const { + searchForm, + tableLoading, + page, + tableData, selectedIds, form, dialogVisible, @@ -473,13 +473,13 @@ const now = new Date(); const randomType = knowledgeTypes[Math.floor(Math.random() * knowledgeTypes.length)]; const randomScenario = scenarios[Math.floor(Math.random() * scenarios.length)]; - + // 鐢熸垚闅忔満鏍囬 let title = titleTemplates[Math.floor(Math.random() * titleTemplates.length)]; title = title .replace('{type}', randomType.label) .replace('{scenario}', randomScenario); - + const newKnowledge = { id: newId, title: title, @@ -493,15 +493,15 @@ usageCount: Math.floor(Math.random() * 20) + 1, createTime: now.toLocaleString() }; - + // 娣诲姞鍒版暟鎹紑澶� mockData.unshift(newKnowledge); - + // 淇濇寔鏁版嵁閲忓湪鍚堢悊鑼冨洿鍐咃紙鏈�澶氫繚鐣�30鏉★級 if (mockData.length > 30) { mockData = mockData.slice(0, 30); } - + console.log(`[${new Date().toLocaleString()}] 鑷姩鐢熸垚鏂扮煡璇�: ${title}`); }; @@ -665,7 +665,7 @@ 鍏抽敭瑕佺偣锛�${currentKnowledge.value.keyPoints} 鍒涘缓浜猴細${currentKnowledge.value.creator} `.trim(); - + // 澶嶅埗鍒板壀璐存澘 navigator.clipboard.writeText(knowledgeText).then(() => { ElMessage.success("鐭ヨ瘑鍐呭宸插鍒跺埌鍓创鏉�"); @@ -682,14 +682,14 @@ mockData[index].usageCount += 1; currentKnowledge.value.usageCount += 1; } - + ElMessage.success("宸叉敹钘忥紝浣跨敤娆℃暟+1"); }; // 鎻愪氦鐭ヨ瘑琛ㄥ崟 const submitForm = async () => { try { - await formRef.value.validate(); + await formRef.value.validate(); if (dialogType.value === "add") { // 鏂板鐭ヨ瘑 addKnowledgeBase({...form.value}).then(res => { @@ -723,7 +723,7 @@ ElMessage.warning("璇烽�夋嫨瑕佸垹闄ょ殑鐭ヨ瘑"); return; } - + ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "鍒犻櫎", { confirmButtonText: "纭", cancelButtonText: "鍙栨秷", @@ -736,7 +736,7 @@ mockData.splice(index, 1); } }); - + ElMessage.success("鍒犻櫎鎴愬姛"); selectedIds.value = []; getList(); -- Gitblit v1.9.3