Forráskód Böngészése

fixed:修改单位产生的一系列问题

nahida 1 éve
szülő
commit
981b60bf89

+ 4 - 0
src/utils/toFixedWithoutRounding.js

@@ -0,0 +1,4 @@
+export function toFixedWithoutRounding(num, fixed) {
+  let factor = Math.pow(10, fixed);
+  return Math.trunc(num * factor) / factor;
+}

+ 1 - 1
src/views/BusDynamics/OPCMonitoring/index.vue

@@ -10,7 +10,7 @@
         <el-option label="年度" :value="5" :disabled="isForbidden">年度</el-option>
       </el-select>
     </div>
-    <div style="float: right;font-weight: 600">单位/(元)</div>
+    <div style="float: right;font-weight: 600">单位/(元)</div>
     <div v-show="showIndex == 1" ref="echartsRef" style="width: 80vw; height: 80vh;"></div>
     <div v-show="showIndex == 2" ref="echartsRef3" style="width: 80vw; height: 80vh;"></div>
     <div v-show="showIndex == 3" ref="echartsRef4" style="width: 80vw; height: 80vh;"></div>

+ 1 - 1
src/views/BusDynamics/TaxMonitoring/index.vue

@@ -10,7 +10,7 @@
         <el-option label="年度" :value="5" :disabled="isForbidden">年度</el-option>
       </el-select>
     </div>
-    <div style="float: right;font-weight: 600">单位/(元)</div>
+    <div style="float: right;font-weight: 600">单位/(元)</div>
     <div v-show="showIndex == 1" ref="echartsRef" style="width: 80vw; height: 80vh;"></div>
     <div v-show="showIndex == 2" ref="echartsRef3" style="width: 80vw; height: 80vh;"></div>
     <div v-show="showIndex == 3" ref="echartsRef4" style="width: 80vw; height: 80vh;"></div>

+ 1 - 1
src/views/BusDynamics/czjsqy/index.vue

@@ -10,7 +10,7 @@
         <el-option label="年度" :value="5" :disabled="isForbidden">年度</el-option>
       </el-select>
     </div>
-    <div style="float: right;font-weight: 600">单位/(元)</div>
+    <div style="float: right;font-weight: 600">单位/(元)</div>
     <div v-show="showIndex == 1" ref="echartsRef" style="width: 80vw; height: 80vh;"></div>
     <div v-show="showIndex == 2" ref="echartsRef3" style="width: 80vw; height: 80vh;"></div>
     <div v-show="showIndex == 3" ref="echartsRef4" style="width: 80vw; height: 80vh;"></div>

+ 11 - 2
src/views/BusDynamics/sjtjzl/index.vue

@@ -148,7 +148,15 @@
       </template>
 
       <template v-for="(col, index) in needShow" :key="index">
-        <el-table-column v-if="col.includes('dr')" sortable :prop="col" :label="colMap.get(col)" width="180" align="right"/>
+        <el-table-column v-if="col == 'dr'" sortable :prop="col" :label="colMap.get(col)" width="180" align="right"/>
+      </template>
+
+      <template v-for="(col, index) in needShow" :key="index">
+        <el-table-column v-if="col == 'dr1'" sortable :prop="col" :label="colMap.get(col)" width="180" align="right">
+          <template #default="{row}">
+            {{ toFixedWithoutRounding(row.dr1,2) }}
+          </template>
+        </el-table-column>
       </template>
 
       <template v-for="(col, index) in needShow" :key="index">
@@ -558,6 +566,7 @@
 import {computed, ref, watch} from "vue";
 import {getCheckList} from "@/api/basicData/sjtjzl"
 import {getInfo} from "@/api/login"
+import {toFixedWithoutRounding} from '@/utils/toFixedWithoutRounding'
 import {ElMessage} from "element-plus";
 import {colMap} from "./colMap";
 import * as XLSX from 'xlsx';
@@ -771,7 +780,7 @@ const getSummaries = (param) => {
         sums[index] += until;
       } else if (column.property == "dr1") {
         sums[index] = sums[index].toFixed(2);
-        until = "元";
+        until = "元";
         sums[index] += until;
       } else if (column.property == "dd" || column.property == "de" || column.property == "df") {
         until = "条";

+ 1 - 1
src/views/BusDynamics/ssjsqy/index.vue

@@ -10,7 +10,7 @@
         <el-option label="年度" :value="5" :disabled="isForbidden">年度</el-option>
       </el-select>
     </div>
-    <div style="float: right;font-weight: 600">单位/(元)</div>
+    <div style="float: right;font-weight: 600">单位/(元)</div>
     <div v-show="showIndex == 1" ref="echartsRef" style="width: 80vw; height: 80vh;"></div>
     <div v-show="showIndex == 2" ref="echartsRef3" style="width: 80vw; height: 80vh;"></div>
     <div v-show="showIndex == 3" ref="echartsRef4" style="width: 80vw; height: 80vh;"></div>

+ 1 - 1
src/views/visualization/index.vue

@@ -30,7 +30,7 @@
         </div>
 
         <div class="leftTwoBox">
-          <div class="leftGDPTitle">园区生产总值(元)</div>
+          <div class="leftGDPTitle">园区生产总值(元)</div>
           <div class="leftGDPContent">
             <baseEcharts :NamechartData="NamechartData" :ArrOneData="ArrOneData" :ArrTwoData="ArrTwoData">
             </baseEcharts>

+ 20 - 20
vite.config.js

@@ -8,27 +8,27 @@ import * as fs from "node:fs";
 let dev = {
   // shaoyang: `http://42.48.99.5:20002`
   // shaoyang: `http://192.168.110.235:20002`
-  shaoyang: `https://192.168.110.13:20002`
+  shaoyang: `http://192.168.110.13:20002`
 }
-export default defineConfig(({ mode, command }) => {
-  const env = loadEnv(mode, process.cwd())
-  const { VITE_APP_ENV } = env
-  return {
-    // base: VITE_APP_ENV === 'production' ? '/qyxyfjflgl/' : '/',
-    base: '/qyxyfjflgl/',
-    plugins: createVitePlugins(env, command === 'build'),
-    resolve: {
-      // https://cn.vitejs.dev/config/#resolve-alias
-      alias: {
-        // 设置路径
-        '~': path.resolve(__dirname, './'),
-        // 设置别名
-        '@': path.resolve(__dirname, './src')
-      },
-      // https://cn.vitejs.dev/config/#resolve-extensions
-      extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
-    },
-    // vite 相关配置
+    export default defineConfig(({ mode, command }) => {
+      const env = loadEnv(mode, process.cwd())
+      const { VITE_APP_ENV } = env
+      return {
+        base: VITE_APP_ENV === 'production' ? '/qyxyfjflgl/' : '/',
+        // base: '/qyxyfjflgl/',
+        plugins: createVitePlugins(env, command === 'build'),
+        resolve: {
+          // https://cn.vitejs.dev/config/#resolve-alias
+          alias: {
+            // 设置路径
+            '~': path.resolve(__dirname, './'),
+            // 设置别名
+            '@': path.resolve(__dirname, './src')
+          },
+          // https://cn.vitejs.dev/config/#resolve-extensions
+          extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
+        },
+        // vite 相关配置
 
     server: {
       port: 8081,