n20-common-lib 1.3.99 → 1.3.101

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.99",
3
+ "version": "1.3.101",
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": {
@@ -63,8 +63,11 @@
63
63
  color: $--color-text-regular;
64
64
  }
65
65
  .n20-description-bgc {
66
+ margin-left: 40px;
67
+ margin-top: 10px;
66
68
  background: $--background-color-base;
67
69
  height: 100%;
70
+ border-radius: 4px;
68
71
  min-height: 40px;
69
72
  }
70
73
  }
@@ -42,7 +42,7 @@
42
42
  </div>
43
43
  <div v-if="item.ccUserName" class="n20-description-c m-t">抄送人:{{ item.ccUserName }}</div>
44
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">
45
+ <div v-if="item.suggestion" class="n20-description-c n20-description-bgc m-t p-a-s">
46
46
  <span v-if="item.result !== status.waiting">{{ '审批意见:' | $lc }}</span>
47
47
  <span v-if="item.suggestion">{{ item.suggestion }}</span>
48
48
  </div>
@@ -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
@@ -307,12 +313,20 @@ import dayjs from 'dayjs'
307
313
  import axios from '../../utils/axios'
308
314
  import clUpload from '../Upload/index.vue'
309
315
  import Dialog from '../Dialog/index.vue'
316
+
317
+ import 'viewerjs/dist/viewer.css'
318
+ import { directive as viewer } from 'v-viewer'
310
319
  export default {
311
320
  name: 'FileUploadTable',
312
321
  components: {
313
322
  clUpload,
314
323
  Dialog
315
324
  },
325
+ directives: {
326
+ viewer: viewer({
327
+ debug: true
328
+ })
329
+ },
316
330
  filters: {
317
331
  typeFiter(type, typeOptions) {
318
332
  return typeOptions.find((c) => c.type === type)?.label || ''
@@ -478,6 +492,8 @@ export default {
478
492
  this.previewName = name
479
493
  this.visibleP = true
480
494
  }
495
+ let ele = document.getElementById('previewId').$viewer
496
+ ele.show()
481
497
  },
482
498
  closeSee() {
483
499
  this.previewUrl && URL.revokeObjectURL(this.previewUrl)