|
@@ -19,7 +19,7 @@ export default {
|
|
|
// 自己的每页显示条目个数
|
|
|
dataPageSize: 10,
|
|
|
// 保存表格所有页面所选中的数据
|
|
|
- dataSelection: [],
|
|
|
+ dataRadioId: [],
|
|
|
// 保存表格单选的数据 保存数据的id
|
|
|
dataRadioId: ""
|
|
|
};
|
|
@@ -65,24 +65,18 @@ export default {
|
|
|
// 判断是否需要在请求体中放入参数
|
|
|
if(this.requestQuery){
|
|
|
console.log(" 判断是否需要在请求体中放入参数")
|
|
|
-
|
|
|
this.dataRequestQuery=this.requestQuery;
|
|
|
// console.log(this.dataRequestQuery.resultBreakId)
|
|
|
}
|
|
|
-
|
|
|
let data = undefined;
|
|
|
for (const key in this.dataRequestQuery) {
|
|
|
-
|
|
|
const val = this.dataRequestQuery[key];
|
|
|
console.log(val)
|
|
|
if (val||val==0) {
|
|
|
-
|
|
|
if (!data) data = {};
|
|
|
-
|
|
|
data[key] = val;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
// 发送请求
|
|
|
this.axios
|
|
|
.post(url, data, {
|
|
@@ -99,7 +93,6 @@ export default {
|
|
|
//执行成功的回调
|
|
|
this.$emit('func',response.data.data);
|
|
|
this.refreshColumnData(d.columnData);
|
|
|
-
|
|
|
this.isShow = true;
|
|
|
});
|
|
|
}
|
|
@@ -111,10 +104,8 @@ export default {
|
|
|
refreshColumnData(columnData) {
|
|
|
// 表头只赋值一次(在查出全部数据的情况下才只赋值一次)
|
|
|
// if (this.dataColumnData.length > 0) return;
|
|
|
-
|
|
|
// 如果前端有写表头,则加在后端表头前面
|
|
|
const d = this.columnData.concat(columnData);
|
|
|
-
|
|
|
// 把操作列拼接到最后一列
|
|
|
this.dataColumnData = d;
|
|
|
this.dataDropColumn = [].concat(this.dataColumnData);
|
|
@@ -186,7 +177,7 @@ export default {
|
|
|
},
|
|
|
// 多选的选中行改变回调
|
|
|
selectionChange(selection) {
|
|
|
- this.dataSelection = selection;
|
|
|
+ // this.dataSelection = selection;
|
|
|
// 将多选中的数据抛出
|
|
|
this.$emit("selection-change", selection);
|
|
|
},
|
|
@@ -233,11 +224,11 @@ export default {
|
|
|
},
|
|
|
// current-page 改变时会触发
|
|
|
currentChange(val, isRequest = true) {
|
|
|
- this.dataCurrentPage = val;
|
|
|
if (isRequest) {
|
|
|
this.requestData({ pageNum: val });
|
|
|
}
|
|
|
// 最后通知父节点页面改变
|
|
|
+ this.dataCurrentPage = val;
|
|
|
this.$emit("update:current-page", val);
|
|
|
},
|
|
|
// pageSize 改变时会触发
|