Commit ad230a2e by xiaohai

新功能添加

parent 576ba03d
......@@ -13,6 +13,27 @@
@clear="clearSearch"
@keyup.enter.native="searchEnterFun">
</el-input>
<el-select
v-model="statusSelect"
@change="searchByStatus"
placeholder="请选择"
class="w-220">
<el-option
:key="0"
label="失效"
:value="0">
</el-option>
<el-option
:key="1"
label="有效"
:value="1">
</el-option>
<el-option
key=""
label="全部"
value="">
</el-option>
</el-select>
<el-button type="primary" @click="toAddGroup" class="fr">新增分组</el-button>
</div>
<div class="common-wrap__table m-t-20">
......@@ -87,6 +108,18 @@
</template>
</el-table-column>
<el-table-column
prop="appStatus"
label="好办展示"
width="100px">
<template slot-scope="scope">
<el-switch
v-model="scope.row.appStatus"
active-color="#1890ff"
@change="switchAppStatus(scope.row.appStatus, scope.row)">
</el-switch>
</template>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
width="150px"
......@@ -180,7 +213,8 @@
pageSize: 20,
total: 0,
groupSetShow: false,
loading: false
loading: false,
statusSelect: ''
}
},
created() {
......@@ -217,10 +251,7 @@
},
methods: {
setRowClassName({row, rowIndex}) {
console.log(row, rowIndex);
// if (rowIndex === 1) {
// return 'row-need-loading';
// }
// console.log(row, rowIndex);
},
/**
*
......@@ -305,6 +336,22 @@
},
/**
* 更新好办展示状态
*/
switchAppStatus(status, obj) {
console.log(status, obj);
const that = this;
that.loading = true;
const appStatus = status ? 1 : 0;
const memberTagGroupId = obj.memberTagGroupId;
let param = {
memberTagGroupId,
appStatus
};
that.updateGroup(param, obj);
},
/**
* 刷新当前分组
*/
refreshGroup(obj) {
......@@ -415,7 +462,14 @@
});
});
},
/**
* 通过状态筛选列表
*/
searchByStatus(val) {
this.loading = true;
console.log(val, this.statusSelect);
this.getGroupList();
},
/**
* 获取列表数据
*/
......@@ -424,7 +478,8 @@
const para = {
groupName: that.tagSearch, // 搜索字段
pageSize: that.pageSize,
pageNum: that.currentPage
pageNum: that.currentPage,
effectiveStatus: that.statusSelect
};
getRequest('/member-tag-group/findList.json',para)
.then((res) => {
......
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