cloud-web-corejs 1.0.54-dev.398 → 1.0.54-dev.399

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.398",
4
+ "version": "1.0.54-dev.399",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -151,6 +151,7 @@
151
151
  "src/components/table",
152
152
  "src/components/tempStorage",
153
153
  "src/components/Tinymce",
154
+ "src/components/obsUpload",
154
155
  "src/components/VabUpload",
155
156
  "src/components/vb-tabs",
156
157
  "src/components/video",
@@ -0,0 +1,34 @@
1
+ const moudule = {};
2
+ import vue from "vue";
3
+ import objView from './index.vue';
4
+
5
+ let configUtil = {
6
+ vue,
7
+ objView
8
+ }
9
+
10
+ const objInstance = configUtil.vue.extend(configUtil.objView);
11
+ const initInstance = (containter) => {
12
+ // 实例化vue实例
13
+ let currentInstance = new objInstance({i18n: window.$vueRoot._i18n});
14
+ let dom = currentInstance.$mount().$el;
15
+ containter.appendChild(dom);
16
+ return currentInstance;
17
+ };
18
+
19
+ export function openObsUploadDialog(options) {
20
+ let containter = document.body;
21
+ let currentInstance = initInstance(containter);
22
+ Object.assign(currentInstance, options);
23
+ return currentInstance.handleShow(options);
24
+ };
25
+
26
+ export function uploadOBS(options) {
27
+ let containter = document.body;
28
+ let currentInstance = initInstance(containter);
29
+ Object.assign(currentInstance, options);
30
+ return currentInstance.singerUpload(options);
31
+ };
32
+
33
+
34
+
@@ -0,0 +1,231 @@
1
+ <template>
2
+ <div>
3
+ <el-dialog
4
+ :title="title"
5
+ :visible.sync="dialogFormVisible"
6
+ v-if="dialogFormVisible"
7
+ :close-on-click-modal="false"
8
+ width="1150px"
9
+ :custom-class="'dialog-style '+(option.otherParams && option.otherParams.uploadDialogCustomClass?option.otherParams.uploadDialogCustomClass:'')"
10
+ :append-to-body="true"
11
+ :destroy-on-close="true"
12
+ @close="handleClose"
13
+ v-el-drag-dialog
14
+ >
15
+ <div class="upload-box" style="margin-left:-20px;margin-right:-20px;">
16
+ <div class="upload-b_left" @click="choosePasteArea" :class="{on:pasteAreaStatus}"
17
+ v-show="option.hidePasteArea!==true">
18
+ <div class="t"><i
19
+ class="el-icon-warning-outline"></i>{{ $t2('选择此处,可粘贴文件', 'components.VabUpload.tip') }}(Ctrl+V)
20
+ </div>
21
+ <ul class="el-upload-list el-upload-list--picture">
22
+ <div class="nodata" v-if="pasteList.length == 0">
23
+ <img src="~@/resources/images/nodata2.png"/>
24
+ </div>
25
+ <li v-for="(pasteFile,index) in pasteList" :key="index" class="el-upload-list__item is-success">
26
+ <div>
27
+ <img
28
+ :src="getShowImage(pasteFile)"
29
+ class="el-upload-list__item-thumbnail"
30
+ />
31
+ <div class="el-upload-list__item-name">
32
+ <!-- <p class="flex">
33
+ <el-input size="mini" v-model="pasteFile.fileName" @change="changeFileName(pasteFile)"></el-input>
34
+ </p> -->
35
+ <div class="txt-box">
36
+ <div class="tb-left"></div>
37
+ <div class="tb-mid name">
38
+ <div class="txt">
39
+ <span>{{ pasteFile.fileName }}</span>
40
+ <span><i class="el-icon-edit" @click="openFileNameDialog(pasteFile,index)"></i></span>
41
+ </div>
42
+ </div>
43
+ <div class="format"><i class="el-icon-edit" @click="openFileNameDialog(pasteFile,index)"></i></div>
44
+ </div>
45
+
46
+ <!-- <p>admin</p>-->
47
+ <p>{{ $t2('格式', 'components.VabUpload.fileType') }}:{{ pasteFile.fileSuffix }}</p>
48
+ <p>{{ $t2('大小', 'components.VabUpload.fileSize') }}:{{ formatFileSize(pasteFile.size) }}</p>
49
+ </div>
50
+ <div class="el-icon-close" @click="deletePasteFile(index)">
51
+ <i class="el-tooltip iconfont iconshanchu"></i>
52
+ </div>
53
+ </div>
54
+ </li>
55
+ </ul>
56
+ <el-button type="primary" @click="confirmPasteFile" class="button-sty" v-if="pasteList.length>0">
57
+ <i class="el-icon-check el-icon"></i>
58
+ {{ $t2('确定文件', 'components.VabUpload.confirmFile') }}
59
+ </el-button>
60
+ </div>
61
+ <div class="upload-b_right">
62
+ <div class="tips">
63
+ {{
64
+ $t2('注意:当前所有文件上传完,才允许确定操作,单个文件上传大小,请尽量小于100MB。', 'components.VabUpload.tip2')
65
+ }}
66
+ <div class="upload-count fr">
67
+ <div>{{ $t2('总数', 'components.VabUpload.total') }}:<span>{{ totalQuantity }}</span></div>
68
+ <div>{{ $t2('成功', 'components.VabUpload.success') }}:<span>{{ successQuantity }}</span></div>
69
+ <div>{{ $t2('失败', 'components.VabUpload.fail') }}:<span
70
+ :class="{error : errorQuantity > 0}">{{ errorQuantity }}</span></div>
71
+ </div>
72
+ </div>
73
+ <el-upload
74
+ ref="upload"
75
+ :action="action"
76
+ :http-request="changeFile"
77
+ :auto-upload="auto"
78
+ :close-on-click-modal="false"
79
+ :data="data"
80
+ :file-list="fileList"
81
+ :headers="headers"
82
+ :limit="limit"
83
+ :multiple="isMulti"
84
+ :name="name"
85
+ :on-change="handleChange"
86
+ :on-error="handleError"
87
+ :on-exceed="handleExceed"
88
+ :on-preview="handlePreview"
89
+ :on-progress="handleProgress"
90
+ :on-remove="handleRemove"
91
+ :on-success="handleSuccess"
92
+ :before-upload="handleBeforeUpload"
93
+ :accept="accept"
94
+ class="upload-demo"
95
+ list-type="picture"
96
+ >
97
+ <div class="avatar-uploader hidden" slot="trigger" v-if="showLocalUploadBtn" ref="uploadBtn" v-show="false">
98
+ <i
99
+ class="el-icon-plus avatar-uploader-icon"></i></div>
100
+ <div slot="file" slot-scope="{ file }">
101
+ <img :src="getShowImage(file)" class="el-upload-list__item-thumbnail"/>
102
+ <div class="el-upload-list__item-name">
103
+ <p>{{ file.name }}</p>
104
+ <p>{{ formatFileSize(file.size) }}</p>
105
+ <p class="f-red" v-if="file.status=='fail'">{{ file.failMsg }}</p>
106
+ </div>
107
+ <el-progress :percentage="file.percentage"
108
+ v-if="file.status == 'uploading' || file.status == 'preUpload'"></el-progress>
109
+ <div class="el-upload-list__item-status-label error" v-else-if="file.status == 'fail'"><i
110
+ class="el-icon-upload-success iconfont icon-gantanhao"></i></div>
111
+ <div class="el-upload-list__item-status-label" v-else-if="file.percentage==100"><i
112
+ class="el-icon-upload-success el-icon-check"></i></div>
113
+ <div class="el-upload-list__item-status-label load" v-else-if="file.status == 'ready'"><i
114
+ class="el-icon-loading"></i></div>
115
+
116
+ <div class="el-icon-close" @click="removeFile(file)">
117
+ <el-tooltip :enterable="false" effect="dark" :content="$t2('删除', 'components.VabUpload.delete')"
118
+ placement="top" popper-class="tooltip-skin">
119
+ <i
120
+ class="iconfont iconshanchu"></i></el-tooltip>
121
+ </div>
122
+ </div>
123
+ <el-dialog :visible.sync="dialogVisible" append-to-body
124
+ :title="$t2('查看大图', 'components.VabUpload.checkBigImgage')">
125
+ <div><img :src="dialogImageUrl" alt="" width="100%"/></div>
126
+ </el-dialog>
127
+ </el-upload>
128
+ </div>
129
+ </div>
130
+ <span slot="footer" class="dialog-footer">
131
+ <div class="fl" style="margin-left:291px;">
132
+ <el-button type="warning" class="button-sty" slot="trigger" v-if="showLocalUploadBtn"
133
+ @click="$refs.uploadBtn.click()">
134
+ <i class="el-icon-plus"></i>
135
+ {{ $t2('从本地选择', 'components.VabUpload.localPick') }}
136
+ </el-button>
137
+ <el-button type="success" class="button-sty" @click="showPrivateProfileDialog= true"
138
+ v-if="showPrivateUploadBtn">
139
+ <i class="iconfont icon-wendangshangchuan"></i>
140
+ {{ $t2('从个人文档工作区选择', 'components.VabUpload.privateDocumentPick') }}
141
+ </el-button>
142
+ </div>
143
+
144
+ <el-button type="primary" plain class="button-sty" @click="handleClose">
145
+ <i class="el-icon-close el-icon"></i>
146
+ {{ $t2('取 消', 'system.button.cancel2') }}
147
+ </el-button>
148
+ <el-button type="primary" plain class="button-sty" @click="submitUpload" v-if="!auto && hasReadyFile">
149
+ <i class="el-icon el-icon-video-play"></i>
150
+ {{ $t2('确认上传', 'components.VabUpload.comfirmUpload') }}
151
+ </el-button>
152
+ <el-button type="primary" @click="submitImage" class="button-sty" v-if="!uploading">
153
+ <i class="el-icon-check el-icon"></i>
154
+ {{ $t2('确 定', 'system.button.confirm2') }}
155
+ </el-button>
156
+ <!-- <el-button type="primary" plain class="button-sty" @click="handleBtn" v-if="uploading">
157
+ <i class="el-icon el-icon-video-play" v-if="btn==true"></i>
158
+ <i class="el-icon el-icon-video-pause" v-if="btn==false"></i>
159
+ {{btn|btnText}}
160
+ </el-button> -->
161
+ </span>
162
+ </el-dialog>
163
+ <privateProfileDialog v-if="showPrivateProfileDialog" :visiable.sync="showPrivateProfileDialog"
164
+ @confirm="confirmPrivateProfileDialog"></privateProfileDialog>
165
+ <el-dialog
166
+ :title="$t2('文件名修改', 'components.VabUpload.modifyFileName')"
167
+ :append-to-body="true"
168
+ :modal-append-to-body="true"
169
+ :close-on-click-modal="false"
170
+ v-if="showFileNameDialog"
171
+ :visible.sync="showFileNameDialog"
172
+ :modal="false"
173
+ custom-class="dialog-style list-dialog dialog-checkbox pd_8"
174
+ width="400px"
175
+ v-el-drag-dialog
176
+ v-el-dialog-center
177
+ >
178
+ <div class="cont">
179
+ <el-form ref="editForm" label-width="110px" class="adSearchForm" style="width: 362px;height: auto;">
180
+ <el-form-item :label="$t2('文件名称', 'components.VabUpload.fileName')">
181
+ <el-input v-model="editFileName" clearable class="all-width"/>
182
+ </el-form-item>
183
+ <el-form-item :label="$t2('文件格式', 'components.VabUpload.fileCategory')">
184
+ {{ editFileSuffix }}
185
+ </el-form-item>
186
+ </el-form>
187
+ </div>
188
+ <span slot="footer" class="dialog-footer">
189
+ <el-button type="primary" plain class="button-sty" @click="showFileNameDialog=false">
190
+ <i class="el-icon-close el-icon"></i>
191
+ {{ $t2('取 消', 'system.button.cancel2') }}
192
+ </el-button>
193
+ <el-button type="primary" @click="confirmFileNameDialog" class="button-sty">
194
+ <i class="el-icon-check el-icon"></i>
195
+ {{ $t2('确 定', 'system.button.confirm2') }}
196
+ </el-button>
197
+ </span>
198
+ </el-dialog>
199
+ </div>
200
+ </template>
201
+
202
+ <script>
203
+ import {mixins} from './mixins';
204
+
205
+ export default {
206
+ mixins: [mixins],
207
+ components: {
208
+ privateProfileDialog: () => import('@base/components/VabUpload/privateProfileDialog')
209
+ }
210
+ };
211
+ </script>
212
+
213
+ <style lang="scss" scoped>
214
+ .pup-annex-box {
215
+ height: 355px;
216
+ background: #fff;
217
+ }
218
+
219
+ ::v-deep .dialog-style {
220
+ margin-top: 7vh !important;
221
+
222
+ .dialog-footer {
223
+ padding-left: 6px;
224
+ display: block;
225
+ }
226
+
227
+ .upload-box .upload-demo .el-upload {
228
+ margin-top: 0 !important;
229
+ }
230
+ }
231
+ </style>