Эх сурвалжийг харах

fix(*):bug及调整

1.树形页面全局样式调整
2.首页自定义布局空的处理
3.经销商管理传参方式修改
wanglj 2 жил өмнө
parent
commit
44608b553e

+ 3 - 2
src/vab/styles/default.scss

@@ -4085,13 +4085,14 @@ $--background-color-base: $base-color-background;
   width: 100%;
   .tree-side {
     // flex: 1 1 210px;
+    height: calc(100vh - 146px);
     width: 210px;
     border-right: 6px solid #f6f8f9;
     display: flex;
     flex-direction: column;
     background: #fff;
     .el-tree {
-      flex: 1;
+      flex:1;
       overflow: auto;
     }
     footer {
@@ -4103,7 +4104,7 @@ $--background-color-base: $base-color-background;
     }
   }
   .tree-table {
-    width: calc(100% - 216px);
+    width: calc(100% - 210px);
     padding: 0 6px;
     background: #fff;
   }

+ 22 - 23
src/views/base/distributor/index.vue

@@ -2,28 +2,24 @@
   <div class="user-management-container">
     <div class="side-layout">
       <div class="tree-side">
-        <div class="head-container">
-          <span style="font-size: 25px">所属区域</span>
-        </div>
-        <div class="tree-container">
-          <el-tree
-            ref="tree"
-            :data="regionOptions"
-            default-expand
-            :default-expand-all="false"
-            :expand-on-click-node="true"
-            :filter-node-method="filterNode"
-            highlight-current
-            :props="defaultProps"
-            @node-click="handleNodeClick">
-            <span slot-scope="{ node }" class="custom-tree-node">
-              <span>{{ node.label }}</span>
-              <span>
-                <i class="el-icon-more"></i>
-              </span>
+        <span style="font-size: 25px">所属区域</span>
+        <el-tree
+          ref="tree"
+          :data="regionOptions"
+          default-expand
+          :default-expand-all="false"
+          :expand-on-click-node="true"
+          :filter-node-method="filterNode"
+          highlight-current
+          :props="defaultProps"
+          @node-click="handleNodeClick">
+          <span slot-scope="{ node }" class="custom-tree-node">
+            <span>{{ node.label }}</span>
+            <span>
+              <i class="el-icon-more"></i>
             </span>
-          </el-tree>
-        </div>
+          </span>
+        </el-tree>
       </div>
       <div class="tree-table">
         <vab-query-form>
@@ -125,7 +121,6 @@
           pageSize: 10,
           userName: '',
         },
