Commit 9300e6c8 authored by zhengke's avatar zhengke

修改

parent 196ac7d2
...@@ -36,12 +36,12 @@ ...@@ -36,12 +36,12 @@
<el-table :data="tableData" ref="multipleTable" v-loading="loading" border style="width: 100%" <el-table :data="tableData" ref="multipleTable" v-loading="loading" border style="width: 100%"
@select="selectSingle" @select-all="selectAll"> @select="selectSingle" @select-all="selectAll">
<el-table-column width="55"> <el-table-column width="55">
<template slot="header" slot-scope="scope"> <template slot="header" slot-scope="scope">
<el-checkbox v-model="isCheckAll" @change="getCheckdData(tableData,'')"></el-checkbox> <el-checkbox v-model="isCheckAll" @change="getCheckdData(tableData,'')"></el-checkbox>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.isChecked" @change="getCheckdData(tableData,scope.row)"></el-checkbox> <el-checkbox v-model="scope.row.isChecked" @change="getCheckdData(tableData,scope.row)"></el-checkbox>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="OrderNo" label="订单号/订单Id" width="200"> <el-table-column prop="OrderNo" label="订单号/订单Id" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
ERPEmpId: 0, ERPEmpId: 0,
updateDialog: false, updateDialog: false,
isCheckAll:false, //全选 isCheckAll: false, //全选
//修改信息 //修改信息
updateMsg: { updateMsg: {
Ids: '', Ids: '',
...@@ -200,12 +200,13 @@ ...@@ -200,12 +200,13 @@
console.log(res, 'res'); console.log(res, 'res');
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.total = res.data.data.count; this.total = res.data.data.count;
this.tableData = res.data.data.pageData; var myData = res.data.data.pageData;
var data = JSON.parse(JSON.stringify(this.tableData)); var tempArray=[];
data.forEach(x=>{ myData.forEach(x => {
x.isChecked=false; x.isChecked = false;
}) })
this.tableData = data; this.tableData = JSON.parse(JSON.stringify(myData));
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -265,12 +266,36 @@ ...@@ -265,12 +266,36 @@
} }
this.ComCheckedArr = selection; this.ComCheckedArr = selection;
}, },
getCheckdData(tabledata,row){ getCheckdData(tabledata, row) {
console.log(tabledata,'tabledata'); console.log(tabledata, 'tabledata');
if(row){ this.ComCheckedArr=[];
row.isChecked=!row.isChecked; //单选
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) { 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