From b4816f6294646157b50bb49f1d19eaf306e0ac8c Mon Sep 17 00:00:00 2001 From: he wei <858544502@qq.com> Date: 星期日, 13 十一月 2022 22:06:22 +0800 Subject: [PATCH] UA 0.1.4发布 --- src/components/contextMenu.vue | 29 ++++++++++++++++++----------- 1 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/components/contextMenu.vue b/src/components/contextMenu.vue index f93dc68..1b15dec 100644 --- a/src/components/contextMenu.vue +++ b/src/components/contextMenu.vue @@ -62,6 +62,7 @@ width="800px" > <file-info + v-if="fileInfoVisible" :info="fileData" @ok="editOk" @cancel="editCancel" @@ -79,7 +80,8 @@ updateStation, deleteStation, delFileFromStation, - getXmlValue, + getParamByFileId, + updateFileParam, } from "@/apis"; export default { name: "ContextMenu", @@ -182,7 +184,7 @@ currFile: { name: "", url: "", - fileId: undefined + fileId: undefined, }, }; }, @@ -233,17 +235,14 @@ }); }, openFile() { - let { url, fileId } = this.contextData; - const params = { - filePath: url - }; - getXmlValue(params).then((res) => { + let { url, fileId, label } = this.contextData; + getParamByFileId(fileId).then((res) => { const { code, data, data2 } = res.data; if (code && data) { // console.log(data2); - this.fileData = data2.fileParam; - this.currFile.name = data2.fileName; - this.currFile.url = data2.fileUrl; + this.fileData = data2; + this.currFile.name = label; + this.currFile.url = url; this.currFile.fileId = fileId; this.fileInfoVisible = true; } else { @@ -456,6 +455,14 @@ }, editOk(data) { this.fileInfoVisible = false; + updateFileParam(this.currFile.fileId, data).then((res) => { + const { code, data } = res.data; + if (code && data) { + this.$message.success('淇敼鎴愬姛'); + } else { + this.$message.error('淇敼澶辫触'); + } + }); this.toRes(); }, editCancel(data) { @@ -469,7 +476,7 @@ path: "/result/" + name, query: { url, - fileId + fileId, }, }); this.$bus.$emit("checkScroll"); -- Gitblit v1.9.1