Browse Source

素材库

xiuli.gao 1 year ago
parent
commit
477ee12392

+ 0 - 21
project/config/index.js

@@ -24,27 +24,6 @@ module.exports = {
24 24
         pathRewrite: {
25 25
           '^/ceshi': 'http://duanju.wenxingshuju.com'
26 26
         }
27
-      },
28
-      '/zy/': {
29
-        target: 'http://60.205.169.65:8078',
30
-        changeOrigin: true, //改变源
31
-        pathRewrite: {
32
-          '^/zy': 'http://60.205.169.65:8078'
33
-        }
34
-      },
35
-      '/xh/': {
36
-        target: 'http://101.201.181.203:8012',
37
-        changeOrigin: true, //改变源
38
-        pathRewrite: {
39
-          '^/xh': 'http://101.201.181.203:8012'
40
-        }
41
-      },
42
-      '/ss/': {
43
-        target: 'http://60.205.169.65:19001',
44
-        changeOrigin: true, //改变源
45
-        pathRewrite: {
46
-          '^/ss': 'http://60.205.169.65:19001'
47
-        }
48 27
       }
49 28
     },
50 29
 

+ 6 - 6
project/src/assets/config/interface_api.js

@@ -3,13 +3,8 @@ import Switchddress from "switch-address";
3 3
 const switchAddress = new Switchddress({
4 4
   address: {
5 5
     // 加入环境--地址映射
6
-    ceshi: "/ceshi",
7
-    王赛: "/ws",
8
-    赵振: "/zz",
6
+    测试: "/ceshi",
9 7
     线上: "/api",
10
-    晓华: "/xh",
11
-    志远: "/zy",
12
-    沈松: "/ss",
13 8
     production: "",
14 9
   },
15 10
   default: process.env.NODE_ENV, // 指定当前web所在的部署环境
@@ -403,6 +398,11 @@ var api = {
403 398
   operatorGroup_changeStatus: "/api/OperationGroup/changeStatus", // 运营组 - 修改状态
404 399
   operatorGroup_setConfig: "/api/OperationGroup/setConfig", // 运营组 - 创建、编辑运营组
405 400
   operatorGroup_groupDetail: "/api/OperationGroup/groupDetail", // 运营组 - 运营组详情
401
+
402
+  media_groupList: '/api/media/groupList', // 素材组列表
403
+  media_delGroup: '/api/media/delGroup', // 删除素材组
404
+  media_editGroup: '/api/media/editGroup', // 素材组新增/编辑
405
+  media_upload: '/api/media/upload',// 上传素材
406 406
 };
407 407
 
408 408
 export { api };

+ 24 - 0
project/src/components/assembly/screen/channel.vue

@@ -224,12 +224,36 @@ export default {
224 224
     } else if (this.type == 'operatorGroup') { // 运营组
225 225
       this.getOperatorGroup()
226 226
       this.placeholderVal = '运营组'
227
+    } else if (this.type == 'materialLibrary') { // 图片组
228
+      this.getPicturesGroup()
229
+      this.placeholderVal = '图片组'
227 230
     } else {
228 231
       this.init()
229 232
     }
230 233
 
231 234
   },
232 235
   methods: {
236
+    getPicturesGroup() { //图片组
237
+      this.$axios.get(this.URL.BASEURL + this.URL.media_groupList, {
238
+        params: {
239
+          page: 1,
240
+          page_size: 500,
241
+          operator_id: '',
242
+        }
243
+      }).then((res) => {
244
+        var res = res.data
245
+        if (res && res.errno == 0 && Array.isArray(res.rst.data)) {
246
+          this.options = res.rst.data
247
+          this.$emit('groupList', res.rst.data)
248
+          this.options.forEach((item) => {
249
+            item.val = item.name
250
+            item.key = item.id
251
+          });
252
+        } else if (res.errno != 4002) {
253
+        }
254
+      }).catch((err) => {
255
+      });
256
+    },
233 257
     getOperatorGroup() { // 运营组
234 258
       this.$axios.get(this.URL.BASEURL + this.URL.operatorGroup_groupList, {
235 259
         params: {

+ 139 - 0
project/src/components/manage/materialLibrary/dialog/uploadMaterials.vue

@@ -0,0 +1,139 @@
1
+<template>
2
+  <el-dialog
3
+      :visible.sync="uploadVisible"
4
+      :before-close="handleCancel"
5
+      :close-on-click-modal="false"
6
+      :close-on-press-escape="false"
7
+      class="group-dialog"
8
+      width="600px"
9
+    >
10
+      <div slot="title">
11
+        <span>上传素材</span>
12
+      </div>
13
+      <div class="form-wrap" v-loading="loading">
14
+        <el-upload
15
+          ref="upload"
16
+          class="upload-demo"
17
+          :action="URL.BASEURL + URL.media_upload"
18
+          :on-success="uploadSuccess"
19
+          :on-progress='beforeUploadUpload'
20
+          :on-error='uploadFail'
21
+          :on-exceed="handleExceed"
22
+          :before-remove="beforeRemove"
23
+          :on-remove="handleRemove"
24
+          :file-list="fileList"
25
+          :limit="6"
26
+          accept=".jpg,.jpeg,.png"
27
+          name="file"
28
+          :data="fileData"
29
+          multiple
30
+          drag
31
+          list-type="picture">
32
+          <i class="el-icon-upload"></i>
33
+
34
+          <div class="el-upload__text">将图片拖到此处,或<em>点击上传</em></div>
35
+          <!-- <el-button size="small" type="success">点击上传</el-button> -->
36
+          <div slot="tip" class="el-upload__tip">*图片仅支持png或jpg格式,且文件大小不得超过10M。</div>
37
+        </el-upload>
38
+      </div>
39
+      <div slot="footer" class="dialog-footer">
40
+        <el-button size="mini" @click="handleCancel">取 消</el-button>
41
+        <el-button size="mini" type="primary" @click="handleConfirm" :disabled="loading">确 定</el-button>
42
+      </div>
43
+    </el-dialog>
44
+</template>
45
+<script>
46
+export default {
47
+  name: 'uploadMaterials',
48
+  props: {
49
+    // 控制弹框是否显示
50
+    uploadVisible: {
51
+      type: Boolean,
52
+      default: () => false
53
+    },
54
+  },
55
+  // watch: {
56
+  //   dialogVisible(isShow) {
57
+  //     // 弹框显示 => 初始化表单数据
58
+  //     if (isShow) {
59
+  //       // this.handleInitData()
60
+  //     }
61
+  //   },
62
+  // },
63
+  data () {
64
+    return{
65
+      loading: false,
66
+      fileData: {
67
+        admin_id: this.$cookie.getCookie('admin_id'),
68
+        ttl: this.$cookie.getCookie('ttl'),
69
+        sign: this.$cookie.getCookie('sign'),
70
+        corpid: this.$localSelfStore.getLocal('defaultCorp') && this.$localSelfStore.getLocal('defaultCorp') != 'undefined' ? JSON.parse(this.$localSelfStore.getLocal('defaultCorp')).corpid : '',
71
+        type: 1,//素材类型。1图片 2语音 3视频
72
+      },
73
+      fileList: [],
74
+      successFile: []
75
+    }
76
+  },
77
+  methods:{
78
+    handleCancel() {
79
+      this.$emit('cancel')
80
+    },
81
+    handleConfirm(){
82
+
83
+    },
84
+    uploadSuccess (res, file) {
85
+        this.$loading(this.$loadingConfig).close();
86
+        if (res.errno == 0) {
87
+          this.successFile.push({uid:file.uid,url:res.rst.url})
88
+          this.$emit('multipleImgList',this.successFile)
89
+        } else {
90
+          let idx = this.$refs.upload.uploadFiles.findIndex(item => item.uid === file.uid)
91
+          this.$refs.upload.uploadFiles.splice(idx, 1)
92
+          this.$message({
93
+            message: res.err,
94
+            type: 'warning'
95
+          })
96
+        }
97
+        // 清除同名图片
98
+        // this.$refs.upload.uploadFiles = this.$refs.upload.uploadFiles.filter((e,i)=>{
99
+        //   return e.name != file.name
100
+        // })
101
+      },
102
+      beforeUploadUpload (file) {
103
+        this.$loading(this.$loadingConfig);
104
+      },
105
+      uploadFail (file) {
106
+        this.$loading(this.$loadingConfig).close();
107
+        this.$message({
108
+          message: '上传失败',
109
+          type: 'fail'
110
+        })
111
+        let idx = this.$refs.upload.uploadFiles.findIndex(item => item.uid === file.uid)
112
+        this.$refs.upload.uploadFiles.splice(idx, 1)
113
+      },
114
+      handleExceed(files, fileList) {
115
+        this.$message.warning(`当前限制选择 6 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
116
+      },
117
+      beforeRemove(file, fileList) {
118
+        return this.$confirm(`确定移除 ${ file.name }?`);
119
+      },
120
+      handleRemove(file, fileList) {
121
+        this.successFile = this.successFile.filter((v)=>{
122
+          return v.uid != file.uid;
123
+        })
124
+        this.$emit('multipleImgList',this.successFile)
125
+      },
126
+  }
127
+}
128
+</script>
129
+<style scoped lang="scss">
130
+.upload-demo{
131
+ /deep/ .el-upload{
132
+  width: 100%;
133
+ }
134
+ /deep/ .el-upload-dragger{
135
+  width: 100%;
136
+  height: 150px;
137
+ }
138
+}
139
+</style>

+ 280 - 0
project/src/components/manage/materialLibrary/groupPictures.vue

@@ -0,0 +1,280 @@
1
+<template>
2
+  <div class="playletManage-wrap">
3
+    <div class="topTagBox flex">
4
+      <slot></slot>
5
+      <div class="flex">
6
+        <selfInput label_name="组名称" @inputChange="onInputKeyword" />
7
+        <el-button type="primary" size="mini" @click="onClickCreateGroup" style="margin-left:10px">创建组</el-button>
8
+      </div>
9
+    </div>
10
+    <div v-loading="loading" >
11
+      <el-table ref="tableDom" :height="height" :data="groupList" tooltip-effect="dark" style="width: 100%;margin-top:10px">
12
+        <el-table-column label="分组名称" prop="name" align="center" fixed="left" />
13
+        <el-table-column label="操作" min-width="210" align="center" fixed="right">
14
+          <template slot-scope="{ row }">
15
+            <span class="btn" @click="onClickEditGroup(row)">编辑</span>
16
+            <el-popconfirm @confirm="onClickDetaleSend(row)" :title="`确定删除【${row.name}】?`">
17
+              <span slot="reference" class="btn">删除组</span>
18
+            </el-popconfirm>
19
+
20
+          </template>
21
+        </el-table-column>
22
+      </el-table>
23
+      <div class="pagination" v-show="pagination.total > 0">
24
+        <el-pagination background :current-page="pagination.page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count="Number(pagination.pages)">
25
+        </el-pagination>
26
+      </div>
27
+      <!-- 创建组 -->
28
+      <el-dialog
29
+        :visible.sync="dialogVisible"
30
+        :before-close="handleCancel"
31
+        :close-on-click-modal="false"
32
+        :close-on-press-escape="false"
33
+        class="group-dialog"
34
+        width="400px"
35
+      >
36
+        <div slot="title">
37
+          <span>{{ currentGroupId == '' ? '新建分组' : '编辑分组' }}</span>
38
+        </div>
39
+        <div class="form-wrap" v-loading="form.loading">
40
+          <div class="form-item">
41
+            <span class="lable"><em>*</em>分组名称</span>
42
+            <el-input v-model="form.name" size="small" placeholder="请输入名称" clearable />
43
+          </div>
44
+        </div>
45
+        <div slot="footer" class="dialog-footer">
46
+          <el-button size="mini" @click="handleCancel">取 消</el-button>
47
+          <el-button size="mini" type="primary" @click="handleConfirm" :disabled="form.loading">确 定</el-button>
48
+        </div>
49
+      </el-dialog>
50
+    </div>
51
+  </div>
52
+</template>
53
+<script>
54
+import selfInput from '@/components/assembly/screen/input.vue'
55
+export default {
56
+  name: 'playletGroup',
57
+  components:{ selfInput },
58
+  data () {
59
+    return {
60
+      height: '',
61
+      loading: false,
62
+      pagination: {
63
+        page: 1,
64
+        page_size: 20,
65
+        pages: 0,
66
+        total: 0,
67
+      },
68
+      filter: {
69
+        keyword: '',
70
+      },
71
+      groupList: [],
72
+
73
+      currentGroupId: '',
74
+      dialogVisible: false,
75
+      form: {
76
+        name: '',
77
+        loading: false
78
+      }
79
+    }
80
+  },
81
+  created () {
82
+    this.height = document.documentElement.clientHeight - 200 > 400 ? document.documentElement.clientHeight - 200 : 400
83
+    this.init()
84
+  },
85
+  methods: {
86
+    // 获取列表数据
87
+    async init() {
88
+      try {
89
+        this.loading = true
90
+        const url = `${this.URL.BASEURL}${this.URL.media_groupList}`
91
+        const params = {
92
+          keyword: this.filter.keyword,
93
+          page: this.pagination.page,
94
+          page_size: this.pagination.page_size,
95
+        }
96
+        const { data: res = {} } = await this.$axios.get(url, { params })
97
+        if (res && res.errno == 0 && Array.isArray(res.rst.data)) {
98
+          this.groupList = res.rst.data;
99
+          this.pagination.total = res.rst.pageInfo.total;
100
+          this.pagination.pages = res.rst.pageInfo.pages;
101
+          this.$refs.tableDom.bodyWrapper.scrollTop = 0
102
+        } else if (res.errno != 4002) {
103
+          this.$message.warning(res.err)
104
+          this.groupList = [];
105
+          this.pagination.total = 0;
106
+          this.pagination.pages = 0;
107
+        }
108
+      } catch (error) {
109
+        this.groupList = [];
110
+        this.pagination.total = 0;
111
+        this.pagination.pages = 0;
112
+      } finally {
113
+        this.loading = false
114
+      }
115
+    },
116
+    // 监听当前页数变化
117
+    handleCurrentChange(currentPage) {
118
+      this.pagination.page = currentPage
119
+      this.init()
120
+    },
121
+    // 监听点击“创建组”
122
+    onClickCreateGroup() {
123
+      this.currentGroupId = ''
124
+      this.dialogVisible = true;
125
+    },
126
+    handleCancel() {
127
+      this.dialogVisible = false
128
+    },
129
+    handleConfirm(){
130
+      this.form.loading = true;
131
+      this.$axios.post(this.URL.BASEURL + this.URL.media_editGroup, {
132
+        name: this.form.name,
133
+        group_id: this.currentGroupId
134
+      }).then((data)=>{
135
+        this.form.loading = false;
136
+        const res = data.data;
137
+        if (res && res.errno == 0) {
138
+          this.$message.success(`${this.currentGroupId == '' ? '新建' : '编辑'}成功`)
139
+          this.init(this.pagination.page)
140
+          this.dialogVisible = false;
141
+        } else if (res.errno != 4002) {
142
+          this.$message.warning(res.err)
143
+        }
144
+      }).catch((err)=>{
145
+        this.form.loading = false;
146
+      })
147
+    },
148
+    // 监听点击“编辑组”
149
+    onClickEditGroup(row) {
150
+      this.currentGroupId = row.id;
151
+      this.dialogVisible = true;
152
+      this.form.name = row.name;
153
+    },
154
+    onConfirmGroupDialog({ isEdit }) {
155
+      if (!isEdit){
156
+        this.pagination.page = 1
157
+      }
158
+      this.init()
159
+    },
160
+    onCancelGroupDialog() {
161
+    },
162
+    // 监听"搜索组名称"变化
163
+    onInputKeyword(val) {
164
+      this.filter.keyword = val || ''
165
+      this.pagination.page = 1
166
+      this.init()
167
+    },
168
+    // 监听点击"删除组"
169
+    async onClickDetaleSend(groupInfo) {
170
+      try {
171
+        this.loading = true
172
+        const url = `${this.URL.BASEURL}${this.URL.media_delGroup}`
173
+        const params = {
174
+          group_id: groupInfo.id,
175
+        }
176
+        const { data: res = {} } = await this.$axios.get(url, { params })
177
+        if (res && res.errno == 0 && res.rst) {
178
+          this.$message.success('删除成功')
179
+          this.init(this.pagination.page)
180
+        } else if (res.errno != 4002) {
181
+          this.$message.warning(res.err)
182
+        }
183
+      } catch (error) {
184
+        console.log(error)
185
+      } finally {
186
+        this.loading = false
187
+      }
188
+    },
189
+  }
190
+}
191
+</script>
192
+<style lang="scss" scoped>
193
+/deep/ .el-select .el-input.is-focus .el-input__inner,
194
+/deep/ .el-select .el-input__inner:focus {
195
+  border-color: #DCDFE6;
196
+}
197
+.playletManage-wrap {
198
+  .playlet-wrap {
199
+    display: flex;
200
+    flex-wrap: wrap;
201
+    .playlet-item {
202
+      background-color: #F2F2F2;
203
+      color: #333;
204
+      padding: 2px 10px;
205
+      margin: 0 6px 6px 0;
206
+      border-radius: 4px;
207
+    }
208
+  }
209
+  /deep/ .common-screen-item{
210
+    margin: 0;
211
+  }
212
+  .select-cls {
213
+    /deep/ .el-input__suffix {
214
+      border-top-right-radius: 4px;
215
+      border-bottom-right-radius: 4px;
216
+      border: 1px solid #DCDFE6;
217
+      right: 0;
218
+      width: 30px;
219
+      background-color: #F1F1F1;
220
+      .el-input__icon {
221
+        color: #909399;
222
+      }
223
+    }
224
+  }
225
+  .playlet-name {
226
+    color: #32B38A;
227
+    // cursor: pointer;
228
+  }
229
+  .status {
230
+    margin: 2px auto;
231
+    padding: 0 6px;
232
+    color: #32B38A;
233
+    border: 1px solid #32B38A;
234
+  }
235
+  .btn {
236
+    color: #32B38A;
237
+    cursor: pointer;
238
+    margin-right: 4px;
239
+    &:last-child {
240
+      margin-right: 0;
241
+    }
242
+  }
243
+}
244
+.form-wrap {
245
+    .form-item {
246
+      display: flex;
247
+      align-items: center;
248
+      margin-top: 16px;
249
+      &.flex-start {
250
+        align-items: flex-start;
251
+        .lable {
252
+          margin-top: 8px;
253
+        }
254
+      }
255
+      &:first-child {
256
+        margin-top: 0;
257
+      }
258
+      .lable {
259
+        width: 70px;
260
+        margin-right: 10px;
261
+        font-weight: 500;
262
+        flex-shrink: 0;
263
+        text-align: right;
264
+        em {
265
+          color: red;
266
+        }
267
+      }
268
+      .el-select {
269
+        width: 100%;
270
+      }
271
+    }
272
+    .palylet-wrap {
273
+      .palylet-item {
274
+        margin-right: 10px;
275
+        margin-bottom: 10px;
276
+        cursor: pointer;
277
+      }
278
+    }
279
+  }
280
+</style>

+ 48 - 0
project/src/components/manage/materialLibrary/index.vue

@@ -0,0 +1,48 @@
1
+<template>
2
+  <div>
3
+    <!-- <div class="topTagBox flex" style="min-width: 1200px;" id="customerAnalysis">
4
+      <div class="left flex-align-center">
5
+        <div :class="['tagItem',tagType==1?'tagItem_active':'']" @click="changeType(1);">图片库</div>
6
+        <div :class="['tagItem',tagType==2?'tagItem_active':'']" @click="changeType(2);">图片组</div>
7
+      </div>
8
+      <div class="right" v-if="tagType==1">
9
+        <el-checkbox v-model="checked">备选项</el-checkbox>
10
+        <el-button type="primary" plain size="mini" @click="onClickMultipleLink({ buttonPath: 'PLFZ' })">批量分组</el-button>
11
+        <el-button type="primary" plain size="mini" @click="onClickMultipleLink({ buttonPath: 'PLYCFZ' })">批量移除分组</el-button>
12
+        <el-button type="primary" plain size="mini" @click="onClickMultipleLink({ buttonPath: 'PLSCSC' })">批量删除素材</el-button>
13
+        <el-button type="primary" plain size="mini" @click="onClickMultipleLink({ buttonPath: 'SCSC' })">上传素材</el-button>
14
+      </div>
15
+    </div> -->
16
+    <pictureLibrary v-if="tagType==1" >
17
+      <div class="left flex-align-center">
18
+        <div :class="['tagItem',tagType==1?'tagItem_active':'']" @click="changeType(1);">图片库</div>
19
+        <div :class="['tagItem',tagType==2?'tagItem_active':'']" @click="changeType(2);">图片组</div>
20
+      </div>
21
+    </pictureLibrary>
22
+    <groupPictures v-if="tagType==2" >
23
+      <div class="left flex-align-center">
24
+        <div :class="['tagItem',tagType==1?'tagItem_active':'']" @click="changeType(1);">图片库</div>
25
+        <div :class="['tagItem',tagType==2?'tagItem_active':'']" @click="changeType(2);">图片组</div>
26
+      </div>
27
+    </groupPictures>
28
+  </div>
29
+</template>
30
+
31
+<script>
32
+import pictureLibrary from './pictureLibrary.vue'
33
+import groupPictures from './groupPictures.vue'
34
+export default {
35
+  name: "materialLibrary",
36
+  components: { pictureLibrary, groupPictures },
37
+  data() {
38
+    return {
39
+      tagType: 1
40
+    }
41
+  },
42
+  methods:{
43
+    changeType(type){
44
+      this.tagType = type
45
+    },
46
+  }
47
+}
48
+</script>

+ 188 - 0
project/src/components/manage/materialLibrary/pictureLibrary.vue

@@ -0,0 +1,188 @@
1
+<template>
2
+  <div>
3
+    <div class="topTagBox flex">
4
+      <slot></slot>
5
+      <div class="right">
6
+        <el-checkbox v-model="checked" class="checkbox1">全选<span>(已选中0个图片)</span></el-checkbox>
7
+        <el-button type="primary" plain size="mini" @click="onClickMultipleLink({ buttonPath: 'PLFZ' })">批量分组</el-button>
8
+        <el-button type="primary" plain size="mini" @click="onClickMultipleLink({ buttonPath: 'PLYCFZ' })">批量移除分组</el-button>
9
+        <el-button type="primary" plain size="mini" @click="onClickMultipleLink({ buttonPath: 'PLSCSC' })">批量删除素材</el-button>
10
+        <el-button type="primary" plain size="mini" @click="onClickMultipleLink({ buttonPath: 'SCSC' })">上传素材</el-button>
11
+      </div>
12
+    </div>
13
+    <div class="screenBox flex">
14
+      <selfChannel title="平台" type="platform" labelWidth @channelDefine="onChangePlatform" />
15
+      <selfChannel title="图片组" type="materialLibrary" labelWidth @channelDefine="onChangePlatform" @groupList="getGroupList"/>
16
+      <selfInput label_name="搜索图片" @inputChange="onInputKeyword" />
17
+    </div>
18
+    <!-- 图片列表 -->
19
+    <div class="materialContainer">
20
+      <div class="materialItem" v-for="item in 21">
21
+        <div class="materialImg">
22
+          <el-image class="img" src="https://mv-oss.zwlab.cn/raw/cover/%e5%90%8c%e5%b1%85%e5%90%a7%e5%bf%83%e5%8a%a8%e7%94%b7%e5%ad%a9/%e5%90%8c%e5%b1%85%e5%90%a7%e5%bf%83%e5%8a%a8%e7%94%b7%e5%ad%a9.jpg" lazy  :preview-src-list="['https://mv-oss.zwlab.cn/raw/cover/%e5%90%8c%e5%b1%85%e5%90%a7%e5%bf%83%e5%8a%a8%e7%94%b7%e5%ad%a9/%e5%90%8c%e5%b1%85%e5%90%a7%e5%bf%83%e5%8a%a8%e7%94%b7%e5%ad%a9.jpg']"></el-image>
23
+        </div>
24
+        <div class="materialInfo">
25
+          <div class="materialTitle">大的解放军队解放军队反季节的风</div>
26
+          <div class="flex"><div class="label">平台:啦啦啦快快快快快</div><div class="label" style="text-align: right;">分组:快看看</div></div>
27
+          <div class="meterialCZ">
28
+            <div class="flex">
29
+              <el-button type="info" size="mini" icon="el-icon-delete" plain circle></el-button>
30
+              <el-button type="info" size="mini" icon="el-icon-edit" plain circle></el-button>
31
+              <!-- <el-button type="info" size="mini" icon="el-icon-view" plain circle></el-button> -->
32
+            </div>
33
+            <el-checkbox class="itemCheckbox" size="mini" v-model="checked"></el-checkbox>
34
+          </div>
35
+        </div>
36
+      </div>
37
+    </div>
38
+    <!-- 上传素材 -->
39
+    <uploadMaterials :uploadVisible="uploadVisible" @cancel="uploadVisible=false"></uploadMaterials>
40
+  </div>
41
+</template>
42
+<script>
43
+import selfChannel from '@/components/assembly/screen/channel.vue'
44
+import selfInput from '@/components/assembly/screen/input.vue'
45
+import uploadMaterials from './dialog/uploadMaterials.vue'
46
+export default {
47
+  components: {
48
+    selfChannel,
49
+    selfInput,
50
+    uploadMaterials
51
+  },
52
+  data () {
53
+    return {
54
+      uploadVisible: false,
55
+      groupList: [],
56
+      checked: false,
57
+      pagination: {
58
+        page: 1,
59
+        page_size: 20,
60
+        pages: 0,
61
+        total: 0,
62
+      },
63
+    }
64
+  },
65
+  methods: {
66
+    // 获取图片组列表
67
+    getGroupList(val){
68
+      this.groupList = val;
69
+      console.log(val)
70
+    },
71
+    // 监听"平台"筛选变化
72
+    async onChangePlatform(val) {
73
+      // this.filter.platform_id = val || ''
74
+
75
+      // // 清空“账号”筛选值 => 根据最新平台值 获取 账号选项
76
+      // this.filter.account_id = ''
77
+      // this.accountOptions = []
78
+      // if (this.filter.platform_id) {
79
+      //   this.handleGetAccountOptions()
80
+      // }
81
+
82
+      // await this.$nextTick()
83
+      // this.pagination.page = 1
84
+      // this.handleGetPlaylet()
85
+    },
86
+    // 监听"搜索图片"变化
87
+    onInputKeyword(val) {
88
+      // this.filter.keyword = val || ''
89
+      // this.pagination.page = 1
90
+      // this.handleGetPlaylet()
91
+    },
92
+    // 点击批量操作按钮
93
+    onClickMultipleLink({buttonPath}){
94
+      if (buttonPath == 'SCSC') {
95
+        this.uploadVisible = true;
96
+      }
97
+    }
98
+  }
99
+}
100
+</script>
101
+<style lang="scss" scoped>
102
+.screenBox {
103
+  background: #fff;
104
+  padding: 5px 20px 5px 0;
105
+  flex-wrap: wrap;
106
+  justify-content: start;
107
+}
108
+.checkbox1{
109
+  margin-right: 20px;
110
+  span{
111
+    font-size: 10px;
112
+  }
113
+}
114
+.materialContainer{
115
+  background: #fff;
116
+  margin-top: 10px;
117
+  display: flex;
118
+  flex-wrap: wrap;
119
+  padding: 5px;
120
+  .materialItem{
121
+    width: 13%;
122
+    height: 260px;
123
+    background: #f5f6f8;
124
+    margin: 5px 0.64%;
125
+    .materialImg{
126
+      width: 100%;
127
+      height: 174px;
128
+      background: #000;
129
+      text-align: center;
130
+      .img{
131
+        height: 100%;
132
+        margin: auto;
133
+      }
134
+    }
135
+    .materialTitle{
136
+      font-size: 14px;
137
+      line-height: 20px;
138
+      font-weight: bold;
139
+      color: #444;
140
+      white-space:nowrap;
141
+      text-overflow: ellipsis;
142
+      overflow: hidden;
143
+    }
144
+    .materialInfo{
145
+      padding: 6px;
146
+    }
147
+    .label{
148
+      font-size: 10px;
149
+      color: #666;
150
+      line-height: 16px;
151
+      margin-top: 4px;
152
+      flex:1;
153
+      white-space:nowrap;
154
+      text-overflow: ellipsis;
155
+      overflow: hidden;
156
+    }
157
+    .meterialCZ{
158
+      display: flex;
159
+      justify-content: space-between;
160
+      align-items: center;
161
+      margin-top:10px;
162
+      /deep/ .el-button--mini.is-circle{
163
+        padding: 5px;
164
+        height: 24px;
165
+      }
166
+      /deep/ .el-checkbox__inner{
167
+        width: 18px;
168
+        height: 18px;
169
+        border-color: #d3d4d6;
170
+      }
171
+      /deep/ .el-checkbox__input.is-checked .el-checkbox__inner{
172
+        border-color: #00B38A;
173
+      }
174
+      /deep/ .el-checkbox__inner::after{
175
+          height: 9px;
176
+          left: 6px;
177
+        }
178
+    }
179
+  }
180
+}
181
+// @media screen and (max-width: 1200px) {
182
+//   .materialContainer{
183
+//     .materialItem{
184
+//       width: 14%;
185
+//     }
186
+//   }
187
+// }
188
+</style>

+ 11 - 0
project/src/router/allRouter.js

@@ -84,6 +84,7 @@ const accountManage = () => import(/* webpackChunkName: 'accountManage' */ '@/co
84 84
 const miniProManage = () => import(/* webpackChunkName: 'miniProManage' */ '@/components/manage/miniProManage/miniProManage.vue')
85 85
 // 企微助手 - 剧集管理
86 86
 // const playletManage = () => import(/* webpackChunkName: 'playletManage' */ '@/components/manage/playletManage/playletManage.vue')
87
+const materialLibrary = () => import(/* webpackChunkName: 'materialLibrary' */ '@/components/manage/materialLibrary/index.vue')
87 88
 const playletManage = () => import(/* webpackChunkName: 'playletManage' */ '@/components/manage/playletManageV2/index.vue')
88 89
 // 数据看板 - 平台推广数据
89 90
 const platformPromote = () => import(/* webpackChunkName: 'platformPromote' */ '@/components/dataBoard/platformPromote/index.vue')
@@ -437,6 +438,16 @@ export var allRouter = [
437 438
         }
438 439
       },
439 440
       {
441
+        path: 'materialLibrary',
442
+        name: 'materialLibrary',
443
+        component: materialLibrary,
444
+        meta: {
445
+          keepAlive: false,
446
+          isLogin: true,
447
+          title: '素材库'
448
+        }
449
+      },
450
+      {
440 451
         path: 'memberManage',
441 452
         name: 'memberManage',
442 453
         component: memberManage,