From 0b72858d245ec76f15d1c1991ee68f256949aa70 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Tue, 23 May 2023 10:13:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=A4=87=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- .env.production | 2 +- .env.test | 2 +- src/api/basic/udiRlCompany.js | 8 + src/permission.js | 17 +- src/router/index.js | 4 +- src/views/basic/product/UdiRlCompany.vue | 69 +- src/views/basic/product/productEdit.vue | 766 +---------------------- vue.config.js | 2 +- 9 files changed, 121 insertions(+), 753 deletions(-) diff --git a/.env.development b/.env.development index 98e61c1..872c505 100644 --- a/.env.development +++ b/.env.development @@ -1,11 +1,11 @@ # 页面标题 -VUE_APP_TITLE = UDI管理系统 +VUE_APP_TITLE = UDI协调平台 # 开发环境配置 ENV = 'development' # 若依管理系统/开发环境 http://api.clborch.com:8190 -VUE_APP_BASE_API = 'http://192.168.0.195:9991' +VUE_APP_BASE_API = 'http://127.0.0.1:9998' # 应用访问路径 例如使用前缀 /admin/ VUE_APP_CONTEXT_PATH = '/' diff --git a/.env.production b/.env.production index 1bb0a0f..ca1a691 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,5 @@ # 页面标题 -VUE_APP_TITLE = UDI管理系统 +VUE_APP_TITLE = UDI协调平台 diff --git a/.env.test b/.env.test index fdfe673..4695071 100644 --- a/.env.test +++ b/.env.test @@ -1,5 +1,5 @@ # 页面标题 -VUE_APP_TITLE = UDI管理系统 +VUE_APP_TITLE = UDI协调平台 # 生产环境配置 ENV = 'test' diff --git a/src/api/basic/udiRlCompany.js b/src/api/basic/udiRlCompany.js index 98dcf42..16f22a5 100644 --- a/src/api/basic/udiRlCompany.js +++ b/src/api/basic/udiRlCompany.js @@ -21,6 +21,14 @@ export function filterByUuid(query) { ) } +export function updateRel(query) { + return axios({ + url: "/udi/basic/rel/update", + method: "post", + data: query + }); +} + export function seachCompany(query) { return axios( diff --git a/src/permission.js b/src/permission.js index 1e9636d..f4b3f44 100644 --- a/src/permission.js +++ b/src/permission.js @@ -1,12 +1,12 @@ import router from "./router"; import store from "./store"; -import { Message } from "element-ui"; +import {Message} from "element-ui"; import NProgress from "nprogress"; import "nprogress/nprogress.css"; -import { getToken } from "@/utils/auth"; -import { isRelogin } from "@/utils/request"; +import {getToken} from "@/utils/auth"; +import {isRelogin} from "@/utils/request"; -NProgress.configure({ showSpinner: false }); +NProgress.configure({showSpinner: false}); const whiteList = [ "/login", @@ -15,15 +15,17 @@ const whiteList = [ "/register", "/userInformation", "/improveInfo", + "/myLogin" ]; router.beforeEach((to, from, next) => { + debugger NProgress.start(); if (getToken()) { to.meta.title && store.dispatch("settings/setTitle", to.meta.title); /* has token*/ if (to.path === "/login") { - next({ path: "/" }); + next({path: "/"}); NProgress.done(); } else { if (store.getters.roles.length === 0) { @@ -36,13 +38,13 @@ router.beforeEach((to, from, next) => { store.dispatch("GenerateRoutes").then((accessRoutes) => { // 根据roles权限生成可访问的路由表 router.addRoutes(accessRoutes); // 动态添加可访问路由表 - next({ ...to, replace: true }); // hack方法 确保addRoutes已完成 + next({...to, replace: true}); // hack方法 确保addRoutes已完成 }); }) .catch((err) => { store.dispatch("LogOut").then(() => { Message.error(err); - next({ path: "/" }); + next({path: "/"}); }); }); } else { @@ -53,6 +55,7 @@ router.beforeEach((to, from, next) => { // 没有token if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入 + debugger next(); } else { next(`/login?redirect=${to.fullPath}`); // 否则全部重定向到登录页 diff --git a/src/router/index.js b/src/router/index.js index b12e8d9..6e0abe2 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -43,7 +43,7 @@ export const constantRoutes = [ }, { path: "/login", - component: (resolve) => require([`@/views/myLogin`], resolve), + component: (resolve) => require([`@/views/myLogin1`], resolve), hidden: true, }, { @@ -53,7 +53,7 @@ export const constantRoutes = [ }, { path: "/register", - component: (resolve) => require([`@/views/register`], resolve), + component: (resolve) => require([`@/views/myLogin`], resolve), hidden: true, }, { diff --git a/src/views/basic/product/UdiRlCompany.vue b/src/views/basic/product/UdiRlCompany.vue index a894bcd..0c34a24 100644 --- a/src/views/basic/product/UdiRlCompany.vue +++ b/src/views/basic/product/UdiRlCompany.vue @@ -90,6 +90,7 @@ @@ -125,6 +126,39 @@ > + + + +
+ 提交 + + 取消 + +
+
+ + { + if (response.code == 20000) { + this.getList(); + this.cancelDialog(); + this.editDiDialogVisible = false; + } else { + this.$message.error(response.message); + } + }) + .catch(() => { + this.cancelDialog(); + }); + }, } , mounted() { @@ -366,7 +430,8 @@ export default { selectErp, selectLocalUdi, selectProduct, - selectDetail + selectDetail, ProductEdit + } , created() { diff --git a/src/views/basic/product/productEdit.vue b/src/views/basic/product/productEdit.vue index 0553ef8..349ee8d 100644 --- a/src/views/basic/product/productEdit.vue +++ b/src/views/basic/product/productEdit.vue @@ -2,32 +2,10 @@
- - - - - - - - - - - - - -
产品标识:
-
- 解绑DI器械信息 - -
+ > - + - - -
- + - - - - - - - - - - - - @@ -94,6 +39,7 @@ @@ -102,471 +48,60 @@ - - - - - - - - - - - - - + - + - - + + - - - - - - - + > + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - -
- - - 参数 - - - - 设置 - - - - 参数设置说明 - - - - - - - - 是否禁用 - - - - - - - - - - - 是否禁用 - - - - - - 是否寄售 - - - - - - - - - - - 是否寄售 - - - - - - 最小包装可使用次数 - - - - - - - - 最小包装可使用次数 - - - - - - 启用使用单元 - - - - - - - - - - - 启用使用单元 - - - - - - 多次/重复使用耗材 - - - - - - - - - - - 多次/重复使用耗材 - - - - - - 是否可配送 - - - - - - - - - - - 是否可配送 - - - - - - 是否集采产品 - - - - - - - - - - - 是否集采产品 - - - - - - 允许无批次 - - - - - - - - - - - 允许无批次 - - - - - - - 允许无失效日期 - - - - - - - - - - - - 允许无失效日期 - - - - - - - 允许无生产日期 - - - - - - - - - - - - - 允许无生产日期 - - - - - - - - - 允许无序列号 - - - - - - - - - - - - - 允许无序列号 - - - - - - - - 是否必须维护资质材料 - - - - - - - - - - - 是否必须维护资质材料 - - - - - - 使用周期 - - - - - - - - 使用周期(天) - - - - -
-
-
- - - - - - -
- 提交 - - 取消 - -
-
@@ -578,7 +113,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, getOneName } from '@/api/basic/basicHospType' +import {getListMenu, getOneName} from '@/api/basic/basicHospType' export default { @@ -592,26 +127,6 @@ export default { type: Object, required: true, }, - relId: { - type: Object, - required: true, - }, - thisData: { - type: Object, - required: true, - }, - productRemarkSet: { - type: Object, - required: true, - }, - relevanceEdit: { - type: Object, - required: true, - }, - productType: { - type: Object, - required: true, - }, closePre: { type: Function, required: true, @@ -620,194 +135,21 @@ export default { data() { return { - isUseDyCheck: true, - useNumEnable: true, - sysList: [], + loading: false, detailList: [], - fromDeptOptions: [], - defaultSys: null, - isImport: false, - selectErpDialogVisible: false, //选入ERP产品 - editSingleDiDialogVisible: false, - editSingleFormat: { - uuid: null, - relId: null, - sptm: null, - packUnit: null, - measname: null, - nameCode: null - }, } }, - components: { - selectErp, - ProductSingleEdit, - Treeselect - }, + components: {}, created() { - this.useMutiChange(true) - this.getThirdSysDetail(); - if (this.editQuery.isDateBy == 1) { - this.editQuery.recentDateTime = this.editQuery.recentDateTime / 24; - } - this.getTreeselect(); let ttquery = { - id: this.relevanceEdit.id + uuid: this.uuid } this.getDetailList(ttquery); }, methods: { - diableChange() { - let query = { - relId: this.pId - } - disableUdi(query) - .then((response) => { - if (response.code != 20000) { - this.editQuery.isDisable = false; - this.$message.error(response.message); - } - - }) - .catch(() => { - this.loading = false; - this.detailList = []; - }); - }, - addSelectErp(row) { - this.defaultSys = row.sysId; - this.isImport = false; - this.selectErpDialogVisible = true; - }, - removeDi() { - this.$confirm("此操作将解除该绑定DI器械信息, 是否继续?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(() => { - let query = { - relId: this.editQuery.id, - }; - removeDiRl(query) - .then((response) => { - if (response.code == 20000) { - this.$message({ - type: "success", - message: "解绑成功!", - }); - this.$emit("closePre", true); - this.cancelDialog(); - } else { - this.$message.error(response.message); - } - }) - .catch(() => { - }); - }) - .catch(() => { - }); - }, cancelDialog() { this.editSingleDiDialogVisible = false; }, - singleDiEdit(val) { - let temp = val; - this.editSingleFormat.uuid = temp.uuid; - this.editSingleFormat.id = temp.id; - this.editSingleFormat.sptm = temp.sptm; - this.editSingleFormat.packUnit = temp.packUnit; - this.editSingleFormat.measname = temp.measname; - this.editSingleFormat.nameCode = temp.nameCode; - this.editSingleFormat.cpmctymc = temp.cpmctymc; - this.editSingleDiDialogVisible = true; - }, - onAddSingleSubmit() { - updatetSingleUdiInfo(this.editSingleFormat) - .then((response) => { - if (response.code == 20000) { - let ttquery = { - id: this.relevanceEdit.id - } - this.getDetailList(ttquery); - this.editSingleDiDialogVisible = false; - } else { - this.$message.error(response.message); - } - }) - .catch(() => { - this.cancelDialog(); - }); - }, - removeErp(row) { - this.$confirm("此操作将解除该绑定产品信息, 是否继续?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(() => { - let query = { - relId: this.relId, - thirdSys: row.sysId - }; - removeRl(query) - .then((response) => { - if (response.code == 20000) { - this.$message({ - type: "success", - message: "删除成功!", - }); - this.getThirdSysDetail(); - } else { - this.$message.error(response.message); - } - }) - .catch(() => { - }); - }) - .catch(() => { - }); - }, - useDyCheckChange(val) { - this.editQuery.useNum = 0; - }, - useDyCountChange(val) { - if (val) { - this.editQuery.useNum = this.editQuery.zxxsbzbhsydysl; - } else { - this.editQuery.useNum = 0; - } - }, - getThirdSysDetail() { - let query = { - id: this.relevanceEdit.id, - }; - thirdSysDetail(query) - .then((response) => { - this.loading = false; - this.sysList = response.data.list || []; - this.resetThirdId(); - }) - .catch(() => { - this.loading = false; - this.sysList = []; - }); - }, - resetThirdId() { - this.sysList.forEach((item) => { - if (item.sysId === "thirdId") { - this.editQuery.thirdId = item.thirdId; - } else if (item.sysId === "thirdId1") { - this.editQuery.thirdId1 = item.thirdId; - } else if (item.sysId === "thirdId2") { - this.editQuery.thirdId2 = item.thirdId; - } else if (item.sysId === "thirdId3") { - this.editQuery.thirdId3 = item.thirdId; - } else if (item.sysId === "thirdId4") { - this.editQuery.thirdId4 = item.thirdId; - } - }) - }, getDetailList(detailQuery) { this.loading = true; filterByUuid(detailQuery) @@ -820,56 +162,6 @@ export default { this.detailList = []; }); }, - useMutiChange(val) { - if (val) { - this.useNumEnable = false; - // this.editQuery.useNum = this.editQuery.zxxsbzbhsydysl; - if (!isBlank(this.editQuery.zxxsbzbhsydysl)) { - if (this.editQuery.zxxsbzbhsydysl > 0) { - this.isUseDyCheck = true; - } - } - } else { - this.useNumEnable = true; - this.editQuery.useNum = 0; - } - }, - closeDialog() { - this.selectErpDialogVisible = false; - }, - closeUdi(val) { - this.selectErpDialogVisible = false; - this.getThirdSysDetail(); - }, - groupBuyChange() { - if (this.editQuery.groupBuy == true) { - this.editQuery.dispatch = true; - } else { - this.editQuery.dispatch = false; - } - }, - getTreeselect() { - 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) { - if (node.children && !node.children.length) { - delete node.children; - } - return { - id: node.code, - label: node.name, - children: node.children - }; - }, } } diff --git a/vue.config.js b/vue.config.js index 279d836..d44a301 100644 --- a/vue.config.js +++ b/vue.config.js @@ -7,7 +7,7 @@ function resolve(dir) { const CompressionPlugin = require("compression-webpack-plugin"); -const name = process.env.VUE_APP_TITLE || "UDI管理系统"; // 网页标题 +const name = process.env.VUE_APP_TITLE || "UDI协调平台"; // 网页标题 const port = process.env.port || process.env.npm_config_port || 80; // 端口