codeMan 1 ano atrás
pai
commit
158d5fcc80

+ 3 - 2
src/HDrpManagement/projectData/components/pageTable.vue

@@ -55,7 +55,8 @@ export default {
     }
   },
   methods:{
-    async listData(){
+    async listData(init){
+      if (init) this.$emit('handleParam',this.param)
       const res = await this.$api.requested(this.param)
       this.list = res.data
       this.list2 = res.data.length && res.data[0].isEmpty ? [] : res.data
@@ -74,7 +75,7 @@ export default {
     },
   },
   created() {
-    this.listData()
+    this.listData(true)
   }
 }
 

+ 50 - 8
src/HDrpManagement/projectData/index.vue

@@ -30,7 +30,7 @@
               <div class="data-all-wrapper">
                 <div class="data-left">
                   <div class="data-item">
-                    <p>{{ tool.formatAmount(dataAll.dealProject) }}</p>
+                    <p>{{ tool.formatAmount(dataAll.totalqty) }}</p>
                     <p>项目总数</p>
                   </div>
                   <div class="data-item">
@@ -52,7 +52,7 @@
                     </p>
                   </div>
                   <div class="data-item">
-                    <p>{{ tool.formatAmount(dataAll.totalqty) }}</p>
+                    <p>{{ tool.formatAmount(dataAll.dealProject) }}</p>
                     <p>
                       项目成交数
                       <el-tooltip class="item" effect="dark" content="项目成交数:统计有关联审核过的订单的项目数量" placement="top">
@@ -835,16 +835,32 @@
                       </el-option>
                     </el-select>
                   </div>
+                  <div class="mt-10 inline-16">
+                    <label  class="search__label">项目类型:</label>
+                    <el-select v-model="unfllowTableParam.content.where.projecttype" placeholder="请选择项目类型" 
+                      @change="$event => {if($event) {unfllowMapParam.content.where.projecttype=$event;$refs.customerUnfllowTable.listData();customerUnfllowInit()} else {unfllowMapParam.content.where.project='';$refs.customerUnfllowTable.listData();customerUnfllowInit()}}" size="small" clearable>
+                      <el-option
+                          v-for="item in projectType"
+                          :key="item.value"
+                          :label="item.value"
+                          :value="item.value">
+                        <span style="float: left">{{ item.value }}</span>
+                        <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>
+                      </el-option>
+                    </el-select>
+                  </div>
                 </div>
               </div>
               <div>
                 <div ref="customerUnfllowEl" style="height:400px"></div>
                 <div style="margin-top:25px">
                   <pageTable
+                    v-if="projectType[0].value != ''"
                     ref="customerUnfllowTable"
                     :tablecols="tool.tabelCol($route.name).projectTable1.tablecols.splice(0,tool.tabelCol($route.name).projectTable1.tablecols.length - 1)"
                     :param="unfllowTableParam"
                     :custom="true"
+                    @handleParam="handleUnfllowParam"
                   >
                     <template v-slot:custom="scope">
                       <div v-if="scope.data.columnname == 'sys_tag'">
@@ -1018,7 +1034,7 @@ export default {
         "content": {
         }
       },
-      projectType:[],
+      projectType:[{value:''}],
       projectLead:[],
       tradefieldSelect:[],
       projectname:'',
@@ -1310,8 +1326,8 @@ export default {
       dateParam: {
         "id": 20231023092304,
         "content": {
-          "type": '',
-          "dataid": '',
+          "type": 1,
+          "dataid": 59,
           "username":JSON.parse(sessionStorage.getItem('accountinfo')).name,
           "begnode":"",//开始节点
           "endnode":"",//结束节点
@@ -1518,7 +1534,17 @@ export default {
           legend: {
             position: 'top-left',
           },
+          interactions: [{ type: 'element-single-selected' }],
         });
+        this.scoreMap.on('element:click',(v) => {
+          if (v.data.data.key != this.scoreTableParam1.content.occupancyratio) {
+            this.scoreTableParam1.content.occupancyratio = v.data.data.key
+            this.$refs.scoreTable.listData()
+          } else {
+            this.scoreTableParam1.content.occupancyratio = ''
+            this.$refs.scoreTable.listData()
+          }
+        })
         this.scoreMap.render();
       } else {
         this.scoreMap.changeData(this.scoreData.map)
@@ -1859,7 +1885,7 @@ export default {
             position:'left'
           },
           // 添加 中心统计文本 交互
-          interactions: [{ type: 'element-selected' },{ type: 'element-active' },{ type: 'pie-statistic-active' }],
+          interactions: [{ type: 'element-highlight-by-x ' },{ type: 'element-active' },{ type: 'pie-statistic-active' }],
         });
         this.projectScoreMap.on('element:click',(v) => {
           if (v.data.data.key != this.scoreTableParam.content.where.istask) {
@@ -1876,7 +1902,8 @@ export default {
       }
       
     },
-    async getDate () {
+    async getDate (init) {
+      if(init === true) this.dateParam.content.where.projecttype = this.projectType.length ? this.projectType[0].value : ''
       let res = await this.$api.requested(this.dateParam)
       this.dateList = res.data
       console.log(this.dateList,'周期数据');
@@ -1910,7 +1937,18 @@ export default {
               { type: 'adjust-color' },
             ],
           },
+          interactions: [{ type: 'element-highlight-by-x' }],
         });
+        this.customerUnfllowMap.on('element:click',(v) => {
+          console.log(v);
+          if (v.data.data.datetype != this.unfllowTableParam.content.where.dateType) {
+            this.unfllowTableParam.content.where.dateType = v.data.data.datetype
+            this.$refs.customerUnfllowTable.listData()
+          } else {
+            this.unfllowTableParam.content.where.dateType = ''
+            this.$refs.customerUnfllowTable.listData()
+          }
+        })
         this.customerUnfllowMap.render()
       } else {
         this.customerUnfllowMap.changeData(this.customerUnfllowData.map)
@@ -2150,6 +2188,10 @@ export default {
       this.projectname = data.projectname
       this.dateParam.content.where.sa_projectid = data.sa_projectid
       this.getDate()
+    },
+    handleUnfllowParam (param) {
+      param.content.where.projecttype = this.projectType.length ? this.projectType[0].value : ''
+      this.unfllowMapParam.content.projecttype = this.projectType.length ? this.projectType[0].value : ''
     }
   },
   async mounted () {
@@ -2167,7 +2209,6 @@ export default {
     this.projectScoreInit(true)
     this.customerInit(true)
     this.customerUnfllowInit(true)
-    this.getDate()
     let baseWidth = 1920
     document.querySelector('html').style.fontSize = `${100 / baseWidth}vw`
 
@@ -2175,6 +2216,7 @@ export default {
     /* 获取项目类型 */
     let res = await this.$store.dispatch('optiontypeselect','projecttype')
     this.projectType = res.data
+    this.getDate(true)
     /* 获取项目等级 */
     let res2 = await this.$store.dispatch('optiontypeselect','projectgrade')
     this.projectLead = res2.data