Ver Fonte

feat: 之前未提交的部分

sunxiao há 2 meses atrás
pai
commit
4ad00b0225

+ 1 - 1
.env.development

@@ -5,7 +5,7 @@ VITE_APP_TITLE = 智能国标化验室数据平台
 VITE_APP_ENV = 'development'
 
 # 管理系统/开发环境
-VITE_APP_BASE_API =  http://10.0.0.28:8889
+VITE_APP_BASE_API = http://192.168.40.21:8080
 
 # VITE_APP_BASE_TEST = http://10.0.0.28:8080/
 # VITE_APP_BASE_PROD = http://192.168.9.54:8080/

+ 1 - 1
.env.production

@@ -5,7 +5,7 @@ VITE_APP_TITLE = 智能国标化验室数据平台
 VITE_APP_ENV = 'production'
 
 # 管理系统/生产环境
-VITE_APP_BASE_API = 'http://192.168.40.20:8899'
+VITE_APP_BASE_API = 'http://192.168.40.18:8080'
 
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip

+ 1 - 1
src/router/index.js

@@ -161,7 +161,7 @@ export const dynamicRoutes = [
 ]
 
 const router = createRouter({
-  history: createWebHashHistory(),
+  history: createWebHashHistory(("/sjzc/")),
   routes: constantRoutes,
   scrollBehavior(to, from, savedPosition) {
     if (savedPosition) {

+ 15 - 12
src/views/report/detection-month/index.vue

@@ -67,16 +67,16 @@ const getStartTimeAndEndTime = () => {
 }
 
 const formatter = (row, column) => {
-    const { title, ratesDeviationNumber }= row;
-    const { no } = column;
- 
+    const { title }= row;
+    const { no, property } = column;
+   
     if (  title === '合格率偏差' && no != 0 && no != columns.value.length - 1 ) {
-      const val = row[column.property];
-  
-      if (!ratesDeviationNumber && ratesDeviationNumber != 0) return '';
+      const val = row[property + 'ratesDeviationNumber'];
   
+      if (!val && val != 0) return '';
+
       return h('span', {
-        style: { color: ratesDeviationNumber != 0 ? 'red' : '#606266' },
+        style: { color: val > 0 ? 'red' : '#606266' },
       }, row[column.property])
     }
 
@@ -101,19 +101,20 @@ const initPageData = async() => {
   let zkTotal = 0;
   
   const middleData = Object.entries(data).map(([key, value]) => {
-    assayTotal += value['assayCounts']
-    zkTotal += value['zkCounts']
+    assayTotal += value['assayCounts'];
+    zkTotal += value['zkCounts'];
     return {
       label: key,
       prop: key,
       minWidth: 160
     }
   });
-  
+
   const tableResultData = whiteTableList.map(item => {
     const { key } = item;
     
     Object.entries(data).forEach(([k, v]) => {
+  
       let total = '';
       
       if ( key === 'assayCounts' ) total = assayTotal;
@@ -123,13 +124,15 @@ const initPageData = async() => {
       item = {
         total: total === '' ? '' : total,
         ...item,
+        [k]: v[key],
         ratesDeviationNumber: v['ratesDeviationNumber'],
-        [k]: v[key]
+        [k + 'ratesDeviationNumber']: v['ratesDeviationNumber'],
       }
     });
+
     return item;
   })
-  console.log(tableResultData)
+
   if ( middleData.length ) {
     columns.value = [
       { label: '检测指标', width: 200, prop: 'title' },

+ 1 - 1
src/views/report/laboratory-month/index.vue

@@ -233,7 +233,7 @@ const test = (key, item) => {
     
     const num = Number(n.replace('%', ''))
 
-    if ( (num || num == 0) && num > 90 ) {
+    if ( (num || num == 0) && num < 90 ) {
       color = 'red'
     }
   }

+ 1 - 1
vite.config.js

@@ -11,7 +11,7 @@ export default defineConfig(({ mode, command }) => {
     // 部署生产环境和开发环境下的URL。
     // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
     // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
-    base: VITE_APP_ENV === 'production' ? '/' : '/',
+    base: VITE_APP_ENV === 'production' ? '/sjzc/' : '/sjzc/',
     plugins: createVitePlugins(env, command === 'build'),
     resolve: {
       // https://cn.vitejs.dev/config/#resolve-alias