vue2-client 1.4.37 → 1.4.39

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.
package/CHANGELOG.md CHANGED
@@ -1,11 +1,14 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
- **1.4.37 -2022-10-18 @苗艳强**
4
+ **1.4.37 - 1.4.39 -2022-10-18 @苗艳强**
5
5
  - 功能修改:
6
6
  - 新增文件列表展示组件
7
7
  - 新增图片列表展示组件
8
8
  - 新增文件预览组件
9
+ - 图片列表展示组件新增宽度设置
10
+ - 售后工单详情可查看问题描述、图片、附件
11
+ - XFormTable可指定id进行修改操作
9
12
 
10
13
  **1.4.36 -2022-10-18 @江超**
11
14
  - 功能修改:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.4.37",
3
+ "version": "1.4.39",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -43,7 +43,7 @@
43
43
  :loading="editDataLoading"
44
44
  class="btn-success"
45
45
  type="dashed"
46
- @click="editItem">
46
+ @click="editItem()">
47
47
  <a-icon :style="iconStyle" type="edit"/>修改
48
48
  </a-button>
49
49
  <a-button v-if="!buttonState || buttonState.delete" :disabled="!isDelete" type="danger" @click="deleteItem">
@@ -357,7 +357,7 @@ export default {
357
357
  this.modelVisible = true
358
358
  },
359
359
  // 修改业务
