Browse Source

主题库upload-设备管理-发布动态

dev
xuhuajiao 3 years ago
parent
commit
5f0310348e
  1. 1
      src/views/components/ThemeGalleryList.vue
  2. 10
      src/views/components/upload.vue
  3. 4
      src/views/content/material/materialList/index.vue
  4. 6
      src/views/content/theme/index.vue
  5. 2
      src/views/device/config/index.vue
  6. 14
      src/views/device/list/index.vue
  7. 32
      src/views/immediateRelease/animation.json
  8. 18
      src/views/immediateRelease/index.vue

1
src/views/components/ThemeGalleryList.vue

@ -141,6 +141,7 @@ export default {
if (this.themeItemActive == 2) {
this.selectedListId = []
} else {
console.log(this.isMyAlbumInThemeLayer)
if (this.$route.path != '/dashboard' && !this.isMyAlbumInThemeLayer) {
this.$router.push('/content/topic')
}

10
src/views/components/upload.vue

@ -1,13 +1,13 @@
<template>
<div class="components_upload">
<!-- <div v-if="isTheme">
<el-button class="cont_upload_btn" round type="primary">选择文件</el-button>
<input id="upFile" ref="inputfile" type="file" name="upFile" @change="changeFile($event)" />
</div> -->
<el-button class="cont_upload_btn" round type="primary">{{ isTheme ? '选择文件' : '上传' }}</el-button>
<input id="upFile" type="file" name="upFile" @change="changeFile($event)" />
<input v-if="isTheme" type="button" name="开始上传" value="开始上传" class="start_upload" @click="uploadFile()" />
<el-progress
v-if="isTheme && filePercent != 0 && filePercent != 100"
:stroke-width="6"
:percentage="filePercent"
/>
<!-- 上传列表layer -->
<div v-if="!isTheme" class="upload_layer">
<el-dialog

4
src/views/content/material/materialList/index.vue

@ -508,7 +508,7 @@ export default {
this.materialImgPath = checkedMaterial[0].img_path
},
//
FetchSaveMaterial() {
saveMaterial() {
if (!this.isEditMaterial) {
const formatType = this.$refs.uploadMaterial.formatType
this.uploadFileUrl = this.$refs.uploadMaterial.uploadFileUrl
@ -559,7 +559,7 @@ export default {
//
delete params.material_id
}
saveMaterial(params).then(res => {
FetchSaveMaterial(params).then(res => {
if (res.code === 200) {
this.$message({
message: '上传素材成功',

6
src/views/content/theme/index.vue

@ -93,8 +93,9 @@
<el-form-item class="upload_source" label="上传内容" prop="deposit_url">
<Upload ref="uploadMaterial" :is-theme="isTheme" @getName="getBeforeUploadTxt" @saveMaterial="saveMaterial" />
<span v-if="beforeUploadTxt" class="before_upload">已选择文件{{ beforeUploadTxt }}</span>
<div v-if="formatType != -1" class="source_cont">
<img v-if="formatType==0" :src="uploadForm.deposit_url" alt="" width="150" />
<img v-if="formatType==0" :src="uploadForm.deposit_url" alt="" />
<video v-if="formatType==1" :src="uploadForm.deposit_url" controls width="200"></video>
<audio v-if="formatType==2" :src="uploadForm.deposit_url" controls></audio>
</div>
@ -403,8 +404,8 @@ export default {
this.uploadTitle = '新增'
this.uploadForm.device_direction = 0
},
//
getBeforeUploadTxt(name) {
console.log(name)
this.beforeUploadTxt = name
},
// -
@ -685,6 +686,7 @@ export default {
}
img{
display: block;
height: 120px;
}
}
::v-deep .components_upload{

2
src/views/device/config/index.vue

@ -49,7 +49,7 @@
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="120">
<template slot-scope="scope">
<el-button type="primary" class="edit_btn" @click="editFormData(scope.row)">编辑</el-button>
<el-button type="primary" class="edit_btn" @click="editFormData(scope.row)">配置</el-button>
<el-button type="info" class="record_btn">记录</el-button>
</template>
</el-table-column>

14
src/views/device/list/index.vue

@ -19,9 +19,9 @@
<el-input v-model="queryInfo.device_name" clearable size="small" placeholder="请输入设备名称" style="width: 200px" class="filter-item" @clear="getDevice" @blur="getDevice" @keyup.enter.native="getDevice" />
</div>
</el-col>
<el-col class="page_add" :span="4">
<!-- <el-col class="page_add" :span="4">
<el-button class="table_add clear_btn" plain disabled>清空</el-button>
</el-col>
</el-col> -->
</el-row>
</div>
<!-- table :data="deviceList"-->
@ -95,18 +95,13 @@
<h4>发布名称 {{ items.relaase_name }} </h4>
<p style="margin-bottom: 10px"> 发布时间 {{ items.release_start.split("00:00:00")[0] }} </p>
<div class="device_cont_list">
<!-- <div v-if="items.bgm_main != null && items.bgm_name != null" class="material_item item_cont">
<div class="radio_img"></div>
<div class="file_name">{{ items.bgm_name }}</div>
</div> -->
<div v-for="(item, i) in items.show_materials" :key="'list-'+i" class="material_item item_cont">
<div class="img_box">
<img v-if="item.img_path || item.material_type == 1" :src="item.img_path" alt />
<div v-if="item.img_path || item.material_type == 1" class="img_box">
<img :src="item.img_path" alt />
</div>
<div v-if="!item.img_path && item.material_type == 2" class="radio_img"></div>
<div class="item_format">
<span class="item_type">{{ item.deposit_url | getFileFormat }}</span>
<!-- <span v-if="item.material_type !== '0'" class="item_time">{{ item.duration | getSeconds }}</span> -->
</div>
<div class="file_name">{{ item.material_name }}</div>
<div v-if="item.bgm_name && item.material_type == 0" class="bgm_name">背景音乐:{{ item.bgm_name }}</div>
@ -205,6 +200,7 @@ export default {
},
//
editFormData(row) {
this.dialogTitle = '编辑'
this.addFromVisible = true
this.form.account = row.device_account
this.form.name = row.device_name

32
src/views/immediateRelease/animation.json

@ -0,0 +1,32 @@
[
{
"key": 0,
"name": "无动画",
"animation_name": ""
},
{
"key": 1,
"name": "左边切入",
"animation_name": "animate__slideInLeft"
},
{
"key": 2,
"name": "右边切入",
"animation_name": "animate__slideInRight"
},
{
"key": 3,
"name": "淡入",
"animation_name": "animate__fadeIn"
},
{
"key": 4,
"name": "放大",
"animation_name": "animate__slideInRight"
},
{
"key": 5,
"name": "旋转",
"animation_name": "animate__rotateIn"
}
]

18
src/views/immediateRelease/index.vue

@ -146,7 +146,7 @@
<!-- 主题库 -->
<div v-if="activeIndex === 1" class="theme_cont">
<!-- 主题库list -->
<ThemeGalleryList ref="ThemeGalleryList" :is-multi-selected="isMultiSelected" :mulit-text="mulitText" :show-item-info="false" :is-my-album="isMyAlbum" />
<ThemeGalleryList ref="ThemeGalleryList" :is-multi-selected="isMultiSelected" :mulit-text="mulitText" :show-item-info="false" :is-my-album="isMyAlbum" :is-my-album-in-theme-layer="true" />
</div>
<div class="upload_list_right">
<div class="mulit_btn" @click="multiSelectBtn">{{ mulitText }}</div>
@ -256,6 +256,7 @@ import { getMaterialByType, FetchFindMaterialById } from '@/api/material/materia
import { ReqDeviceList } from '@/api/device/deviceList.js'
import { FetchSaveRelease, FetchGetReleaseDetailsById } from '@/api/release/release.js'
import { getSeconds, formatBytes, parseTime, getFileFormat } from '@/utils/index.js'
import animationJson from './animation.json'
export default {
name: 'ImmediateRelease',
components: {
@ -317,20 +318,6 @@ export default {
selectedEditData: [], // list - item
thisEditIndex: null, // index
setMaterialForm: [],
animationData: [ // -
{
key: '0',
name: '无动画'
},
{
key: '1',
name: '动画1'
},
{
key: '2',
name: '动画2'
}
],
selectWeekly: [],
weeklyList: [
{
@ -402,6 +389,7 @@ export default {
}
},
created() {
this.animationData = animationJson
this.selectedMaterial = []
this.selectedMaterial = JSON.parse(localStorage.getItem('selectedMaterial'))
this.getSelectTotal()

Loading…
Cancel
Save