|
@ -18,16 +18,26 @@ |
|
|
</BoardRecordPreview> |
|
|
</BoardRecordPreview> |
|
|
</template> |
|
|
</template> |
|
|
<template v-if="editData.deviceType == '5'"> |
|
|
<template v-if="editData.deviceType == '5'"> |
|
|
<p class="text">{{ editData.params.text }}</p> |
|
|
<p class="text">内容:{{ editData.params.text }}</p> |
|
|
</template> |
|
|
</template> |
|
|
<template v-if="editData.deviceType == '2'"> |
|
|
<template v-if="editData.deviceType == '10'"> |
|
|
|
|
|
<div class="center"> |
|
|
|
|
|
<p>{{ gzmsDic[editData.params.SETMD] }}</p> |
|
|
|
|
|
<p>时长:{{ editData.params.SETTM }}</p> |
|
|
|
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template v-if="editData.deviceType == '2'"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-if="editData.deviceType == '12'"> |
|
|
|
|
|
<div class="center"> |
|
|
|
|
|
<p>{{ gzmsDic[editData.params.SETMD] }}</p> |
|
|
|
|
|
<p>时长:{{ editData.params.SETTM }}</p> |
|
|
|
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template v-if="editData.deviceType == '2'"> |
|
|
<template v-if="editData.deviceType == '13'"> |
|
|
|
|
|
<div class="center"> |
|
|
|
|
|
<p>{{ gzmsDic[editData.params.SETMD] }}</p> |
|
|
|
|
|
<p>时长:{{ editData.params.SETTM }}</p> |
|
|
|
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
@ -45,7 +55,7 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import request from "@/utils/request"; |
|
|
import request from "@/utils/request"; |
|
|
import { deviceTypeDic } from "@screen/utils/enum.js" |
|
|
import { deviceTypeDic, gzmsMap } from "@screen/utils/enum.js" |
|
|
import { getDeviceList } from "@screen/utils/api/device.js" |
|
|
import { getDeviceList } from "@screen/utils/api/device.js" |
|
|
import taskEditDialog from "./taskEditDialog.vue"; |
|
|
import taskEditDialog from "./taskEditDialog.vue"; |
|
|
import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue' |
|
|
import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue' |
|
@ -66,6 +76,7 @@ export default { |
|
|
isEditingTask: false, |
|
|
isEditingTask: false, |
|
|
selectedType:"", |
|
|
selectedType:"", |
|
|
deviceTypeDic:"", |
|
|
deviceTypeDic:"", |
|
|
|
|
|
gzmsMap:"", |
|
|
deviceDic:{}, |
|
|
deviceDic:{}, |
|
|
deviceList:[] |
|
|
deviceList:[] |
|
|
}; |
|
|
}; |
|
@ -78,6 +89,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.deviceTypeDic = deviceTypeDic; |
|
|
this.deviceTypeDic = deviceTypeDic; |
|
|
|
|
|
this.gzmsDic = gzmsMap; |
|
|
this.isCompReady = true; |
|
|
this.isCompReady = true; |
|
|
console.log(JSON.parse(this.propData.callParameter || '[{}]')[0], "++++=====######"); |
|
|
console.log(JSON.parse(this.propData.callParameter || '[{}]')[0], "++++=====######"); |
|
|
this.initBasicData().then(res=>{ |
|
|
this.initBasicData().then(res=>{ |
|
@ -86,16 +98,33 @@ export default { |
|
|
//转成BoardRecordPreview组件需要的格式,用来预览 |
|
|
//转成BoardRecordPreview组件需要的格式,用来预览 |
|
|
if(temp.functions){ |
|
|
if(temp.functions){ |
|
|
// temp.functions[1].params.CONTENT = temp.functions[1].params.CONTENT.replaceAll(/\\n/g, '\\\\n').replaceAll(/=/g, '\\=').replaceAll(/,/g, '\\,').replaceAll(/ /g, ' '); |
|
|
// temp.functions[1].params.CONTENT = temp.functions[1].params.CONTENT.replaceAll(/\\n/g, '\\\\n').replaceAll(/=/g, '\\=').replaceAll(/,/g, '\\,').replaceAll(/ /g, ' '); |
|
|
let paramsIndex = 0; |
|
|
let params = {}; |
|
|
if (temp.deviceType == '2'){ |
|
|
if (temp.deviceType == '2'){ |
|
|
paramsIndex = 1; |
|
|
params = temp.functions[1].params |
|
|
|
|
|
} else if (temp.deviceType == '5'){ |
|
|
|
|
|
params = temp.functions[0].params |
|
|
|
|
|
} else if (temp.deviceType == '10') { |
|
|
|
|
|
params = { |
|
|
|
|
|
SETMD: temp.functions[0].params.SET, |
|
|
|
|
|
SETTM: temp.functions[1].params.SET, |
|
|
|
|
|
} |
|
|
|
|
|
} else if (temp.deviceType == '12') { |
|
|
|
|
|
params = { |
|
|
|
|
|
SETMD: temp.functions[0].params.SET, |
|
|
|
|
|
SETTM: temp.functions[1].params.SET, |
|
|
|
|
|
} |
|
|
|
|
|
} else if (temp.deviceType == '13') { |
|
|
|
|
|
params = { |
|
|
|
|
|
SETMD: temp.functions[0].params.SET, |
|
|
|
|
|
SETTM: temp.functions[1].params.SET, |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
this.editData = { |
|
|
this.editData = { |
|
|
id: this.propData.jobId, |
|
|
id: this.propData.jobId, |
|
|
direction: temp.direction, |
|
|
direction: temp.direction, |
|
|
deviceType: temp.deviceType, |
|
|
deviceType: temp.deviceType, |
|
|
devices: temp.devices, |
|
|
devices: temp.devices, |
|
|
params: temp.functions[paramsIndex].params, |
|
|
params, |
|
|
screenSize: temp.screenSize |
|
|
screenSize: temp.screenSize |
|
|
}; |
|
|
}; |
|
|
}else{ |
|
|
}else{ |
|
@ -118,18 +147,26 @@ export default { |
|
|
// this.$emit("onModify", {devices}); |
|
|
// this.$emit("onModify", {devices}); |
|
|
}, |
|
|
}, |
|
|
onDelete(){ |
|
|
onDelete(){ |
|
|
request({ |
|
|
this.$confirm("确定要删除该任务么?", "操作确认", { |
|
|
url: `/business/dcBatchFunctionsJob/` + this.propData.jobId, |
|
|
confirmButtonText: "确定", |
|
|
method: "DELETE", |
|
|
cancelButtonText: "取消", |
|
|
// params: { |
|
|
type: "warning", |
|
|
// jobGroup: this.propData.id |
|
|
}).then(() => { |
|
|
// }, |
|
|
|
|
|
}) |
|
|
request({ |
|
|
.then((result) => { |
|
|
url: `/business/dcBatchFunctionsJob/` + this.propData.jobId, |
|
|
if (result.code != 200) return; |
|
|
method: "DELETE", |
|
|
this.$message.success("删除成功"); |
|
|
// params: { |
|
|
this.$emit("onSubmit"); |
|
|
// jobGroup: this.propData.id |
|
|
|
|
|
// }, |
|
|
}) |
|
|
}) |
|
|
|
|
|
.then((result) => { |
|
|
|
|
|
if (result.code != 200) return; |
|
|
|
|
|
this.$message.success("删除成功"); |
|
|
|
|
|
this.$emit("onSubmit"); |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
initBasicData(){ |
|
|
initBasicData(){ |
|
|
|
|
|
|
|
@ -159,6 +196,7 @@ export default { |
|
|
.content{ width: 300px; display: flex; align-items: stretch; |
|
|
.content{ width: 300px; display: flex; align-items: stretch; |
|
|
.board{ flex: 1; } |
|
|
.board{ flex: 1; } |
|
|
.text{ flex: 1; display: flex; align-items: center; justify-content: center; word-break: break-all;} |
|
|
.text{ flex: 1; display: flex; align-items: center; justify-content: center; word-break: break-all;} |
|
|
|
|
|
.center{ flex: 1; text-align: center;} |
|
|
} |
|
|
} |
|
|
.button{ width:140px; margin-left: 10px} |
|
|
.button{ width:140px; margin-left: 10px} |
|
|
} |
|
|
} |
|
|