|
|
@ -18,16 +18,26 @@ |
|
|
|
</BoardRecordPreview> |
|
|
|
</template> |
|
|
|
<template v-if="editData.deviceType == '5'"> |
|
|
|
<p class="text">{{ editData.params.text }}</p> |
|
|
|
<p class="text">内容:{{ editData.params.text }}</p> |
|
|
|
</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 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 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> |
|
|
|
|
|
|
|
</div> |
|
|
@ -45,7 +55,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
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 taskEditDialog from "./taskEditDialog.vue"; |
|
|
|
import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue' |
|
|
@ -66,6 +76,7 @@ export default { |
|
|
|
isEditingTask: false, |
|
|
|
selectedType:"", |
|
|
|
deviceTypeDic:"", |
|
|
|
gzmsMap:"", |
|
|
|
deviceDic:{}, |
|
|
|
deviceList:[] |
|
|
|
}; |
|
|
@ -78,6 +89,7 @@ export default { |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.deviceTypeDic = deviceTypeDic; |
|
|
|
this.gzmsDic = gzmsMap; |
|
|
|
this.isCompReady = true; |
|
|
|
console.log(JSON.parse(this.propData.callParameter || '[{}]')[0], "++++=====######"); |
|
|
|
this.initBasicData().then(res=>{ |
|
|
@ -86,16 +98,33 @@ 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; |
|
|
|
let params = {}; |
|
|
|
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 = { |
|
|
|
id: this.propData.jobId, |
|
|
|
direction: temp.direction, |
|
|
|
deviceType: temp.deviceType, |
|
|
|
devices: temp.devices, |
|
|
|
params: temp.functions[paramsIndex].params, |
|
|
|
params, |
|
|
|
screenSize: temp.screenSize |
|
|
|
}; |
|
|
|
}else{ |
|
|
@ -118,18 +147,26 @@ export default { |
|
|
|
// this.$emit("onModify", {devices}); |
|
|
|
}, |
|
|
|
onDelete(){ |
|
|
|
request({ |
|
|
|
url: `/business/dcBatchFunctionsJob/` + this.propData.jobId, |
|
|
|
method: "DELETE", |
|
|
|
// params: { |
|
|
|
// jobGroup: this.propData.id |
|
|
|
// }, |
|
|
|
}) |
|
|
|
.then((result) => { |
|
|
|
if (result.code != 200) return; |
|
|
|
this.$message.success("删除成功"); |
|
|
|
this.$emit("onSubmit"); |
|
|
|
this.$confirm("确定要删除该任务么?", "操作确认", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}).then(() => { |
|
|
|
|
|
|
|
request({ |
|
|
|
url: `/business/dcBatchFunctionsJob/` + this.propData.jobId, |
|
|
|
method: "DELETE", |
|
|
|
// params: { |
|
|
|
// jobGroup: this.propData.id |
|
|
|
// }, |
|
|
|
}) |
|
|
|
.then((result) => { |
|
|
|
if (result.code != 200) return; |
|
|
|
this.$message.success("删除成功"); |
|
|
|
this.$emit("onSubmit"); |
|
|
|
}) |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
initBasicData(){ |
|
|
|
|
|
|
@ -159,6 +196,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;} |
|
|
|
.center{ flex: 1; text-align: center;} |
|
|
|
} |
|
|
|
.button{ width:140px; margin-left: 10px} |
|
|
|
} |
|
|
|