Commit 9300e6c8 authored by zhengke's avatar zhengke

修改

parent 196ac7d2
......@@ -36,12 +36,12 @@
<el-table :data="tableData" ref="multipleTable" v-loading="loading" border style="width: 100%"
@select="selectSingle" @select-all="selectAll">
<el-table-column width="55">
<template slot="header" slot-scope="scope">
<el-checkbox v-model="isCheckAll" @change="getCheckdData(tableData,'')"></el-checkbox>
</template>
<template slot-scope="scope">
<el-checkbox v-model="scope.row.isChecked" @change="getCheckdData(tableData,scope.row)"></el-checkbox>
</template>
<template slot="header" slot-scope="scope">
<el-checkbox v-model="isCheckAll" @change="getCheckdData(tableData,'')"></el-checkbox>
</template>
<template slot-scope="scope">
<el-checkbox v-model="scope.row.isChecked" @change="getCheckdData(tableData,scope.row)"></el-checkbox>
</template>
</el-table-column>
<el-table-column prop="OrderNo" label="订单号/订单Id" width="200">
<template slot-scope="scope">
......@@ -155,7 +155,7 @@
ERPEmpId: 0,
updateDialog: false,
isCheckAll:false, //全选
isCheckAll: false, //全选
//修改信息
updateMsg: {
Ids: '',
......@@ -200,12 +200,13 @@
console.log(res, 'res');
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
this.tableData = res.data.data.pageData;
var data = JSON.parse(JSON.stringify(this.tableData));
data.forEach(x=>{
x.isChecked=false;
var myData = res.data.data.pageData;
var tempArray=[];
myData.forEach(x => {
x.isChecked = false;
})
this.tableData = data;
this.tableData = JSON.parse(JSON.stringify(myData));
} else {
this.Error(res.data.message);
}
......@@ -265,12 +266,36 @@
}
this.ComCheckedArr = selection;
},
getCheckdData(tabledata,row){
console.log(tabledata,'tabledata');
if(row){
row.isChecked=!row.isChecked;
getCheckdData(tabledata, row) {
console.log(tabledata, 'tabledata');
this.ComCheckedArr=[];
//单选
if (row) {
var findRow = tabledata.find(eItem => eItem.isChecked == true);
console.log("findRow", findRow);
if (findRow) {
tabledata.forEach(x => {
if (x.isChecked) {
if (x.LivePeopleNum != findRow.LivePeopleNum) {
this.Info("11111")
x.isChecked = false;
}
this.ComCheckedArr.push(x);
}
})
}
} else {
var findRow = tabledata[0];
if (findRow) {
tabledata.forEach(x => {
if (x.LivePeopleNum == findRow.LivePeopleNum) {
x.isChecked = this.isCheckAll;
this.ComCheckedArr.push(x);
}
})
}
}
// tabledata
console.log(this.ComCheckedArr,'ComCheckedArr');
},
//多选
selectAll(selection) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment