<template>
|
<div>
|
<el-form-item
|
:prop="'tableData.' + scope.$index + '.' + colItem.name"
|
:rules="model.tableRules[colItem.name]"
|
v-if="colItem.type === 'input' && model.tableData[scope.$index].isEidt"
|
>
|
<el-input
|
:placeholder="colItem.placeholder"
|
size="small"
|
validate-event
|
v-model="model.tableData[scope.$index][colItem.name]"
|
:style="{ minWidth: colItem.minWidth, width: '100%' }"
|
:disabled="!model.tableData[scope.$index].isEidt"
|
:key="colIndex"
|
></el-input>
|
</el-form-item>
|
<p
|
v-if="colItem.type === 'input' &&!model.tableData[scope.$index].isEidt"
|
:class="{changeCol:model.tableData[scope.$index].changeflag && !noHistory}"
|
>{{ model.tableData[scope.$index][colItem.name] || "--" }}</p>
|
<p
|
v-if="colItem.type === 'text'"
|
:style="{ textAlign: colItem.align || 'left' }"
|
:class="{ changeCol: model.tableData[scope.$index].changeflag } &&!noHistory"
|
>{{ model.tableData[scope.$index][colItem.name] || "--" }}</p>
|
<el-form-item
|
:prop="'tableData.' + scope.$index + '.' + colItem.name"
|
:rules="model.tableRules[colItem.name]"
|
v-if="colItem.type === 'select' && model.tableData[scope.$index].isEidt "
|
>
|
<el-select
|
size="small"
|
v-model="tableData[scope.$index][colItem.name]"
|
:filterable="colItem.filterable || true"
|
:placeholder="colItem.placeholder"
|
:disabled="!model.tableData[scope.$index].isEidt"
|
:style="{ minWidth: colItem.minWidth, width: '100%' }"
|
>
|
<el-option
|
v-for="(optionsItem, optionsIndex) in colItem.options"
|
:key="optionsIndex"
|
:label="optionsItem.label || optionsItem[colItem.labelKey]"
|
:value="optionsItem.value || optionsItem[colItem.valueKey]"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
props: ["scope", "colItem", "model", "noHistory", "tableData", "colIndex"]
|
};
|
</script>
|
|
<style scoped>
|
</style>
|