n20-common-lib 1.3.98 → 1.3.100

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "1.3.98",
3
+ "version": "1.3.100",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -49,6 +49,7 @@
49
49
  "panzoom": "*",
50
50
  "qrcode": "*",
51
51
  "resize-detector": "*",
52
+ "v-viewer": "*",
52
53
  "vuedraggable": "*"
53
54
  },
54
55
  "devDependencies": {
@@ -2,7 +2,7 @@
2
2
  $--pl: 80px;
3
3
 
4
4
  .el-timeline {
5
- padding-left: $--pl;
5
+ padding-left: 120px;
6
6
  padding-top: 10px;
7
7
  }
8
8
 
@@ -16,10 +16,9 @@
16
16
 
17
17
  .el-timeline-item__content {
18
18
  cursor: default;
19
-
20
- &:hover {
21
- background: $--background-color-base;
22
- }
19
+ }
20
+ .result-left-name {
21
+ width: 20%;
23
22
  }
24
23
 
25
24
  .n20-time {
@@ -36,7 +35,6 @@
36
35
  }
37
36
 
38
37
  .n20-worker {
39
- // width: 150px;
40
38
  font-weight: initial;
41
39
  font-size: $--font-size-base;
42
40
  color: $--color-text-primary;
@@ -64,4 +62,9 @@
64
62
  font-size: $--font-size-base;
65
63
  color: $--color-text-regular;
66
64
  }
65
+ .n20-description-bgc {
66
+ background: $--background-color-base;
67
+ height: 100%;
68
+ min-height: 40px;
69
+ }
67
70
  }
@@ -8,25 +8,44 @@
8
8
  <div>{{ item.endTime | timeF }}</div>
9
9
  </div>
10
10
  <div>
11
- <div class="flex-box">
12
- <div v-title="item.assignee" class="n20-worker flex-item m-r-s text-ellipsis" :show-overflow-tooltip="true">
13
- <span class="worker-icon n20-icon-user"></span>
14
- <span>{{ item.assignee }}</span>
15
- </div>
16
- <div class="n20-approval m-r-s" style="width: auto; min-width: 100px">
17
- <template v-if="item.result == status.submit">{{ '提交' | $lc }}</template>
18
- <template v-else-if="item.result == status.end">{{ '结束' | $lc }}</template>
19
- <template v-else-if="item.result !== status.waiting">
20
- <span>{{ '审批意见:' | $lc }}</span>
21
- <span :class="item | typeF(status, 'color-')">{{ $lc(item.resultName) }}</span>
22
- </template>
23
- </div>
11
+ <div v-if="item.result === 0" class="flex-box flex-v">
12
+ <div class="n20-worker p-r-s">{{ item.assignee }}</div>
24
13
  </div>
25
- <div v-if="item.suggestion" class="n20-description-c m-t">
26
- {{ item.suggestion }}
14
+ <div v-else class="flex-box">
15
+ <div class="result-left-name" :class="item | typeF(status, 'color-')">{{ $lc(item.resultName) }}</div>
16
+ <div v-title="item.assignee" class="flex-box n20-worker m-r-s text-ellipsis" :show-overflow-tooltip="true">
17
+ <div
18
+ v-title="item.memberName"
19
+ :show-overflow-tooltip="true"
20
+ class="n20-worker m-r-s text-ellipsis"
21
+ style="width: 130px"
22
+ >
23
+ {{ item.memberName }}
24
+ </div>
25
+ <div
26
+ v-title="item.roleName"
27
+ class="n20-worker text-ellipsis"
28
+ :show-overflow-tooltip="true"
29
+ style="width: 130px"
30
+ >
31
+ {{ item.roleName }}
32
+ </div>
33
+ <div
34
+ v-title="item.assignee"
35
+ class="n20-worker text-ellipsis"
36
+ style="width: 120px"
37
+ :show-overflow-tooltip="true"
38
+ >
39
+ <span class="worker-icon n20-icon-user"></span>{{ item.assignee }}
40
+ </div>
41
+ </div>
27
42
  </div>
28
43
  <div v-if="item.ccUserName" class="n20-description-c m-t">抄送人:{{ item.ccUserName }}</div>
29
44
  <div v-if="item.addTaskName" class="n20-description-c m-t">加签审批人:{{ item.addTaskName }}</div>
45
+ <div v-if="item.suggestion" class="n20-description-c n20-description-bgc m-t p-a-ss">
46
+ <span v-if="item.result !== status.waiting">{{ '审批意见:' | $lc }}</span>
47
+ <span v-if="item.suggestion">{{ item.suggestion }}</span>
48
+ </div>
30
49
  </div>
31
50
  </el-timeline-item>
32
51
  </el-timeline>
@@ -105,8 +124,10 @@ export default {
105
124
  endTime: item.endTime || '',
106
125
  assignee: item.assignee,
107
126
  suggestion: item.suggestion,
127
+ roleName: item.roleName,
108
128
  ccUserName: item.ccUserName, // 抄送人
109
- addTaskName: item.addTaskName // 加签审批人
129
+ addTaskName: item.addTaskName, // 加签审批人
130
+ memberName: item.memberName // 审批人单位
110
131
  }
111
132
  let resultName = item.optResult || ''
112
133
  resultName = resultName.split('-')
@@ -134,6 +155,7 @@ export default {
134
155
  approvalData.push(_item)
135
156
  })
136
157
  this.approvalData.push(...approvalData)
158
+ console.log(this.approvalData)
137
159
  })
138
160
  }
139
161
  }
@@ -248,8 +248,14 @@
248
248
  append-to-body
249
249
  @close="closeSee"
250
250
  >
251
- <div v-if="imgType.test(previewName)" class="p-a flex-box flex-c flex-v" style="height: 82vh">
252
- <img :src="previewUrl" :alt="previewName" style="max-width: 98%; max-height: 98%" />
251
+ <div
252
+ v-if="imgType.test(previewName)"
253
+ id="previewId"
254
+ v-viewer="{ scalable: false, inline: true, navbar: false }"
255
+ class="p-a flex-box flex-c flex-v"
256
+ style="height: 82vh"
257
+ >
258
+ <img :src="previewUrl" :alt="previewName" style="display: none" />
253
259
  </div>
254
260
  <div v-else class="p-a" style="height: 82vh">
255
261
  <component
@@ -303,16 +309,25 @@
303
309
 
304
310
  <script>
305
311
  import { $lc } from '../../utils/i18n/index'
312
+ import importG from '../../utils/importGlobal'
306
313
  import dayjs from 'dayjs'
307
314
  import axios from '../../utils/axios'
308
315
  import clUpload from '../Upload/index.vue'
309
316
  import Dialog from '../Dialog/index.vue'
317
+
318
+ import 'viewerjs/dist/viewer.css'
319
+ import { directive as viewer } from 'v-viewer'
310
320
  export default {
311
321
  name: 'FileUploadTable',
312
322
  components: {
313
323
  clUpload,
314
324
  Dialog
315
325
  },
326
+ directives: {
327
+ viewer: viewer({
328
+ debug: true
329
+ })
330
+ },
316
331
  filters: {
317
332
  typeFiter(type, typeOptions) {
318
333
  return typeOptions.find((c) => c.type === type)?.label || ''
@@ -478,6 +493,8 @@ export default {
478
493
  this.previewName = name
479
494
  this.visibleP = true
480
495
  }
496
+ let ele = document.getElementById('previewId').$viewer
497
+ ele.show()
481
498
  },
482
499
  closeSee() {
483
500
  this.previewUrl && URL.revokeObjectURL(this.previewUrl)