jufubao-admin-library 1.1.171 → 1.1.172

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.
@@ -56,8 +56,11 @@
56
56
  <span>{{item.name|fitersName}}</span>
57
57
  </div>
58
58
  </draggable>
59
- <div><el-button
59
+ <div>
60
+ <div style="margin-bottom: 10px"><span style="color:#999999;font-size:12px">(上传文件格式:JPG/PNG/JPEG/GIF,不超过5MB)</span></div>
61
+ <el-button
60
62
  type="primary"
63
+ size="small"
61
64
  :disabled="isBtnMaterialMore || disabled"
62
65
  @click="isDialogShow=true"
63
66
  >{{materialBtnName}}</el-button></div>
@@ -249,8 +252,9 @@
249
252
  :limit="limit"
250
253
  multiple
251
254
  >
252
- <div class="xd-upload__list-btn">
255
+ <div class="xd-upload__list-btn" style="text-align: left;">
253
256
  <slot>
257
+ <div style="margin-bottom: 10px"><span style="color:#999999;font-size:12px">(上传文件格式:JPG/PNG/JPEG/GIF,不超过5MB)</span></div>
254
258
  <el-button :disabled="!(showList.length < limit ) || disabled" size="small" type="primary">{{uploadName}}</el-button>
255
259
  </slot>
256
260
  <div class="xd-upload__disabled" v-if="disabled"></div>
@@ -327,7 +331,7 @@
327
331
  * @slot tip插槽:提示文案插槽(one,list,'')
328
332
  *
329
333
  */
330
- import dialogMaterial from "@/viewsMaterial/dialogMaterial.vue";
334
+ // import dialogMaterial from "@/viewsMaterial/dialogMaterial.vue";
331
335
  import XdFontIcon from "@/components/XdFontIcon.vue";
332
336
  import {Loading} from 'element-ui';
333
337
  import draggable from 'vuedraggable';
@@ -341,7 +345,7 @@
341
345
  components: {
342
346
  XdItemImage,
343
347
  draggable,
344
- dialogMaterial,
348
+ // dialogMaterial,
345
349
  XdFontIcon
346
350
  },
347
351
  props: {
@@ -567,6 +571,7 @@
567
571
  url: temp['url'] || temp['file_src'],
568
572
  name: temp['name'] || temp['file_name'],
569
573
  uid: temp['uid'] || temp['file_id'],
574
+ file_id: temp['file_id'] || '',
570
575
  }
571
576
  this.update(this.oneItem);
572
577
  }
@@ -578,6 +583,7 @@
578
583
  url: item['url'] || item['file_src'],
579
584
  name: item['name'] || item['file_name'],
580
585
  uid: item['uid'] || item['file_id'],
586
+ file_id: item['file_id'] || '',
581
587
  }
582
588
  });
583
589
  this.showList = this.$xdHelper.cloneDeep(this.showList).concat(list).map((item)=>{
@@ -3,7 +3,18 @@
3
3
  <div class="form-wrap">
4
4
  <div class="form-input">
5
5
  <div>
6
- <div style="margin-bottom: 10px">添加素材:<span style="color:#999999;font-size:12px">(上传文件格式:JPG/PNG/JPEG/GIF,不超过5MB)</span></div>
6
+ <!-- <div style="margin-bottom: 10px">添加素材:<span style="color:#999999;font-size:12px">(上传文件格式:JPG/PNG/JPEG/GIF,不超过5MB)</span></div> -->
7
+ <el-form ref="radioForm" :model="radioForm" label-width="65px">
8
+ <el-form-item label="上传方式">
9
+ <el-radio-group v-model="radioForm.method" @change="handleRaidoMethodChange">
10
+ <el-radio
11
+ v-for="item in radioOptions"
12
+ :key="item.value"
13
+ :label="item.value"
14
+ >{{ item.label }}</el-radio>
15
+ </el-radio-group>
16
+ </el-form-item>
17
+ </el-form>
7
18
  <cus-upload
8
19
  v-model="form.file_info"
9
20
  action="action"
@@ -12,9 +23,11 @@
12
23
  tipsformet="上传文件格式:@imageType@,不超过@size@MB."
13
24
  styleType="list"
14
25
  uploadType="aliyun"
15
- :is-material="false"
26
+ :is-material="radioForm.method==='local'?false:true"
16
27
  :isHideFileName="true"
28
+ :materialBtnName="'上传'"
17
29
  :sort="true"
30
+ :key="cusUploadKey"
18
31
  :showtype="false"
19
32
  listSize="100*100"
20
33
  :maxlen="100"
@@ -66,7 +79,7 @@ import XdUpload from "@/components/XdUpload.vue";
66
79
  import handleUpdate from "@/mixins/handleUpdate";
67
80
  import CusUpload from "./CusUpload.vue";
68
81
  export default {
69
- name: "Form",
82
+ name: "UploadForm",
70
83
  components: {
71
84
  XdUpload,
72
85
  CusUpload,
@@ -100,6 +113,19 @@ export default {
100
113
  status: "",
101
114
  file_info: [],
102
115
  },
116
+ radioForm:{
117
+ method: 'local',
118
+ },
119
+ radioOptions:[
120
+ {
121
+ label:'直接上传',
122
+ value:'local'
123
+ },{
124
+ label:'选择素材',
125
+ value:'material'
126
+ }
127
+ ],
128
+ cusUploadKey:'cusUploadKey',
103
129
  };
104
130
  },
105
131
  created() {
@@ -167,6 +193,9 @@ export default {
167
193
  });
168
194
  }
169
195
  },
196
+ handleRaidoMethodChange(){
197
+ this.cusUploadKey = Date.now();
198
+ },
170
199
  },
171
200
  };
172
201
  </script>
@@ -226,4 +255,11 @@ export default {
226
255
  color: #409eff;
227
256
  background: #ecf5ff;
228
257
  }
258
+ ::v-deep .form-input .el-form-item__label{
259
+ width: 65px !important;
260
+ text-align: left !important;
261
+ padding: 0 !important;
262
+ color: #333333!important;
263
+ font-weight: 400!important;
264
+ }
229
265
  </style>
@@ -75,7 +75,7 @@ import company from "./dialog/component/company.vue";
75
75
  import share from "./dialog/component/share.vue";
76
76
 
77
77
  export default {
78
- name: "XdMaterial",
78
+ name: "DialogMaterial",
79
79
  props: {
80
80
  setting: {
81
81
  type: Object,
@@ -197,6 +197,7 @@ export default {
197
197
  url: item.file_url,
198
198
  name: item.file_name,
199
199
  uid: item.file_uid,
200
+ file_id: item.file_id||'',
200
201
  };
201
202
  })
202
203
 
@@ -125,6 +125,7 @@ import uploadForm from "./components/uploadForm";
125
125
  import { mapActions } from "vuex";
126
126
  import axios from "axios";
127
127
  export default {
128
+ name: "Material",
128
129
  components: {
129
130
  XdPagination,
130
131
  XdDialog,
@@ -361,6 +362,7 @@ export default {
361
362
  this.addMaterial(data)
362
363
  .then((res) => {
363
364
  this.uploadVisible = false;
365
+ this.materialForm = {};
364
366
  this.getList(this.searchParams);
365
367
  })
366
368
  .catch((err) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.171",
3
+ "version": "1.1.172",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {