| | |
| | | width="800px" |
| | | > |
| | | <file-info |
| | | v-if="fileInfoVisible" |
| | | :info="fileData" |
| | | @ok="editOk" |
| | | @cancel="editCancel" |
| | |
| | | updateStation, |
| | | deleteStation, |
| | | delFileFromStation, |
| | | getXmlValue, |
| | | getParamByFileId, |
| | | updateFileParam, |
| | | } from "@/apis"; |
| | | export default { |
| | | name: "ContextMenu", |
| | |
| | | currFile: { |
| | | name: "", |
| | | url: "", |
| | | fileId: undefined |
| | | fileId: undefined, |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | }); |
| | | }, |
| | | 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 { |
| | |
| | | }, |
| | | 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) { |
| | |
| | | path: "/result/" + name, |
| | | query: { |
| | | url, |
| | | fileId |
| | | fileId, |
| | | }, |
| | | }); |
| | | this.$bus.$emit("checkScroll"); |