|
@ -18,15 +18,18 @@ |
|
|
</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'"> |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
<template v-if="editData.deviceType == '2'"> |
|
|
<template v-if="editData.deviceType == '13'"> |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -45,7 +48,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 +69,7 @@ export default { |
|
|
isEditingTask: false, |
|
|
isEditingTask: false, |
|
|
selectedType:"", |
|
|
selectedType:"", |
|
|
deviceTypeDic:"", |
|
|
deviceTypeDic:"", |
|
|
|
|
|
gzmsMap:"", |
|
|
deviceDic:{}, |
|
|
deviceDic:{}, |
|
|
deviceList:[] |
|
|
deviceList:[] |
|
|
}; |
|
|
}; |
|
@ -78,6 +82,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 +91,23 @@ 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, |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
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{ |
|
@ -159,6 +171,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} |
|
|
} |
|
|
} |
|
|