Explorar el Código

新加页面二调整

liangluogis hace 5 meses
padre
commit
8e3eea0474

+ 2 - 1
public/config.js

@@ -13,7 +13,8 @@ export const iserverConfig = {
 }
 export const getResultList={
   coordinatedEvaluationUrl:"http://221.182.8.141:7021/data/response.json",
-  analyseDataUrl:"http://221.182.8.141:7021/analyze_epc_synergy"
+  analyseDataUrl:"http://221.182.8.141:7021/analyze_epc_synergy",
+  problemUrl:"http://221.182.8.141:7022/data/response.json",
 };
 export const appconfig = {
   // 底图是否采用在线地图,true在线,false离线

+ 17 - 13
src/views/groupPage/districtPageModules/decisionSupport/coordinatedEvaluation/StatisticalRisk.vue

@@ -38,14 +38,14 @@
             <span class="resultTitle" >{{resultTitle}}:</span>
             <span class="resultValue" :title="resultValue">{{resultValue}}</span>
           </div>
-          <div class="rankPmd">
+          <div class="rankPmd" v-if="problemlist.length>0">
             <el-carousel @change="changeCarousel"  trigger="click" height="70px">
-              <el-carousel-item v-for="(i, k) in list" :key="k">
+              <el-carousel-item v-for="(i, k) in problemlist" :key="k">
                 <span>{{ i.problem }}</span>
                 <i>{{ i.correction }}</i>
               </el-carousel-item>
             </el-carousel>
-            <div v-if="list.length>0" class="pageInfo">{{(currentIndex+1)+"/"+list.length}}</div>
+            <div  class="pageInfo">{{(currentIndex+1)+"/"+problemlist.length}}</div>
           </div>
         </div>
       </div>
@@ -132,6 +132,19 @@ export default {
         name:"02 宜昌二期“两网”项目部周例会第2期会议纪要 20200923",
       }]
     },//列表数据
+    problemlist:{
+      type:Array,
+      default:()=>[
+        {
+          problem: '信息共享不及时,导致项目进度滞后。',
+          correction: '充分利用信息共享平台,确保及时沟通。'
+        },
+        {
+          problem: '12121信息共享不及时,导致项目进度滞后。',
+          correction: '1212充分利用信息共享平台,确保及时沟通。'
+        }
+      ]
+    } ,
   },
   data() {
     return {
@@ -145,16 +158,7 @@ export default {
         { title: '已整改', num: 3 }
       ],
       rankingBarChartData: null,
-      list: [
-        {
-          problem: '信息共享不及时,导致项目进度滞后。',
-          correction: '充分利用信息共享平台,确保及时沟通。'
-        },
-        {
-          problem: '12121信息共享不及时,导致项目进度滞后。',
-          correction: '1212充分利用信息共享平台,确保及时沟通。'
-        }
-      ],
+    
       projectCode: this.$store.state.bigScreen.currentProjectCode
     }
   },

+ 77 - 15
src/views/groupPage/districtPageModules/decisionSupport/coordinatedEvaluation/index.vue

@@ -22,6 +22,7 @@
       :contentItemTitleInfo="pageData.information.contentItemTitleInfo"
       :resultValue="pageData.information.resultValue"
       :listData="pageData.information.listData"
+      :problemlist="pageData.information.problemlist"
       />
     </div>
     <div class="leftBottomDiv">
@@ -31,6 +32,7 @@
       :contentItemTitleInfo="pageData.objective.contentItemTitleInfo"
       :resultValue="pageData.objective.resultValue"
       :listData="pageData.objective.listData"
+      :problemlist="pageData.objective.problemlist"
       />
     </div>
     <div class="rightTopDiv">
@@ -40,6 +42,7 @@
       :contentItemTitleInfo="pageData.resource.contentItemTitleInfo"
       :resultValue="pageData.resource.resultValue"
       :listData="pageData.resource.listData"
+      :problemlist="pageData.resource.problemlist"
       />
     </div>
     <div class="rightBottomDiv">
@@ -49,6 +52,7 @@
       :contentItemTitleInfo="pageData.benefit.contentItemTitleInfo"
       :resultValue="pageData.benefit.resultValue"
       :listData="pageData.benefit.listData"
+      :problemlist="pageData.benefit.problemlist"
       />
     </div>
     <InspectionsNum v-if="centerInfo"
@@ -154,18 +158,18 @@ export default {
         centerObj[item]=centerData[item].value;
       }
       this.centerInfo=centerObj;
