xiuli.gao 2 years ago
parent
commit
8e678377dc

+ 2 - 2
project/src/assets/config/config.js

@@ -17,7 +17,7 @@ axios.interceptors.request.use(
17 17
         admin_id: getCookie("admin_id"),
18 18
         ttl: Number(getCookie("ttl")),
19 19
         sign: getCookie("sign"),
20
-        corpid: store.state && store.state.corpid
20
+        corpid: store.state && store.state.defaultCorp && store.state.defaultCorp.corpid
21 21
       }
22 22
     } else {
23 23
       config.params = {
@@ -25,7 +25,7 @@ axios.interceptors.request.use(
25 25
         admin_id: getCookie("admin_id"),
26 26
         ttl: Number(getCookie("ttl")),
27 27
         sign: getCookie("sign"),
28
-        corpid: store.state && store.state.corpid
28
+        corpid: store.state && store.state.defaultCorp && store.state.defaultCorp.corpid
29 29
       }
30 30
     }
31 31
     // }

+ 3 - 0
project/src/assets/config/interface_api.js

@@ -39,6 +39,9 @@ var api = {
39 39
   lossCustomerList: "/api/customer/lossCustomerList",
40 40
   unassignedCustomerList: "/api/customer/unassignedCustomerList",
41 41
   customerAssignmentList: "/api/customer/customerAssignmentList",
42
+  authorize_corpList: "/api/authorize/corpList",
43
+  getCorCustomerList: "/api/corp/getCorCustomerList",
44
+  authCode: "/api/authCode",
42 45
 };
43 46
 
44 47
 export { api };

+ 19 - 3
project/src/components/assembly/screen/channel.vue

@@ -1,8 +1,8 @@
1 1
 <template>
2 2
   <div class="common-screen-item">
3
-    <label class="common-screen-label">添加渠道</label>
3
+    <label class="common-screen-label">{{title}}</label>
4 4
     <div :class="['common-screen-self-box','common-input-select',value!=''&&clearable?'common-input-select-hover':'']">
5
-      <span :class="['common-screen-self-con',value==''?'common-screen-self-placeholder':'']">{{value!=''?valueCon.val:'请选择渠道'}}</span>
5
+      <span :class="['common-screen-self-con',value==''?'common-screen-self-placeholder':'']">{{value!=''?valueCon.val:'请选择'}}</span>
6 6
       <div class="common-screen-self-icon" @click="clear">
7 7
         <i class="el-icon-arrow-down default-icon"></i>
8 8
         <i class="el-icon-circle-close other-icon"></i>
@@ -24,6 +24,14 @@ export default {
24 24
     reset: {
25 25
       type: Boolean,
26 26
       default: false
27
+    },
28
+    title: {
29
+      type: String,
30
+      default: '添加渠道'
31
+    },
32
+    type: {
33
+      type: String,
34
+      default: ''
27 35
     }
28 36
   },
29 37
   watch: {
@@ -40,7 +48,15 @@ export default {
40 48
     }
41 49
   },
42 50
   created () {
43
-    if (this.options.length == 0) {
51
+    if (this.type == 'assignment_status') {
52
+      this.options = [
53
+        { key: 1, val: '已转接' },
54
+        { key: 2, val: '客户转接中' },
55
+        { key: 3, val: '客户已拒绝' },
56
+        { key: 4, val: '接替成员客户达到上限' },
57
+        { key: 5, val: '无接替记录' },
58
+      ]
59
+    } else {
44 60
       this.init()
45 61
     }
46 62
   },

+ 55 - 164
project/src/components/assembly/screen/serviceSingle.vue

@@ -1,20 +1,20 @@
1 1
 <template>
2 2
   <div class="common-screen-item">
3 3
     <label class="common-screen-label" v-if="title&&title!=''">{{title}}</label>
4
-    <el-popover placement="bottom" trigger="click" v-model="visible">
5
-      <div :style="width?'width:'+width:''" :class="['common-screen-self-box','common-input-select',final_result&&final_result.length!=0&&clearable?'common-input-select-hover':'']" slot="reference">
6
-        <div :class="['common-screen-self-con',!final_result||final_result.length==0?'common-screen-self-placeholder':'']">
7
-          <span v-if="!final_result||final_result.length==0">请选择</span>
8
-          <template v-else>
9
-            <span v-for="(item,index) in final_result" :key="index">{{item.name}}{{index==final_result.length-1?'':','}}</span>
10
-          </template>
11
-        </div>
12
-        <div class="common-screen-self-icon" @click.stop="clear">
13
-          <i class="el-icon-arrow-down default-icon"></i>
14
-          <i class="el-icon-circle-close other-icon"></i>
15
-        </div>
4
+    <div :style="width?'width:'+width:''" :class="['common-screen-self-box','common-input-select',selectUser&&selectUser.user_id&&clearable?'common-input-select-hover':'']" @click="screenClick">
5
+      <div :class="['common-screen-self-con',!selectUser||!selectUser.user_id||selectUser.user_id==''?'common-screen-self-placeholder':'']">
6
+        <span v-if="!selectUser||!selectUser.user_id||selectUser.user_id==''">请选择</span>
7
+        <template v-else>
8
+          <span>{{selectUser.name}}</span>
9
+        </template>
10
+      </div>
11
+      <div class="common-screen-self-icon" @click.stop="clear">
12
+        <i class="el-icon-arrow-down default-icon"></i>
13
+        <i class="el-icon-circle-close other-icon"></i>
16 14
       </div>
17
-      <div class="flex" style="padding:10px" v-loading="loading">
15
+    </div>
16
+    <el-dialog title="" :visible.sync="visible" :close-on-click-modal="false" width="400px" center top="15vh">
17
+      <div v-loading="loading">
18 18
         <div class="propoverItem">
19 19
           <!-- <self-input :hasLabel="false" width="270px" style="margin-top:0"></self-input> -->
20 20
           <div class="allMember">全部成员({{userTotal}}):</div>
@@ -23,14 +23,13 @@
23 23
               <div class="memberBox self-scrollbar-3" :key="index + 'userList' + item.department_id">
24 24
                 <i :class="['el-icon-caret-bottom',item.is_open?'reversalAnimation':'']" @click="openEvent(index)"></i>
25 25
                 <div class="meberList">
26
-                  <div class="department" @click="selectUserEvent('all',index)">
26
+                  <div class="department">
27 27
                     <div class="flex">
28 28
                       <i class="el-icon-s-cooperation"></i>
29 29
                       <span>{{item.department_name?item.department_name:'部门'+(index+1)}}</span>
30 30
                     </div>
31
-                    <div :class="['checkbox',item.is_select?'checkbox_active':'']"><i class="el-icon-check"></i></div>
32 31
                   </div>
33
-                  <div class="memberItem" :style="item.is_open?'display:none':''" v-for="(item1,user_index) in item.user_list" :key="item1.user_id" @click="selectUserEvent('user',index,user_index)">
32
+                  <div class="memberItem" :style="item.is_open?'display:none':''" v-for="(item1) in item.user_list" :key="item1.user_id" @click="selectUserEvent('user',item1.user_id)">
34 33
                     <div class="flex">
35 34
                       <img class="memberImg" :src="item1.avatar" alt="">
36 35
                       <div class="memberInfo">
@@ -38,39 +37,19 @@
38 37
                         <div class="other">部门:{{item1.department}}</div>
39 38
                       </div>
40 39
                     </div>
41
-                    <div :class="['checkbox',item1.is_select?'checkbox_active':'']"><i class="el-icon-check"></i></div>
40
+                    <div :class="['checkbox',selectUserId==item1.user_id?'checkbox_active':'']"><i class="el-icon-check"></i></div>
42 41
                   </div>
43 42
                 </div>
44 43
               </div>
45 44
             </template>
46 45
           </div>
47 46
         </div>
48
-        <div class="line"></div>
49
-        <div class="propoverItem" style="padding-left:20px">
50
-          <div class="title">已选择的成员</div>
51
-          <div class="choice_result_top">
52
-            <div class="clear" @click="closeUser(-1)">全部清空</div>
53
-            <div class="result_num">已选择<span>{{selectUser&&selectUser.length}}</span>人</div>
54
-          </div>
55
-          <div class="member_result self-scrollbar-3">
56
-            <div class="memberItem" v-for="(item,index) in selectUser" :key="index">
57
-              <div class="flex">
58
-                <img class="memberImg" :src="item.avatar" alt="">
59
-                <div class="memberInfo">
60
-                  <div class="name">{{item.name}}</div>
61
-                  <div class="other">部门:{{item.department}}</div>
62
-                </div>
63
-              </div>
64
-              <i class="el-icon-close" @click="closeUser(index)"></i>
65
-            </div>
66
-          </div>
67
-          <div class="buttons">
68
-            <el-button type="primary" plain size="mini" @click="visible = false">取消</el-button>
69
-            <el-button type="primary" size="mini" @click="defineEvent">确定</el-button>
70
-          </div>
47
+        <div class="buttons">
48
+          <el-button type="primary" plain size="mini" @click="visible = false">取消</el-button>
49
+          <el-button type="primary" size="mini" @click="defineEvent">确定</el-button>
71 50
         </div>
72 51
       </div>
73
-    </el-popover>
52
+    </el-dialog>
74 53
   </div>
75 54
 </template>
76 55
 <script>
@@ -99,9 +78,8 @@ export default {
99 78
   },
100 79
   watch: {
101 80
     reset () {
102
-      this.selectUser = [];
103
-      this.final_result = [];
104
-      this.changeSelect()
81
+      this.selectUserId = '';
82
+      this.selectUser = {};
105 83
     }
106 84
   },
107 85
   data () {
@@ -110,60 +88,50 @@ export default {
110 88
       loading: false,
111 89
       userList: [],
112 90
       userTotal: 0,
113
-      selectUser: [],
114
-      final_result: []
91
+      selectUserId: '',
92
+      selectUser: {},
115 93
     }
116 94
   },
117
-  created () {
118
-    if (this.userList.length == 0) {
119
-      this.init()
120
-    } else {
121
-      this.selectUser = JSON.parse(JSON.stringify(this.final_result));
122
-      this.changeSelect()
123
-      this.afferent_init()
124
-    }
95
+  mounted () {
96
+    console.log(this.selectUser)
125 97
   },
126 98
   methods: {
127
-    afferent_init () {//从外面传入
128
-      let selectUser = [];
129
-      if (this.afferent_users && this.afferent_users.length > 0) {
130
-        this.userList.forEach((item1) => {
131
-          item1.user_list.forEach((item) => {
132
-            if (this.afferent_users.indexOf(item.user_id) != -1) {
133
-              selectUser.push(item)
134
-            }
135
-          })
99
+    screenClick () {
100
+      this.visible = true;
101
+      if (this.userList.length == 0) {
102
+        this.init()
103
+      } else {
104
+        this.serviceInit()
105
+      }
106
+    },
107
+    serviceInit (type) {
108
+      this.userList.forEach((item) => {
109
+        item.is_open = false//是否折叠
110
+        item.user_list.forEach((item1, index) => {
111
+          if (item1.user_id == this.selectUserId) {
112
+            this.selectUser = item1
113
+          }
136 114
         })
137
-        this.selectUser = selectUser;
138
-        this.final_result = JSON.parse(JSON.stringify(selectUser))
139
-        this.changeSelect()
115
+      });
116
+      if (type == 'define') {
117
+        this.$emit('customerDefine', this.selectUser)
140 118
       }
141 119
     },
142 120
     clear () {
143
-      if (!this.selectUser || this.selectUser.length == 0) {
144
-        this.visible = !this.visible
145
-        return
146
-      } else {
147
-        this.selectUser = [];
148
-        this.final_result = []
149
-        this.changeSelect()
150
-        this.$emit('customerDefine', [])
151
-      }
121
+      this.selectUserId = '';
122
+      this.selectUser = {};
123
+      this.$emit('customerDefine', '')
152 124
     },
153 125
     defineEvent () {
154
-      this.final_result = JSON.parse(JSON.stringify(this.selectUser))
155
-      let arr = this.selectUser.map((v) => {
156
-        return v.user_id
157
-      })
158
-      if (arr.length == 0) {
126
+      if (this.selectUserId == '') {
159 127
         this.$message({
160 128
           message: '请选择客服',
161 129
           type: "warning"
162 130
         })
163 131
         return
164 132
       }
133
+      this.serviceInit('define')
165 134
       this.visible = false
166
-      this.$emit('customerDefine', arr)
167 135
     },
168 136
     init () {
169 137
       this.loading = true
@@ -172,16 +140,7 @@ export default {
172 140
         this.loading = false
173 141
         if (res && res.errno == 0) {
174 142
           this.userList = res.rst.list;
175
-          this.userList.forEach((item) => {
176
-            item.is_open = false//是否折叠
177
-            item.is_select = false//是否选中
178
-            item.user_list.forEach((item1) => {
179
-              item1.is_select = false
180
-            })
181
-          });
182
-          this.selectUser = JSON.parse(JSON.stringify(this.final_result));
183
-          this.changeSelect()
184
-          this.afferent_init()
143
+          this.serviceInit()
185 144
           this.userTotal = res.rst.count
186 145
         } else if (res.errno != 4002) {
187 146
           this.$message({
@@ -198,83 +157,15 @@ export default {
198 157
       arr.is_open = !arr.is_open
199 158
       this.$set(this.userList, index, arr)
200 159
     },
201
-    selectUserEvent (type, main_index, user_index) {
202
-      let selectUser = this.selectUser
203
-      let user_arr = this.userList[main_index];
204
-      if (type == 'all') {//点击部门全选时
205
-        if (!user_arr.is_select) {
206
-          selectUser = selectUser.concat(user_arr.user_list)
207
-        } else {
208
-          let arr = user_arr.user_list.map((v) => {
209
-            return v.user_id
210
-          })
211
-          selectUser = selectUser.filter((v) => {
212
-            return arr.indexOf(v.user_id) == -1
213
-          })
214
-        }
215
-      } else {//点击单个客服时
216
-        let brr = user_arr.user_list[user_index]
217
-        if (brr.is_select) {
218
-          selectUser = selectUser.filter((v) => {
219
-            return v.user_id != brr.user_id
220
-          })
221
-        } else {
222
-          selectUser.push(brr)
223
-        }
224
-      }
225
-      this.$set(this.userList, main_index, user_arr)
226
-      // 去重
227
-      let tmp = {};
228
-      selectUser = selectUser.reduce((list, item) => {
229
-        tmp[item.user_id] ? '' : (tmp[item.user_id] = list.push(item));
230
-        return list
231
-      }, []);
232
-      this.selectUser = selectUser
233
-      this.changeSelect()
160
+    selectUserEvent (type, user_id) {
161
+      this.selectUserId = user_id
234 162
     },
235
-    changeSelect () {//客服选择发生变化时,部门全选跟着相应的改变
236
-      let self_userList = JSON.parse(JSON.stringify(this.userList))
237
-      let arr_selectUser = this.selectUser.map((v) => { return v.user_id })
238
-      // 全选的改变
239
-      self_userList.forEach((item) => {
240
-        item.user_list = item.user_list.filter((v) => {
241
-          return arr_selectUser.indexOf(v.user_id) != -1
242
-        })
243
-        this.userList.forEach((main) => {
244
-          if (main.department_id == item.department_id) {
245
-            if (item.user_list.length == main.user_list.length) {
246
-              main.is_select = true
247
-            } else {
248
-              main.is_select = false
249
-            }
250
-          }
251
-        })
252
-      })
253
-      // 单个用户的改变
254
-      this.userList.forEach((item) => {
255
-        item.user_list.forEach((item1) => {
256
-          if (arr_selectUser.indexOf(item1.user_id) == -1) {
257
-            item1.is_select = false
258
-          } else {
259
-            item1.is_select = true
260
-          }
261
-        })
262
-      })
263
-    },
264
-    closeUser (index) {
265
-      if (index == -1) {
266
-        this.selectUser = []
267
-      } else {
268
-        this.selectUser.splice(index, 1)
269
-      }
270
-      this.changeSelect()
271
-    }
272 163
   }
273 164
 }
274 165
 </script>
275 166
 <style lang="scss" scoped>
276 167
 .propoverItem {
277
-  width: 300px;
168
+  width: 100%;
278 169
   flex: 1;
279 170
   height: 100%;
280 171
   .allMember {
@@ -323,10 +214,10 @@ export default {
323 214
 }
324 215
 .propoverItem,
325 216
 .line {
326
-  height: 478px;
217
+  max-height: 478px;
327 218
 }
328 219
 .memberBoxBig {
329
-  height: 400px;
220
+  max-height: 400px;
330 221
   overflow-y: auto;
331 222
 }
332 223
 .memberBox {

+ 24 - 17
project/src/components/customManage/transferRecord.vue

@@ -13,8 +13,12 @@
13 13
     <div class="screenBox">
14 14
       <!-- 搜索客户 -->
15 15
       <self-input :reset='resetFlag' @inputChange='(val)=>{input_keyword = val;init(1)}'></self-input>
16
+      <!-- 所属客服 -->
17
+      <service-single title='接替员工' :reset='resetFlag' @customerDefine="serviceSingleEvent"></service-single>
16 18
       <!-- 添加时间 -->
17 19
       <date-picker title="分配时间" :reset='resetFlag' @changeTime="changeTime"></date-picker>
20
+      <!-- 转接状态 -->
21
+      <self-channel title="转接状态" :reset='resetFlag' type='assignment_status' @channelDefine="(val)=>{assignment_status = val;init(1)}"></self-channel>
18 22
       <div class="reset" @click="resetEvent">重置</div>
19 23
     </div>
20 24
     <div class="tableInfo">
@@ -57,9 +61,11 @@
57 61
 <script>
58 62
 import selfInput from '@/components/assembly/screen/input.vue'
59 63
 import datePicker from '@/components/assembly/screen/datePicker.vue'
64
+import serviceSingle from '@/components/assembly/screen/serviceSingle.vue'
65
+import selfChannel from '@/components/assembly/screen/channel.vue'
60 66
 
61 67
 export default {
62
-  components: { selfInput, datePicker },
68
+  components: { selfInput, datePicker, serviceSingle, selfChannel },
63 69
   data () {
64 70
     return {
65 71
       type: '',
@@ -71,7 +77,9 @@ export default {
71 77
       input_keyword: '',
72 78
       resetFlag: false,
73 79
       tableData: [],
74
-      transfer_time: []
80
+      transfer_time: [],
81
+      user_id: '',
82
+      assignment_status: ''
75 83
     }
76 84
   },
77 85
   created () {
@@ -79,6 +87,14 @@ export default {
79 87
     this.init(1)
80 88
   },
81 89
   methods: {
90
+    serviceSingleEvent (val) {
91
+      if (val && val.user_id) {
92
+        this.user_id = val.user_id
93
+      } else {
94
+        this.user_id = ''
95
+      }
96
+      this.init(1)
97
+    },
82 98
     goBack () {
83 99
       localStorage.setItem('transter', this.type)
84 100
       this.$router.go(-1)
@@ -94,6 +110,9 @@ export default {
94 110
     resetEvent () {//重置
95 111
       this.resetFlag = !this.resetFlag
96 112
       this.input_keyword = '';
113
+      this.user_id = '';
114
+      this.assignment_status = '';
115
+      this.transfer_time = [];
97 116
       this.init(1)
98 117
     },
99 118
     init (page) {
@@ -101,32 +120,20 @@ export default {
101 120
       this.loading = true
102 121
       this.$axios.get(this.URL.BASEURL + this.URL.customerAssignmentList, {
103 122
         params: {
104
-          // user_id_list: this.user_id_list,
105
-          // add_date_start: this.add_date_start,
106
-          // add_date_end: this.add_date_end,
107
-          // add_way: this.add_way,
108
-          // pay_status: this.pay_status,
109
-          // pay_num_min: this.pay_num_min,
110
-          // pay_num_max: this.pay_num_max,
111
-          // tag_type: this.tag_type,
112
-          // tag_id_list: this.tag_id_list,
113
-          // loss_status: this.loss_status,
114 123
           assignment_date_start: this.transfer_time && this.transfer_time.length > 1 ? this.transfer_time[0] : '',
115 124
           assignment_date_end: this.transfer_time && this.transfer_time.length > 1 ? this.transfer_time[1] : '',
116 125
           customer_name: this.input_keyword,
117 126
           page: this.page,
118 127
           page_size: this.page_size,
119
-          type: this.type == 'off' ? 2 : 1
128
+          type: this.type == 'off' ? 2 : 1,
129
+          user_id: this.user_id,
130
+          assignment_status: this.assignment_status
120 131
         }
121 132
       }).then((res) => {
122 133
         var res = res.data
123 134
         this.loading = false
124 135
         if (res && res.errno == 0) {
125 136
           this.tableData = res.rst.data;
126
-          this.otherData = {
127
-            count: res.rst.data.count,
128
-            exclude_count: res.rst.data.exclude_count
129
-          }
130 137
           this.total = res.rst.pageInfo.total;
131 138
           this.pages = res.rst.pageInfo.pages;
132 139
         } else if (res.errno != 4002) {

+ 173 - 0
project/src/components/manage/authorityManage.vue

@@ -0,0 +1,173 @@
1
+<template>
2
+  <div>
3
+    <div class="tableInfo">
4
+      <div>
5
+        <div class="flex">
6
+          <div class="totalCustom">已授权<span>{{total}}</span>个企业</div>
7
+          <self-input style="margin-left:80px" label_name="企业关键词" @inputChange='(val)=>{input_keyword = val;init(1)}'></self-input>
8
+        </div>
9
+      </div>
10
+      <div class="flex">
11
+        <el-button type="primary" size="small" @click="createAuthCode">{{$store.state.simpleName}}授权</el-button>
12
+      </div>
13
+    </div>
14
+    <div class="bg-ffffff">
15
+      <div class="corpListBox">
16
+        <div class="corpItem" v-for="(item,index) in tableData" :key="index">
17
+          <div class="left">
18
+            <!-- <img :src="item.corp_square_logo_url" alt=""> -->
19
+            <span>{{item.corp_full_name?item.corp_full_name:item.corp_name}}</span>
20
+          </div>
21
+          <i class="el-icon-refresh" @click="resetCorp(item)"></i>
22
+        </div>
23
+      </div>
24
+      <noData v-if="!loading&&tableData.length==0"></noData>
25
+    </div>
26
+    <div class="pagination" v-show="total>0">
27
+      <el-pagination background :current-page="page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count='Number(pages)'>
28
+      </el-pagination>
29
+    </div>
30
+  </div>
31
+</template>
32
+<script>
33
+import selfInput from '@/components/assembly/screen/input.vue'
34
+import noData from '@/components/assembly/noData.vue'
35
+export default {
36
+  components: { selfInput, noData },
37
+  data () {
38
+    return {
39
+      loading: false,
40
+      page: 1,
41
+      pages: 0,
42
+      total: 0,
43
+      page_size: 40,
44
+      tableData: [],
45
+      input_keyword: ''
46
+    }
47
+  },
48
+  created () {
49
+    this.init(1)
50
+  },
51
+  methods: {
52
+    resetCorp (item) {//同步企业信息
53
+      this.$loading(this.$loadingConfig);
54
+      this.$axios.get(this.URL.BASEURL + this.URL.getCorCustomerList, {
55
+        params: {
56
+          corpid: item.corpid
57
+        }
58
+      }).then((res) => {
59
+        var res = res.data;
60
+        this.$loading(this.$loadingConfig).close();
61
+        if (res && res.errno == 0) {
62
+          this.$message({
63
+            message: '同步企业信息成功!',
64
+            type: 'warning'
65
+          })
66
+        } else {
67
+          this.$message({
68
+            message: res.err,
69
+            type: 'warning'
70
+          })
71
+        }
72
+      }).catch(() => {
73
+        this.$loading(this.$loadingConfig).close();
74
+      })
75
+    },
76
+    createAuthCode () {//企微授权
77
+      this.$loading(this.$loadingConfig);
78
+      this.$axios.get(this.URL.BASEURL + this.URL.authCode, {}).then((res) => {
79
+        var res = res.data;
80
+        this.$loading(this.$loadingConfig).close();
81
+        if (res && res.errno == 0) {
82
+          if (res.rst.data && res.rst.data.url) {
83
+            let a = document.createElement('a');
84
+            a.setAttribute('href', res.rst.data.url);
85
+            a.setAttribute('target', '_blank');
86
+            a.setAttribute('id', 'startTelMedicine');
87
+            document.body.appendChild(a);
88
+            a.click();
89
+            document.body.removeChild(document.getElementById('startTelMedicine'));
90
+          } else {
91
+            this.$message({
92
+              message: '授权链接不存在,请联系管理员',
93
+              type: 'warning'
94
+            })
95
+          }
96
+        } else {
97
+          this.$message({
98
+            message: res.err,
99
+            type: 'warning'
100
+          })
101
+        }
102
+      }).catch(() => {
103
+        this.$loading(this.$loadingConfig).close();
104
+      })
105
+    },
106
+    init (page) {
107
+      this.page = page ? page : this.page;
108
+      this.loading = true
109
+      this.$axios.get(this.URL.BASEURL + this.URL.authorize_corpList, {
110
+        params: {
111
+          keyword: this.input_keyword,
112
+          page: this.page,
113
+          page_size: this.page_size
114
+        }
115
+      }).then((res) => {
116
+        var res = res.data
117
+        this.loading = false
118
+        if (res && res.errno == 0) {
119
+          this.tableData = res.rst.data;
120
+          this.total = res.rst.pageInfo.total;
121
+          this.pages = res.rst.pageInfo.pages;
122
+        } else if (res.errno != 4002) {
123
+          this.$message({
124
+            message: res.err,
125
+            type: "warning"
126
+          })
127
+        }
128
+      }).catch((err) => {
129
+        this.loading = false
130
+      });
131
+    },
132
+    handleCurrentChange (val) {
133
+      this.init(val)
134
+    }
135
+  }
136
+}
137
+</script>
138
+<style lang="scss" scoped>
139
+@import "@/style/list.scss";
140
+.tableInfo {
141
+  height: 50px;
142
+}
143
+.corpListBox {
144
+  background: #fff;
145
+  display: flex;
146
+  flex-wrap: wrap;
147
+  padding: 8px;
148
+  .corpItem {
149
+    height: 42px;
150
+    background: #edf8fd;
151
+    display: flex;
152
+    align-items: center;
153
+    justify-content: space-between;
154
+    margin: 8px;
155
+    padding: 0 10px;
156
+    color: #383e47;
157
+    font-size: 15px;
158
+    line-height: 21px;
159
+    .left {
160
+      display: flex;
161
+      align-items: center;
162
+      flex: 1;
163
+    }
164
+    i {
165
+      margin-left: 10px;
166
+      cursor: pointer;
167
+      &:hover {
168
+        color: #00b38a;
169
+      }
170
+    }
171
+  }
172
+}
173
+</style>

+ 11 - 0
project/src/router/allRouter.js

@@ -10,6 +10,7 @@ const welcom_message = () => import(/* webpackChunkName: 'welcom_message' */ '@/
10 10
 const lostCustomer = () => import(/* webpackChunkName: 'lostCustomer' */ '@/components/customManage/lostCustomer.vue')
11 11
 const customerTransfer = () => import(/* webpackChunkName: 'customerTransfer' */ '@/components/customManage/customerTransfer.vue')
12 12
 const transferRecord = () => import(/* webpackChunkName: 'transferRecord' */ '@/components/customManage/transferRecord.vue')
13
+const authorityManage = () => import(/* webpackChunkName: 'authorityManage' */ '@/components/manage/authorityManage.vue')
13 14
 
14 15
 
15 16
 export var allRouter = [
@@ -137,6 +138,16 @@ export var allRouter = [
137 138
           isLogin: true,
138 139
           title: '群发详情'
139 140
         }
141
+      },
142
+      {
143
+        path: 'authorityManage',
144
+        name: 'authorityManage',
145
+        component: authorityManage,
146
+        meta: {
147
+          keepAlive: false,
148
+          isLogin: true,
149
+          title: '授权管理'
150
+        }
140 151
       }
141 152
     ]
142 153
   }

+ 1 - 1
project/src/router/navList.js

@@ -80,7 +80,7 @@ var navList = [
80 80
       },
81 81
       {
82 82
         viewName: '授权管理',
83
-        path: 'hotVideo',
83
+        path: 'authorityManage',
84 84
       },
85 85
     ]
86 86
   },

+ 22 - 27
project/src/store.js

@@ -6,9 +6,11 @@ import { setLocal, getLocal, delLocal, delAllLocal } from '@/assets/js/storage.j
6 6
 import { setCookie, getCookie, delCookie, delAllCookie } from '@/assets/js/cookie.js'
7 7
 Vue.use(Vuex);
8 8
 const state = {  //要设置的全局访问的state对象
9
-  corpid: '',//企业ID
9
+  defaultCorp: {},//企业信息
10 10
   exportNumber: 500,//导出的数量
11
-  simpleName: '企微助手',//平台简称
11
+  simpleName: '企微',//平台简称
12
+  fullName: '企微助手',//平台全称
13
+  authorize_corpList: [],//企业列表
12 14
 };
13 15
 const getters = {
14 16
   // getIsCollapse (state) {
@@ -23,31 +25,24 @@ const mutations = {
23 25
 const actions = {
24 26
   profileInit ({ commit, state }, obj) {
25 27
     return new Promise(function (resolve, reject) {
26
-      state.corpid = 'wwc8d3e33f8e096671'
27
-      resolve()
28
-      //     //获取用户被禁用权限
29
-      //     axios.get(api.BASEURL + api.userProfile, {
30
-      //       params: {
31
-      //         id: getCookie('admin_id'),
32
-      //       }
33
-      //     }).then(function (res) {
34
-      //       let data = res.data;
35
-      //       if (data && data.errno == 0) {
36
-      //         state.userInfo = data.rst
37
-      //       } else {
38
-      //         delAllLocal();//清除所有的
39
-      //         delAllCookie();//清除所有的
40
-      //         if (data.errno == '4002') {
41
-      //           // 未登录
42
-      //           resolve('未登录');
43
-      //           return;
44
-      //         }
45
-      //         resolve(data);
46
-      //       }
47
-      //       resolve(true);
48
-      //     }).catch(function (error) {
49
-      //       resolve(false);
50
-      //     });
28
+      //获取企业列表
29
+      axios.get(api.BASEURL + api.authorize_corpList, {
30
+        params: {
31
+          page: 1,
32
+          page_size: 500
33
+        }
34
+      }).then(function (res) {
35
+        let data = res.data;
36
+        if (data && data.errno == 0) {
37
+          state.authorize_corpList = data.rst.data
38
+          state.defaultCorp = data.rst.data[0]
39
+          resolve(true);
40
+        } else {
41
+          resolve(true);
42
+        }
43
+      }).catch(function (error) {
44
+        resolve(false);
45
+      });
51 46
     });
52 47
   }
53 48
 }