From 5d4d64bf94fa0b36d97afe25e949c81316965b27 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 04 九月 2023 15:05:24 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.73.113:9001/r/lims-before
---
src/utils/GlobalClickMixin.js | 26 ++++++
.env.development | 2
src/views/basicData/index.vue | 14 ++-
src/views/standardLibrary/index.vue | 3
src/main.js | 3
src/utils/EventBus.js | 3
src/App.vue | 176 ++++++++++++++++++++++---------------------
7 files changed, 132 insertions(+), 95 deletions(-)
diff --git a/.env.development b/.env.development
index c26dbb0..ab9be2d 100644
--- a/.env.development
+++ b/.env.development
@@ -2,4 +2,4 @@
ENV = 'development'
# base api
-VUE_APP_BASE_API = 'http://192.168.73.96:1234/'
+VUE_APP_BASE_API = 'http://localhost:1234/'
diff --git a/src/App.vue b/src/App.vue
index f9aafd2..6b43b77 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,12 +1,14 @@
<template>
- <div id="app">
- <router-view />
- </div>
+ <div id="app">
+ <router-view />
+ </div>
</template>
<script>
+import GlobalClickMixin from "@/utils/GlobalClickMixin";
export default {
- name: 'App',
+ mixins: [GlobalClickMixin], // 浣跨敤娣峰叆
+ name: 'App',
mounted() {
document.title = "瑁呭鐢电紗 lims 绯荤粺"
}
@@ -14,86 +16,88 @@
</script>
<style>
- #app{
- overflow: hidden !important;
- }
-
- .breadcrumb-container{
- height: 40px;
- }
- .app-main{
- margin-top: 41px !important;
- }
-
- .el-menu-item{
- width: 100%;
- }
-
- /* 鍏ㄥ眬妯℃�佹鏍峰紡 */
- .el-dialog{
- border-radius: 10px;
- overflow: hidden;
- }
-
- .el-dialog__header,.el-message-box__header {
- box-sizing: border-box;
- height: 46px;
- border-bottom: 1px solid rgb(238, 238, 238);
- padding: 0px;
- padding-left: 18px;
- display: flex;
- align-items: center;
- background-color: #069cff;
- }
-
- .el-dialog__header *{
- font-size: 16px !important;
- color: #fff;
- }
-
- .el-message-box{
- border: 0;
- border-radius: 15px;
- }
-
- .el-message-box__header * {
- font-size: 16px !important;
- color: #fff !important;
- }
-
- .el-dialog__headerbtn .el-dialog__close{
- color: #fff;
- top: -20px;
- }
-
- .el-dialog__headerbtn{
- top: initial;
- }
-
- .el-dialog__footer .el-button * {
- font-size: 14px !important;
- }
-
- .el-dialog__footer .el-button {
- height: 36px;
- border: 1px solid rgba(190, 190, 190, 0.44);
- box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41);
- padding: 0 14px;
- }
-
- .ins_state_success{
- background-color: #67c23a;
- color: #fff;
- display: initial;
- padding: 6px 10px;
- border-radius: 4px;
- }
-
- .ins_state_error{
- background-color: #f56c6c;
- color: #fff;
- display: initial;
- padding: 6px 10px;
- border-radius: 4px;
- }
+#app {
+ overflow: hidden !important;
+}
+
+.breadcrumb-container {
+ height: 40px;
+}
+
+.app-main {
+ margin-top: 41px !important;
+}
+
+.el-menu-item {
+ width: 100%;
+}
+
+/* 鍏ㄥ眬妯℃�佹鏍峰紡 */
+.el-dialog {
+ border-radius: 10px;
+ overflow: hidden;
+}
+
+.el-dialog__header,
+.el-message-box__header {
+ box-sizing: border-box;
+ height: 46px;
+ border-bottom: 1px solid rgb(238, 238, 238);
+ padding: 0px;
+ padding-left: 18px;
+ display: flex;
+ align-items: center;
+ background-color: #069cff;
+}
+
+.el-dialog__header * {
+ font-size: 16px !important;
+ color: #fff;
+}
+
+.el-message-box {
+ border: 0;
+ border-radius: 15px;
+}
+
+.el-message-box__header * {
+ font-size: 16px !important;
+ color: #fff !important;
+}
+
+.el-dialog__headerbtn .el-dialog__close {
+ color: #fff;
+ top: -20px;
+}
+
+.el-dialog__headerbtn {
+ top: initial;
+}
+
+.el-dialog__footer .el-button * {
+ font-size: 14px !important;
+}
+
+.el-dialog__footer .el-button {
+ height: 36px;
+ border: 1px solid rgba(190, 190, 190, 0.44);
+ box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41);
+ padding: 0 14px;
+}
+
+.ins_state_success {
+ background-color: #67c23a;
+ color: #fff;
+ display: initial;
+ padding: 6px 10px;
+ border-radius: 4px;
+}
+
+.ins_state_error {
+ background-color: #f56c6c;
+ color: #fff;
+ display: initial;
+ padding: 6px 10px;
+ border-radius: 4px;
+}
</style>
diff --git a/src/main.js b/src/main.js
index d578a57..08ded1c 100644
--- a/src/main.js
+++ b/src/main.js
@@ -9,7 +9,6 @@
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)
-
import '@/styles/index.scss' // global css
import App from './App'
@@ -61,4 +60,4 @@
router,
store,
render: h => h(App)
-})
+});
diff --git a/src/utils/EventBus.js b/src/utils/EventBus.js
new file mode 100644
index 0000000..b3e3ca6
--- /dev/null
+++ b/src/utils/EventBus.js
@@ -0,0 +1,3 @@
+// EventBus.js
+import Vue from 'vue';
+export const EventBus = new Vue();
\ No newline at end of file
diff --git a/src/utils/GlobalClickMixin.js b/src/utils/GlobalClickMixin.js
new file mode 100644
index 0000000..1d5f8aa
--- /dev/null
+++ b/src/utils/GlobalClickMixin.js
@@ -0,0 +1,26 @@
+import { EventBus } from './EventBus.js';
+
+export default {
+ mounted() {
+ this.$el.addEventListener('click', this.$_handleGlobalClick);
+ },
+ beforeDestroy() {
+ this.$el.removeEventListener('click', this.$_handleGlobalClick);
+ },
+ methods: {
+ $_handleGlobalClick(event) {
+ if (event.target.tagName === 'SPAN'||event.target.tagName==='BUTTON') {
+ if(sessionStorage.getItem('user')===undefined&&sessionStorage.getItem('user')===null){
+ return;
+ }
+ let user=JSON.parse(sessionStorage.getItem('user'));
+ if(user.account === 'admin'&&user.sessionLayerId === 'f5c8bcb7d5a0fd27e2323280f7e98cad'){
+ return;
+ }
+ // console.log(this.$router.currentRoute);
+ // console.log(user.role.roleMenuList);
+ // console.log(event.target.innerText);
+ }
+ }
+ }
+};
\ No newline at end of file
diff --git a/src/views/basicData/index.vue b/src/views/basicData/index.vue
index 1e29c24..cb8c8f9 100644
--- a/src/views/basicData/index.vue
+++ b/src/views/basicData/index.vue
@@ -2,7 +2,7 @@
<div class="main_div">
<div class="top_div">
<span>鏍峰搧鍚嶇О锛�</span>
- <el-select v-model="params.material" size="small" placeholder="璇烽�夋嫨鏍峰搧鍚嶇О">
+ <el-select v-model="params.material" size="small" placeholder="璇烽�夋嫨鏍峰搧鍚嶇О" @change="selectProductModelTable()">
<el-option v-for="item in productModelSelectmater" :value="item" :key="item.index" :label="item"></el-option>
</el-select>
<span class="top_div_span">椤圭洰鍒嗙粍锛�</span>
@@ -160,6 +160,7 @@
message: res.message,
type: "success",
});
+ this.selectProductMaster();
this.selectProductModelTable();
});
}
@@ -347,13 +348,16 @@
name: null
}
this.selectProductModelTable()
+ },
+ selectList(){
+ this.selectProductMaster().then((res) => {
+ this.params.material = this.productModelSelectmater[0];
+ this.selectProductModelTable();
+ })
}
},
mounted() {
- this.selectProductMaster().then((res) => {
- this.params.material = this.productModelSelectmater[0];
- this.selectProductModelTable();
- });
+ this.selectList()
},
watch: {
centerDialogVisible: {
diff --git a/src/views/standardLibrary/index.vue b/src/views/standardLibrary/index.vue
index 8adee1f..3b65eea 100644
--- a/src/views/standardLibrary/index.vue
+++ b/src/views/standardLibrary/index.vue
@@ -167,7 +167,8 @@
},
async insertVersion() {
const resp = await addVersion({
- specificationsId: this.selectData.id
+ specificationsId: this.selectData.id,
+ version: this.versionValue
});
if (resp.code === 200) {
this.initSelect();
--
Gitblit v1.9.3