Przeglądaj źródła

feature(首页):
1、首页数据指标
2、项目升级决策人员选择
3、产品线、地区授权人群放开

ZZH-wl 2 lat temu
rodzic
commit
a2bb86c1da

+ 4 - 0
src/api/index/index.js

@@ -26,6 +26,10 @@ export default {
   getReportList(query) {
     return micro_request.postRequest(basePath, 'Report', 'GetList', query)
   },
+  // 数值指标
+  getHomeNumReportData(query) {
+    return micro_request.postRequest(basePath, 'Home', 'GetHomeNumReportData', query)
+  },
   // 指标图表
   getHomeDataReportData(query) {
     return micro_request.postRequest(basePath, 'Home', 'GetHomeDataReportData', query)

+ 0 - 1
src/views/base/productAuth/index.vue

@@ -89,7 +89,6 @@
           pageNum: 1,
           pageSize: 10,
           keyWords: '',
-          deptId: 1001,
         },
         layout: 'total, sizes, prev, pager, next, jumper',
         listLoading: false,

+ 18 - 17
src/views/base/regionAuth/index.vue

@@ -104,21 +104,23 @@
           <el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">
             全选
           </el-checkbox>
-          <div v-for="item in options" :key="item.custProvinceId" class="province" :label="item.custProvince">
-            <h3>{{ item.custProvince }}</h3>
-            <div class="check-container">
-              <el-checkbox
-                v-model="item.checkAll"
-                :indeterminate="item.isIndeterminate"
-                @change="(val) => handleSndCheckAllChange(val, item)">
-                全选
-              </el-checkbox>
-              <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 }}
-                  <span v-if="city.allocator.length">({{ city.allocator.join() }})</span>
+          <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">
+                <el-checkbox
+                  v-model="item.checkAll"
+                  :indeterminate="item.isIndeterminate"
+                  @change="(val) => handleSndCheckAllChange(val, item)">
+                  全选
                 </el-checkbox>
-              </el-checkbox-group>
+                <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 }}
+                    <span v-if="city.allocator.length">({{ city.allocator.join() }})</span>
+                  </el-checkbox>
+                </el-checkbox-group>
+              </div>
             </div>
           </div>
         </div>
@@ -146,7 +148,6 @@
           pageNum: 1,
           pageSize: 10,
           keyWords: '',
-          deptId: 1001,
         },
         layout: 'total, sizes, prev, pager, next, jumper',
         listLoading: false,
@@ -288,7 +289,7 @@
         this.regionId = data.id
         this.saleRegionName = data.regionDesc
         await this.handleDetail()
-        const [err, res] = await to(regionApi.getRegionDetailList({ regionId: data.id }))
+        const [err, res] = await to(regionApi.getRegionDetailList({ regionId: data.id, pageNum: 1, pageSize: 9999 }))
         if (err) return
         this.flatOptions = res.data.list || []
         this.flatOptions.forEach((item) => (item.saleRegionName = data.regionDesc))
