n20-common-lib 2.7.48 → 2.7.49

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": "2.7.48",
3
+ "version": "2.7.49",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -221,7 +221,13 @@
221
221
  </template>
222
222
  <template v-slot="{ row }">
223
223
  <slot name="handle" :row="row">
224
- <el-button type="text" icon="el-icon-view" v-if="officeStatus" :disabled="!row[keys.url]" @click="seeFile(row)" />
224
+ <el-button
225
+ type="text"
226
+ icon="el-icon-view"
227
+ v-if="officeStatus"
228
+ :disabled="!row[keys.url]"
229
+ @click="seeFile(row)"
230
+ />
225
231
  <el-button
226
232
  v-if="readonly"
227
233
  type="text"
@@ -350,7 +356,7 @@ import Dialog from '../Dialog/index.vue'
350
356
  import 'viewerjs/dist/viewer.css'
351
357
  import importG from '../../utils/importGlobal.js'
352
358
  import downloadBlob from '../../utils/downloadBlob.js'
353
- import {log} from "qrcode/lib/core/galois-field";
359
+ import { log } from 'qrcode/lib/core/galois-field'
354
360
 
355
361
  const ViewerImg = async function () {
356
362
  let { component } = await importG('v-viewer', () => import(/*webpackChunkName: "v-viewer"*/ 'v-viewer'))
@@ -461,7 +467,7 @@ export default {
461
467
  typeOptions: [],
462
468
  previewSameOrg: false,
463
469
  selectionList: [],
464
- officeStatus:false
470
+ officeStatus: false
465
471
  }
466
472
  },
467
473
  watch: {
@@ -525,18 +531,22 @@ export default {
525
531
  }
526
532
  },
527
533
  mounted() {
528
- this.getBussTypeList()
534
+ console.log(this.dataProp)
529
535
  this.getAttachList()
530
536
  if (this.dataProp.bussId && this.dataProp.bussValue) {
531
537
  this.getFileList()
532
538
  }
539
+ this.getBussTypeList()
533
540
  this.getOfficeStatus()
534
541
  },
535
542
  methods: {
536
- async getOfficeStatus() {
537
- const {data} =await this.$axios.get( this.requestPrefix
538
- ? `${this.requestPrefix}/neams/eamsBaseFile/getOfficeIsEnable`:`/neams/eamsBaseFile/getOfficeIsEnable`)
539
- this.officeStatus = data
543
+ async getOfficeStatus() {
544
+ const { data } = await this.$axios.get(
545
+ this.requestPrefix
546
+ ? `${this.requestPrefix}/neams/eamsBaseFile/getOfficeIsEnable`
547
+ : `/neams/eamsBaseFile/getOfficeIsEnable`
548
+ )
549
+ this.officeStatus = data
540
550
  },
541
551
  rowStyle({ row, rowIndex }) {
542
552
  if (row.isEnable === '0') {
@@ -688,6 +698,7 @@ export default {
688
698
  * @returns {Promise<void>}
689
699
  */
690
700
  async getAttachList() {
701
+ console.log(this.dataProp)
691
702
  const { data, code } = await axios.post(
692
703
  this.requestPrefix
693
704
  ? `${this.requestPrefix}/neams/eamsattachfile/getByBussValues`
@@ -1,29 +1,78 @@
1
1
  <template>
2
2
  <span>
3
- <el-link
4
- v-for="(item, i) in dfBtns"
5
- :key="item.label"
6
- :class="i ? 'm-l-b' : ''"
7
- :type="item.type || 'primary'"
8
- :underline="false"
9
- :disabled="item.disabled | dbdBtn(row)"
10
- @click="$emit('command', item.command)"
11
- >
12
- <span v-if="item.tip" v-title="`${item.tip}`">{{ item.label }}</span>
13
- <span v-else>{{ item.label }}</span>
14
- </el-link>
3
+ <template v-for="(item, i) in dfBtns" class="flex-box flex-v">
4
+ <el-dropdown
5
+ v-if="item.children && item.children.length"
6
+ :key="item.label"
7
+ class="m-l-b"
8
+ @command="(c) => $emit('command', c)"
9
+ >
10
+ <div class="flex-box flex-v">
11
+ <el-link
12
+ :key="item.label"
13
+ :class="i ? 'm-l-b' : ''"
14
+ type="primary"
15
+ :underline="false"
16
+ :disabled="item.disabled | dbdBtn(row)"
17
+ @click="$emit('command', item.command)"
18
+ >
19
+ <span v-if="item.tip" v-title="`${item.tip}`">{{ item.label }}</span>
20
+ <span v-else>{{ item.label }}</span>
21
+ </el-link>
22
+ <i class="el-icon-arrow-down color-primary" />
23
+ </div>
24
+ <el-dropdown-menu slot="dropdown" class="text-c">
25
+ <el-dropdown-item
26
+ v-for="item1 in item.children"
27
+ :key="item1.label"
28
+ :command="item1.command"
29
+ :disabled="item1.disabled | dbdBtn(row)"
30
+ >
31
+ <el-link v-if="item1.type" :type="item1.type" :underline="false">{{ item1.label }}</el-link>
32
+ <template v-else>{{ item1.label }}</template>
33
+ </el-dropdown-item>
34
+ </el-dropdown-menu>
35
+ </el-dropdown>
36
+ <el-link
37
+ v-else
38
+ :key="item.label"
39
+ :class="i ? 'm-l-b' : ''"
40
+ :type="item.type || 'primary'"
41
+ :underline="false"
42
+ :disabled="item.disabled | dbdBtn(row)"
43
+ @click="$emit('command', item.command)"
44
+ >
45
+ <span v-if="item.tip" v-title="`${item.tip}`">{{ item.label }}</span>
46
+ <span v-else>{{ item.label }}</span>
47
+ </el-link>
48
+ </template>
49
+
15
50
  <el-dropdown v-if="moreBtns.length" class="m-l-b" @command="(c) => $emit('command', c)">
16
51
  <el-button class="n20-icon-moren" type="text" size="mini" />
17
52
  <el-dropdown-menu slot="dropdown" class="text-c">
18
- <el-dropdown-item
19
- v-for="item in moreBtns"
20
- :key="item.label"
21
- :command="item.command"
22
- :disabled="item.disabled | dbdBtn(row)"
23
- >
24
- <el-link v-if="item.type" :type="item.type" :underline="false">{{ item.label }}</el-link>
25
- <template v-else>{{ item.label }}</template>
26
- </el-dropdown-item>
53
+ <template v-for="(item, i) in moreBtns">
54
+ <el-dropdown-item :key="i" v-if="item.children && item.children.length">
55
+ <template>{{ item.label }}</template>
56
+ <el-dropdown class="m-l-b" @command="(c) => $emit('command', c)">
57
+ <i class="el-icon-arrow-down" />
58
+ <el-dropdown-menu slot="dropdown" class="text-c">
59
+ <el-dropdown-item
60
+ v-for="item2 in item.children"
61
+ :key="item2.label"
62
+ :command="item2.command"
63
+ :disabled="item2.disabled | dbdBtn(row)"
64
+ >
65
+ <el-link v-if="item2.type" :type="item2.type" :underline="false">{{ item2.label }}</el-link>
66
+ <template v-else>{{ item2.label }}</template>
67
+ </el-dropdown-item>
68
+ </el-dropdown-menu>
69
+ </el-dropdown>
70
+ </el-dropdown-item>
71
+ <el-dropdown-item v-else :key="item.label" :command="item.command" :disabled="item.disabled | dbdBtn(row)">
72
+ <el-link v-if="item.type" :type="item.type" :underline="false">{{ item.label }}</el-link>
73
+ <template v-else>{{ item.label }}</template>
74
+ </el-dropdown-item>
75
+ </template>
27
76
  </el-dropdown-menu>
28
77
  </el-dropdown>
29
78
  </span>