|
|
@ -10,8 +10,7 @@ |
|
|
|
</div> |
|
|
|
<el-form ref="form" :model="form" class="partCon"> |
|
|
|
<el-form-item style="margin-bottom: 12px;"> |
|
|
|
<el-select v-model="form.selectedDirection" size="medium" placeholder="请选择方向" |
|
|
|
style="overflow: hidden;width: 100%;"> |
|
|
|
<el-select v-model="form.selectedDirection" size="medium" placeholder="请选择方向" class="direction"> |
|
|
|
<el-option v-for="item in boardDirectionList" :key="item.dictValue" :label="item.dictLabel" |
|
|
|
:value="item.dictValue" @click.native="____changeDirection(item.dictValue)" /> |
|
|
|
</el-select> |
|
|
@ -23,13 +22,13 @@ |
|
|
|
<div v-if="item.list.length > 0"> |
|
|
|
<!-- <el-checkbox style="width: 100%" :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选 |
|
|
|
</el-checkbox> --> |
|
|
|
<el-checkbox-group class="checkbox" v-model="checkedCities" @change="onSelectDevice" :max="1"> |
|
|
|
<el-checkbox-group class="checkbox" v-model="checkedDevices" @change="____onSelctDevices"> |
|
|
|
<el-checkbox v-for="(itm, index) in item.list" :label="itm.iotDeviceId" :key="index"> |
|
|
|
<el-tooltip :content="itm.ip" placement="top"> |
|
|
|
<div>{{ itm.deviceName }}</div> |
|
|
|
</el-tooltip> |
|
|
|
<el-tooltip content="回读当前信息" placement="top"> |
|
|
|
<el-button class="el-icon-tickets huiduButton" @click.stop.prevent="onSubmit(itm.id)" |
|
|
|
<div>{{ itm.deviceName }}</div> |
|
|
|
<!-- <el-tooltip :content="itm.ip" placement="top"> |
|
|
|
</el-tooltip> --> |
|
|
|
<el-tooltip content="回读当前信息" placement="right"> |
|
|
|
<el-button class="el-icon-tickets huiduButton" @click.stop.prevent="____onCheckDeviceInfo(itm)" |
|
|
|
:disabled="submitButton"></el-button> |
|
|
|
</el-tooltip> |
|
|
|
</el-checkbox> |
|
|
@ -110,7 +109,7 @@ |
|
|
|
<!-- 操作按钮 --> |
|
|
|
<div class="infoBtnBox"> |
|
|
|
<el-tooltip content="加入待下发信息" placement="top"> |
|
|
|
<p @click="arrowLeft(itm)" :class="disabledButton && !selectedSize ? 'disabledClass' : ''" |
|
|
|
<p @click="____onAddToDevice(itm)" :class="disabledButton && !selectedSize ? 'disabledClass' : ''" |
|
|
|
class="btn btnApply"></p> |
|
|
|
</el-tooltip> |
|
|
|
<el-tooltip content="编辑" placement="top"> |
|
|
@ -148,7 +147,6 @@ |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import Sortable from 'sortablejs' |
|
|
|
import BoardInfoEditor from './BoardInfoEditor' |
|
|
|
import editInfo from './editInfo' |
|
|
|
import boardData from './boardData' |
|
|
|
import { getUserDeptId } from '@/api/system/user' |
|
|
@ -157,8 +155,9 @@ import { uploadBoardEditInfo, getAllVmsTemplate, addTemplate, addTemplateContent |
|
|
|
import { invokedFunction, getDeviceRealtimeProperty } from '@/api/device/device' |
|
|
|
import { getBoardList, getBoardDeviceInfo } from '@/api/board/board' |
|
|
|
import { getTemplateList } from '@/api/board/template' |
|
|
|
import BoardPreview from './BoardPreview' |
|
|
|
import BoardTplPreview from './BoardTplPreview' |
|
|
|
import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue" |
|
|
|
import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue" |
|
|
|
import BoardInfoEditor from '@screen/components/infoBoard/BoardInfoEditor' |
|
|
|
|
|
|
|
import vuescroll from 'vuescroll' |
|
|
|
import scrollOptions from '@/common/scrollbar.js' |
|
|
@ -228,7 +227,7 @@ export default { |
|
|
|
mechanismList: [], //管理机构下拉框 |
|
|
|
devicessizeList: [], //分辨率下拉框 |
|
|
|
deviceList: [], //分辨率 |
|
|
|
checkedCities: [], //多选 选中项 |
|
|
|
checkedDevices: [], //多选 选中项 |
|
|
|
templateAvailable: [], |
|
|
|
form: { |
|
|
|
selectedDirection: "", |
|
|
@ -384,15 +383,14 @@ export default { |
|
|
|
this.boardSizeDic[item.otherConfig.screenSize].list.push(item); |
|
|
|
if (!this.selectedSize) { |
|
|
|
this.selectedSize = item.otherConfig.screenSize; |
|
|
|
this.____onChangeSize(); |
|
|
|
} |
|
|
|
if (!this.selectedDevice.deviceName) { |
|
|
|
this.selectedDevice = item; |
|
|
|
this.selectedDeviceId = item.iotDeviceId; |
|
|
|
this.____getBoardMessage(); |
|
|
|
} |
|
|
|
}) |
|
|
|
this.$forceUpdate(); |
|
|
|
this.____onChangeSize(); |
|
|
|
this.____getBoardMessage(); |
|
|
|
// this.$forceUpdate(); |
|
|
|
// this.____onChangeSize(this.boardSizeDic[0].selectedPixel); |
|
|
|
}); |
|
|
|
}, |
|
|
@ -404,12 +402,11 @@ export default { |
|
|
|
// this.selectedBdMsg = res.default.data["3A"].content; |
|
|
|
// }) |
|
|
|
} |
|
|
|
if (!this.selectedDeviceId) { |
|
|
|
if (!this.selectedDevice.iotDeviceId) { |
|
|
|
return; |
|
|
|
} |
|
|
|
getBoardDeviceInfo(this.selectedDeviceId).then(res => { |
|
|
|
getBoardDeviceInfo(this.selectedDevice.iotDeviceId).then(res => { |
|
|
|
this.selectedBdMsg = res.data["3A"].content; |
|
|
|
console.log(this.selectedBdMsg); |
|
|
|
}).catch(err => { |
|
|
|
|
|
|
|
}) |
|
|
@ -435,7 +432,7 @@ export default { |
|
|
|
}, |
|
|
|
____onEditBoardItem(tpl, index) { |
|
|
|
// type : board template |
|
|
|
// mode : edit add |
|
|
|
// mode : edit add toDevice toTemplate |
|
|
|
this.boardItemEdtingIndex = index; |
|
|
|
this.editDialog = { |
|
|
|
visible: true, |
|
|
@ -457,14 +454,18 @@ export default { |
|
|
|
____onEditSubmit(para) { |
|
|
|
this.editDialog.tpl = {}; |
|
|
|
this.editDialog.visible = false; |
|
|
|
|
|
|
|
if (para.type == "device") { |
|
|
|
if (para.mode == "edit") { |
|
|
|
this.selectedBdMsg[this.boardItemEdtingIndex] = para.data; |
|
|
|
} else { |
|
|
|
this.selectedBdMsg.push(para.data); |
|
|
|
} |
|
|
|
}else if(para.mode == "toDevice"){ |
|
|
|
this.selectedBdMsg.push(para.data); |
|
|
|
}else{ |
|
|
|
this.____refreshPageData(para); |
|
|
|
} |
|
|
|
this.____refreshPageData(para); |
|
|
|
}, |
|
|
|
____refreshPageData(para) { |
|
|
|
if (para.type == 'template') { |
|
|
@ -474,26 +475,18 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 向左新增待下发 |
|
|
|
arrowLeft(item) { |
|
|
|
var list = { |
|
|
|
FONT_SIZE: item.tcontents[0].fontSize + 'px', |
|
|
|
COLOR: item.tcontents[0].fontColor, |
|
|
|
CONTENT: item.tcontents[0].content, |
|
|
|
COORDINATE: item.tcontents[0].coordinate, |
|
|
|
FONT: this.getFont(item.tcontents[0].fontType), |
|
|
|
SPEED: item.tcontents[0].fontSpacing, //字体间距 |
|
|
|
ACTION: item.inScreenMode, //出屏方式 |
|
|
|
STAY: item.stopTime, //停留时间 |
|
|
|
category: item.category, //所属类别 |
|
|
|
ID: this.contentList.length, |
|
|
|
format: item.tcontents[0].contentList, |
|
|
|
formatStyle: item.tcontents[0].formatStyle |
|
|
|
// 新增待下发 |
|
|
|
____onAddToDevice(item) { |
|
|
|
if(this.checkedDevices.length<=0){ |
|
|
|
this.$message.warning('未选择设备!'); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.editDialog = { |
|
|
|
visible: true, |
|
|
|
mode: "toDevice", |
|
|
|
type: "template", |
|
|
|
tpl: item |
|
|
|
} |
|
|
|
this.contentList.push(list) |
|
|
|
this.toggleIndex++ |
|
|
|
console.log(this.contentList, 'this.contentList') |
|
|
|
console.log(this.toggleIndex, 'toggleIndex') |
|
|
|
}, |
|
|
|
|
|
|
|
// 向右添加模板 |
|
|
@ -623,7 +616,7 @@ export default { |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
const objAll = {} |
|
|
|
objAll.deviceIds = this.checkedCities.toString() |
|
|
|
objAll.deviceIds = this.checkedDevices.toString() |
|
|
|
let that = this |
|
|
|
|
|
|
|
let selectedPixel = this.form.selectedPixel.split('*') |
|
|
@ -707,35 +700,41 @@ export default { |
|
|
|
|
|
|
|
// 全选 |
|
|
|
handleCheckAllChange(val) { |
|
|
|
this.checkedCities = val ? this.deviceList : [] |
|
|
|
this.checkedDevices = val ? this.deviceList : [] |
|
|
|
}, |
|
|
|
|
|
|
|
// 多选 |
|
|
|
onSelectDevice(value) { |
|
|
|
this.selectedDeviceId = value[0]; |
|
|
|
this.selctedDevice = _.find(this.boardSizeDic[this.selectedSize].list, { iotDeviceId: value[0] }); |
|
|
|
____onSelctDevices(arr){ |
|
|
|
console.log(arr , "<<< 已选设备"); |
|
|
|
}, |
|
|
|
____onCheckDeviceInfo(item) { |
|
|
|
// this.selectedDevice = _.find(this.boardSizeDic[this.selectedSize].list, { iotDeviceId: value[0] }); |
|
|
|
this.selectedDevice = item; |
|
|
|
// this.selectedDevice = this.deviceList |
|
|
|
this.____getBoardMessage(); |
|
|
|
|
|
|
|
this.checkedCities = value |
|
|
|
let val = JSON.parse(JSON.stringify(value)) |
|
|
|
for (let itm of this.deviceList) { |
|
|
|
if (val.indexOf(itm) > -1) { |
|
|
|
this.checkAll = true |
|
|
|
} else { |
|
|
|
this.checkAll = false |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
this.$forceUpdate() |
|
|
|
// this.checkedDevices = value |
|
|
|
// let val = JSON.parse(JSON.stringify(value)) |
|
|
|
// for (let itm of this.deviceList) { |
|
|
|
// if (val.indexOf(itm) > -1) { |
|
|
|
// this.checkAll = true |
|
|
|
// } else { |
|
|
|
// this.checkAll = false |
|
|
|
// return |
|
|
|
// } |
|
|
|
// } |
|
|
|
// this.$forceUpdate() |
|
|
|
}, |
|
|
|
// 情报板列表手风琴 |
|
|
|
____onChangeSize(val) { |
|
|
|
this.____setAvailableTemplate(); |
|
|
|
this.checkedDevices = []; |
|
|
|
this.selectedDevice = []; |
|
|
|
this.selectedBdMsg = []; |
|
|
|
// this.contentList = [] |
|
|
|
// this.deviceList = [] |
|
|
|
// this.disabledButton = true |
|
|
|
// this.checkedCities = [] |
|
|
|
// this.checkedDevices = [] |
|
|
|
// this.checkAll = false |
|
|
|
// this.allVmsTemplate() |
|
|
|
// for (let item of this.boardSizeDic) { |
|
|
@ -1035,6 +1034,15 @@ export default { |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
.direction{ |
|
|
|
::v-deep .el-input{ |
|
|
|
.el-input__inner{ |
|
|
|
font-size: 16px !important; |
|
|
|
padding: 8px 5px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.infoBoardBox { |
|
|
|
.infoBoardCon { |
|
|
|
width: 100%; |
|
|
|