vue2-client 1.2.115 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -199,16 +199,20 @@ export default {
199
199
  this.$message.success(timeFix().CN + `,${result.name} 欢迎回来`, 3)
200
200
  },
201
201
  setAccessToken (data) {
202
- localStorage.setItem(ACCESS_TOKEN, data)
203
- let timestamp = new Date().getTime()// 当前的时间戳
204
- timestamp = timestamp + 12 * 60 * 60 * 1000
205
- // 格式化时间获取年月日, 登陆过期时间
206
- const dateAfter = new Date(timestamp)
207
- setAuthorization({ token: data, expireAt: dateAfter })
202
+ if (data) {
203
+ localStorage.setItem(ACCESS_TOKEN, data)
204
+ let timestamp = new Date().getTime()// 当前的时间戳
205
+ timestamp = timestamp + 12 * 60 * 60 * 1000
206
+ // 格式化时间获取年月日, 登陆过期时间
207
+ const dateAfter = new Date(timestamp)
208
+ setAuthorization({ token: data, expireAt: dateAfter })
209
+ }
208
210
  },
209
211
  setV4AccessToken (data) {
210
- localStorage.setItem(ACCESS_TOKEN, data.token)
211
- setAuthorization({ token: data.token, expire: data.expire })
212
+ if (data.token) {
213
+ localStorage.setItem(ACCESS_TOKEN, data.token)
214
+ setAuthorization({ token: data.token, expire: data.expire })
215
+ }
212
216
  }
213
217
  }
214
218
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div>
3
3
  <!-- 显示成功页抽屉 -->
4
- <a-modal v-model="successVisible" title="工单状态" width="70%" :footer="null" destroy-on-close>
4
+ <a-modal v-model="successVisible" title="工单状态" width="70%" :footer="null" destroy-on-close @cancel="onSuccessCancel">
5
5
  <submit-ticket-success v-if="serialNumber" :serialNumber="serialNumber" />
6
6
  </a-modal>
7
7
  <!-- 两个使用手册弹框 -->
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
  </a-modal>
118
118
  <a-modal
119
- title="填写信息"
119
+ title="填写联系方式"
120
120
  :visible="infoFormVisible"
121
121
  @ok="onInfoFormSubmit"
122
122
  @cancel="infoFormVisible = false">
@@ -125,8 +125,8 @@
125
125
  :model="infoForm"
126
126
  :label-col="{ span: 5 }"
127
127
  :wrapper-col="{ span: 18 }">
128
- <a-form-model-item label="客户名称" prop="customerName" :rules="{ required: true, message: '请输入客户名称' }">
129
- <a-input v-model="infoForm.customerName" placeholder="请输入客户名称查询历史工单" />
128
+ <a-form-model-item label="联系方式" prop="phone" :rules="{ required: true, message: '请输入联系方式' }">
129
+ <a-input v-model="infoForm.phone" placeholder="请输入联系方式查询历史工单" />
130
130
  </a-form-model-item>
131
131
  </a-form-model>
132
132
  </a-modal>
@@ -171,7 +171,7 @@
171
171
  <!-- 图片上传 -->
172
172
  <a-form-item :wrapper-col="{ span: 12 }" label="问题截图">
173
173
  <div class="clearfix">
174
- <upload :model="uploadModel" @setFiles="setFiles" />
174
+ <upload v-if="uploadVisible" :model="uploadModel" @setFiles="setFiles" />
175
175
  <a-modal
176
176
  :visible="previewVisible"
177
177
  :footer="null"
@@ -234,6 +234,7 @@
234
234
  :queryParamsName="queryParamsName"
235
235
  :fixed-query-form="fixedQueryForm"
236
236
  @action="toDetail">
237
+ <a-button slot="button" type="primary" @click="infoFormVisible = true">填写联系方式</a-button>
237
238
  </x-form-table>
238
239
  </a-tab-pane>
239
240
  </a-tabs>
@@ -293,11 +294,12 @@ export default {
293
294
  // 问题类型选项
294
295
  ticketCategoryMap: [],
295
296
  ticketCategoryMapLoading: false,
296
- // 未传入客户名称信息手动输入弹框
297
+ // 未传入客户名称手动输入联系方式
297
298
  infoFormVisible: false,
298
299
  infoForm: {
299
- customerName: ''
300
- }
300
+ phone: ''
301
+ },
302
+ uploadVisible: true
301
303
  }
302
304
  },
303
305
  computed: {
@@ -310,13 +312,11 @@ export default {
310
312
  document.title = '奥枫问题反馈平台'
311
313
  const dictionary = this.$appdata.getParams()
312
314
  if (dictionary && dictionary['ticketCategoryMap']) {
313
- console.log('pre', dictionary['ticketCategoryMap'])
314
315
  this.ticketCategoryMap = dictionary['ticketCategoryMap']
315
316
  } else {
316
317
  this.ticketCategoryMapLoading = true
317
318
  this.$appdata.load().then(() => {
318
319
  this.ticketCategoryMap = this.$appdata.getDictionaryList('ticketCategoryMap')
319
- console.log('load', this.ticketCategoryMap)
320
320
  this.ticketCategoryMapLoading = false
321
321
  })
322
322
  }
@@ -378,8 +378,21 @@ export default {
378
378
  this.serialNumber = res
379
379
  this.successVisible = true
380
380
  this.$message.success('创建成功')
381
+ this.customerName = ''
382
+ this.form.category = undefined
383
+ this.form.phone = ''
384
+ this.form.desc = ''
385
+ this.fileList = []
386
+ this.uploadVisible = false
387
+ if (!this.currUser.ename) {
388
+ this.fixedQueryForm.t_uploader_phone = form.contact
389
+ this.infoForm.phone = form.contact
390
+ }
381
391
  })
382
392
  },