-      //四个角的数据
-      const pageData={
-        information:{
-          contentTitle:"信息",
-          listTitle:"信息分析结果",
-          contentItemTitleInfo:"",
-          resultValue:"",
-          listData:[],
-          remarkOne:"信息协同",
-          remarkTwo:"信息协同"
-        }
-      }
+      // //四个角的数据
+      // const pageData={
+      //   information:{
+      //     contentTitle:"信息",
+      //     listTitle:"信息分析结果",
+      //     contentItemTitleInfo:"",
+      //     resultValue:"",
+      //     listData:[],
+      //     remarkOne:"信息协同",
+      //     remarkTwo:"信息协同"
+      //   }
+      // }
 
       //四个角面板的数据
       const data={
@@ -178,6 +182,7 @@ export default {
           listData:[],
           remarkOne:"信息协同",
           remarkName:"文件名",
+          problemlist:[],
         },
         //利益数据
         benefit:{
@@ -188,6 +193,7 @@ export default {
           listData:[],
           remarkOne:"利益协同",
           remarkName:"文件名",
+          problemlist:[],
         },
         //目标数据
         objective:{
@@ -198,6 +204,7 @@ export default {
           listData:[],
           remarkOne:"目标协同",
           remarkName:"文件名",
+          problemlist:[],
         },
         //资源数据
         resource:{
@@ -208,6 +215,7 @@ export default {
           listData:[],
           remarkOne:"资源协同",
           remarkName:"文件名",
+          problemlist:[],
         },
       }
       for(let item in data){
@@ -224,14 +232,68 @@ export default {
             const value=tempResult2[i][tempData.remarkOne];
             const name=this.renderFileName(tempResult2[i][tempData.remarkName]);
             tempData.listData.push({
-              name:name,
+              name:name.trim(),
               value:(value*100).toFixed(0),
               item:tempData.remarkOne+i,
             })
           }
         }
       }
-      this.pageData=data;
+      this.getProblemInfo().then(res=>{
+        const tempData={};
+        const best_matches=res.best_matches;
+        if(best_matches){
+          for(let i=0;i<best_matches.length;i++){
+            const item=best_matches[i];
+            const name=this.renderFileName(item['出处文件']).trim()+item['问题类型'].trim();
+            if(tempData[name]){
+              tempData[name].push(item)
+            }else{
+              tempData[name]=[item];
+            }
+          }
+        }
+        for(let item in data){
+          const showItem=data[item];
+          const getDataList=tempData[showItem['contentItemTitleInfo']+showItem['contentTitle']]
+          if(getDataList){
+            getDataList.forEach(dataItem=>{
+              const tempItem={
+                problem:dataItem['问题句'],
+                correction:dataItem['策略句']
+              }
+              showItem.problemlist.push(tempItem)
+            })
+          }
+        }
+        debugger
+        this.pageData=data;
+      })
+
+    },
+    //获取问题信息
+    getProblemInfo(){
+      return new Promise((resolve,reject)=>{
+        fetch(getResultList.problemUrl).then(response => {
+          if (!response.ok) {
+            throw new Error('请求数据失败');
+          }
+          return response.json(); // 将响应解析为 JSON 格式
+        }) .then(data => {
+          // 处理返回的数据
+          console.log(data);
+          if(data.code==1){
+            resolve(data.result)
+          }else{
+            resolve(null);
+          }
+        })
+          .catch(error => {
+            // 处理错误
+            console.error(error);
+            resolve(null);
+          });
+      })
     },
     //获取最低评分信息
     getcontentItemTitleInfoAndresultValue(data){
@@ -251,7 +313,7 @@ export default {
     //处理后缀
     renderFileName(data){
       if(data){
-        return data.replace('.docx', "").replace('.txt', "");
+        return data.replace('.docx', "").replace('.txt', "").replace('doc',"");
       }else{
         return "";
       }

src/views/groupPage/districtPageModules/decisionSupport/coordinatedEvaluation/协调评价 → src/views/groupPage/districtPageModules/decisionSupport/coordinatedEvaluation/协同评价


+ 1 - 1
src/views/groupPage/districtPageModules/decisionSupport/index.vue

@@ -39,7 +39,7 @@ export default {
           component: constructionProgressSimulation
         },
         {
-          title: '协评价',
+          title: '协评价',
           component: coordinatedEvaluation
         }
       ]

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

@@ -1,7 +1,7 @@
 <template>
   <div class="widget-groupPage">
     <!--地图模块-->
-    <!-- <BaseMap /> -->
+    <BaseMap />
     <!--头部菜单模块-->
     <Header />
     <!--集团、分公司级页面模块-->