<template>
<div class='user-table-root'>
<!--表单添加-->
<el-button type="success" @click="addListRow()" round>添加行信息</el-button>
<el-table :data="datas = content.cardInfo" border height="550" class='user-table-container'>
<el-table-column fixed="left" label="MRO客户抬头" width="120">
<template slot-scope="scope">
<!--<el-input v-model="scope.row.MROCardName ">-->
<!--<i slot="suffix" @click="openCardCode('MROCardName','MROCardCode',scope.$index)" class="el-input__icon el-icon-search"></i>--> <!--</el-input>--> <div>{{scope.row.MROCardName}}</div>
</template> </el-table-column> <el-table-column label="MRO分配金额" width="320">
<template slot-scope="scope">
<!-- {{ scope.row.MROAmount }}-->
<el-input v-model="scope.row.MROAmount" type="number"></el-input>
</template> </el-table-column> <el-table-column label="大宗客户抬头" width="320">
<template slot-scope="scope">
<el-input v-model="scope.row.DZCardName">
<i slot="suffix" @click="openCardCode('DZCardName','DZCardCode',scope.$index)" class="el-input__icon el-icon-search"></i>
</el-input> </template> </el-table-column> <el-table-column label="大宗分配额" width="320">
<template slot-scope="scope">
<!-- {{ scope.row.DZAmount }}-->
<el-input v-model="scope.row.DZAmount" type="number"></el-input>
</template> </el-table-column>
<el-table-column label="操作" width="220">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="handleDelete(scope.$index)">删除</el-button>
</template> </el-table-column> </el-table> </div></template>
<script>
export default {
data () {
return {
// name: "taskList"
webSocket: null,
demo: '',
value: '',
package: {
count: 5,
price: 5
},
content: {
cardInfo: [
{
"MROCardCode":"123",
"MROCardName":"",
"DZCardCode":"",
"DZCardName":"",
"MROAmount":'',
"DZAmount":''
},
{
"MROCardCode":"三个人",
"MROCardName":"",
"DZCardCode":"",
"DZCardName":"",
"MROAmount":'',
"DZAmount":''
}
]
}
}
},
无法获取scope中的数据
<el-table-column fixed="left" label="MRO客户抬头" width="120">
<template slot-scope="scope">
<!--<el-input v-model="scope.row.MROCardName ">-->
<!--<i slot="suffix" @click="openCardCode('MROCardName','MROCardCode',scope.$index)" class="el-input__icon el-icon-search"></i>--> <!--</el-input>--> <div>{{scope.row.MROCardName}}</div>
</template></el-table-column>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…