-
         checkList: [],
         columns: [
           {
@@ -196,7 +191,11 @@
       },
       // 节点单击事件
       handleNodeClick(data) {
-        this.queryForm.provinceId = parseInt(data.regionCode)
+        if (data.children && data.children.length) {
+          this.queryForm.provinceId = data.children.map((item) => item.regionCode)
+        } else {
+          this.queryForm.provinceId = [data.regionCode]
+        }
         this.fetchData()
       },
       setSelectRows(val) {

+ 1 - 1
src/views/base/product/index.vue

@@ -192,7 +192,7 @@
     },
     computed: {
       height() {
-        return this.$baseTableHeight(1)
+        return this.$baseTableHeight(2)
       },
       finallyColumns() {
         return this.columns.filter((item) => this.checkList.includes(item.label))

+ 0 - 4
src/views/base/region/index.vue

@@ -371,10 +371,6 @@
   }
 </script>
 <style lang="scss" scoped>
-  .side-layout {
-    height: calc(100vh - 200px);
-  }
-
   ::v-deep .custom-tree-node {
     .el-input__inner {
       padding: 0 !important;

+ 10 - 3
src/views/base/regionAuth/index.vue

@@ -2,7 +2,7 @@
  * @Author: wanglj 471442253@qq.com
  * @Date: 2023-02-13 13:51:45
  * @LastEditors: wanglj
- * @LastEditTime: 2023-02-14 18:05:38
+ * @LastEditTime: 2023-02-27 11:29:24
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\base\regionAuth\index.vue
 -->
@@ -106,14 +106,16 @@
           </el-checkbox>
           <div style="height: calc(100% - 5px); overflow: auto">
             <div v-for="item in options" :key="item.custProvinceId" class="province" :label="item.custProvince">
-              <h3>{{ item.custProvince }}</h3>
-              <div class="check-container">
+              <h3>
+                {{ item.custProvince }}
                 <el-checkbox
                   v-model="item.checkAll"
                   :indeterminate="item.isIndeterminate"
                   @change="(val) => handleSndCheckAllChange(val, item)">
                   全选
                 </el-checkbox>
+              </h3>
+              <div class="check-container">
                 <el-checkbox-group v-model="form.checkList" @change="(val) => handleChange(val, item)">
                   <el-checkbox v-for="city in item.children" :key="city.id" :label="city.custCityId">
                     {{ city.custCity }}
@@ -406,6 +408,9 @@
 <style lang="scss" scoped>
   .side-layout {
     height: 600px;
+    .tree-side {
+      height: 600px !important;
+    }
   }
   .el-icon-check {
     font-size: 18px;
@@ -421,6 +426,8 @@
         padding: 10px;
         border-radius: 5px;
         background: #eee;
+        display: flex;
+        justify-content: space-between;
       }
       .check-container {
         padding-left: 8px;

+ 4 - 4
src/views/contract/components/DetailsRecords.vue

@@ -1,10 +1,10 @@
 <!--
  * @Author: liuzl 461480418@qq.com
  * @Date: 2023-01-09 17:42:13
- * @LastEditors: liuzhenlin
- * @LastEditTime: 2023-01-09 17:55:42
+ * @LastEditors: wanglj
+ * @LastEditTime: 2023-02-21 17:14:52
  * @Description: file content
- * @FilePath: \订单全流程管理系统\src\views\contract\components\DetailsRecords.vue
+ * @FilePath: \opms_frontend\src\views\contract\components\DetailsRecords.vue
 -->
 <template>
   <ul class="records">
@@ -66,7 +66,7 @@
     margin: 0;
     padding: 10px 20px;
     list-style: none;
-    height: 100%;
+    height: calc(100% - 60px);
     margin-top: 6px;
     overflow-y: auto;
 

+ 91 - 86
src/views/index/index.vue

@@ -2,7 +2,7 @@
  * @Author: wanglj 471442253@qq.com
  * @Date: 2023-01-11 15:52:49
  * @LastEditors: wanglj
- * @LastEditTime: 2023-02-17 17:57:12
+ * @LastEditTime: 2023-02-27 11:42:17
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\index\index.vue
 -->
@@ -216,78 +216,78 @@
       return {
         editFlag: false,
         privateBoard: [
-          {
-            report_name: '当前客户数(个)',
-            id: 1,
-            report_icon: 'account-circle-line',
-            checked: false,
-          },
-          {
-            report_name: '新增客户数(个)',
-            id: 2,
-            report_icon: 'user-add-line',
-            checked: false,
-          },
-          {
-            report_name: '跟进客户数(个)',
-            id: 3,
-            report_icon: 'account-pin-box-line',
-            checked: false,
-          },
-          {
-            report_name: '合同订单数(个)',
-            id: 4,
-            report_icon: 'account-circle-line',
-            checked: false,
-          },
-          {
-            report_name: '合同订单金额(元)',
-            id: 5,
-            report_icon: 'exchange-cny-fill',
-            checked: false,
-          },
-          {
-            report_name: '新增机会数(个)',
-            id: 6,
-            report_icon: 'mail-add-line',
-            checked: false,
-          },
-          {
-            report_name: '新增机会金额(元)',
-            id: 7,
-            report_icon: 'exchange-cny-fill',
-            checked: false,
-          },
-          {
-            report_name: '采购合同数(个)',
-            id: 8,
-            report_icon: 'account-circle-line',
-            checked: false,
-          },
-          {
-            report_name: '采购金额(元)',
-            id: 9,
-            report_icon: 'money-cny-circle-line',
-            checked: false,
-          },
-          {
-            report_name: '应收未收(元)',
-            id: 10,
-            report_icon: 'money-cny-circle-line',
-            checked: false,
-          },
-          {
-            report_name: '计划付款(元)',
-            id: 11,
-            report_icon: 'money-cny-circle-line',
-            checked: false,
-          },
-          {
-            report_name: '当前库存成本(元)',
-            id: 12,
-            report_icon: 'money-cny-circle-line',
-            checked: false,
-          },
+          // {
+          //   report_name: '当前客户数(个)',
+          //   id: 1,
+          //   report_icon: 'account-circle-line',
+          //   checked: false,
+          // },
+          // {
+          //   report_name: '新增客户数(个)',
+          //   id: 2,
+          //   report_icon: 'user-add-line',
+          //   checked: false,
+          // },
+          // {
+          //   report_name: '跟进客户数(个)',
+          //   id: 3,
+          //   report_icon: 'account-pin-box-line',
+          //   checked: false,
+          // },
+          // {
+          //   report_name: '合同订单数(个)',
+          //   id: 4,
+          //   report_icon: 'account-circle-line',
+          //   checked: false,
+          // },
+          // {
+          //   report_name: '合同订单金额(元)',
+          //   id: 5,
+          //   report_icon: 'exchange-cny-fill',
+          //   checked: false,
+          // },
+          // {
+          //   report_name: '新增机会数(个)',
+          //   id: 6,
+          //   report_icon: 'mail-add-line',
+          //   checked: false,
+          // },
+          // {
+          //   report_name: '新增机会金额(元)',
+          //   id: 7,
+          //   report_icon: 'exchange-cny-fill',
+          //   checked: false,
+          // },
+          // {
+          //   report_name: '采购合同数(个)',
+          //   id: 8,
+          //   report_icon: 'account-circle-line',
+          //   checked: false,
+          // },
+          // {
+          //   report_name: '采购金额(元)',
+          //   id: 9,
+          //   report_icon: 'money-cny-circle-line',
+          //   checked: false,
+          // },
+          // {
+          //   report_name: '应收未收(元)',
+          //   id: 10,
+          //   report_icon: 'money-cny-circle-line',
+          //   checked: false,
+          // },
+          // {
+          //   report_name: '计划付款(元)',
+          //   id: 11,
+          //   report_icon: 'money-cny-circle-line',
+          //   checked: false,
+          // },
+          // {
+          //   report_name: '当前库存成本(元)',
+          //   id: 12,
+          //   report_icon: 'money-cny-circle-line',
+          //   checked: false,
+          // },
         ],
         addBoard: [],
         addLayout: [],
@@ -316,6 +316,9 @@
       })
       window.addEventListener('resize', this.handleResize)
     },
+    beforeDestroy() {
+      window.removeEventListener('resize', this.handleResize)
+    },
     methods: {
       async getHomeNumReportData() {
         let ids = this.privateBoard.map((item) => {
@@ -341,19 +344,21 @@
         const [err, res] = await to(indexApi.getHomeReport({ module_code: 'HomePage' }))
         if (err) return
         const obj = JSON.parse(res.data.configInfo)
-        this.privateBoard = obj.num_report_config
-        this.layout = obj.data_report_config.map((item) => {
-          return {
-            x: item.location_x,
-            y: item.location_y,
-            i: item.id,
-            desc: item.report_desc,
-            name: item.report_name,
-            type: item.report_type,
-            h: item.size_h,
-            w: item.size_w,
-          }
-        })
+        this.privateBoard = obj.num_report_config || []
+        if (obj.data_report_config && obj.data_report_config.length) {
+          this.layout = obj.data_report_config.map((item) => {
+            return {
+              x: item.location_x,
+              y: item.location_y,
+              i: item.id,
+              desc: item.report_desc,
+              name: item.report_name,
+              type: item.report_type,
+              h: item.size_h,
+              w: item.size_w,
+            }
+          })
+        }
         await this.$nextTick()
         this.initChart()
         this.getHomeNumReportData()