|
@@ -3,7 +3,7 @@
|
|
|
<div>
|
|
|
<table-list
|
|
|
:tableSets="tableSet"
|
|
|
- :tableData="tableData"
|
|
|
+ :tableData="computedData(tableData)"
|
|
|
:navText="navText"
|
|
|
@addClick="openActiveBox"
|
|
|
:loading="loading"
|
|
@@ -12,6 +12,11 @@
|
|
|
ref="tableList"
|
|
|
>
|
|
|
<template slot="customize">
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入题目内容"
|
|
|
+ v-model="keyValue"
|
|
|
+ style="margin-right: 10px"
|
|
|
+ ></el-input>
|
|
|
<el-button
|
|
|
size="medium"
|
|
|
@click="$refs.wordpop.dialogDRword = true"
|
|
@@ -687,6 +692,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ keyValue: "",
|
|
|
dialogDRword: false,
|
|
|
disabledBtn: false,
|
|
|
dialogDRexcel: false,
|
|
@@ -965,6 +971,19 @@ export default {
|
|
|
});
|
|
|
return num;
|
|
|
},
|
|
|
+ computedData: function () {
|
|
|
+ return function (data) {
|
|
|
+ var arr = [];
|
|
|
+ if (this.keyValue) {
|
|
|
+ arr = data.filter((item) => {
|
|
|
+ return item.content.search(this.keyValue) !== -1;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ arr = data;
|
|
|
+ }
|
|
|
+ return arr;
|
|
|
+ };
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
djTime: {
|
|
@@ -1139,7 +1158,7 @@ export default {
|
|
|
this.tableData = this.tableData.filter((item) => {
|
|
|
return !dataIndedx.includes(item.index);
|
|
|
});
|
|
|
- this.$refs.tableList.clearMoreActive()
|
|
|
+ this.$refs.tableList.clearMoreActive();
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: "删除成功!",
|
|
@@ -1185,10 +1204,11 @@ export default {
|
|
|
return item.index === v.index;
|
|
|
});
|
|
|
this.tableData.splice(index, 1);
|
|
|
- if(this.$refs.tableList.allCheckData.length){
|
|
|
- this.$refs.tableList.allCheckData = this.$refs.tableList.allCheckData.filter(item => {
|
|
|
- return item.index !== v.index
|
|
|
- })
|
|
|
+ if (this.$refs.tableList.allCheckData.length) {
|
|
|
+ this.$refs.tableList.allCheckData =
|
|
|
+ this.$refs.tableList.allCheckData.filter((item) => {
|
|
|
+ return item.index !== v.index;
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
.catch(() => {
|