From 6247b8d7cb8e8317a2f7ec4a5979e62ca1a3f90c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Thu, 20 Apr 2023 15:05:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E8=B4=A8=E5=88=86=E7=B1=BB=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/basic/basicHospType.js | 9 +++++ src/views/basic/product/productEdit.vue | 17 +++++---- src/views/basic/product/productUdiType.vue | 35 ++++++++++++------- .../thirdSys/product/thrProductsExport.vue | 7 ++-- 4 files changed, 45 insertions(+), 23 deletions(-) diff --git a/src/api/basic/basicHospType.js b/src/api/basic/basicHospType.js index 766b347..b7a7d02 100644 --- a/src/api/basic/basicHospType.js +++ b/src/api/basic/basicHospType.js @@ -13,12 +13,21 @@ export function getBasicHospType(query) { export function getListMenu(query) { return axios({ url: "/udiwms/basic/hosp/type/menuList", + method: "post", + data: query + }); +} + +export function getOneName(query) { + return axios({ + url: "/udiwms/basic/hosp/type/getOneName", method: "get", params: query }); } + export function saveBasicHospType(query) { return axios({ url: "/udiwms/basic/hosp/type/save", diff --git a/src/views/basic/product/productEdit.vue b/src/views/basic/product/productEdit.vue index ae69725..0553ef8 100644 --- a/src/views/basic/product/productEdit.vue +++ b/src/views/basic/product/productEdit.vue @@ -578,7 +578,7 @@ import ProductSingleEdit from "@/views/basic/product/productSingleEdit"; import selectErp from "./udiInfoselectErpUdi"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import Treeselect from "@riophae/vue-treeselect"; -import {getListMenu} from "@/api/basic/basicHospType"; +import { getListMenu, getOneName } from '@/api/basic/basicHospType' export default { @@ -849,12 +849,15 @@ export default { } }, getTreeselect() { - getListMenu().then(response => { - this.fromDeptOptions = []; - const menu = {id: 0, name: '主类目', children: []}; - menu.children = this.handleTree(response.data, "code", "parentCode"); - this.fromDeptOptions.push(menu); - }); + getOneName().then(res =>{ + const menu = {id: res.data.id,code:res.data.code, name: res.data.name, children: []}; + getListMenu({}).then(response => { + this.fromDeptOptions = []; + menu.children = this.handleTree(response.data,"code", "parentCode"); + console.log(menu) + this.fromDeptOptions.push(menu); + }); + }) }, /** 转换菜单数据结构 */ normalizer(node) { diff --git a/src/views/basic/product/productUdiType.vue b/src/views/basic/product/productUdiType.vue index fb186aa..1dc4bdd 100644 --- a/src/views/basic/product/productUdiType.vue +++ b/src/views/basic/product/productUdiType.vue @@ -32,7 +32,7 @@