|
|
|
@ -59,6 +59,14 @@ |
|
|
|
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)" |
|
|
|
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" /> |
|
|
|
</template> |
|
|
|
<div class="flex flex1" v-else-if="col.bodyType === 'clickable'"> |
|
|
|
<HandleFormItem :fieldKey="prefixKey+'_'+col.prop+'_'+rowIndex" :fieldItemLabel="fieldItemLabel" type="clickable" class="body-clickable" |
|
|
|
:item="getBodyItem(col, rowIndex)" :value="row[col.prop]" |
|
|
|
:error="hasError(rowIndex, colIndex, col.prop)" |
|
|
|
@clickable="handleClickable(col,rowIndex,colIndex)" |
|
|
|
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)" |
|
|
|
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" /> |
|
|
|
</div> |
|
|
|
<template v-else> |
|
|
|
{{ row[col.prop] }} |
|
|
|
</template> |
|
|
|
@ -80,6 +88,7 @@ |
|
|
|
@update:error="onErrorUpdate(rowIndex, colIndex, col.bodySubKey, $event)" |
|
|
|
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" /> |
|
|
|
</template> |
|
|
|
|
|
|
|
<template v-else> |
|
|
|
{{ row[col.bodySubKey] }} |
|
|
|
</template> |
|
|
|
@ -181,6 +190,14 @@ export default { |
|
|
|
// this.initHeaderSelectValues(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 点击事件 |
|
|
|
handleClickable(col, rowIndex, colIndex) { |
|
|
|
console.log("clickable",rowIndex,colIndex, col) |
|
|
|
if (this.templateFillType !== 'actFill') { |
|
|
|
return |
|
|
|
} |
|
|
|
this.$emit("clickable", col,rowIndex) |
|
|
|
}, |
|
|
|
isShowAddRos() { |
|
|
|
if(!this.showAddRow) { |
|
|
|
return false; |
|
|
|
@ -369,6 +386,7 @@ export default { |
|
|
|
precision: currentItem[col.bodyPrecisionKey] || col.precision || 0, |
|
|
|
copyFrom: col.copyFrom || "", |
|
|
|
compareTo: col.bodyCompareTo, // 添加 compareTo 字段 |
|
|
|
type: col.bodyType || "input", |
|
|
|
}; |
|
|
|
if (col.bodyDisabled) { |
|
|
|
item.disabled = col.bodyDisabled; |
|
|
|
@ -631,4 +649,10 @@ export default { |
|
|
|
padding: 20px 0; |
|
|
|
margin-top: 20px; |
|
|
|
} |
|
|
|
.flex1 { |
|
|
|
flex: 1; |
|
|
|
} |
|
|
|
.flex{ |
|
|
|
display: flex; |
|
|
|
} |
|
|
|
</style> |