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 @@ - +
文件: