miaofuhao лет назад: 6
Родитель
Сommit
6383bbc390

+ 16 - 0
fuwaiCallCenterWeb.UI/src/api/reportForm/provCallduration.js

@@ -0,0 +1,16 @@
1
+import request from '@/utils/request'
2
+export function getDataList(params) {
3
+  return request({
4
+    url: 'callcenterapi/api/talktime/getpcdatalist',
5
+    method: 'get',
6
+    params
7
+  })
8
+}
9
+
10
+export function getColumnList() {
11
+  return request({
12
+    url: 'callcenterapi/api/talktime/getpccolumnlist',
13
+    method: 'get'
14
+
15
+  })
16
+}

+ 247 - 0
fuwaiCallCenterWeb.UI/src/views/customer/customerManage/addOrEdit copy.vue

@@ -0,0 +1,247 @@
1
+<template>
2
+  <div v-loading="loading">
3
+    <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="150px" class="cusUser_form">
4
+      <el-form-item label="姓名" prop="name">
5
+        <el-input v-model="ruleForm.name" placeholder="请输入客户姓名"/>
6
+      </el-form-item>
7
+      <el-form-item label="手机号码" prop="mobilephone">
8
+        <el-input v-model="ruleForm.mobilephone" placeholder="请输入手机号码"/>
9
+      </el-form-item>
10
+      <el-form-item label="用户角色" prop="provinceCity">
11
+        <el-cascader
12
+          v-model="codes"
13
+          :options="codesDatas"
14
+          :props="props2"
15
+          placeholder="请选择角色"
16
+          class="form_select"
17
+          clearable
18
+          filterable
19
+          change-on-select/>
20
+      </el-form-item>
21
+
22
+      <el-form-item label="固定号码" prop="telephone">
23
+        <el-input v-model="ruleForm.telephone" placeholder="请输入固定号码"/>
24
+      </el-form-item>
25
+      <el-form-item label="所在地" prop="provinceCity">
26
+        <el-cascader
27
+          v-model="provinceCity"
28
+          :options="provinceCityDatas"
29
+          :props="props"
30
+          placeholder="请选择省市"
31
+          class="form_select"
32
+          clearable
33
+          filterable
34
+          change-on-select/>
35
+      </el-form-item>
36
+      <el-form-item label="具体地址" prop="address">
37
+        <el-input v-model="ruleForm.address" placeholder="请输入具体地址"/>
38
+      </el-form-item>
39
+      <el-form-item>
40
+        <el-button type="primary" @click="submitForm">保存</el-button>
41
+        <el-button @click="resetForm">重置</el-button>
42
+      </el-form-item>
43
+    </el-form>
44
+  </div>
45
+</template>
46
+
47
+<script>
48
+import { getProviceCity, getroleTreeList } from '@/api/commonAPI'
49
+import { getCusUser, addCusUser, editCusUser } from '@/api/customer/customerManage'
50
+import { validName, validateTel, validFax, validQQ, validEmail } from '@/utils/validate'
51
+
52
+const validNameRule = (rule, value, callback) => {
53
+  if (!validName(value)) {
54
+    callback(new Error('请输入有效的姓名(2-20位汉字和·•的组合)!'))
55
+  } else {
56
+    callback()
57
+  }
58
+}
59
+
60
+const validateTelRule = (rule, value, callback) => {
61
+  if (!validateTel(value)) {
62
+    callback(new Error('请输入有效的客户电话!'))
63
+  } else {
64
+    callback()
65
+  }
66
+}
67
+
68
+const validFaxRule = (rule, value, callback) => {
69
+  if (value) {
70
+    if (!validFax(value)) {
71
+      callback(new Error('请输入正确的固话号码!'))
72
+    } else {
73
+      callback()
74
+    }
75
+  } else {
76
+    callback()
77
+  }
78
+}
79
+export default {
80
+  name: 'AddOrEdit',
81
+  props: {
82
+    rowid: {
83
+      type: String,
84
+      default: ''
85
+    },
86
+    isCallin: {
87
+      type: Boolean,
88
+      default: false
89
+    },
90
+    layerid: {
91
+      type: String,
92
+      default: ''
93
+    }
94
+  },
95
+  data() {
96
+    return {
97
+      provinceCity: [], // 省市下拉绑定的值
98
+      provinceCityDatas: [], // 省市下拉数据
99
+      codes: [], // 省市下拉绑定的值
100
+      codesDatas: [], // 省市下拉数据
101
+      props: { // 自定义省市下拉数据的key值
102
+        value: 'code',
103
+        label: 'name',
104
+        children: 'entityJson'
105
+      },
106
+      props2: { // 自定义省市下拉数据的key值
107
+        value: 'code',
108
+        label: 'name'
109
+      },
110
+      ruleForm: {
111
+        id: '',
112
+        name: '', //	否	string	姓名
113
+        mobilephone: '', //	是	string	手机号码
114
+        telephone: '', //	是	string	手机号码
115
+        province: '', //	否	string	省code
116
+        city: '', //	否	string	市code
117
+        usercodes: '',
118
+        rolecodes: '',
119
+        address: '' //	否	string	地址
120
+      },
121
+      rules: {
122
+        name: [{
123
+          required: true,
124
+          // message: '请输入客户姓名',
125
+          trigger: 'blur',
126
+          validator: validNameRule
127
+        }],
128
+        mobilephone: [{
129
+          required: true,
130
+          trigger: 'blur',
131
+          validator: validateTelRule
132
+        }],
133
+        telephone: [{
134
+          required: false,
135
+          trigger: 'blur',
136
+          validator: validFaxRule
137
+        }]
138
+      },
139
+      loading: false
140
+    }
141
+  },
142
+  created() {
143
+    this.getProCity().then(() => {
144
+      if (this.rowid) {
145
+        this.ruleForm.id = this.rowid
146
+        this.getDetail(this.rowid)
147
+      }
148
+    })
149
+    this.getCodes()
150
+  },
151
+  methods: {
152
+    submitForm() {
153
+      this.$refs.ruleForm.validate((valid) => {
154
+        if (valid) {
155
+          this.ruleForm.province = this.provinceCity && this.provinceCity[0]
156
+          this.ruleForm.city = this.provinceCity && this.provinceCity[1]
157
+          this.ruleForm.usercodes = this.codes && this.codes[0]
158
+          this.ruleForm.rolecodes = this.codes && this.codes[1]
159
+          // 添加
160
+          if (!this.rowid) {
161
+            addCusUser(this.ruleForm).then(response => {
162
+              this.loading = false
163
+              if (response.state.toLowerCase() === 'success') {
164
+                debugger
165
+                this.$parent.$layer.close(this.layerid)
166
+                if (this.isCallin) {
167
+                  this.$parent.getCusInfos() // 来电弹屏内获取客户资料信息
168
+                } else {
169
+                  this.$parent.getList() // 重新加载父级数据
170
+                }
171
+                this.$message.success('恭喜你,客户信息添加成功!')
172
+              }
173
+            }).catch(() => {
174
+              this.loading = false
175
+            })
176
+            return
177
+          }
178
+          // 编辑
179
+          editCusUser(this.ruleForm).then(response => {
180
+            this.loading = false
181
+            if (response.state.toLowerCase() === 'success') {
182
+              this.$parent.$layer.close(this.layerid)
183
+              this.$parent.getList() // 重新加载父级数据
184
+              this.$message.success('恭喜你,客户信息编辑成功!')
185
+            }
186
+          }).catch(() => {
187
+            this.loading = false
188
+          })
189
+        } else {
190
+          this.$message.error('请输入有效的必填项信息!')
191
+          return false
192
+        }
193
+      })
194
+    },
195
+    resetForm() {
196
+      this.provinceCity = []
197
+      this.codes = []
198
+      this.$refs.ruleForm.resetFields()
199
+    },
200
+    // 详情
201
+    getDetail(rid) {
202
+      getCusUser(rid).then(response => {
203
+        if (response.state.toLowerCase() === 'success') {
204
+          const res = response.data
205
+          this.ruleForm.name = res.name //	否	string	姓名
206
+          this.ruleForm.mobilephone = res.mobilephone //	是	string	手机号码
207
+          this.ruleForm.telephone = res.telephone //	是	string	手机号码
208
+          this.provinceCity = [res.province, res.city]//	否	string	省code 市
209
+          this.ruleForm.address = res.address //	否	string	地址
210
+        }
211
+      })
212
+    },
213
+    // 获取省市下拉数据
214
+    getProCity() {
215
+      return new Promise(resolve => {
216
+        getProviceCity().then(response => {
217
+          if (response.state.toLowerCase() === 'success') {
218
+            this.provinceCityDatas = response.data
219
+          }
220
+        })
221
+        resolve()
222
+      })
223
+    },
224
+    // 获取用户部门角色
225
+    getCodes() {
226
+      return new Promise(resolve => {
227
+        getroleTreeList().then(response => {
228
+          if (response.state.toLowerCase() === 'success') {
229
+            this.codesDatas = response.data
230
+          }
231
+        })
232
+        resolve()
233
+      })
234
+    }
235
+  }
236
+}
237
+</script>
238
+
239
+<style rel="stylesheet/scss" lang="scss">
240
+.cusUser_form .form_select{
241
+	width: 100%;
242
+}
243
+</style>
244
+
245
+<style rel="stylesheet/scss" lang="scss" scoped>
246
+
247
+</style>

+ 417 - 14
fuwaiCallCenterWeb.UI/src/views/customer/customerManage/addOrEdit.vue

@@ -36,19 +36,71 @@
36 36
       <el-form-item label="具体地址" prop="address">
37 37
         <el-input v-model="ruleForm.address" placeholder="请输入具体地址"/>
38 38
       </el-form-item>
39
-      <el-form-item>
40
-        <el-button type="primary" @click="submitForm">保存</el-button>
41
-        <el-button @click="resetForm">重置</el-button>
42
-      </el-form-item>
39
+      <el-form-item/>
43 40
     </el-form>
41
+    <el-row :gutter="20" class="filter-container">
42
+
43
+      <el-col :lg="24">
44
+        <draggable v-model="pagerLists" @update="datadragEnd">
45
+          <transition-group tag="div" type="transition" name="flip-list">
46
+            <div v-for="(item, index) in pagerLists" :key="item.queguid" class="question_list">
47
+              <div class="question">
48
+                <div class="question_tit">
49
+                  <div class="title">
50
+                    <b class="sign">*</b>
51
+                    <span class="sort">{{ item.sort + 1 }}</span>
52
+                    <b class="option_title">{{ item.quetitle }}</b>
53
+                  </div>
54
+                  <div :lg="12" class="queOpion">
55
+                    <div class="queOptext">
56
+                      <template v-if="item.type === '1'">
57
+                        <el-input v-model="item.name" placeholder="请输入内容"/>
58
+                      </template>
59
+                    </div>
60
+                  </div>
61
+                </div>
62
+                <div v-show="!item.isEdit" class="operate_btn">
63
+                  <el-button size="mini" plain type="primary" @click.stop="btn_edit(item)">编辑</el-button>
64
+                  <el-button size="mini" plain type="danger" @click.stop="btn_delete(index)">删除</el-button>
65
+                  <el-button size="mini" plain type="primary" @click.stop="btn_moveup(index)">上移</el-button>
66
+                  <el-button size="mini" plain type="primary" @click.stop="btn_movedown(index)">下移</el-button>
67
+                </div>
68
+              </div>
69
+              <div v-show="item.isEdit" class="question_edit">
70
+                <div class="title_area">
71
+                  <el-input v-model="item.quetitle" placeholder="请输入标题" clearable class="title_input"/>
72
+                  <el-button type="primary" class="title_btn" @click="btn_edit(item)">保存</el-button>
73
+                </div>
74
+
75
+              </div>
76
+            </div>
77
+          </transition-group>
78
+        </draggable>
79
+      </el-col>
80
+
81
+      <div class="clearfix sub-navbar">
82
+        <!-- <sticky> -->
83
+        <el-button type="primary" plain class="filter-item" @click="btn_addPagers('1')">
84
+          添加
85
+        </el-button>
86
+        <el-button type="primary" class="filter-item" @click="btn_save">
87
+          提交
88
+        </el-button>
89
+        <!-- </sticky> -->
90
+      </div>
91
+    </el-row>
44 92
   </div>
93
+
45 94
 </template>
46 95
 
47 96
 <script>
97
+import draggable from 'vuedraggable'
98
+import { guid } from '@/utils'
99
+// import { addPager, editPager, getPager } from '@/api/questionnaire/management'
100
+import Sticky from '@/components/Sticky'
48 101
 import { getProviceCity, getroleTreeList } from '@/api/commonAPI'
49 102
 import { getCusUser, addCusUser, editCusUser } from '@/api/customer/customerManage'
50 103
 import { validName, validateTel, validFax, validQQ, validEmail } from '@/utils/validate'
51
-
52 104
 const validNameRule = (rule, value, callback) => {
53 105
   if (!validName(value)) {
54 106
     callback(new Error('请输入有效的姓名(2-20位汉字和·•的组合)!'))
@@ -78,6 +130,10 @@ const validFaxRule = (rule, value, callback) => {
78 130
 }
79 131
 export default {
80 132
   name: 'AddOrEdit',
133
+  components: {
134
+    draggable,
135
+    Sticky
136
+  },
81 137
   props: {
82 138
     rowid: {
83 139
       type: String,
@@ -94,6 +150,7 @@ export default {
94 150
   },
95 151
   data() {
96 152
     return {
153
+      pagerLists: [],
97 154
       provinceCity: [], // 省市下拉绑定的值
98 155
       provinceCityDatas: [], // 省市下拉数据
99 156
       codes: [], // 省市下拉绑定的值
@@ -113,6 +170,7 @@ export default {
113 170
         mobilephone: '', //	是	string	手机号码
114 171
         telephone: '', //	是	string	手机号码
115 172
         province: '', //	否	string	省code
173
+        customfields: '',
116 174
         city: '', //	否	string	市code
117 175
         usercodes: '',
118 176
         rolecodes: '',
@@ -143,15 +201,28 @@ export default {
143 201
     this.getProCity().then(() => {
144 202
       if (this.rowid) {
145 203
         this.ruleForm.id = this.rowid
146
-        this.getDetail(this.rowid)
204
+        this.getDetail_1(this.rowid)
147 205
       }
148 206
     })
149 207
     this.getCodes()
150 208
   },
151 209
   methods: {
152
-    submitForm() {
210
+    btn_save() {
211
+      if (this.pagerLists.length === 0) {
212
+        this.$message.warning('您还没有添加试题!')
213
+        return
214
+      }
215
+      for (let i = 0, len = this.pagerLists.length; i < len; i++) {
216
+        if (this.pagerLists[i].isEdit) {
217
+          this.$message.warning(`第${i + 1}题还没有编辑完成!`)
218
+          return
219
+        }
220
+      }
221
+
153 222
       this.$refs.ruleForm.validate((valid) => {
154 223
         if (valid) {
224
+          // 修改试题数据用于提交
225
+          this.ruleForm.customfields = this.getPagerOptions()
155 226
           this.ruleForm.province = this.provinceCity && this.provinceCity[0]
156 227
           this.ruleForm.city = this.provinceCity && this.provinceCity[1]
157 228
           this.ruleForm.usercodes = this.codes && this.codes[0]
@@ -198,7 +269,7 @@ export default {
198 269
       this.$refs.ruleForm.resetFields()
199 270
     },
200 271
     // 详情
201
-    getDetail(rid) {
272
+    getDetail_1(rid) {
202 273
       getCusUser(rid).then(response => {
203 274
         if (response.state.toLowerCase() === 'success') {
204 275
           const res = response.data
@@ -207,6 +278,7 @@ export default {
207 278
           this.ruleForm.telephone = res.telephone //	是	string	手机号码
208 279
           this.provinceCity = [res.province, res.city]//	否	string	省code 市
209 280
           this.ruleForm.address = res.address //	否	string	地址
281
+          this.pagerLists = this.changePagerOptions(res.customfields)
210 282
         }
211 283
       })
212 284
     },
@@ -231,17 +303,348 @@ export default {
231 303
         })
232 304
         resolve()
233 305
       })
306
+    },
307
+    /**
308
+			 * 添加试题
309
+			 * @type 1问答题,2单选题,3多选题
310
+			 */
311
+    btn_addPagers(type) {
312
+      const pagerNum = this.pagerLists.length
313
+      let itemList = []
314
+      if (this.pagerLists && this.pagerLists.length > 0) {
315
+        for (let i = 0, len = this.pagerLists.length; i < len; i++) {
316
+          if (this.pagerLists[i].isEdit) {
317
+            this.$message.warning(`第${i + 1}题还没有编辑完成!`)
318
+            return
319
+          }
320
+          // this.$set(this.pagerLists[i], 'isEdit', false);
321
+        }
322
+      }
323
+      if (Number(type) > 1) {
324
+        itemList = [{
325
+          'id': guid(),
326
+          'queguid': '',
327
+          'name': '选项1',
328
+          'sort': 0
329
+        },
330
+        {
331
+          'id': guid(),
332
+          'queguid': '',
333
+          'name': '选项2',
334
+          'sort': 1
335
+        }]
336
+      }
337
+      this.pagerLists.push({
338
+        'queguid': guid(), // 前端生成的guid
339
+        'quetitle': '标题',
340
+        'type': type,
341
+        'sort': pagerNum,
342
+        'isEdit': true, // 是否是编辑状态
343
+        'remark': '',
344
+        'isRequire': true, // 是否是必填
345
+        'itemList': itemList
346
+      })
347
+    },
348
+    // 生成问卷
349
+    // btn_save() {},
350
+    // 试题编辑  完成此题
351
+    btn_edit(item) {
352
+      const isValid = this.isValidOption(item)
353
+      if (isValid) {
354
+        this.pagerLists.forEach((v, i) => {
355
+          if (v.queguid === item.queguid) {
356
+            this.$set(item, 'isEdit', !item.isEdit)
357
+          } else {
358
+            this.$set(v, 'isEdit', false)
359
+          }
360
+        })
361
+      }
362
+    },
363
+
364
+    // 删除试题
365
+    btn_delete(index) {
366
+      this.$confirm('您确定要将此试题删除吗?', '提示', {
367
+        confirmButtonText: '确定',
368
+        cancelButtonText: '取消',
369
+        type: 'warning'
370
+      }).then(() => {
371
+        this.pagerLists.splice(index, 1)
372
+        if (this.pagerLists && this.pagerLists.length > 0) {
373
+          this.pagerLists.forEach((v, i) => {
374
+            if (i >= index) {
375
+              this.$set(v, 'sort', v.sort - 1)
376
+            }
377
+          })
378
+        }
379
+        this.$message.success('删除成功!')
380
+      }).catch(() => {
381
+        this.$message.info('已取消删除')
382
+      })
383
+    },
384
+
385
+    // 上移试题
386
+    btn_moveup(index) {
387
+      if (index === 0) {
388
+        this.$message.warning('第一题不能再上移!')
389
+        return
390
+      }
391
+      const temp = this.pagerLists[index - 1]
392
+      this.$set(this.pagerLists, index - 1, this.pagerLists[index])
393
+      this.$set(this.pagerLists[index - 1], 'sort', index - 1)
394
+      this.$set(this.pagerLists, index, temp)
395
+      this.$set(this.pagerLists[index], 'sort', index)
396
+    },
397
+
398
+    // 下移试题
399
+    btn_movedown(index) {
400
+      if (index === this.pagerLists.length - 1) {
401
+        this.$message.warning('最后一题不能再下移!')
402
+        return
403
+      }
404
+      const i = this.pagerLists[index + 1]
405
+      this.$set(this.pagerLists, index + 1, this.pagerLists[index])
406
+      this.$set(this.pagerLists[index + 1], 'sort', index + 1)
407
+      this.$set(this.pagerLists, index, i)
408
+      this.$set(this.pagerLists[index], 'sort', index)
409
+    },
410
+
411
+    // 添加选项
412
+    btn_addOption(item, index) {
413
+      item.splice(index + 1, 0, {
414
+        'id': guid(),
415
+        'queguid': '',
416
+        'name': '选项',
417
+        'sort': index
418
+      })
419
+      item.forEach((v, i) => {
420
+        if (i > index) {
421
+          this.$set(v, 'sort', v.sort + 1)
422
+        }
423
+      })
424
+    },
425
+
426
+    // 删除选项
427
+    btn_deleteOption(item, index) {
428
+      this.$confirm('您确定要将此选项删除吗?', '提示', {
429
+        confirmButtonText: '确定',
430
+        cancelButtonText: '取消',
431
+        type: 'warning'
432
+      }).then(() => {
433
+        if (item.length === 1) {
434
+          this.$message.warning('请至少保留一个选项!')
435
+          return
436
+        }
437
+        item.splice(index, 1)
438
+        item.forEach((v, i) => {
439
+          if (i >= index) {
440
+            this.$set(v, 'sort', v.sort - 1)
441
+          }
442
+        })
443
+        this.$message.success('删除成功!')
444
+      }).catch(() => {
445
+        this.$message.info('已取消删除')
446
+      })
447
+    },
448
+
449
+    // 验证试题编辑 标题和选项是否为空
450
+    isValidOption(item) {
451
+      if (item.isEdit) {
452
+        if (!item.quetitle) {
453
+          this.$message.warning('您还没有填写试题的标题!')
454
+          return false
455
+        }
456
+        if (item.itemList) {
457
+          for (let i = 0, len = item.itemList.length; i < len; i++) {
458
+            if (!item.itemList[i].name) {
459
+              this.$message.warning('试题的选项不允许为空!')
460
+              return false
461
+            }
462
+          }
463
+        }
464
+        return true
465
+      }
466
+      return true
467
+    },
468
+
469
+    // 修改获取的数据
470
+    changePagerOptions(arr) {
471
+      const tem = []
472
+      arr.forEach((v, i) => {
473
+        tem.push({
474
+          'fields': v.fields,
475
+          'name': v.name,
476
+          'sort': v.sort
477
+        })
478
+      })
479
+      return tem
480
+    },
481
+
482
+    // 提交前数据修改
483
+    getPagerOptions() {
484
+      const tem = []
485
+      this.pagerLists.forEach((v, i) => {
486
+        tem.push({
487
+          'quetitle': v.quetitle,
488
+          'name': v.name,
489
+          'sort': v.sort
490
+        })
491
+      })
492
+      return tem
493
+    },
494
+    // 拖动后索引的变化
495
+    datadragEnd(evt) {
496
+      // console.log('拖动前的索引 :' + evt.oldIndex)
497
+      // console.log('拖动后的索引 :' + evt.newIndex)
498
+      this.$set(this.pagerLists[evt.oldIndex], 'sort', evt.oldIndex)
499
+      this.pagerLists.forEach((v, i) => {
500
+        // 向下拖
501
+        if ((i > evt.oldIndex) && (i < evt.newIndex)) {
502
+          this.$set(v, 'sort', v.sort - 1)
503
+        }
504
+        // 向上拖
505
+        if ((i < evt.oldIndex) && (i > evt.newIndex)) {
506
+          this.$set(v, 'sort', v.sort + 1)
507
+        }
508
+      })
509
+      this.$set(this.pagerLists[evt.newIndex], 'sort', evt.newIndex)
234 510
     }
235 511
   }
236 512
 }
237 513
 </script>
238 514
 
239
-<style rel="stylesheet/scss" lang="scss">
240
-.cusUser_form .form_select{
241
-	width: 100%;
242
-}
243
-</style>
244
-
245 515
 <style rel="stylesheet/scss" lang="scss" scoped>
516
+    .sub-navbar{
517
+			position: fixed;
518
+			//width: calc(100% - 80px);
519
+      bottom:50px;
520
+      right: 50px;
521
+			z-index: 2;
522
+			background-color: rgba(255, 255, 255, .9);
523
+		}
524
+    .cusUser_form{
525
+      margin-top: 30px;
526
+    }
527
+		.pager_content{
528
+			margin-top: 42px;
529
+		}
530
+		.filter-container .el-button .svg-icon{
531
+			height: 1.4em;
532
+			vertical-align: -0.3em;
533
+		}
534
+		.page_input{
535
+			margin: 10px 0;
536
+		}
537
+		.question_list{
538
+			.question{
539
+				cursor: move;
540
+				padding: 20px;
541
+				border: 1px solid #EBEEF5;
542
+        overflow: hidden;
543
+        position:relative;
544
+        .question_tit{
545
+          display: flex;
546
+        }
547
+				.title{
548
+					margin-bottom: 30px;
549
+          width: 150px;
550
+					.sign{
551
+						color: #F14949;
552
+						vertical-align: middle;
553
+					}
554
+					.sort{
555
+						display: inline-block;
556
+						width: 30px;
557
+						height: 24px;
558
+						background-color: #409EFF;
559
+						border-radius: 2px;
560
+						color: #FFFFFF;
561
+						text-align: center;
562
+						line-height: 24px;
563
+						font-size: 14px;
564
+					}
565
+					.option_title{
566
+						padding-left: 20px;
567
+						font-weight: bold;
568
+						font-size: 16px;
569
+						color: #333333;
570
+					}
571
+          .titleText{
572
+            width: 240px
573
+          }
574
+				}
575
+				.queOpion{
576
+          flex:1;
577
+          word-break: break-all;
578
+				}
579
+				.operate_btn{
580
+					text-align: right;
581
+				}
582
+			}
583
+			.question_edit{
584
+				position: relative;
585
+				background-color: #fafafa;
586
+				padding: 10px 30px 15px 30px;
587
+				.triangle{
588
+					position: absolute;
589
+					left: 53px;
590
+					top: -16px;
591
+					z-index: 1;
592
+					width:0;
593
+					height:0;
594
+					border-width:0 12px 16px;
595
+					border-style:solid;
596
+					border-color:transparent transparent #ebeef5;
597
+					&:after{
598
+						content: '';
599
+						position: absolute;
600
+						top: 2px;
601
+						left: -11px;
602
+						border-width:0 11px 15px;
603
+						border-style: solid;
604
+						border-color:transparent transparent #fafafa;
605
+					}
606
+				}
607
+				.title_area{
608
+					margin-bottom: 10px;
609
+					.title_input{
610
+						width: 40%;
611
+					}
612
+					.must_answer{
613
+						margin-right: 60px;
614
+						margin-left: 60px;
615
+					}
616
+				}
617
+				.option_area{
618
+					margin-left: -10px;
619
+					margin-right: -10px;
620
+					margin-bottom: 20px;
621
+					.option_input{
622
+						width: auto;
623
+						margin-bottom: 10px;
624
+					}
625
+					i{
626
+						font-size: 24px;
627
+						color: #cfcfcf;
628
+						vertical-align: middle;
629
+						cursor: pointer;
630
+						&:hover{
631
+							color: #409EFF;
632
+						}
633
+					}
634
+				}
635
+				.done_question{
636
+					width: 100%;
637
+					text-align: center;
638
+					.el-button{
639
+						width: 240px;
640
+					}
641
+				}
642
+			}
643
+		}
246 644
 
645
+		@media only screen and (max-width: 1200px) {
646
+			.pager_content{
647
+				margin-top: 84px;
648
+			}
649
+		}
247 650
 </style>

+ 10 - 8
fuwaiCallCenterWeb.UI/src/views/order/orderAppointed/index.vue

@@ -103,7 +103,8 @@ export default {
103 103
   },
104 104
   computed: {
105 105
     ...mapGetters([
106
-      'usercode' // 工号
106
+      'usercode', // 工号
107
+      'token'
107 108
     ])
108 109
   },
109 110
   created() {
@@ -141,14 +142,15 @@ export default {
141 142
       })
142 143
     },
143 144
     btn_export() {
145
+      alert(this.token)
144 146
       window.location.href = this.$store.getters.serverConfig.BASE_API + 'workorderapi/api/workorder/exportyclexcel?ordercode=' + this.searchDatas.sc_ordercode +
145
-					'&phone=' + this.searchDatas.sc_tel +
146
-					'&stime=' + this.searchDatas.searchDate && this.searchDatas.searchDate[0] +
147
-					'&etime=' + this.searchDatas.searchDate && this.searchDatas.searchDate[1] +
148
-					'&province=' + this.searchDatas.provinceCity && this.searchDatas.provinceCity[0] +
149
-					'&city=' + this.searchDatas.provinceCity && this.searchDatas.provinceCity[1] +
150
-					'&typeid=' + this.searchDatas.sc_type +
151
-					'&deptid=' + this.searchDatas.sc_deptid
147
+      '&phone=' + this.searchDatas.sc_tel +
148
+      '&stime=' + this.searchDatas.searchDate && this.searchDatas.searchDate[0] +
149
+      '&etime=' + this.searchDatas.searchDate && this.searchDatas.searchDate[1] +
150
+      '&province=' + this.searchDatas.provinceCity && this.searchDatas.provinceCity[0] +
151
+      '&city=' + this.searchDatas.provinceCity && this.searchDatas.provinceCity[1] +
152
+      '&typeid=' + this.searchDatas.sc_type +
153
+      '&deptid=' + this.searchDatas.sc_deptid
152 154
     },
153 155
     btn_search() {
154 156
       this.pageParams.pageindex = 1

+ 0 - 1
fuwaiCallCenterWeb.UI/src/views/questionnaire/management/addOrEdit.vue

@@ -188,7 +188,6 @@ export default {
188 188
         'itemList': itemList
189 189
       })
190 190
     },
191
-
192 191
     // 获取问卷信息
193 192
     getDetail() {
194 193
       getPager(this.rowid).then(response => {

+ 149 - 0
fuwaiCallCenterWeb.UI/src/views/reportForm/provCallduration/index.vue

@@ -0,0 +1,149 @@
1
+<template>
2
+  <div class="app-container callTotalCount">
3
+    <div class="filter-container">
4
+      <el-date-picker
5
+        v-model="seachDate"
6
+        class="filter-item"
7
+        type="daterange"
8
+        format="yyyy年MM月dd日"
9
+        value-format="yyyy-MM-dd"
10
+        align="left"
11
+        unlink-panels
12
+        range-separator="至"
13
+        start-placeholder="开始日期"
14
+        end-placeholder="结束日期"/>
15
+      <!-- <el-form-item label="所在地" prop="provinceCity">
16
+        <el-cascader
17
+          v-model="provinceCity"
18
+          :options="provinceCityDatas"
19
+          :props="props"
20
+          placeholder="请选择省市"
21
+          class="form_select"
22
+          clearable
23
+          filterable
24
+          change-on-select/>
25
+      </el-form-item> -->
26
+
27
+      <el-cascader
28
+        v-model="provinceCity"
29
+        :options="provinceCityDatas"
30
+        :props="props"
31
+        placeholder="请选择省市"
32
+        change-on-select
33
+        filterable
34
+        clearable
35
+      />
36
+
37
+      <!-- <el-select v-model="roleId" class="filter-item" filterable clearable placeholder="请选择角色">
38
+        <el-option
39
+          v-for="item in roleOptions"
40
+          :key="item.name"
41
+          :label="item.name"
42
+          :value="item.name"/>
43
+      </el-select> -->
44
+
45
+      <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
46
+      <el-button type="primary" class="filter-item" icon="el-icon-upload2" @click="btn_export">导出</el-button>
47
+    </div>
48
+
49
+    <div class="tableContent">
50
+      <el-table :data="tableData" height="600" border style="width: 100%">
51
+        <el-table-column v-for="col in cols" :key="col" :prop="col" :label="col" align="center"/>
52
+      </el-table>
53
+    </div>
54
+  </div>
55
+</template>
56
+<script>
57
+import { getUserAccountLists } from '@/api/systemSetup/roleSetting/userManage'
58
+import { getProviceCity } from '@/api/commonAPI'
59
+import { getDataList, getColumnList } from '@/api/reportForm/provCallduration'
60
+
61
+export default {
62
+  name: 'DayCallStatistics',
63
+  data() {
64
+    return {
65
+      provinceCity: [], // 省市下拉绑定的值
66
+      provinceCityDatas: [], // 省市下拉数据
67
+      props: { // 自定义省市下拉数据的key值
68
+        expandTrigger: 'hover',
69
+        value: 'name',
70
+        label: 'name',
71
+        children: 'entityJson'
72
+      },
73
+      // roleOptions: [],
74
+      // roleId: '',
75
+      seachDate: '',
76
+      tableData: [], // 表格数据
77
+      cols: [] // 表头
78
+    }
79
+  },
80
+  mounted: function() {
81
+    // this.getRoleSelects()
82
+    this.getProCity()
83
+    this.getList()
84
+    this.getcolumnLists()
85
+  },
86
+  methods: {
87
+
88
+    // 获取省市下拉数据
89
+    // getRoleSelects() {
90
+    //   getProviceCity().then(response => {
91
+    //     if (response.state.toLowerCase() === 'success') {
92
+    //       this.roleOptions = response.data
93
+    //     }
94
+    //   })
95
+    // },
96
+    getProCity() {
97
+      return new Promise(resolve => {
98
+        getProviceCity().then(response => {
99
+          if (response.state.toLowerCase() === 'success') {
100
+            this.provinceCityDatas = response.data
101
+          }
102
+        })
103
+        resolve()
104
+      })
105
+    },
106
+    getList() {
107
+      this.loading = true
108
+      return new Promise(resolve => {
109
+        const params = {
110
+          province: this.provinceCity && this.provinceCity[0],
111
+          city: this.provinceCity && this.provinceCity[1],
112
+          stime: this.seachDate && this.seachDate[0],
113
+          endtime: this.seachDate && this.seachDate[1]
114
+        }
115
+        getDataList(params).then(response => {
116
+          this.loading = false
117
+          if (response.state.toLowerCase() === 'success') {
118
+            this.tableData = response.data
119
+          }
120
+        })
121
+        resolve()
122
+      })
123
+    },
124
+    getcolumnLists() {
125
+      return new Promise(resolve => {
126
+        getColumnList().then(response => {
127
+          if (response.state.toLowerCase() === 'success') {
128
+            this.cols = response.data
129
+          }
130
+        })
131
+        resolve()
132
+      })
133
+    },
134
+    btn_search() {
135
+      this.getList()
136
+    },
137
+    btn_export() {
138
+      const exportUrl = `${this.$store.getters.serverConfig.BASE_API}callcenterapi/api/talktime/exportpcexcel?stime=${this.seachDate &&
139
+					this.seachDate[0]}&endtime=${this.seachDate && this.seachDate[1]} `
140
+      window.location.href = exportUrl
141
+    }
142
+  }
143
+
144
+}
145
+</script>
146
+
147
+<style lang="scss" scoped>
148
+
149
+</style>