360
- editItem () {
360
+ editItem (selectId) {
361
361
  this.businessType = '修改'
362
362
  const requestParameters = {
363
363
  queryParamsName: this.queryParamsName,
@@ -365,8 +365,11 @@ export default {
365
365
  pageNo: 1,
366
366
  pageSize: 1
367
367
  }
368
- requestParameters.conditionParams[this.tableColumns[0].dataIndex] = this.selectedRowKeys[0]
369
- requestParameters.f_businessid = this.selectedRowKeys[0]
368
+ if (selectId === undefined) {
369
+ selectId = this.selectedRowKeys[0]
370
+ }
371
+ requestParameters.conditionParams[this.tableColumns[0].dataIndex] = selectId
372
+ requestParameters.f_businessid = selectId
370
373
  if (this.isTableTemp) {
371
374
  this.$emit('tempTableEdit', requestParameters)
372
375
  return
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div>
3
3
  <!-- 图片 -->
4
- <span v-for="img in images" :key="img.id" class="picture-card">
4
+ <span v-for="img in images" :key="img.id" class="picture-card" :style="{ width: cardSize, height: cardSize }">
5
5
  <img :src="img.url" :alt="img.name" />
6
- <span class="picture-action">
6
+ <span class="picture-action" :style="{ width: actionSize, height: actionSize }">
7
7
  <a-icon type="eye" class="picture-preview-icon" @click="preview(img.url)" />
8
8
  </span>
9
9
  </span>
@@ -17,6 +17,18 @@ export default {
17
17
  images: {
18
18
  type: Array,
19
19
  required: true
20
+ },
21
+ width: {
22
+ type: Number,
23
+ default: 150
24
+ }
25
+ },
26
+ computed: {
27
+ cardSize: function () {
28
+ return this.width + 'px'
29
+ },
30
+ actionSize: function () {
31
+ return this.width - 22 + 'px'
20
32
  }
21
33
  },
22
34
  methods: {
@@ -31,8 +43,6 @@ export default {
31
43
  .picture-card {
32
44
  position: relative;
33
45
  display: inline-block;
34
- width: 150px;
35
- height: 150px;
36
46
  border: 1px solid #d9d9d9;
37
47
  border-radius: 6px;
38
48
  padding: 10px;
@@ -49,8 +59,6 @@ export default {
49
59
  display: flex;
50
60
  justify-content: center;
51
61
  align-items: center;
52
- width: 128px;
53
- height: 128px;
54
62
  background: #000;
55
63
  opacity: 0;
56
64
  transition: opacity 0.3s;
@@ -44,6 +44,23 @@
44
44
  </a-steps>
45
45
  </div>
46
46
  </result>
47
+ <div class="ticket-detail">
48
+ <a-row class="item">
49
+ <a-col :span="3"><span class="title">问题描述</span></a-col>
50
+ <a-col :span="17"><span>{{ details.description }}</span></a-col>
51
+ </a-row>
52
+ <a-row class="item">
53
+ <a-col :span="3"><span class="title">问题截图</span></a-col>
54
+ <a-col :span="21"><image-item :images="details.images" :width="120" @preview="handleFilePreview" /></a-col>
55
+ </a-row>
56
+ <a-row v-if="details.files.length" class="item">
57
+ <a-col :span="3"><span class="title">附件</span></a-col>
58
+ <a-col :span="21"><file-item :files="details.files" :downloadable="false" @preview="handleFilePreview" /></a-col>
59
+ </a-row>
60
+ </div>
61
+ <a-modal v-model="filePreviewVisible" :footer="null" :dialog-style="{ top: '30px' }" width="80%" :z-index="1001">
62
+ <file-preview :path="filePath" />
63
+ </a-modal>
47
64
  </a-card>
48
65
  </template>
49
66
 
@@ -53,13 +70,15 @@ import DetailList from '@vue2-client/components/tool/DetailList'
53
70
  import AStepItem from '@vue2-client/components/tool/AStepItem'
54
71
  import { TicketDetailsViewApi, post } from '@vue2-client/services/api'
55
72
  import { formatDate } from '@vue2-client/utils/util'
73
+ import { FileItem, ImageItem } from '@vue2-client/components/FileImageItem'
74
+ import FilePreview from '@vue2-client/components/FilePreview'
56
75
 
57
76
  const AStepItemGroup = AStepItem.Group
58
77
  const DetailListItem = DetailList.Item
59
78
 
60
79
  export default {
61
80
  name: 'submitTicketSuccess',
62
- components: { AStepItemGroup, AStepItem, DetailListItem, DetailList, Result },
81
+ components: { AStepItemGroup, AStepItem, DetailListItem, DetailList, Result, FileItem, ImageItem, FilePreview },
63
82
  props: {
64
83
  // 工单序列号
65
84
  serialNumber: {
@@ -80,7 +99,10 @@ export default {
80
99
  phone: '',
81
100
  createdTime: '',
82
101
  confirmTime: '',
83
- finishedTime: ''
102
+ finishedTime: '',
103
+ description: '',
104
+ files: [],
105
+ images: []
84
106
  },
85
107
  // 控制加急按钮
86
108
  urgentAccess: true,
@@ -91,7 +113,10 @@ export default {
91
113
  // 取消工单确认框可见性
92
114
  closeVisible: false,
93
115
  // 控制页面大图标
94
- icon: true
116
+ icon: true,
117
+ // 文件预览
118
+ filePreviewVisible: false,
119
+ filePath: ''
95
120
  }
96
121
  },
97
122
  mounted () {
@@ -175,10 +200,17 @@ export default {
175
200
  this.details.createdTime = this.format(res.createdtime, 'yyyy-MM-dd hh:mm:ss')
176
201
  this.details.status = res.status
177
202
  this.details.phone = res.phone
203
+ this.details.description = res.description
204
+ this.details.files = res.files
205
+ this.details.images = res.images
178
206
  }, err => {
179
207
  console.log(err)
180
208
  })
181
209
  },
210
+ handleFilePreview (path) {
211
+ this.filePath = path
212
+ this.filePreviewVisible = true
213
+ }
182
214
  },
183
215
  computed: {
184
216
  // 用于进度条,进度显示控制
@@ -205,4 +237,15 @@ export default {
205
237
  margin-bottom: 20px;
206
238
  }
207
239
  }
240
+ .ticket-detail {
241
+ width: 72%;
242
+ margin: 0 auto;
243
+ .item {
244
+ margin-bottom: 14px;
245
+ }
246
+ .title {
247
+ font-size: 14px;
248
+ font-weight: 600;
249
+ }
250
+ }
208
251
  </style>