瀏覽代碼

优化计分样式和功能

songxy 3 周之前
父節點
當前提交
3726cc98bd

+ 1 - 0
web_ui/build/webpack.dev.conf.js

@@ -38,6 +38,7 @@ const devWebpackConfig = merge(baseWebpackConfig, {
       ? { warnings: false, errors: true }
       : false,
     publicPath: config.dev.assetsPublicPath,
+    compress: config.dev.compress,
     proxy: config.dev.proxyTable,
     quiet: true, // necessary for FriendlyErrorsPlugin
     watchOptions: {

+ 3 - 2
web_ui/config/index.js

@@ -1,4 +1,5 @@
 'use strict'
+const { sector } = require('@turf/turf')
 // Template version: 1.3.1
 // see http://vuejs-templates.github.io/webpack for documentation.
 
@@ -6,14 +7,14 @@ const path = require('path')
 
 module.exports = {
   dev: {
-
+    compress: false,
     // Paths
     assetsSubDirectory: 'static',
     assetsPublicPath: '/',
     proxyTable: {
       '/landsiteai': {
         // target: 'http://lq.lianqiai.cn:23001',
-        target: 'https://ai.zrzyt.zj.gov.cn:10086/landsiteai',
+        target: 'https://ai.zrzyt.zj.gov.cn/landsiteai/',
         // target: 'http://localhost:8511',
         // ws: true,
         // onProxyRes: function(proxyRes, req, res) {

+ 39 - 8
web_ui/src/views/industrial-land/AiIndustriaLandDetail.vue

@@ -224,8 +224,8 @@
                       <div>
                         <span>{{ i + 1 }}</span>
                         <span>{{ citem.name }}</span>
+                        <span :class="`score_color color${total_score(citem) < 80 ? '2' : '1'}`">{{total_score(citem)}}分</span>
                       </div>
-                      <div>90分</div>
                       <div @click="toggleContentVisabled(citem)">
                         <template v-if="citem['show']">
                           <span
@@ -258,7 +258,7 @@
                         </p>
                       </div>
                       <div class="land-evaluation">
-                        <p class="title">地块评价:</p>
+                        <p class="evaluation-title">地块评价:</p>
                         <div class="evaluation-item">
                           <span>产业匹配度:</span>
                           <span class="score">{{ citem.cyppd ? (citem.cyppd / 5).toFixed(0) : 0 }}分</span>
@@ -587,6 +587,10 @@ export default {
   },
 
   methods: {
+    total_score (citem) {
+      const total = citem.cyppd + citem.dkcsd + citem.jtblx +citem.ghfhd +citem.dkgzd
+      return total / 5
+    },
     onBackHandle() {
       this.showResult = this.showQuery = this.loading = false;
       this.hzData = [];
@@ -3040,7 +3044,23 @@ export default {
     align-items: center;
     justify-content: space-between;
     margin-bottom: 8px;
-
+    .score_color {
+      padding: 2px 10px;
+      border-radius: 2px;
+      font-size: 13px;
+      font-weight: bold;
+      margin-left: 5px;
+      &.color1 {
+        border: 1px solid #5ac724;
+        color: #5ac724;
+        background: #f6ffed;
+      }
+      &.color2 {
+        border: 1px solid #fa8f1d;
+        color: #fa8f1d;
+        background: #fff2e8;
+      }
+    }
     > div {
       &:first-child {
         color: #2553d5;
@@ -3086,9 +3106,8 @@ export default {
 
   .land-evaluation {
     margin-top: 15px;
-    padding-left: 10px;
 
-    .title {
+    >.evaluation-title {
       font-size: 16px;
       font-weight: bold;
       color: #212121;
@@ -3110,7 +3129,7 @@ export default {
       .score {
         font-weight: bold;
         margin-left: 5px;
-        color: #2553d5;
+        color: #1890ff;
         width: 50px;
       }
 
@@ -3120,11 +3139,23 @@ export default {
         background-color: #f0f0f0;
         border-radius: 4px;
         overflow: hidden;
-
+        position: relative;
         .progress {
           height: 100%;
-          background-color: #2553d5;
+          background-color: rgb(24, 144, 255);
           border-radius: 4px;
+          position: relative;
+          z-index: 99999999;
+        }
+        &::after {
+          content: "";
+          display: block;
+          position: absolute;
+          left: 0px;
+          top: 0px;
+          width: 100%;
+          height: 100%;
+          background: rgba(24, 144, 255, 0.15);
         }
       }
     }

+ 1 - 1
web_ui/static/config.js

@@ -13,7 +13,7 @@
     yjjbntQueryUrl: 'http://localhost:8511/yjjbntQuery', // 永久基本农田查询
 
     // ===================== 分析与AI服务 (8521) =====================
-    landAnalysisUrl: `https://ai.zrzyt.zj.gov.cn:10086/landsiteai/land_analysis/stream`, // 土地分析流
+    landAnalysisUrl: `${landsiteai_base_url}/land_analysis/stream`, // 土地分析流
     kgQueryUrl: `${landsiteai_base_url}/kg-query`, // 知识图谱查询
     klyzyQueryUrl: `${landsiteai_base_url}/klyzy-query`, // 耕地利用状况查询
     populationQueryUrl: `${landsiteai_base_url}/population`, // 人口查询