Browse Source

bug修改

dev
xuhuajiao 3 years ago
parent
commit
855f8f3b9c
  1. 4
      src/utils/index.js
  2. 12
      src/views/device/deviceConfig.vue
  3. 20
      src/views/immediateRelease/index.vue
  4. 2
      src/views/publishContent/historyList/index.vue
  5. 2
      src/views/publishContent/publishList/index.vue

4
src/utils/index.js

@ -452,13 +452,13 @@ export function formatBytes(bytes, decimals) {
// 将数字转成一,二 // 将数字转成一,二
export function setWeekly(str) { export function setWeekly(str) {
const a = { const a = {
0: '日',
1: '一', 1: '一',
2: '二', 2: '二',
3: '三', 3: '三',
4: '四', 4: '四',
5: '五', 5: '五',
6: '六',
7: '七'
6: '六'
} }
if (str) { if (str) {
return str.split(',').sort().map(i => a[i]).join('/') return str.split(',').sort().map(i => a[i]).join('/')

12
src/views/device/deviceConfig.vue

@ -241,6 +241,10 @@ export default {
clearBtnDisabled: true, clearBtnDisabled: true,
deviceData: [{ key: '1', name: '竖屏' }, { key: '2', name: '横屏' }], deviceData: [{ key: '1', name: '竖屏' }, { key: '2', name: '横屏' }],
weeklyList: [ weeklyList: [
{
id: '0',
name: '周日'
},
{ {
id: '1', id: '1',
name: '周一' name: '周一'
@ -264,10 +268,6 @@ export default {
{ {
id: '6', id: '6',
name: '周六' name: '周六'
},
{
id: '7',
name: '周七'
} }
] ]
} }
@ -276,13 +276,13 @@ export default {
// //
setWeekly() { setWeekly() {
const a = { const a = {
0: '日',
1: '一', 1: '一',
2: '二', 2: '二',
3: '三', 3: '三',
4: '四', 4: '四',
5: '五', 5: '五',
6: '六',
7: '七'
6: '六'
} }
return function(str) { return function(str) {
if (str) { if (str) {

20
src/views/immediateRelease/index.vue

@ -305,6 +305,7 @@ export default {
is_topping: false, // , is_topping: false, // ,
orga_id: '', // "id" orga_id: '', // "id"
bgm_main: '', bgm_main: '',
bgm_name: '',
relaase_name: '', // relaase_name: '', //
release_cycle: '', // 0. 1. 2. release_cycle: '', // 0. 1. 2.
release_weekly: '', // release_weekly: '', //
@ -338,6 +339,10 @@ export default {
], ],
selectWeekly: [], selectWeekly: [],
weeklyList: [ weeklyList: [
{
id: '0',
name: '周日'
},
{ {
id: '1', id: '1',
name: '周一' name: '周一'
@ -361,10 +366,6 @@ export default {
{ {
id: '6', id: '6',
name: '周六' name: '周六'
},
{
id: '7',
name: '周七'
} }
], ],
materialTabItem: [ // - tabtitle materialTabItem: [ // - tabtitle
@ -433,6 +434,7 @@ export default {
if (res.code == 200) { if (res.code == 200) {
const releaseInfo = res.data.release const releaseInfo = res.data.release
this.releaseInfo = releaseInfo this.releaseInfo = releaseInfo
console.log(releaseInfo)
this.form.orga_id = releaseInfo.orga_id this.form.orga_id = releaseInfo.orga_id
this.form.relaase_name = releaseInfo.relaase_name this.form.relaase_name = releaseInfo.relaase_name
this.form.release_cycle = releaseInfo.release_cycle this.form.release_cycle = releaseInfo.release_cycle
@ -590,10 +592,14 @@ export default {
const isBgm = this.selectedMaterial.find(item => { const isBgm = this.selectedMaterial.find(item => {
return item.material_type == 2 return item.material_type == 2
}) })
console.log('有啊')
console.log(isBgm)
if (isBgm) { if (isBgm) {
this.form.bgm_name = isBgm.name
this.form.bgm_main = isBgm.deposit_url this.form.bgm_main = isBgm.deposit_url
} else { } else {
this.form.bgm_main = null this.form.bgm_main = null
this.form.bgm_name = null
} }
console.log(this.form) console.log(this.form)
// //
@ -756,6 +762,8 @@ export default {
const index = this.audioChecked const index = this.audioChecked
if (!this.isMainBgm) { if (!this.isMainBgm) {
this.audioListData[index].material_type = 2 this.audioListData[index].material_type = 2
//
if (this.selectedMaterial) {
const resultIndex = this.selectedMaterial.findIndex((item, key) => { const resultIndex = this.selectedMaterial.findIndex((item, key) => {
return item.material_type == 2 return item.material_type == 2
}) })
@ -781,6 +789,10 @@ export default {
}) })
} }
} }
} else {
this.selectedMaterial = []
this.selectedMaterial.push(this.audioListData[index])
}
// localStorage.setItem('selectedMaterial', JSON.stringify(this.selectedMaterial)) // localStorage.setItem('selectedMaterial', JSON.stringify(this.selectedMaterial))
} else { } else {
this.selectedEditData[this.thisEditIndex].showAudioName = this.audioListData[index].material_name this.selectedEditData[this.thisEditIndex].showAudioName = this.audioListData[index].material_name

2
src/views/publishContent/historyList/index.vue

@ -5,7 +5,7 @@
<!-- v-loading="crud.loading" --> <!-- v-loading="crud.loading" -->
<el-table ref="table" :data="publishHistoryList" :header-cell-style="{ background: '#3a8aeb', color: '#fff' }" @selection-change="handleSelectionChange"> <el-table ref="table" :data="publishHistoryList" :header-cell-style="{ background: '#3a8aeb', color: '#fff' }" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column label="文件名称" align="center" prop="relaase_name" />
<el-table-column label="发布名称" align="center" prop="relaase_name" />
<el-table-column label="发布内容" align="center" prop="content"> <el-table-column label="发布内容" align="center" prop="content">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>

2
src/views/publishContent/publishList/index.vue

@ -4,7 +4,7 @@
<el-col> <el-col>
<el-table ref="table" :data="publishList" :header-cell-style="{ background: '#3a8aeb', color: '#fff' }" class="publish_table"> <el-table ref="table" :data="publishList" :header-cell-style="{ background: '#3a8aeb', color: '#fff' }" class="publish_table">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column label="文件名称" align="center" prop="relaase_name" />
<el-table-column label="发布名称" align="center" prop="relaase_name" />
<el-table-column label="发布内容" align="center" prop="content"> <el-table-column label="发布内容" align="center" prop="content">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.release_first_img"> <div v-if="scope.row.release_first_img">

Loading…
Cancel
Save