|
|
@ -10,28 +10,65 @@ |
|
|
|
<template #[otherConfig]="{ data }"> |
|
|
|
<span style="color: #6ee5fe"> {{ data.deviceName }}(当前) </span> |
|
|
|
</template> |
|
|
|
</CheckboxGroup> |
|
|
|
</div> |
|
|
|
<div class="right"> |
|
|
|
<div class="top-content"> |
|
|
|
<Video class="item-video" :pileNum="pileNum" /> |
|
|
|
|
|
|
|
<label>发布内容: </label> |
|
|
|
<ElInput type="textarea" v-model="releaseMessage" :autosize="{ minRows: 3, maxRows: 3 }" :maxlength="150" |
|
|
|
showWordLimit placeholder="请输入发布内容" /> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="footer"> |
|
|
|
<Button style="background-color: rgba(0, 179, 204, 0.3)" |
|
|
|
@click.native="(modelVisible = false), (submitting = false)"> |
|
|
|
取消 |
|
|
|
</Button> |
|
|
|
<Button @click.native="handleSubmit" :loading="submitting"> |
|
|
|
确定 |
|
|
|
</Button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</CheckboxGroup> |
|
|
|
</div> |
|
|
|
<div class="right"> |
|
|
|
<div class="top-content"> |
|
|
|
<Video class="item-video" :pileNum="pileNum" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form ref="form" :model="dataForm" :rules="dataRule" label-width=" 90px"> |
|
|
|
<el-form-item label="音量" prop="outVol"> |
|
|
|
<el-row :gutter="0"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-input-number v-model="dataForm.outVol" :min="1" :max="9"></el-input-number> |
|
|
|
</el-col> |
|
|
|
<el-col :span="18"><span style="margin-left: 10px;">取值范围 1 - 9</span></el-col> |
|
|
|
</el-row> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="循环次数" prop="repeatTimes"> |
|
|
|
<el-row :gutter="0"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-input-number v-model="dataForm.repeatTimes" :min="1" :max="16"></el-input-number> |
|
|
|
</el-col> |
|
|
|
<el-col :span="18"><span style="margin-left: 10px;">取值范围 1 - 16</span></el-col> |
|
|
|
</el-row> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="紧急度" prop="priority"> |
|
|
|
<el-row :gutter="0"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-select v-model="dataForm.priority" placeholder="请选择"> |
|
|
|
<el-option v-for="(item, key) in broadcastPriority" :key="key" :label="item" :value="key"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="详细内容" prop="content"> |
|
|
|
<ElInput type="textarea" v-model="dataForm.content" :autosize="{ minRows: 3, maxRows: 3 }" |
|
|
|
:maxlength="150" showWordLimit placeholder="请输入发布内容" /> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <label>发布内容: </label> |
|
|
|
<ElInput type="textarea" v-model="dataForm.content" :autosize="{ minRows: 3, maxRows: 3 }" :maxlength="150" |
|
|
|
showWordLimit placeholder="请输入发布内容" /> --> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="footer"> |
|
|
|
<Button style="background-color: rgba(0, 179, 204, 0.3)" |
|
|
|
@click.native="(modelVisible = false), (submitting = false)"> |
|
|
|
取消 |
|
|
|
</Button> |
|
|
|
<Button @click.native="handleSubmit" :loading="submitting"> |
|
|
|
确定 |
|
|
|
</Button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</Dialog> |
|
|
|
</template> |
|
|
@ -46,7 +83,7 @@ import request from "@/utils/request"; |
|
|
|
import { getDeviceList } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"; |
|
|
|
|
|
|
|
import { Message } from "element-ui"; |
|
|
|
|
|
|
|
import { broadcastPriority } from "@screen/utils/enum.js"; |
|
|
|
export default { |
|
|
|
name: "BroadcastReleases", |
|
|
|
components: { |
|
|
@ -67,10 +104,25 @@ export default { |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
broadcastPriority, |
|
|
|
submitting: false, |
|
|
|
checkList: [], |
|
|
|
releaseMessage: null, |
|
|
|
dataForm: { |
|
|
|
content:"", |
|
|
|
priority:"1", |
|
|
|
repeatTimes:3, |
|
|
|
outVol:6 |
|
|
|
}, |
|
|
|
musicList: [], |
|
|
|
dataRule: { |
|
|
|
content: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "请输入详细内容", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
] |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
@ -94,7 +146,7 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleSubmit() { |
|
|
|
if (!this.releaseMessage?.trim()) |
|
|
|
if (!this.dataForm.content?.trim()) |
|
|
|
return Message.error("发布内容不能为空!"); |
|
|
|
if (!this.checkList.length) |
|
|
|
return Message.error("请至少选择一个广播设备!"); |
|
|
@ -106,10 +158,10 @@ export default { |
|
|
|
method: "post", |
|
|
|
data: { |
|
|
|
name: "task-3", |
|
|
|
outVol: "6", |
|
|
|
priority: "1", |
|
|
|
text: this.releaseMessage.trim(), |
|
|
|
repeatTimes: "3", |
|
|
|
outVol: "" + this.dataForm.outVol, |
|
|
|
priority: "" + this.dataForm.priority, |
|
|
|
text: this.dataForm.content.trim(), |
|
|
|
repeatTimes: "" + this.dataForm.repeatTimes, |
|
|
|
termList: this.checkList.map((str) => JSON.parse(str)), |
|
|
|
functionType: "startPaTts", |
|
|
|
}, |
|
|
@ -134,7 +186,7 @@ export default { |
|
|
|
<style lang="scss" scoped> |
|
|
|
.BroadcastReleases { |
|
|
|
// width: 450px; |
|
|
|
height: 420px; |
|
|
|
height: 520px; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
gap: 15px; |
|
|
|