From c88f640a8dff6f7190c9edfdf066dfeceb50a97e Mon Sep 17 00:00:00 2001 From: chenhc <2369838784@qq.com> Date: Wed, 21 Feb 2024 10:32:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=AB=E7=A0=81=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=9F=A5=E7=9C=8B=E5=B8=AE=E5=8A=A9=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/sysMenuHelp.js | 8 ++++- src/views/inout/DialogCreateOrder.vue | 41 +++++++++++++++++++--- src/views/system/param/addhelpSettings.vue | 4 +-- 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/src/api/system/sysMenuHelp.js b/src/api/system/sysMenuHelp.js index fb1aaa1..6627c50 100644 --- a/src/api/system/sysMenuHelp.js +++ b/src/api/system/sysMenuHelp.js @@ -41,7 +41,13 @@ export function selectAuthMenu(query) { }); } - +export function selectAuthMenuByMenuKey(query) { + return axios({ + url: "/system/param/help/selectAuthMenuByMenuKey", + method: "get", + params: query + }); +} diff --git a/src/views/inout/DialogCreateOrder.vue b/src/views/inout/DialogCreateOrder.vue index eaa5869..12a1da5 100644 --- a/src/views/inout/DialogCreateOrder.vue +++ b/src/views/inout/DialogCreateOrder.vue @@ -248,6 +248,7 @@ import {findByFrom, findInvByUser} from "../../api/system/invSubWarehouse"; import {parseTime} from "../../utils/coTools"; import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain" import editCodeDialog from "./DialogEditCode"; +import {selectAuthMenuByMenuKey } from '@/api/system/sysMenuHelp' import codesPanel from "./PanelCreateOrderCodes" @@ -280,7 +281,19 @@ export default { }, data() { return { - + //查看帮助相关 + helpMenuKey: "ioCreateOrderHelp", + help:{ + id: null, + menuKey: null, + menuName: null, + status: null, + filePath: null, + remark: null, + updateTime: null, + helpType: null, + urlPath: null, + }, //单据相关 orderFormData: { billNo: null, @@ -373,6 +386,16 @@ export default { codesPanel, codeDetailPanel, bizDetailPanel, editCodeDialog }, methods: { + //获取查看帮助url + selectAuthMenuByMenuKey() { + let params = {menuKey: this.helpMenuKey} + selectAuthMenuByMenuKey(params).then((res) => { + if (res.code === 20000) { + this.help = res.data; + } + }) + }, + //获取用户仓库列表 findInvListByUser() { this.curInvOptions = []; @@ -666,11 +689,20 @@ export default { } else { this.$alert(response.message, '提示', { confirmButtonText: '确定', + cancelButtonText: "查看帮助", type: 'warning', closeOnClickModal: true, - callback: action => { - this.$refs.inputRef.focus(); - this.$refs.inputRef.select(); + showCancelButton: true, + // callback: action => { + // this.$refs.inputRef.focus(); + // this.$refs.inputRef.select(); + // } + }).then(() => { + }).catch(() => { + let helpType = this.help.helpType; + //为url类型 + if (helpType == 1){ + window.open(this.help.urlPath,'_blank') } }); } @@ -982,6 +1014,7 @@ export default { } this.findInvListByUser(); } + this.selectAuthMenuByMenuKey(); } , } diff --git a/src/views/system/param/addhelpSettings.vue b/src/views/system/param/addhelpSettings.vue index 54a1d82..ffce9e3 100644 --- a/src/views/system/param/addhelpSettings.vue +++ b/src/views/system/param/addhelpSettings.vue @@ -89,7 +89,7 @@ - + 文件 URL @@ -111,7 +111,7 @@ - +
文件: