cloud-web-corejs 1.0.54-dev.283 → 1.0.54-dev.286

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,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.283",
4
+ "version": "1.0.54-dev.286",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -26,9 +26,11 @@
26
26
  "core-js": "^3.8.3",
27
27
  "dayjs": "^1.11.13",
28
28
  "element-ui": "^2.15.14",
29
+ "html2canvas": "^1.4.1",
29
30
  "js-base64": "^3.7.7",
30
31
  "js-cookie": "2.2.0",
31
32
  "jsqr": "^1.4.0",
33
+ "jspdf": "^3.0.1",
32
34
  "less": "^4.2.0",
33
35
  "less-loader": "^7.0.1",
34
36
  "lodash": "4.17.21",
@@ -1,135 +1,135 @@
1
- <template>
2
- <div>
3
- <div id="uploadImage" :class="classList">
4
- <div class="upload-list" model="singer" v-for="(attachment, index) in attachments" :key="index"
5
- style="display: inline-block;vertical-align: middle;float: left;">
6
- <template v-if="$attrs.hideInfo !== true && $attrs.hideInfo !== 'true'">
7
- <div class="upload-box">
8
- <ul class="el-upload-list el-upload-list--picture">
9
- <li tabindex="0" class="el-upload-list__item">
10
- <div>
11
- <div class="el-upload-list__item-thumbnail">
12
- <div class="show-video" v-if="hasPreview(attachment)" @click="openPreview(attachment,index)"><i
13
- class="icon-chakan"></i></div>
14
- <p>
15
- <el-image
16
- :src="getShowUrl(attachment)"
17
- @click="openPreview(attachment,index)"
18
- :z-index="999999"
19
- />
20
- </p>
21
- </div>
22
- <div class="el-upload-list__item-name">
23
- <el-tooltip :enterable="false" class="item" effect="dark" :content="getAttachmentName(attachment)"
24
- placement="top">
25
- <p v-if="$attrs.hideName !== true">{{ getAttachmentName(attachment) }}</p>
26
- </el-tooltip>
27
- <p v-if="$attrs.showSize === true || $attrs.showSize === 'true'">
28
- {{ formatFileSize(attachment.fileSize) }}</p>
29
- <!-- <p v-if="$attrs.showSortInput !== true && !dataType && $attrs.createBy !== false">
30
- {{ attachment.createBy }}</p>-->
31
- <p v-if="$attrs.showSortInput !== true && !dataType && $attrs.createDate !== false">
32
- {{ attachment.createDate }}</p>
33
- </div>
34
- <div class="el-upload-input" v-if="$attrs.showSortInput">
35
- <base-input-number v-model="attachment.orders" class="button-sty"
36
- :placeholder="$t2('序号', 'components.VabUpload.orders')" :scale="0"/>
37
- </div>
38
- <div class="el-upload-input" v-if="$attrs.showNameInput">
39
- <el-input v-model="attachment.name" class="button-sty"
40
- :placeholder="$t2('请输入名称', 'components.VabUpload.name')" :scale="0"/>
41
- </div>
42
- <div class="el-upload-list__item-status-label"><i class="el-icon-upload-success el-icon-check"></i>
43
- </div>
44
- <div class="el-icon-close" @click="deleteFile(index)"
45
- v-if="$attrs.edit !== false && $attrs.edit !== 'false' && attachment.h5!==1">
46
- <i class="el-tooltip iconfont iconshanchu" aria-describedby="el-tooltip-6144" tabindex="0"></i>
47
- </div>
48
- <div class="el-icon-tagEdit" v-if="attachment.h5!==1">
49
- <el-tooltip class="item" effect="dark" :content="$t2('下载', 'system.button.download')"
50
- placement="top">
51
- <i class="el-icon-download"
52
- @click="downloadFile(attachment)"></i>
53
- </el-tooltip>
54
- <el-tooltip class="item" effect="dark" :content="$t2('详情', 'components.VabUpload.detail')"
55
- placement="top"
56
- v-if="attachment && attachment.id && $attrs.showProperties!==false && !dataType">
57
- <i class="iconfont icon-shuxing" @click="openPropertiesDialog(attachment)"></i>
58
- </el-tooltip>
59
- </div>
60
- </div>
61
- </li>
62
- </ul>
63
- </div>
64
- </template>
65
- <template v-else>
66
- <a>
67
- <el-image
68
- :src="getShowUrl(attachment)"
69
- @click="openPreview(attachment,index)"
70
- :z-index="999999"
71
- />
72
- </a>
73
- <a href="javascript:void(0);" class="del" @click="deleteFile(index)"
74
- v-if="$attrs.edit !== false && $attrs.edit !== 'false'"><i class="el-icon-error"></i></a>
75
- </template>
76
- </div>
77
- <div class="el-upload el-upload--picture" style="vertical-align: middle;display: inline-block;float:left"
78
- v-if="$attrs.edit !== false && $attrs.edit !== 'false'">
79
- <button
80
- type="button"
81
- class=" avatar-uploader"
82
- v-if="showUploadBtn"
83
- @keyup.prevent
84
- @keydown.enter.prevent
85
- @click="
86
- $baseUpload.open({
87
- ..._props,
88
- ...$attrs,
89
- limit: limit,
90
- multi:multi,
91
- accept: accept ? accept : 'file',
92
- auto: auto,
93
- size: fileMaxSize,
94
- chunkSize: chunkSize,
95
- callback: fileConfirm,
96
- pickPrivateProfile:pickPrivateProfile,
97
- confirmUpload:confirmUpload,
98
- otherParams:$attrs
99
- })
100
- "
101
- >
102
- <i class="el-icon-plus avatar-uploader-icon"></i>
103
- </button>
104
- </div>
105
- </div>
106
- <propertiesDialog v-if="showPropertiesDialog" :visiable.sync="showPropertiesDialog"
107
- :editAttachment.sync="editAttachment" :edit.sync="$attrs.edit"></propertiesDialog>
108
- <el-image-viewer v-if="showViewer" :on-close="closeViewer" :initial-index.sync="chooseIndex"
109
- :url-list="pictureDtoList"/>
110
- </div>
111
- </template>
112
-
113
- <script>
114
- import {viewMixins} from './mixins';
115
-
116
- export default {
117
- mixins: [viewMixins],
118
- components: {propertiesDialog: () => import('./propertiesDialog.vue'), ElImageViewer: () => import('./image-viewer')},
119
- computed:{
120
- classList(){
121
- // 'upload-img': this.dataType || (this.$attrs.hideInfo == true || this.$attrs.hideInfo == 'true')
122
- let arr = [];
123
- if(this.dataType || (this.$attrs.hideInfo == true || this.$attrs.hideInfo == 'true')){
124
- arr.push('upload-img')
125
- }
126
- let widgetSize = this.$attrs.widgetSize || 2
127
- if(widgetSize){
128
- let str1 = "widgetSize-" + widgetSize
129
- arr.push(str1)
130
- }
131
- return arr
132
- },
133
- }
134
- };
135
- </script>
1
+ <template>
2
+ <div>
3
+ <div id="uploadImage" :class="classList">
4
+ <div class="upload-list" model="singer" v-for="(attachment, index) in attachments" :key="index"
5
+ style="display: inline-block;vertical-align: middle;float: left;">
6
+ <template v-if="$attrs.hideInfo !== true && $attrs.hideInfo !== 'true'">
7
+ <div class="upload-box">
8
+ <ul class="el-upload-list el-upload-list--picture">
9
+ <li tabindex="0" class="el-upload-list__item">
10
+ <div>
11
+ <div class="el-upload-list__item-thumbnail">
12
+ <div class="show-video" v-if="hasPreview(attachment)" @click="openPreview(attachment,index)"><i
13
+ class="icon-chakan"></i></div>
14
+ <p>
15
+ <el-image
16
+ :src="getShowUrl(attachment)"
17
+ @click="openPreview(attachment,index)"
18
+ :z-index="999999"
19
+ />
20
+ </p>
21
+ </div>
22
+ <div class="el-upload-list__item-name">
23
+ <el-tooltip :enterable="false" class="item" effect="dark" :content="getAttachmentName(attachment)"
24
+ placement="top">
25
+ <p v-if="$attrs.hideName !== true">{{ getAttachmentName(attachment) }}</p>
26
+ </el-tooltip>
27
+ <p v-if="$attrs.showSize === true || $attrs.showSize === 'true'">
28
+ {{ formatFileSize(attachment.fileSize) }}</p>
29
+ <!-- <p v-if="$attrs.showSortInput !== true && !dataType && $attrs.createBy !== false">
30
+ {{ attachment.createBy }}</p>-->
31
+ <p v-if="$attrs.showSortInput !== true && !dataType && $attrs.createDate !== false">
32
+ {{ attachment.createDate }}</p>
33
+ </div>
34
+ <div class="el-upload-input" v-if="$attrs.showSortInput">
35
+ <base-input-number v-model="attachment.orders" class="button-sty"
36
+ :placeholder="$t2('序号', 'components.VabUpload.orders')" :scale="0"/>
37
+ </div>
38
+ <div class="el-upload-input" v-if="$attrs.showNameInput">
39
+ <el-input v-model="attachment.name" class="button-sty"
40
+ :placeholder="$t2('请输入名称', 'components.VabUpload.name')" :scale="0"/>
41
+ </div>
42
+ <div class="el-upload-list__item-status-label"><i class="el-icon-upload-success el-icon-check"></i>
43
+ </div>
44
+ <div class="el-icon-close" @click="deleteFile(index)"
45
+ v-if="$attrs.edit !== false && $attrs.edit !== 'false' && attachment.h5!==1">
46
+ <i class="el-tooltip iconfont iconshanchu" aria-describedby="el-tooltip-6144" tabindex="0"></i>
47
+ </div>
48
+ <div class="el-icon-tagEdit" v-if="attachment.h5!==1">
49
+ <el-tooltip class="item" effect="dark" :content="$t2('下载', 'system.button.download')"
50
+ placement="top">
51
+ <i class="el-icon-download"
52
+ @click="downloadFile(attachment)"></i>
53
+ </el-tooltip>
54
+ <el-tooltip class="item" effect="dark" :content="$t2('详情', 'components.VabUpload.detail')"
55
+ placement="top"
56
+ v-if="attachment && attachment.id && $attrs.showProperties!==false && !dataType">
57
+ <i class="iconfont icon-shuxing" @click="openPropertiesDialog(attachment)"></i>
58
+ </el-tooltip>
59
+ </div>
60
+ </div>
61
+ </li>
62
+ </ul>
63
+ </div>
64
+ </template>
65
+ <template v-else>
66
+ <a>
67
+ <el-image
68
+ :src="getShowUrl(attachment)"
69
+ @click="openPreview(attachment,index)"
70
+ :z-index="999999"
71
+ />
72
+ </a>
73
+ <a href="javascript:void(0);" class="del" @click="deleteFile(index)"
74
+ v-if="$attrs.edit !== false && $attrs.edit !== 'false'"><i class="el-icon-error"></i></a>
75
+ </template>
76
+ </div>
77
+ <div class="el-upload el-upload--picture" style="vertical-align: middle;display: inline-block;float:left"
78
+ v-if="$attrs.edit !== false && $attrs.edit !== 'false'">
79
+ <button
80
+ type="button"
81
+ class=" avatar-uploader"
82
+ v-if="showUploadBtn"
83
+ @keyup.prevent
84
+ @keydown.enter.prevent
85
+ @click="
86
+ $baseUpload.open({
87
+ ..._props,
88
+ ...$attrs,
89
+ limit: limit,
90
+ multi:multi,
91
+ accept: accept ? accept : 'file',
92
+ auto: auto,
93
+ size: fileMaxSize,
94
+ chunkSize: chunkSize,
95
+ callback: fileConfirm,
96
+ pickPrivateProfile:pickPrivateProfile,
97
+ confirmUpload:confirmUpload,
98
+ otherParams:$attrs
99
+ })
100
+ "
101
+ >
102
+ <i class="el-icon-plus avatar-uploader-icon"></i>
103
+ </button>
104
+ </div>
105
+ </div>
106
+ <propertiesDialog v-if="showPropertiesDialog" :visiable.sync="showPropertiesDialog"
107
+ :editAttachment.sync="editAttachment" :edit.sync="$attrs.edit"></propertiesDialog>
108
+ <el-image-viewer v-if="showViewer" :on-close="closeViewer" :initial-index.sync="chooseIndex"
109
+ :url-list="pictureDtoList"/>
110
+ </div>
111
+ </template>
112
+
113
+ <script>
114
+ import {viewMixins} from './mixins';
115
+
116
+ export default {
117
+ mixins: [viewMixins],
118
+ components: {propertiesDialog: () => import('./propertiesDialog.vue'), ElImageViewer: () => import('./image-viewer')},
119
+ computed:{
120
+ classList(){
121
+ // 'upload-img': this.dataType || (this.$attrs.hideInfo == true || this.$attrs.hideInfo == 'true')
122
+ let arr = [];
123
+ if(this.dataType || (this.$attrs.hideInfo == true || this.$attrs.hideInfo == 'true')){
124
+ arr.push('upload-img')
125
+ }
126
+ let widgetSize = this.$attrs.widgetSize || 2
127
+ if(widgetSize){
128
+ let str1 = "widgetSize-" + widgetSize
129
+ arr.push(str1)
130
+ }
131
+ return arr
132
+ },
133
+ }
134
+ };
135
+ </script>