From 074f334d060ec7d33d39cdeaae5ed84a2a2dd3a3 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 22 八月 2023 18:20:59 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmMes
---
screen_standard/src/components/AppLayout.vue | 2 +-
screen_standard/src/utils/request.js | 2 +-
screen_standard/index.html | 2 +-
screen_standard/src/router/index.js | 3 ++-
screen_standard/public/favicon.ico | 0
screen_standard/.env.development | 4 ++--
screen_standard/src/views/process.vue | 1 +
screen_standard/src/views/index.vue | 13 ++++++-------
screen_standard/vite.config.js | 7 ++++---
9 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/screen_standard/.env.development b/screen_standard/.env.development
index 817bfd7..324ad85 100644
--- a/screen_standard/.env.development
+++ b/screen_standard/.env.development
@@ -2,5 +2,5 @@
VITE_NAME='寮�鍙戠幆澧�'
VITE_BASE_CONTEXT=''
-VITE_BASE_PATH=''
-VITE_BASE_URL='http://192.168.0.35:10021/'
\ No newline at end of file
+VITE_BASE_PATH='/api'
+VITE_BASE_PATH='http://192.168.0.35:10021/'
\ No newline at end of file
diff --git a/screen_standard/index.html b/screen_standard/index.html
index 99f583a..72fa53f 100644
--- a/screen_standard/index.html
+++ b/screen_standard/index.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Vite App</title>
+ <title>DM浜戝伐鍘�</title>
</head>
<body>
<div id="app"></div>
diff --git a/screen_standard/public/favicon.ico b/screen_standard/public/favicon.ico
index df36fcf..deac355 100644
--- a/screen_standard/public/favicon.ico
+++ b/screen_standard/public/favicon.ico
Binary files differ
diff --git a/screen_standard/src/components/AppLayout.vue b/screen_standard/src/components/AppLayout.vue
index 718e0de..c5715f1 100644
--- a/screen_standard/src/components/AppLayout.vue
+++ b/screen_standard/src/components/AppLayout.vue
@@ -148,7 +148,7 @@
enterprise.setDepartId(data.tempCom.id)
})
.catch(err => {})
- const week = ['鏄熸湡涓�', '鏄熸湡浜�', '鏄熸湡涓�', '鏄熸湡鍥�', '鏄熸湡浜�', '鏄熸湡鍏�', '鏄熸湡鏃�',]
+ const week = ['鏄熸湡涓�', '鏄熸湡浜�', '鏄熸湡涓�', '鏄熸湡鍥�', '鏄熸湡浜�', '鏄熸湡鍏�', '鏄熸湡鏃�']
setInterval(() => {
let date = new Date()
data.tempDate = {
diff --git a/screen_standard/src/router/index.js b/screen_standard/src/router/index.js
index 8d7c178..c8239a7 100644
--- a/screen_standard/src/router/index.js
+++ b/screen_standard/src/router/index.js
@@ -4,7 +4,8 @@
import processView from '../views/process.vue'
const router = createRouter({
- history: createWebHistory(import.meta.env.BASE_URL),
+
+ history: createWebHistory(import.meta.env.VITE_BASE_CONTEXT),
routes: [
{
path: '/',
diff --git a/screen_standard/src/utils/request.js b/screen_standard/src/utils/request.js
index b07cabc..0133041 100644
--- a/screen_standard/src/utils/request.js
+++ b/screen_standard/src/utils/request.js
@@ -2,7 +2,7 @@
import { ElMessage } from 'element-plus';
const axiosInstance = axios.create({
- baseURL: '/api',
+ baseURL: import.meta.env.VITE_BASE_PATH,
headers: {'Content-Type': 'application/json'},
timeout: 60000
});
diff --git a/screen_standard/src/views/index.vue b/screen_standard/src/views/index.vue
index 752c08e..3cb26ac 100644
--- a/screen_standard/src/views/index.vue
+++ b/screen_standard/src/views/index.vue
@@ -15,7 +15,7 @@
<div class="content_left_item1_content_row_line">
<el-progress
:show-text="false"
- :percentage="item.doneNum">
+ :percentage="item.doneNum / baseNum">
</el-progress>
</div>
<div class="content_left_item1_content_row_num">{{ item.doneNum }}</div>
@@ -207,8 +207,11 @@
patrolInspection: [],
dayDistribution: [],
typeDistribution: [],
- num: 0
+ num: 0,
+ baseNum: 0
})
+
+ let { baseNum } = toRefs(data)
let timer = ref(null)
let timer1 = ref(null)
@@ -293,11 +296,7 @@
getTop(companyId.value, departId.value)
.then(res => {
if (res.length > 0) {
- res.forEach((item, index) => {
- if (index > 1) {
- item.doneNum1 = res[0].doneNum / item.doneNum
- }
- })
+ data.baseNum = res[0].doneNum
data.production = res
}
})
diff --git a/screen_standard/src/views/process.vue b/screen_standard/src/views/process.vue
index 20f08bc..154b1ba 100644
--- a/screen_standard/src/views/process.vue
+++ b/screen_standard/src/views/process.vue
@@ -719,6 +719,7 @@
display: flex;
align-items: center;
justify-content: center;
+ font-size: 13px;
}
}
}
diff --git a/screen_standard/vite.config.js b/screen_standard/vite.config.js
index fd10edf..6843aff 100644
--- a/screen_standard/vite.config.js
+++ b/screen_standard/vite.config.js
@@ -11,8 +11,9 @@
// https://vitejs.dev/config/
export default defineConfig(({mode, command}) => {
let env = loadEnv(mode, process.cwd(), '')
- console.log(env.NODE_ENV);
+ // console.log(env.NODE_ENV);
return {
+ base:env.VITE_BASE_CONTEXT,
plugins: [
vue(),
vueJsx(),
@@ -42,11 +43,11 @@
open: true, // 鍦ㄦ湇鍔″櫒鍚姩鏃惰嚜鍔ㄥ湪娴忚鍣ㄤ腑鎵撳紑搴旂敤绋嬪簭
//鍙嶅悜浠g悊閰嶇疆锛屾敞鎰弐ewrite鍐欐硶锛屽紑濮嬫病鐪嬫枃妗e湪杩欓噷韪╀簡鍧�
proxy: { // 鏈湴寮�鍙戠幆澧冮�氳繃浠g悊瀹炵幇璺ㄥ煙锛岀敓浜х幆澧冧娇鐢� nginx 杞彂
- '/api': {
+ [env.VITE_BASE_PATH] : {
target: env.VITE_BASE_URL, // 閫氳繃浠g悊鎺ュ彛璁块棶瀹為檯鍦板潃銆傝繖閲屾槸瀹為檯璁块棶鐨勫湴鍧�銆倂ue浼氶�氳繃浠g悊鏈嶅姟鍣ㄦ潵浠g悊璇锋眰
changeOrigin: true,
ws: false, // 鍏佽websocket浠g悊
- rewrite: (path) => path.replace(/^\/api/, '') // 灏哸pi鏇挎崲涓虹┖
+ rewrite: (path) => path.replace(/^\[env.VITE_BASE_PATH]/, '') // 灏哸pi鏇挎崲涓虹┖
}
}
}
--
Gitblit v1.9.3