Browse Source

feat: 迁移记录 - 接口联调

zhengxy 2 years ago
parent
commit
5c92503d11

+ 35 - 32
project/src/components/customManage/removeRecord.vue

2
   <div v-loading="loading">
2
   <div v-loading="loading">
3
     <div class="screenBox">
3
     <div class="screenBox">
4
       <!-- 创建人 -->
4
       <!-- 创建人 -->
5
-      <selfInput label_name="创建人" :reset='resetFlag' :keyword="filter.operator_name" @inputChange='onChangeKeyword' />
5
+      <selfChannel title="创建人" :reset="resetFlag" type="circleCreate" :afferent_value="filter.operator_id" @channelDefine="onChangeOperatorId" />
6
       <!-- 迁出成员 -->
6
       <!-- 迁出成员 -->
7
-      <serviceSingle title='迁出成员' :reset='resetFlag' :afferent_userId="filter.handover_userid" @customerDefine="onChangeHandoverUserId" />
7
+      <serviceSingle title="迁出成员" :reset="resetFlag" :afferent_userId="filter.handover_userid" @customerDefine="onChangeHandoverUserId" />
8
       <!-- 接替成员 -->
8
       <!-- 接替成员 -->
9
-      <serviceSingle title='接替成员' :reset='resetFlag' :afferent_userId="filter.takeover_userid" @customerDefine="onChangeTakeOverUserId" />
9
+      <serviceSingle title="接替成员" :reset="resetFlag" :afferent_userId="filter.takeover_userid" @customerDefine="onChangeTakeOverUserId" />
10
       <!-- 分配时间 -->
10
       <!-- 分配时间 -->
11
-      <datePicker title="分配时间" :reset='resetFlag' :afferent_time="filter.time" @changeTime="onChangeTime" />
11
+      <datePicker title="分配时间" :reset="resetFlag" :afferent_time="filter.time" @changeTime="onChangeTime" />
12
       <!-- 迁移状态 -->
12
       <!-- 迁移状态 -->
13
-      <selfChannel title="迁移状态" :reset='resetFlag' type='remove_status' :afferent_value="filter.assignment_status" @channelDefine="onChangeStatus" />
13
+      <selfChannel title="迁移状态" :reset="resetFlag" type="remove_status" :afferent_value="filter.assignment_status" @channelDefine="onChangeStatus" />
14
       <!-- 迁移类型 -->
14
       <!-- 迁移类型 -->
15
-      <selfChannel title="迁移类型" :reset='resetFlag' type='remove_type' :afferent_value="filter.type" @channelDefine="onChangeType" />
15
+      <selfChannel title="迁移类型" :reset="resetFlag" type="remove_type" :afferent_value="filter.type" @channelDefine="onChangeType" />
16
       <div class="reset" @click="resetEvent">重置</div>
16
       <div class="reset" @click="resetEvent">重置</div>
17
     </div>
17
     </div>
18
-    <!-- table -->
19
-    <el-table :height='height' :data="tableData" style="width: 100%;margin-top:10px;">
18
+
19
+    <el-table :height="height" :data="tableData" style="width: 100%;margin-top:10px;">
20
       <el-table-column prop="create_time" label="分配时间" align="center" min-width="160" />
20
       <el-table-column prop="create_time" label="分配时间" align="center" min-width="160" />
21
       <el-table-column prop="type" label="迁移类型" align="center" min-width="140">
21
       <el-table-column prop="type" label="迁移类型" align="center" min-width="140">
22
         <template slot-scope="{ row }">
22
         <template slot-scope="{ row }">
55
         </template>
55
         </template>
56
       </el-table-column>
56
       </el-table-column>
57
     </el-table>
57
     </el-table>
58
+
58
     <div class="pagination" v-show="pagination.total > 0">
59
     <div class="pagination" v-show="pagination.total > 0">
59
-      <el-pagination background :current-page="pagination.page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count='Number(pagination.pages)'>
60
-      </el-pagination>
60
+      <el-pagination background :current-page="pagination.page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count="Number(pagination.pages)" />
61
     </div>
61
     </div>
62
   </div>
62
   </div>
63
 </template>
63
 </template>
80
 ])
80
 ])
81
 
81
 
