Sfoglia il codice sorgente

Merge branch 'master' of http://114.55.67.98:8070/Natural_p1/CSPON

# Conflicts:
#	web_ui/src/views/industrial-land/AiIndustriaLandDetail.vue
liutao 2 mesi fa
parent
commit
83adadc595

+ 17 - 1
web_ui/src/components/AIBtn.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="ai-btn">
+  <div :class="{'ai-btn': true, 'disabled': disabled}" @click="clickHandle">
     <img src="~@/assets/image/cyyd/send.png" />
   </div>
 </template>
@@ -7,6 +7,18 @@
 <script>
 export default {
   name: "AIBtn",
+  props: {
+    disabled: {
+      type: Boolean,
+      default: false
+    }
+  },
+  methods: {
+    clickHandle () {
+      if (this.disabled) return;
+      this.$emit('send')
+    }
+  }
 };
 </script>
 
@@ -28,5 +40,9 @@ export default {
     width: 20px;
     height: 20px;
   }
+  &.disabled {
+    background: #ccc !important;
+    cursor: not-allowed;
+  }
 }
 </style>

+ 117 - 50
web_ui/src/views/industrial-land/AiIndustriaLandDetail.vue

@@ -118,7 +118,7 @@
               autofocus=""
             >
             </textarea>
-            <AIBtn @click.native="hotQuestionReset()" />
+            <AIBtn @send="hotQuestionReset()" />
           </div>
         </div>
         <vue-perfect-scrollbar
@@ -157,7 +157,17 @@
                 <div class="name">回答</div>
               </div>
               <p class="xg-des">
-                为您找到以下{{ xgdk ? xgdk.length : 0 }}个地块
+                <span>为您推荐以下{{ xgdk ? xgdk.length : 0 }}个地块:</span>
+                <span @click="toggleContentVisabledAll">
+                  <template v-if="mContentVisabled">
+                    <Icon class="icon" type="ios-arrow-up" />
+                    <span class="text">全部收起</span>
+                  </template>
+                  <template v-else>
+                    <Icon class="icon" type="ios-arrow-down" />
+                    <span class="text">全部展开</span>
+                  </template>
+                </span>
               </p>
               <div class="table-panel">
                 <template v-if="xgdk && xgdk.length > 0">
@@ -170,19 +180,32 @@
                     v-for="(citem, i) in xgdk"
                     :key="i"
                   >
-                    <div class="number">{{ i + 1 }}</div>
-                    <div class="content">
-                      <h3>
-                        {{ citem.ydxz }}
-                      </h3>
-                      <p>
-                        <span class="content-item"
-                          >单元名称:{{ citem.dymc ? citem.dymc : "-" }}</span
-                        >
-                        <span class="content-item"
-                          >行政区:{{ citem.xzqmc ? citem.xzqmc : "-" }}</span
-                        >
-                      </p>
+                    <div class="dk_title">
+                      <div>
+                        <span>{{ i+1 }}</span>
+                        <span>{{ citem.ydxz }}</span>
+                      </div>
+                      <div @click="toggleContentVisabled(citem)">
+                        <template v-if="citem['show']">
+                          <Icon type="ios-arrow-up" />
+                        </template>
+                        <template v-else>
+                          <Icon type="ios-arrow-down" />
+                        </template>
+                      </div>
+                    </div>
+                    <div class="content" v-show="citem['show']">
+                      <p>推荐原因:</p>
+                      <div>
+                        <p>
+                          <span>地块信息:</span>
+                          <span>该地块为一类工业用地(M1),面积36.45亩。</span>
+                        </p>
+                        <p>
+                          <span>位置周边:</span>
+                          <span>该地块位于工业区内,距离机场(萧山国际机场) 4.4km,距高速出入口(萧山南)1.5km,距高铁站(杭州南) 2.8km。</span>
+                        </p>
+                      </div>
                     </div>
                   </div>
                 </template>
@@ -225,7 +248,7 @@
               autofocus=""
             >
             </textarea>
-            <AIBtn @click.native="zwsend" />
+            <AIBtn @send="zwsend" :disabled="btnSendDisabled" />
           </div>
         </vue-perfect-scrollbar>
         <znxz-detail
