- 设备类型:
{{ deviceTypeDic[editData.deviceType].label }}
@@ -19,7 +18,7 @@
-
+ {{ editData.params.text }}
@@ -87,12 +86,16 @@ export default {
//转成BoardRecordPreview组件需要的格式,用来预览
if(temp.functions){
// temp.functions[1].params.CONTENT = temp.functions[1].params.CONTENT.replaceAll(/\\n/g, '\\\\n').replaceAll(/=/g, '\\=').replaceAll(/,/g, '\\,').replaceAll(/ /g, ' ');
+ let paramsIndex = 0;
+ if (temp.deviceType == '2'){
+ paramsIndex = 1;
+ }
this.editData = {
id: this.propData.jobId,
direction: temp.direction,
deviceType: temp.deviceType,
devices: temp.devices,
- params: temp.functions[1].params,
+ params: temp.functions[paramsIndex].params,
screenSize: temp.screenSize
};
}else{
@@ -131,7 +134,7 @@ export default {
initBasicData(){
this.deviceDic = {};
- return getDeviceList({ deviceType: this.editData.deviceType }).then(res=>{
+ return getDeviceList({ deviceType: JSON.parse(this.propData.callParameter || '[{}]')[0].deviceType }).then(res=>{
this.deviceList = res.data;
res.data.forEach(item=>{
// this.deviceOptions.push({
@@ -155,6 +158,7 @@ export default {
}
.content{ width: 300px; display: flex; align-items: stretch;
.board{ flex: 1; }
+ .text{ flex: 1; display: flex; align-items: center; justify-content: center; word-break: break-all;}
}
.button{ width:140px; margin-left: 10px}
}
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue
index 4f6f07c0..56d6e360 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue
@@ -6,7 +6,7 @@
-->
-
+
@@ -62,7 +62,7 @@
-
+
@@ -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 = [];
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/timeEditDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/timeEditDialog.vue
index c5b8a73a..a42ac7c0 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/timeEditDialog.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/timeEditDialog.vue
@@ -4,7 +4,7 @@
-
+
diff --git a/ruoyi-ui/src/views/JiHeExpressway/utils/api/batch.js b/ruoyi-ui/src/views/JiHeExpressway/utils/api/batch.js
index bffcfd0a..370e0509 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/utils/api/batch.js
+++ b/ruoyi-ui/src/views/JiHeExpressway/utils/api/batch.js
@@ -2,16 +2,16 @@
import request from '@/utils/request'
export function submitTaskRequest(id, jobGroup, time, devices, params, others) {
- let temp = [{
- ...others,
- devices: devices,
- "functions": [
+ let functions;
+ let deviceType = others.deviceType;
+ if (deviceType == '2'){ //情报板
+ functions = [
{
"functionId": "11",
"params": {
"size": "65535",
"fileName": "play012.lst"
- }
+ }
},
{
"functionId": "13",
@@ -21,10 +21,37 @@ export function submitTaskRequest(id, jobGroup, time, devices, params, others) {
"functionId": "1B",
"params": {
"fileId": "12"
- }
+ }
}
]
+ } else if (deviceType == '5'){ //语音广播
+ functions = [
+ {
+ "functionId": "",
+ "params": {
+ "name": "task-3",
+ "outVol": "6",
+ "priority": "1",
+ "text": params.text,
+ "repeatTimes": "3",
+ "termList": [
+ {
+ "zoneld": "6001",
+ "termDN": "601"
+ }
+ ],
+ "functionType": "startPaTts"
+ }
+ }
+ ]
+
+ }
+
+ let temp = [{
+ ...others,
+ devices,
+ functions
}];
let data = {
jobGroup,
@@ -42,6 +69,4 @@ export function submitTaskRequest(id, jobGroup, time, devices, params, others) {
// data: data
data
})
-}
-
-
+}
\ No newline at end of file