瀏覽代碼

2023-10-30

codeMan 1 年之前
父節點
當前提交
4598227762

+ 15 - 5
src/HDrpManagement/customerData/index.vue

@@ -1051,12 +1051,12 @@ export default {
           interactions: [{ type: 'element-single-selected' }, { type: 'element-active' }, { type: 'pie-statistic-active' }],
         });
         this.customerTypeMap.on('element:click',(v) => {
-          if (v.data.data.key != this.gradTableParam.content.where.grade) {
-            this.gradTableParam.content.where.grade = v.data.data.key
-            this.$refs.customerGradTable.listData()
+          if (v.data.data.key != this.typeTableParam.content.where.customerstype) {
+            this.typeTableParam.content.where.customerstype = v.data.data.key
+            this.$refs.customerTypeTable.listData()
           } else {
-            this.gradTableParam.content.where.grade = ''
-            this.$refs.customerGradTable.listData()
+            this.typeTableParam.content.where.customerstype = ''
+            this.$refs.customerTypeTable.listData()
           }
         })
         this.customerTypeMap.render();
@@ -1351,7 +1351,17 @@ 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 = ''
+          } else {
+            this.unfllowTableParam.content.where.dateType = v.data.data.datetype
+          }
+          this.$refs.customerUnfllowTable.listData()
+        })
         this.customerUnfllowMap.render()
       } else {
         this.customerUnfllowMap.changeData(this.customerUnfllowData.map)

+ 4 - 3
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
@@ -73,8 +74,8 @@ export default {
       this.listData()
     },
   },
-  created() {
-    this.listData()
+  mounted() {
+    this.listData(init)
   }
 }
 

+ 1 - 1
src/HDrpManagement/projectData/components/table.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
-    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
+    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="data" style="height:100%"  size="mini" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
               :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange">
       <el-table-column
           type="selection"

+ 63 - 5
src/HDrpManagement/projectData/index.vue

@@ -835,16 +835,47 @@
                       </el-option>
                     </el-select>
                   </div>
+                  <div class="mt-10 inline-16">
+                    <label  class="search__label">项目类型:</label>
+                    <el-select 
+                      v-model="unfllowMapParam.content.where.projecttype" 
+                      placeholder="请选择项目类型" 
+                      @change="$event => {if($event.length) {unfllowTableParam.content.where.projecttype=$event;$refs.customerUnfllowTable.listData();customerUnfllowInit()} else {unfllowTableParam.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 class="mt-10 inline-16">
+                    <label  class="search__label" >分析日期:</label>
+                    <el-date-picker
+                        v-model="unfllowMapParam.content.enddate"
+                        format="yyyy-MM-dd"
+                        value-format="yyyy-MM-dd"
+                        type="date"
+                        size="small"
+                        placeholder="选择日期"
+                        @change="unfllowTableParam.content.where.enddate=unfllowMapParam.content.enddate;customerUnfllowInit();$refs.customerUnfllowTable.listData()">
+                    </el-date-picker>
+                  </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 +1049,7 @@ export default {
         "content": {
         }
       },
-      projectType:[],
+      projectType:[{value:''}],
       projectLead:[],
       tradefieldSelect:[],
       projectname:'',
@@ -1310,8 +1341,8 @@ export default {
       dateParam: {
         "id": 20231023092304,
         "content": {
-          "type": '',
-          "dataid": '',
+          "type": 1,
+          "dataid": 59,
           "username":JSON.parse(sessionStorage.getItem('accountinfo')).name,
           "begnode":"",//开始节点
           "endnode":"",//结束节点
@@ -1518,7 +1549,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)
@@ -1876,7 +1917,9 @@ export default {
       }
       
     },
-    async getDate () {
+    async getDate (init) {
+      if(init === true) this.dateParam.content.where.projecttype = this.projectType.length ? this.projectType[0].value : ''
+      console.log(this.dateParam.content.where.projecttype,init);
       let res = await this.$api.requested(this.dateParam)
       this.dateList = res.data
       console.log(this.dateList,'周期数据');
@@ -1910,7 +1953,17 @@ 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 = ''
+          } else {
+            this.unfllowTableParam.content.where.dateType = v.data.data.datetype
+          }
+          this.$refs.customerUnfllowTable.listData()
+        })
         this.customerUnfllowMap.render()
       } else {
         this.customerUnfllowMap.changeData(this.customerUnfllowData.map)
@@ -2150,6 +2203,11 @@ export default {
       this.projectname = data.projectname
       this.dateParam.content.where.sa_projectid = data.sa_projectid
       this.getDate()
+    },
+    handleUnfllowParam (param) {
+      console.log('触发',param,this.projectType);
+      param.content.where.projecttype = this.projectType.length ? this.projectType[0].value : ''
+      this.unfllowMapParam.content.where.projecttype = this.projectType.length ? this.projectType[0].value : ''
     }
   },
   async mounted () {
@@ -2167,7 +2225,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 +2232,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