393
+ onSuccessCancel () {
394
+ this.uploadVisible = true
395
+ },
383
396
  // 点击向日葵链接
384
397
  toSunClientClick () {
385
398
  window.open('https://sunlogin.oray.com/download')
@@ -390,7 +403,7 @@ export default {
390
403
  },
391
404
  // 切换标签页
392
405
  changeTab (id) {
393
- if (id === 'workHistory' && !this.fixedQueryForm.t_uploader) {
406
+ if (id === 'workHistory' && !this.fixedQueryForm.t_uploader && !this.fixedQueryForm.t_uploader_phone) {
394
407
  this.infoFormVisible = true
395
408
  return
396
409
  }
@@ -399,7 +412,9 @@ export default {
399
412
  onInfoFormSubmit () {
400
413
  this.$refs.infoFormRef.validate(valid => {
401
414
  if (valid) {
402
- this.fixedQueryForm['t_uploader'] = this.infoForm.customerName
415
+ this.fixedQueryForm = {
416
+ t_uploader_phone: this.infoForm.phone
417
+ }
403
418
  this.tabActiveKey = 'workHistory'
404
419
  this.infoFormVisible = false
405
420
  }
@@ -1,58 +1,58 @@
1
- import { METHOD, request } from '@vue2-client/utils/request'
2
- import { indexedDB } from '@vue2-client/utils/indexedDB'
3
-
4
- const commonApi = {
5
- // 获取表格列配置
6
- getColumnsJson: '/webmeterapi/getColumns',
7
- // 通用查询
8
- query: '/webmeterapi/commonQuery',
9
- // 表单通用查询
10
- queryWithResource: '/webmeterapi/commonQueryWithResource',
11
- // 通用新增/修改
12
- addOrModify: '/webmeterapi/commonAddOrModify',
13
- // 通用删除
14
- delete: '/webmeterapi/commonDelete',
15
- // 获取字典键列表
16
- getDictionaryParam: '/webmeterapi/getDictionaryParam',
17
- // 获取所有员工及其部门的级联菜单数据
18
- getEmpTree: '/webmeterapi/getEmpTree',
19
- }
20
-
21
- /**
22
- * 带缓存查询的表格配置文件查询
23
- * @param queryParamsName 配置名称
24
- * @param callback 回调函数
25
- */
26
- export function getColumnsJson (queryParamsName, callback) {
27
- indexedDB.getByWeb(queryParamsName, commonApi.getColumnsJson, { str: queryParamsName }, callback)
28
- }
29
-
30
- /**
31
- * 通用表单查询
32
- */
33
- export function query (parameter) {
34
- return request(commonApi.query, METHOD.POST, parameter)
35
- }
36
-
37
- /**
38
- * 通用表单查询
39
- */
40
- export function queryWithResource (parameter, api = commonApi.queryWithResource) {
41
- return request(api, METHOD.POST, parameter)
42
- }
43
-
44
- /**
45
- * 通用新增/修改
46
- */
47
- export function addOrModify (parameter, api = commonApi.addOrModify) {
48
- return request(api, METHOD.POST, parameter)
49
- }
50
-
51
- /**
52
- * 通用删除
53
- */
54
- export function remove (parameter) {
55
- return request(commonApi.delete, METHOD.POST, parameter)
56
- }
57
-
58
- export { commonApi }
1
+ import { METHOD, request } from '@vue2-client/utils/request'
2
+ import { indexedDB } from '@vue2-client/utils/indexedDB'
3
+
4
+ const commonApi = {
5
+ // 获取表格列配置
6
+ getColumnsJson: '/af-system/getColumns',
7
+ // 通用查询
8
+ query: 'commonQuery',
9
+ // 表单查询
10
+ queryWithResource: 'commonQueryWithResource',
11
+ // 通用新增/修改
12
+ addOrModify: 'commonAddOrModify',
13
+ // 通用删除
14
+ delete: 'commonDelete',
15
+ // 获取字典键列表
16
+ getDictionaryParam: '/af-system/getDictionaryParam',
17
+ // 获取所有员工及其部门的级联菜单数据
18
+ getEmpTree: '/af-system/getEmpTree',
19
+ }
20
+
21
+ /**
22
+ * 带缓存查询的表格配置文件查询
23
+ * @param queryParamsName 配置名称
24
+ * @param callback 回调函数
25
+ */
26
+ export function getColumnsJson (queryParamsName, callback) {
27
+ indexedDB.getByWeb(queryParamsName, commonApi.getColumnsJson, { str: queryParamsName }, callback)
28
+ }
29
+
30
+ /**
31
+ * 通用查询
32
+ */
33
+ export function query (parameter, api = commonApi.query, serviceName = 'af-system') {
34
+ return request('/' + serviceName + '/' + api, METHOD.POST, parameter, null)
35
+ }
36
+
37
+ /**
38
+ * 通用表单查询
39
+ */
40
+ export function queryWithResource (parameter, api = commonApi.queryWithResource, serviceName = 'af-system') {
41
+ return request('/' + serviceName + '/' + api, METHOD.POST, parameter, null)
42
+ }
43
+
44
+ /**
45
+ * 通用新增/修改
46
+ */
47
+ export function addOrModify (parameter, api = commonApi.addOrModify, serviceName = 'af-system') {
48
+ return request('/' + serviceName + '/' + api, METHOD.POST, parameter, null)
49
+ }
50
+
51
+ /**
52
+ * 通用删除
53
+ */
54
+ export function remove (parameter, api = commonApi.delete, serviceName = 'af-system') {
55
+ return request('/' + serviceName + '/' + api, METHOD.POST, parameter, null)
56
+ }
57
+
58
+ export { commonApi }