|
|
@@ -14,7 +14,7 @@
|
|
|
>
|
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
|
</el-input>
|
|
|
- <el-button>查询</el-button>
|
|
|
+ <el-button @click="inquire">查询</el-button>
|
|
|
</div>
|
|
|
<div class="export" @click="addStaff">添加员工</div>
|
|
|
<el-dialog
|
|
|
@@ -282,64 +282,65 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
data: [],
|
|
|
+ //总数据
|
|
|
tableData: [
|
|
|
{
|
|
|
- phone: 13602320232,
|
|
|
+ phone: 13611110232,
|
|
|
staff: "刘德华",
|
|
|
position: "歌星",
|
|
|
},
|
|
|
{
|
|
|
- phone: 13602320232,
|
|
|
- staff: "刘德华",
|
|
|
+ phone: 13620220232,
|
|
|
+ staff: "刘",
|
|
|
position: "歌星",
|
|
|
},
|
|
|
{
|
|
|
- phone: 13602320232,
|
|
|
- staff: "刘德华",
|
|
|
+ phone: 1363636320232,
|
|
|
+ staff: "德华",
|
|
|
position: "歌星",
|
|
|
},
|
|
|
{
|
|
|
- phone: 13602320232,
|
|
|
- staff: "刘德华",
|
|
|
+ phone: 1344540232,
|
|
|
+ staff: "华",
|
|
|
position: "歌星",
|
|
|
},
|
|
|
{
|
|
|
- phone: 13602320232,
|
|
|
- staff: "刘德华",
|
|
|
+ phone: 1360468880232,
|
|
|
+ staff: "刘德",
|
|
|
position: "歌星",
|
|
|
},
|
|
|
{
|
|
|
- phone: 13602320232,
|
|
|
- staff: "刘德华",
|
|
|
+ phone: 13602220232,
|
|
|
+ staff: "德",
|
|
|
position: "歌星",
|
|
|
},
|
|
|
{
|
|
|
- phone: 13602320232,
|
|
|
- staff: "刘德华",
|
|
|
+ phone: 1360888832,
|
|
|
+ staff: "刘华",
|
|
|
position: "歌星",
|
|
|
},
|
|
|
{
|
|
|
- phone: 13602320232,
|
|
|
- staff: "刘德华",
|
|
|
+ phone: 13655550232,
|
|
|
+ staff: "华",
|
|
|
position: "歌星",
|
|
|
},
|
|
|
{
|
|
|
- phone: 13602320232,
|
|
|
+ phone: 13605656232,
|
|
|
staff: "刘德华",
|
|
|
position: "歌星",
|
|
|
},
|
|
|
{
|
|
|
- phone: 13602320232,
|
|
|
+ phone: 13464520232,
|
|
|
staff: "刘德华",
|
|
|
position: "歌星",
|
|
|
},
|
|
|
{
|
|
|
- phone: 13602320232,
|
|
|
+ phone: 1365650232,
|
|
|
staff: "刘德华",
|
|
|
position: "歌星",
|
|
|
},
|
|
|
],
|
|
|
-
|
|
|
+ Tdata: [],
|
|
|
options: [
|
|
|
{
|
|
|
value: "选项1",
|
|
|
@@ -364,7 +365,7 @@ export default {
|
|
|
],
|
|
|
|
|
|
state: "",
|
|
|
- value: "",
|
|
|
+ value: "", //请输入手机号码或员工姓名
|
|
|
value1: "",
|
|
|
value2: "",
|
|
|
dialogVisible: false,
|
|
|
@@ -386,6 +387,7 @@ export default {
|
|
|
"el-pagination__jump"
|
|
|
)[0].childNodes[0].nodeValue = "跳转到";
|
|
|
this.handleCurrentChange(1);
|
|
|
+ this.Tdata = this.tableData;
|
|
|
},
|
|
|
methods: {
|
|
|
allRead($event, index) {
|
|
|
@@ -416,6 +418,23 @@ export default {
|
|
|
this.dialogVisible = false;
|
|
|
},
|
|
|
|
|
|
+ inquire() {
|
|
|
+ this.tableData = this.Tdata;
|
|
|
+ let data = [];
|
|
|
+ this.tableData.filter((item) => {
|
|
|
+ if (
|
|
|
+ item.phone.toString().includes(this.value) ||
|
|
|
+ item.staff.includes(this.value)
|
|
|
+ ) {
|
|
|
+ data.push(item);
|
|
|
+ this.tableData = data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (this.value == "") {
|
|
|
+ this.tableData = this.Tdata;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
// 添加员工
|
|
|
addStaff() {
|
|
|
this.addStaffShow = true;
|