|
|
@ -6,7 +6,7 @@ |
|
|
|
<el-radio-button v-for="item in deviceTypeOptions" :key="item.value" :label="item.label" :value="item.value" |
|
|
|
v-if="item.timingControl"></el-radio-button> |
|
|
|
</el-radio-group> --> |
|
|
|
<el-select v-model="searchData.deviceType" placeholder="请选择设备类型" @change="onChange"> |
|
|
|
<el-select v-model="searchData.deviceType" placeholder="请选择设备类型" @change="onSelectDeviceType"> |
|
|
|
<el-option v-for="item in deviceTypeOptions" :key="item.value" :label="item.label" :value="item.value+''" |
|
|
|
v-if="item.timingControl"> |
|
|
|
</el-option> |
|
|
@ -62,7 +62,7 @@ |
|
|
|
<template v-else-if="searchData.deviceType == '5'"> |
|
|
|
<!-- 语音广播 --> |
|
|
|
<el-form-item label="广播内容"> |
|
|
|
<el-input type="textarea" v-model="editData.type5.content"></el-input> |
|
|
|
<el-input type="textarea" v-model="editData.type5.text"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
|
|
|
@ -204,13 +204,16 @@ export default { |
|
|
|
this.filterData.screenSize = this.propData.screenSize; |
|
|
|
this.editData.devices = _.map(this.propData.devices, "id"); |
|
|
|
// { "STAY": 90, "ACTION": "1", "SPEED": "0", "COLOR": "ffff00", "FONT": "3", "FONT_SIZE": "24", "CONTENT": "长清收费站\\\\n出入口封闭", "width": "160", "height": "80", "formatStyle": "2" } |
|
|
|
this.editData.type2 = BoardUtils.contentToDeviceItem(this.propData.params); |
|
|
|
if (this.propData.deviceType == "2"){ |
|
|
|
this.editData.type2 = BoardUtils.contentToDeviceItem(this.propData.params); |
|
|
|
} else if (this.propData.deviceType == "5"){ |
|
|
|
this.editData.type5 = { ...this.propData.params}; |
|
|
|
} |
|
|
|
}else{ |
|
|
|
this.searchData.deviceType = ""; |
|
|
|
this.searchData.direction = ""; |
|
|
|
this.filterData.screenSize = ""; |
|
|
|
this.editData.devices = []; |
|
|
|
this.editData.type2 = {}; |
|
|
|
} |
|
|
|
}, |
|
|
|
onEditBoard(){ |
|
|
@ -268,11 +271,13 @@ export default { |
|
|
|
}, |
|
|
|
onSubmit(){ |
|
|
|
// this.boardDataTransform(); |
|
|
|
console.log(this.editData , "eeeeeeeeee"); |
|
|
|
let devices = []; |
|
|
|
this.deviceArr.forEach((item,index)=>{ |
|
|
|
if (this.editData.devices.includes(item.id)){ |
|
|
|
let temp = { |
|
|
|
id: item.id, |
|
|
|
deviceName: item.deviceName, |
|
|
|
iotDeviceId: item.iotDeviceId, |
|
|
|
deviceType: item.deviceType, |
|
|
|
direction: item.direction |
|
|
@ -286,10 +291,7 @@ export default { |
|
|
|
|
|
|
|
let params = this.processParams(); |
|
|
|
|
|
|
|
if(this.mode == "add"){ |
|
|
|
|
|
|
|
} |
|
|
|
submitTaskRequest(this.propData.id, this.groupId, this.time, devices, params, { deviceType: this.searchData.deviceType, screenSize: this.filterData.screenSize }).then(res=>{ |
|
|
|
submitTaskRequest(this.propData.id, this.groupId, this.time, devices, params, { direction: this.searchData.direction, deviceType: this.searchData.deviceType, screenSize: this.filterData.screenSize }).then(res=>{ |
|
|
|
this.$emit("onSubmit") |
|
|
|
}); |
|
|
|
}, |
|
|
@ -298,7 +300,7 @@ export default { |
|
|
|
return BoardUtils.deviceItemToContent(this.editData.type2); |
|
|
|
}else if(this.searchData.deviceType == "5"){ |
|
|
|
return { |
|
|
|
content : editData.type5.content |
|
|
|
text : this.editData.type5.text |
|
|
|
} |
|
|
|
} else if (this.searchData.deviceType == "10") { |
|
|
|
return { |
|
|
@ -316,6 +318,12 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
onSelectDeviceType(){ |
|
|
|
if (Object.keys(this.editData['type' + this.searchData.deviceType]).length<=0){ |
|
|
|
this.editData['type'+this.searchData.deviceType] = {}; |
|
|
|
} |
|
|
|
this.onChange(); |
|
|
|
}, |
|
|
|
onChange() { |
|
|
|
this.resetEditData(); |
|
|
|
this.deviceArr = []; |
|
|
|