调整工程目录
This commit is contained in:
@@ -4,48 +4,54 @@
|
||||
<div class="item">
|
||||
<div class="label">播发内容</div>
|
||||
<div class="value" @click="linkTo('/pages/resourcesManage/resourcesManage?isChoose=1')">
|
||||
<span :class="formData.mediaName == '请选择' ? 'color-999' : ''">{{formData.mediaName}}</span>
|
||||
<span :class="formData.mediaName == '请选择' ? 'color-999' : ''">{{ formData.mediaName }}</span>
|
||||
<img src="./img/right-icon.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">播放设备</div>
|
||||
<div class="value" @click="selectClick('showEquipment', equipmentList)">
|
||||
<span :class="formData.serialName == '请选择' ? 'color-999' : ''">{{formData.serialName}}</span>
|
||||
<span :class="formData.serialName == '请选择' ? 'color-999' : ''">{{ formData.serialName }}</span>
|
||||
<img src="./img/right-icon.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">播发级别</div>
|
||||
<div class="value" @click="selectClick('showMessageLevel', messageLevelList)">
|
||||
<span :class="formData.messageLevelName == '请选择' ? 'color-999' : ''">{{formData.messageLevelName}}</span>
|
||||
<span :class="formData.messageLevelName == '请选择' ? 'color-999' : ''">{{ formData.messageLevelName }}</span>
|
||||
<img src="./img/right-icon.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="radio-content">
|
||||
<div class="title">播放方式</div>
|
||||
<div class="item mar-r50" :class="formData.taskType == 0 ? 'active' : ''" @click="formData.taskType = 0">立即播放<img src="./img/bigHorn-xz.png" alt=""></div>
|
||||
<div class="item" :class="formData.taskType == 1 ? 'active' : ''" @click="formData.taskType = 1"><img src="./img/bigHorn-xz.png" alt="">定时播放</div>
|
||||
<div class="item mar-r50" :class="formData.taskType == 0 ? 'active' : ''" @click="formData.taskType = 0">立即播放<img
|
||||
src="./img/bigHorn-xz.png" alt=""></div>
|
||||
<div class="item" :class="formData.taskType == 1 ? 'active' : ''" @click="formData.taskType = 1"><img
|
||||
src="./img/bigHorn-xz.png" alt="">定时播放
|
||||
</div>
|
||||
</div>
|
||||
<div class="content" v-if="formData.taskType != 0">
|
||||
<div class="item">
|
||||
<div class="label">定时策略</div>
|
||||
<div class="value" @click="selectClick('showCyclingType', cyclingTypeList)">
|
||||
<span :class="formData.cyclingTypeName == '请选择' ? 'color-999' : ''">{{formData.cyclingTypeName}}</span>
|
||||
<span :class="formData.cyclingTypeName == '请选择' ? 'color-999' : ''">{{ formData.cyclingTypeName }}</span>
|
||||
<img src="./img/right-icon.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="radio-content" v-if="formData.taskType != 0 && formData.cyclingType == 2">
|
||||
<div class="title">播放天数</div>
|
||||
<div class="mini-item" :class="item.isCheck ? 'mini-active' : ''" v-for="(item, index) in dayList" :key="index" @click="checkClick(index)">{{item.label}}</div>
|
||||
<div class="mini-item" :class="item.isCheck ? 'mini-active' : ''" v-for="(item, index) in dayList" :key="index"
|
||||
@click="checkClick(index)">{{ item.label }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="content" v-if="formData.taskType != 0 && formData.cyclingType == 3">
|
||||
<div class="item">
|
||||
<div class="label">播放天数</div>
|
||||
<div class="value">
|
||||
<u-input type="text" placeholder="请输入" height="18" input-align="right" v-model="formData.broadcastDay" maxlength="4" />
|
||||
<u-input type="text" placeholder="请输入" height="18" input-align="right" v-model="formData.broadcastDay"
|
||||
maxlength="4"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,33 +59,35 @@
|
||||
<div class="item">
|
||||
<div class="label">开始日期</div>
|
||||
<div class="value" @click="timeClick(true, 'showDate')">
|
||||
<span :class="formData.startDate ? 'color-999' : ''">{{formData.startDate || '请选择'}}</span>
|
||||
<span :class="formData.startDate ? 'color-999' : ''">{{ formData.startDate || '请选择' }}</span>
|
||||
<img src="./img/right-icon.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">开始时间</div>
|
||||
<div class="value" @click="timeClick(false, 'showSatrt')">
|
||||
<span :class="formData.startTime ? 'color-999' : ''">{{formData.startTime || '请选择'}}</span>
|
||||
<span :class="formData.startTime ? 'color-999' : ''">{{ formData.startTime || '请选择' }}</span>
|
||||
<img src="./img/right-icon.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">结束时间</div>
|
||||
<div class="value" @click="timeClick(false, 'showEnd')">
|
||||
<span :class="formData.endTime ? 'color-999' : ''">{{formData.endTime || '请选择'}}</span>
|
||||
<span :class="formData.endTime ? 'color-999' : ''">{{ formData.endTime || '请选择' }}</span>
|
||||
<img src="./img/right-icon.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn" @click="addConfirm">确认</div>
|
||||
<u-select v-model="showSelect" :list="selectList" @confirm="confirm" label-name="dictName" value-name="dictValue"></u-select>
|
||||
<u-select v-model="showSelect" :list="selectList" @confirm="confirm" label-name="dictName"
|
||||
value-name="dictValue"></u-select>
|
||||
<u-picker v-model="showDateTime" mode="time" :params="params" @confirm="confirm"></u-picker>
|
||||
<AiBack></AiBack>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import AiBack from "@/components/AiBack";
|
||||
<script>
|
||||
import AiBack from "@/components/AiBack";
|
||||
|
||||
export default {
|
||||
name: "addPlay",
|
||||
data() {
|
||||
@@ -166,7 +174,7 @@ export default {
|
||||
AiBack
|
||||
},
|
||||
|
||||
onLoad () {
|
||||
onLoad() {
|
||||
uni.$on('choose', e => {
|
||||
console.log(e)
|
||||
this.formData.mediaId = e.mediaId
|
||||
@@ -178,41 +186,41 @@ export default {
|
||||
addConfirm() {
|
||||
var cyclingDateList = []
|
||||
this.dayList.map((item) => {
|
||||
if(item.isCheck) {
|
||||
if (item.isCheck) {
|
||||
cyclingDateList.push(item.value)
|
||||
}
|
||||
})
|
||||
|
||||
if(!this.formData.mediaId) {
|
||||
if (!this.formData.mediaId) {
|
||||
return this.$u.toast('请选择播发内容')
|
||||
}
|
||||
if(!this.formData.serialNo) {
|
||||
if (!this.formData.serialNo) {
|
||||
return this.$u.toast('请选择播放设备')
|
||||
}
|
||||
if(!this.formData.messageLevel) {
|
||||
if (!this.formData.messageLevel) {
|
||||
return this.$u.toast('播发级别')
|
||||
}
|
||||
|
||||
//播放方式(定时播放)
|
||||
if(this.formData.taskType != 0 && this.formData.startDate == '请选择') {
|
||||
if (this.formData.taskType != 0 && this.formData.startDate == '请选择') {
|
||||
return this.$u.toast('请选择开始日期')
|
||||
}
|
||||
if(this.formData.taskType != 0 && this.formData.startTime == '请选择') {
|
||||
if (this.formData.taskType != 0 && this.formData.startTime == '请选择') {
|
||||
return this.$u.toast('请选择开始时间')
|
||||
}
|
||||
if(this.formData.taskType != 0 && this.formData.endTime == '请选择') {
|
||||
if (this.formData.taskType != 0 && this.formData.endTime == '请选择') {
|
||||
return this.$u.toast('请选择结束时间')
|
||||
}
|
||||
//播放方式(定时播放)定时策略(时长)
|
||||
if(this.formData.taskType != 0 && this.formData.cyclingType == 3 && !this.formData.broadcastDay) {
|
||||
if (this.formData.taskType != 0 && this.formData.cyclingType == 3 && !this.formData.broadcastDay) {
|
||||
return this.$u.toast('请输入播放天数')
|
||||
}
|
||||
//播放方式(定时播放)定时策略(自定义)
|
||||
if(this.formData.taskType != 0 && this.formData.cyclingType == 2 && !cyclingDateList.length) {
|
||||
if (this.formData.taskType != 0 && this.formData.cyclingType == 2 && !cyclingDateList.length) {
|
||||
return this.$u.toast('请选择播放天数')
|
||||
}
|
||||
|
||||
if(this.formData.taskType != 0 && this.formData.cyclingType == 2) {
|
||||
|
||||
if (this.formData.taskType != 0 && this.formData.cyclingType == 2) {
|
||||
this.formData.cyclingDate = cyclingDateList.join(',')
|
||||
}
|
||||
this.formData.coverageType = '4'
|
||||
@@ -223,46 +231,46 @@ export default {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
linkTo (path) {
|
||||
linkTo(path) {
|
||||
uni.navigateTo({
|
||||
url: path
|
||||
})
|
||||
},
|
||||
|
||||
confirm(e) {
|
||||
if(this.showMedia) {
|
||||
if (this.showMedia) {
|
||||
this.formData.mediaId = e[0].value
|
||||
this.formData.mediaName = e[0].label
|
||||
}
|
||||
if(this.showEquipment) {
|
||||
if (this.showEquipment) {
|
||||
this.formData.serialNo = e[0].value
|
||||
this.formData.serialName = e[0].label
|
||||
}
|
||||
if(this.showMessageLevel) {
|
||||
if (this.showMessageLevel) {
|
||||
this.formData.messageLevel = e[0].value
|
||||
this.formData.messageLevelName = e[0].label
|
||||
}
|
||||
if(this.showCyclingType) {
|
||||
if (this.showCyclingType) {
|
||||
this.formData.cyclingType = e[0].value
|
||||
this.formData.cyclingTypeName = e[0].label
|
||||
}
|
||||
if(this.showDate) {
|
||||
if (this.showDate) {
|
||||
this.formData.startDate = e.year + '-' + e.month + '-' + e.day
|
||||
}
|
||||
if(this.showSatrt) {
|
||||
if (this.showSatrt) {
|
||||
var startTime = e.hour + ':' + e.minute + ':' + e.second
|
||||
var myDate = new Date();
|
||||
var time = myDate.getHours() + ':' + myDate.getMinutes() + ':' + myDate.getSeconds()
|
||||
var time = myDate.getHours() + ':' + myDate.getMinutes() + ':' + myDate.getSeconds()
|
||||
if (this.timeToSec(startTime) - this.timeToSec(time) > 0) {
|
||||
this.formData.startTime = startTime
|
||||
}else {
|
||||
} else {
|
||||
this.$u.toast('开始时间要大于当前时间')
|
||||
}
|
||||
}
|
||||
if(this.showEnd) {
|
||||
if (this.showEnd) {
|
||||
var endTime = e.hour + ':' + e.minute + ':' + e.second
|
||||
console.log(this.timeToSec(endTime), this.timeToSec(this.formData.startTime))
|
||||
if (this.timeToSec(endTime) - this.timeToSec(this.formData.startTime) > 0) {
|
||||
@@ -291,7 +299,7 @@ export default {
|
||||
this.$http.post(`/app/appdlbresource/list?current=1&size=10000`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.mediaList = []
|
||||
if(res.data && res.data.records.length) {
|
||||
if (res.data && res.data.records.length) {
|
||||
res.data.records.map((item) => {
|
||||
let info = {
|
||||
dictName: item.name,
|
||||
@@ -307,7 +315,7 @@ export default {
|
||||
this.$http.post(`/app/appdlbquipment/getDlbDeviceList?current=1&size=10000&devStatus=5&keyword=`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.equipmentList = []
|
||||
if(res.data && res.data.records.length) {
|
||||
if (res.data && res.data.records.length) {
|
||||
res.data.records.map((item) => {
|
||||
let info = {
|
||||
dictName: item.deviceName,
|
||||
@@ -325,7 +333,7 @@ export default {
|
||||
timeClick(showYear, showType) {
|
||||
this[showType] = true
|
||||
this.showDateTime = true
|
||||
if(showYear) {
|
||||
if (showYear) {
|
||||
this.params = {
|
||||
year: true,
|
||||
month: true,
|
||||
@@ -334,7 +342,7 @@ export default {
|
||||
minute: false,
|
||||
second: false
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
this.params = {
|
||||
year: false,
|
||||
month: false,
|
||||
@@ -349,10 +357,10 @@ export default {
|
||||
var s = "";
|
||||
var hour = time.split(":")[0];
|
||||
var min = time.split(":")[1];
|
||||
var second = time.split(":")[2];
|
||||
var second = time.split(":")[2];
|
||||
s = Number(hour * 3600) + Number(min * 60) + Number(second)
|
||||
return s;
|
||||
},
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.$dict.load('dlbMessageUrgency', 'dlbBroadTaskType', 'dlbDyclingType').then(() => {
|
||||
@@ -367,10 +375,12 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.addPlay {
|
||||
padding-bottom: 128px;
|
||||
.content{
|
||||
|
||||
.content {
|
||||
padding-left: 32px;
|
||||
background-color: #fff;
|
||||
.item{
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
padding: 34px 0;
|
||||
font-size: 32px;
|
||||
@@ -381,11 +391,13 @@ export default {
|
||||
display: flex;
|
||||
color: #333;
|
||||
justify-content: space-between;
|
||||
.label{
|
||||
|
||||
.label {
|
||||
width: 198px;
|
||||
font-size: 32px;
|
||||
}
|
||||
.value{
|
||||
|
||||
.value {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
@@ -401,35 +413,41 @@ export default {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
img{
|
||||
|
||||
img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
vertical-align: middle;
|
||||
margin-left: 6px;
|
||||
}
|
||||
}
|
||||
.color-999{
|
||||
|
||||
.color-999 {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
.radio-content{
|
||||
|
||||
.radio-content {
|
||||
padding: 34px 32px 38px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
background-color: #fff;
|
||||
.title{
|
||||
|
||||
.title {
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
margin-bottom: 54px;
|
||||
span{
|
||||
|
||||
span {
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
.item{
|
||||
|
||||
.item {
|
||||
display: inline-block;
|
||||
width: 320px;
|
||||
height: 112px;
|
||||
@@ -441,15 +459,18 @@ export default {
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
img{
|
||||
|
||||
img {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.active{
|
||||
|
||||
.active {
|
||||
background: #E7F1FE;
|
||||
color: #1174FE;
|
||||
position: relative;
|
||||
img{
|
||||
|
||||
img {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
@@ -458,10 +479,12 @@ export default {
|
||||
height: 46px;
|
||||
}
|
||||
}
|
||||
|
||||
.mar-r50 {
|
||||
margin-right: 50px;
|
||||
}
|
||||
.mini-item{
|
||||
|
||||
.mini-item {
|
||||
display: inline-block;
|
||||
width: 128px;
|
||||
height: 72px;
|
||||
@@ -474,16 +497,19 @@ export default {
|
||||
margin-right: 58px;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.mini-item:nth-of-type(5) {
|
||||
margin-right: 0;
|
||||
}
|
||||
.mini-active{
|
||||
|
||||
.mini-active {
|
||||
background: #F2F8FE;
|
||||
border: 1px solid #89B2EE;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
.btn{
|
||||
|
||||
.btn {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
@@ -498,4 +524,4 @@ export default {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user