@@ -381,7 +382,7 @@
         params.saleRegionName = this.saleRegionName
         let arr = []
         for (const item of params.checkList) {
-          const obj = this.flatOptions.find((each) => each.id == item)
+          const obj = this.flatOptions.find((each) => each.custCityId == item)
           if (obj)
             arr.push({
               saleRegionId: obj.regionId,

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

@@ -39,7 +39,7 @@
               <div class="board-container">
                 <vab-icon class="icon" :icon="item.report_icon" />
                 <div class="text">
-                  <p class="num">{{ item.id }}</p>
+                  <p class="num">{{ item.report_data }}</p>
                   <p>{{ item.report_name }}</p>
                 </div>
                 <vab-icon v-show="editFlag" class="close" icon="close-fill" @click.stop="handleDel(index)" />
@@ -200,6 +200,7 @@
   import to from 'await-to-js'
   import indexApi from '@/api/index'
   import messageApi from '@/api/system/message'
+
   export default {
     name: 'Index',
     components: {
@@ -312,6 +313,25 @@
       window.addEventListener('resize', this.handleResize)
     },
     methods: {
+      async getHomeNumReportData() {
+        let ids = this.privateBoard.map((item) => {
+          return item.id
+        })
+        const {
+          data: { num_report_response },
+        } = await indexApi.getHomeNumReportData({ ids: ids })
+        let privateBoardData = []
+        this.privateBoard.forEach((item, index) => {
+          num_report_response.forEach((val) => {
+            if (item.id === val.id) {
+              this.privateBoard[index].report_data = val.data
+              privateBoardData.push(this.privateBoard[index])
+            }
+          })
+        })
+        this.privateBoard = privateBoardData
+        console.log(this.privateBoard)
+      },
       // 布局信息
       async init() {
         const [err, res] = await to(indexApi.getHomeReport({ module_code: 'HomePage' }))
@@ -332,6 +352,7 @@
         })
         await this.$nextTick()
         this.initChart()
+        this.getHomeNumReportData()
       },
       initChart() {
         // console.log(this.layout, 'layout')
@@ -594,6 +615,7 @@
       display: flex;
       justify-content: space-between;
       align-items: center;
+
       i {
         font-weight: normal;
         cursor: pointer;
@@ -609,19 +631,23 @@
       margin-right: 10px;
       overflow-x: hidden;
       overflow-y: auto;
+
       .board {
         display: flex;
         flex-direction: column;
         margin-bottom: 2px;
+
         ::v-deep .el-card__body {
           flex: 1;
           display: flex;
           flex-direction: column;
           justify-content: space-around;
         }
+
         .el-row {
           height: 100%;
           flex-wrap: wrap;
+
           > div,
           > div span {
             display: flex;
@@ -630,12 +656,15 @@
             flex-wrap: wrap;
             width: 100%;
           }
+
           .ghost {
             background: #ecf5ff;
           }
+
           .drag {
             background: pink;
           }
+
           .el-col {
             display: flex;
             height: 60px;
@@ -695,6 +724,7 @@
           height: 48px;
           display: flex;
           align-items: center;
+
           ul {
             flex: 1;
             display: flex;
@@ -708,6 +738,7 @@
               justify-content: center;
               user-select: none;
               cursor: pointer;
+
               &.active span:last-child {
                 background: rgb(34, 76, 218);
                 color: #fff;
@@ -797,6 +828,7 @@
   ::v-deep .el-timeline-item__tail {
     border-left: 2px dashed #e4e7ed;
   }
+
   // #funnel,
   // #bar {
   //   height: 100%;
@@ -804,18 +836,21 @@
   .vue-grid-layout {
     margin-left: -10px;
     margin-right: -10px;
+
     &.grid {
       background: linear-gradient(90deg, #fff 10px, transparent 0), linear-gradient(#fff 10px, transparent 0);
       background-size: calc((100% - 10px) / 24) 40px;
       background-position: top 0px left 0px;
     }
   }
+
   .vue-grid-item {
     background: #fff;
     border: 1px solid #ebeef5;
     border-radius: 4px;
     box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
     overflow: hidden;
+
     h4 {
       line-height: 22px;
       height: 54px;
@@ -825,16 +860,19 @@
       justify-content: space-between;
       align-items: center;
       border-bottom: 1px solid #ebeef5;
+
       i {
         font-size: 24px;
         font-weight: bold;
         cursor: pointer;
+
         &:hover {
           color: #1d66dc;
         }
       }
     }
   }
+
   .board-container {
     display: flex;
     height: 60px;
@@ -845,9 +883,11 @@
     flex: 1;
     cursor: pointer;
     user-select: none;
+
     &:hover {
       box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
     }
+
     .icon {
       font-size: 32px;
       border-radius: 4px;
@@ -855,34 +895,42 @@
       height: 40px;
       color: #1d66dc;
       background: #ecf5ff;
+
       &.ri-money-cny-circle-line {
         color: #e6a23c;
         background: #fdf6ec;
       }
+
       &.ri-exchange-cny-fill {
         color: #f56c6c;
         background: #fef0f0;
       }
     }
+
     .full-icon {
       flex: 1;
       font-size: 32px;
     }
+
     .close {
       font-size: 32px;
       transition: 0.3s all;
+
       &:hover {
         color: #1d66dc;
       }
     }
+
     .check {
       font-size: 32px;
       color: #67c23a;
     }
+
     .text {
       padding-left: 10px;
       color: #9499a0;
       flex: 1;
+
       .num {
         font-size: 22px;
         font-weight: bold;
@@ -890,9 +938,11 @@
       }
     }
   }
+
   .add-board {
     height: 500px;
     overflow: auto;
+
     li + li {
       margin-top: 10px;
     }

+ 4 - 1
src/views/proj/business/components/BusinessGradation.vue

@@ -206,6 +206,8 @@
           id: undefined,
           distributorId: undefined,
           distributorName: undefined,
+          custId: undefined,
+          custName: undefined,
           makerId: undefined,
           makerName: undefined,
           makerDept: undefined,
@@ -297,7 +299,8 @@
         this.form.technicalSupportContent = undefined
         this.form.technicalSupportTime = undefined
         this.form.remark = undefined
-        console.log(this.form)
+        this.customerInfo = { custId: this.form.custId, custName: this.form.custName }
+        this.queryContact = { custId: this.form.custId, isDecision: '10' }
         this.dialogFormVisible = true
       },
       open(row) {

+ 1 - 1
src/views/system/user/components/RestPwd.vue

@@ -2,7 +2,7 @@
   <!-- 添加或修改参数配置对话框 -->
   <el-dialog :title="title" :visible.sync="dialogFormVisible" width="600px" @close="close">
     <el-form ref="form" label-width="80px" :model="form" :rules="rules">
-      <el-form-item prop="password">
+      <el-form-item label="新密码" prop="password">
         <el-input v-model="form.password" placeholder="请输入新密码" show-password />
       </el-form-item>
     </el-form>

+ 8 - 3
src/views/system/user/components/UserEdit.vue

@@ -182,13 +182,18 @@
     methods: {
       // 获取角色和岗位
       getRoleAndPost() {
-        roleApi.getList({ status: '10' }).then((response) => {
+        let query = {
+          pageNum: 1,
+          pageSize: 999,
+          status: '10',
+        }
+        roleApi.getList(query).then((response) => {
           this.roleOptions = response.data.list
         })
-        postApi.getList({ status: '10' }).then((response) => {
+        postApi.getList(query).then((response) => {
           this.postOptions = response.data.list
         })
-        groupApi.getList({ status: '10' }).then((response) => {
+        groupApi.getList(query).then((response) => {
           this.groupOptions = response.data.list
         })
       },