|
@ -3,16 +3,17 @@ |
|
|
<el-form> |
|
|
<el-form> |
|
|
<div class="flex" style="justify-content: space-between;"> |
|
|
<div class="flex" style="justify-content: space-between;"> |
|
|
<div> |
|
|
<div> |
|
|
设备类型:<span>{{ deviceTypeDic[editData.deviceType].label }}</span> |
|
|
设备类型: |
|
|
|
|
|
<span v-if="editData.deviceType">{{ deviceTypeDic[editData.deviceType].label }}</span> |
|
|
</div> |
|
|
</div> |
|
|
<div> |
|
|
<div> |
|
|
设备: |
|
|
设备: |
|
|
<!-- {{ deviceDic }} --> |
|
|
<template v-if="editData.devices"> |
|
|
<span v-for="item,index in editData.devices"> |
|
|
<span v-for="item,index in editData.devices"> |
|
|
{{ deviceDic[item.id].deviceName }} |
|
|
{{ deviceDic[item.id].deviceName }} |
|
|
</span>等{{ editData.devices.length }}个设备 |
|
|
</span>等{{ editData.devices.length }}个 |
|
|
|
|
|
</template> |
|
|
</div> |
|
|
</div> |
|
|
<!-- <div>{{ editData.params }}</div> --> |
|
|
|
|
|
<template v-if="editData.deviceType=='2'"> |
|
|
<template v-if="editData.deviceType=='2'"> |
|
|
<BoardRecordPreview :tpl="editData.params" style=" width:300px; height: 100%;"> |
|
|
<BoardRecordPreview :tpl="editData.params" style=" width:300px; height: 100%;"> |
|
|
</BoardRecordPreview> |
|
|
</BoardRecordPreview> |
|
@ -81,8 +82,9 @@ export default { |
|
|
|
|
|
|
|
|
this.initBasicData().then(res=>{ |
|
|
this.initBasicData().then(res=>{ |
|
|
|
|
|
|
|
|
let temp = JSON.parse(this.propData.callParameter)[0]; //callParameter是个字符串 |
|
|
let temp = JSON.parse(this.propData.callParameter || '[{}]')[0]; //callParameter是个字符串 |
|
|
//转成BoardRecordPreview组件需要的格式,用来预览 |
|
|
//转成BoardRecordPreview组件需要的格式,用来预览 |
|
|
|
|
|
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, ' '); |
|
|
this.editData = { |
|
|
this.editData = { |
|
|
id: this.propData.jobId, |
|
|
id: this.propData.jobId, |
|
@ -92,7 +94,9 @@ export default { |
|
|
params: temp.functions[1].params, |
|
|
params: temp.functions[1].params, |
|
|
screenSize: temp.screenSize |
|
|
screenSize: temp.screenSize |
|
|
}; |
|
|
}; |
|
|
console.log(this.editData , "+++======"); |
|
|
}else{ |
|
|
|
|
|
this.editData = {}; |
|
|
|
|
|
} |
|
|
this.isCompReady = true; |
|
|
this.isCompReady = true; |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
@ -100,7 +104,8 @@ export default { |
|
|
onModify(){ |
|
|
onModify(){ |
|
|
this.isEditingTask = true; |
|
|
this.isEditingTask = true; |
|
|
}, |
|
|
}, |
|
|
onSubmit(){ |
|
|
onSubmit(para){ |
|
|
|
|
|
this.emit("onSubmit"); |
|
|
this.isEditingTask = false; |
|
|
this.isEditingTask = false; |
|
|
// let devices = _.filter(this.deviceOptions, item=>{ |
|
|
// let devices = _.filter(this.deviceOptions, item=>{ |
|
|
// this.editData.devices.includes(item.id); |
|
|
// this.editData.devices.includes(item.id); |
|
|