82
 export default {
82
 export default {
83
-  components: { selfInput, datePicker, serviceSingle, selfChannel },
83
+  components: {
84
+    selfInput,
85
+    datePicker,
86
+    serviceSingle,
87
+    selfChannel
88
+  },
84
   data () {
89
   data () {
85
     return {
90
     return {
86
       loading: false,
91
       loading: false,
95
         total: 0,
100
         total: 0,
96
       },
101
       },
97
       filter: {
102
       filter: {
98
-        operator_name: '',
103
+        operator_id: '',
99
         handover_userid: '',
104
         handover_userid: '',
100
         takeover_userid: '',
105
         takeover_userid: '',
101
         time: [],
106
         time: [],
133
     },
138
     },
134
     onClickDetail({ type, record_id }) {
139
     onClickDetail({ type, record_id }) {
135
       this.handleSetLocalParams()
140
       this.handleSetLocalParams()
136
-
137
       const pathOpt = {
141
       const pathOpt = {
138
         1: '/transferRecord/on',
142
         1: '/transferRecord/on',
139
         2: '/transferRecord/off',
143
         2: '/transferRecord/off',
149
     handleGetTypeName(type) {
153
     handleGetTypeName(type) {
150
       return typesMap.get(Number(type)) || '-'
154
       return typesMap.get(Number(type)) || '-'
151
     },
155
     },
152
-    onChangeKeyword(val) {
153
-      this.filter.operator_name = val || ''
156
+    onChangeOperatorId(val) {
157
+      this.filter.operator_id = val
154
       this.pagination.page = 1
158
       this.pagination.page = 1
155
       this.handleGetList()
159
       this.handleGetList()
156
     },
160
     },
181
       this.pagination.page = 1
185
       this.pagination.page = 1
182
       this.handleGetList()
186
       this.handleGetList()
183
     },
187
     },
188
+    handleCurrentChange(currentPage) {
189
+      this.pagination.page = currentPage
190
+      this.handleGetList()
191
+    },
184
     resetEvent () {
192
     resetEvent () {
185
       this.resetFlag = !this.resetFlag
193
       this.resetFlag = !this.resetFlag
186
-      this.filter.operator_name = ''
194
+      this.filter.operator_id = ''
187
       this.filter.handover_userid = ''
195
       this.filter.handover_userid = ''
188
       this.filter.takeover_userid = ''
196
       this.filter.takeover_userid = ''
189
       this.filter.time = [];
197
       this.filter.time = [];
193
       this.handleGetList()
201
       this.handleGetList()
194
     },
202
     },
195
     async handleGetList() {
203
     async handleGetList() {
196
-      console.log('handleGetList => ')
197
       this.handleClearLocalParams()
204
       this.handleClearLocalParams()
198
       try {
205
       try {
199
         this.loading = true
206
         this.loading = true
202
         const params = {
209
         const params = {
203
           assignment_date_start,
210
           assignment_date_start,
204
           assignment_date_end,
211
           assignment_date_end,
205
-          operator_name: this.filter.operator_name,
212
+          operator_id: this.filter.operator_id,
206
           handover_userid: this.filter.handover_userid,
213
           handover_userid: this.filter.handover_userid,
207
           takeover_userid: this.filter.takeover_userid,
214
           takeover_userid: this.filter.takeover_userid,
208
           assignment_status: this.filter.assignment_status,
215
           assignment_status: this.filter.assignment_status,
210
           page: this.pagination.page,
217
           page: this.pagination.page,
211
           page_size: this.pagination.page_size,
218
           page_size: this.pagination.page_size,
212
         }
219
         }
213
-        console.log('params => ', JSON.parse(JSON.stringify(params)))
214
         const { data: res = {} } = await this.$axios.get(url, { params })
220
         const { data: res = {} } = await this.$axios.get(url, { params })
215
         if (res && res.errno == 0) {
221
         if (res && res.errno == 0) {
216
-          this.tableData = res.rst.data;
217
-          this.pagination.total = res.rst.pageInfo.total;
218
-          this.pagination.pages = res.rst.pageInfo.pages;
222
+          this.tableData = res.rst.data
223
+          this.pagination.total = res.rst.pageInfo.total
224
+          this.pagination.pages = res.rst.pageInfo.pages
219
         } else if (res.errno != 4002) {
225
         } else if (res.errno != 4002) {
220
           this.$message.warning(res.err)
226
           this.$message.warning(res.err)
221
-          this.tableData = [];
222
-          this.pagination.total = 0;
223
-          this.pagination.pages = 0;
227
+          this.handleClearTableData()
224
         }
228
         }
225
       } catch (error) {
229
       } catch (error) {
226
         console.log(error)
230
         console.log(error)
227
-        this.tableData = [];
228
-        this.pagination.total = 0;
229
-        this.pagination.pages = 0;
231
+        this.handleClearTableData()
230
       } finally {
232
       } finally {
231
         this.loading = false
233
         this.loading = false
232
       }
234
       }
233
     },
235
     },
234
-    handleCurrentChange(currentPage) {
235
-      this.pagination.page = currentPage
236
-      this.handleGetList()
237
-    }
236
+    handleClearTableData() {
237
+      this.tableData = []
238
+      this.pagination.total = 0
239
+      this.pagination.pages = 0
240
+    },
238
   }
241
   }
239
 }
242
 }
240
 </script>
243
 </script>

+ 1 - 1
project/src/components/customOperate/employee_bulk_messaging_log.vue

68
           <!-- -1 发送失败 && 失败原因 -->
68
           <!-- -1 发送失败 && 失败原因 -->
69
           <div class="status-wrap" >
69
           <div class="status-wrap" >
70
             <span v-if="row.enable==-2" class="c-F03F5C">已删除</span>
70
             <span v-if="row.enable==-2" class="c-F03F5C">已删除</span>
71
-            <span v-else-if="row.enable==-1" :class="[(row.err_msg && row.err_msg.length) ? 'c-F03F5C' : 'c-666']">发送失败</span>
71
+            <span v-else-if="row.enable==-1" :class="[(row.err_msg && row.err_msg.length) ? 'c-F03F5C' : 'c-666']">发送失败</span>
72
             <span v-else-if="row.enable==0" class="c-F03F5C">禁用</span>
72
             <span v-else-if="row.enable==0" class="c-F03F5C">禁用</span>
73
             <span v-else-if="row.enable==1" class="c-FFB055">待发送</span>
73
             <span v-else-if="row.enable==1" class="c-FFB055">待发送</span>
74
             <span v-else-if="row.enable==2" class="c-448AFF">正在发送中</span>
74
             <span v-else-if="row.enable==2" class="c-448AFF">正在发送中</span>