@@ -327,6 +350,7 @@ export default {
       hzData: [],
       showQuery: false,
       radarShow: false,
+      btnSendDisabled: false,
       input: "",
       hotQestionList: [
         {
@@ -361,6 +385,7 @@ export default {
       activeItem: { id: 1 },
       id: "industriaMap" + new Date().getTime(),
       layers: [],
+      mContentVisabled: true,
       showResult: false,
       showDetail: false,
       zoomLevel: 8,
@@ -566,6 +591,16 @@ export default {
   },
 
   methods: {
+    toggleContentVisabledAll () {
+      this.mContentVisabled = !this.mContentVisabled;
+      this.xgdk.forEach((item) => {
+        item['show'] = this.mContentVisabled
+      })
+    },
+    toggleContentVisabled (item) {
+      item['show'] = item['show'] ? false : true
+      this.mContentVisabled = item['show']
+    },
     mapExtend() {
       // 18级的地图
       L.TileLayer.MyTileLayer2 = L.TileLayer.extend({
@@ -716,7 +751,7 @@ export default {
       this.toggleInfoTab();
       this.toggleTab(0);
     },
-    zwsend() {
+    zwsend () {
       if (!this.zwinputText) {
         this.zwinputText = "帮我在萧山区推荐3宗50-80亩之间的工业用地";
       }
@@ -1510,6 +1545,7 @@ export default {
       if (!this.ctrlAbout) {
         this.ctrlAbout = new AbortController();
       }
+      this.btnSendDisabled = true;
       //todo
       const signal = this.ctrlAbout.signal;
       await fetchEventSource(window.ApplicationConfig.subscribeUrl, {
@@ -1672,6 +1708,7 @@ export default {
       } else {
         if (e.data == "[FINISH]") {
           console.log("SSE连接关闭");
+          T.btnSendDisabled = false;
           T.loading = false;
           T.count = 0;
           if (T.eventSource) {
@@ -2023,7 +2060,7 @@ export default {
           img {
             width: 32px;
             height: 32px;
-            margin-right: 11px;
+            margin-right: 8px;
           }
 
           .right-nr {
@@ -2416,6 +2453,28 @@ export default {
 
         .xg-des {
           margin-bottom: 10px;
+          display: flex;
+          align-content: center;
+          justify-content: space-between;
+          >span {
+            &:first-child {
+              color: #212121;
+            }
+            &:last-child {
+              cursor: pointer;
+              display: flex;
+              align-content: center;
+              justify-content: space-between;
+              .icon {
+                font-size: 20px;
+                margin-right: 2px;
+              }
+              .text {
+                font-size: 14px;
+                color: #777C88;
+              }
+            }
+          }
         }
 
         .table-panel {
@@ -2633,47 +2692,55 @@ export default {
 }
 
 .dkitemchecked {
-  border: 1px solid #007bff;
+  background: rgba(224, 234, 250, 0.4);
 }
 
 .dkitem {
-  display: flex;
   align-items: center;
-  margin-bottom: 20px;
   padding: 10px;
-  background-color: #f8f9fd;
-  border-radius: 8px;
-
-  .number {
-    width: 30px;
-    height: 30px;
-    background-color: #007bff;
-    color: #fff;
+  border-bottom: 1px solid #E4E8ED;
+  cursor: pointer;
+  >.dk_title {
     display: flex;
-    justify-content: center;
     align-items: center;
-    border-radius: 50%;
-    margin-right: 10px;
+    justify-content: space-between;
+    margin-bottom: 8px;
+    >div {
+      &:first-child {
+        color: #2553D5;
+        font-size: 16px;
+        font-weight: bold;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+        overflow: hidden;
+        margin-right: 10px;
+      }
+      &:last-child {
+        color: #777C88;
+        font-size: 20px;
+        cursor: pointer;
+      }
+    }
+  
   }
-
-  .content {
+  >.content {
     flex: 1;
-  }
-
-  .content h3 {
-    margin: 0;
-    font-size: 16px;
-    margin-bottom: 10px;
-  }
-
-  .content p {
-    margin: 5px 0 0;
-    font-size: 14px;
-    color: #666;
-  }
-
-  .content p .content-item {
-    margin-right: 5px;
+    p {
+      color: #212121;
+      margin-top: 5px;
+    }
+    >p {
+      font-size: 16px;
+      font-weight: bold;
+    }
+    >div {
+      >p {
+        font-size: 15px;
+        >span:first-child {
+          font-weight: bold;
+        }
+      }
+    }
   }
 }
 </style>

+ 10 - 10
web_ui/static/config.js

@@ -119,21 +119,21 @@
             // layername: 'nrllm:ecgap_klyzy'
           },
           {
-            name: "开发区",
-            id: "KFQ",
+            name: "工业用地调查",
+            id: "GYYDDC",
             checked: false,
             type: 'geoserver',
-            url: 'https://kjzl.zrzyt.zj.gov.cn/zdzy/geoserver/sde/wms',
-            layername: 'sde:kfq',
+            url: 'https://kjzl.zrzyt.zj.gov.cn/zdzy/geoserver/test/wms',
+            layername: 'test:zjgyydc',
             zindex: 1
           },
           {
-            name: "工业用地调查",
-            id: "GYYDDC",
+            name: "开发区",
+            id: "KFQ",
             checked: false,
             type: 'geoserver',
-            url: 'https://kjzl.zrzyt.zj.gov.cn/zdzy/geoserver/test/wms',
-            layername: 'test:zjgyydc',
+            url: 'https://kjzl.zrzyt.zj.gov.cn/zdzy/geoserver/sde/wms',
+            layername: 'sde:kfq',
             zindex: 1
           }
         ]
@@ -248,7 +248,7 @@
           id: "czkfbj",
           checked: false,
           type: 'tile2',
-          url: 'https://ai.zrzyt.zj.gov.cn/mapserver/GDPProxy226/a119e0e024944866a260798599aa19f4/arcgis/rest/services/GCS330000_2001_YJJBNT_GX/GCS330000_2001_YJJBNT_GX_XSB/MapServer',
+          url: 'https://ai.zrzyt.zj.gov.cn/mapserver/GDPProxy226/789b497aff224fb3b612187decca0586/arcgis/rest/services/GCS330000_2001_CZKFBJ/GCS330000_2001_CZKFBJ_YHCG/MapServer',
           zindex: 1
         },
         {
@@ -256,7 +256,7 @@
           id: "stbhhx",
           checked: false,
           type: 'tile2',
-          url: 'https://ai.zrzyt.zj.gov.cn/mapserver/GDPProxy226/a119e0e024944866a260798599aa19f4/arcgis/rest/services/GCS330000_2001_YJJBNT_GX/GCS330000_2001_YJJBNT_GX_XSB/MapServer',
+          url: 'https://ai.zrzyt.zj.gov.cn/mapserver/zjgt38/9a971693e3e1461b99a66c3a81dc6823/arcgis/rest/services/GCS330000_2001_SQSX_2022/GCS330000_2001_STBHHX_2022/MapServer',
           zindex: 1
         }]
       }