Commit 32dbe2d3 authored by 黄奎's avatar 黄奎

页面修改

parent 8dcbd1ce
...@@ -22,14 +22,22 @@ ...@@ -22,14 +22,22 @@
<td>{{item.CreateTimeStr}}</td> <td>{{item.CreateTimeStr}}</td>
<td> <td>
<el-button-group> <el-button-group>
<el-tooltip class="item" effect="dark" :content="$t('active.ld_editInfo')" placement="top"> <template v-if="item.AccountStatus==0">
<el-button type="primary" size="mini" icon="el-icon-edit" @click="getAdManage(item.Id)"> <el-tooltip class="item" effect="dark" content="禁用" placement="top">
</el-button> <el-button type="primary" size="mini" icon="el-icon-edit" @click="SetAccountStatus(item.Id,1)">
</el-tooltip> </el-button>
<el-tooltip class="item" effect="dark" content="删除" placement="top"> </el-tooltip>
<el-button type="danger" size="mini" class="iconfont icon-quxiao1" @click="removeAdManage(item.Id)"> <el-tooltip class="item" effect="dark" content="删除" placement="top">
</el-button> <el-button type="danger" size="mini" class="iconfont icon-quxiao1" @click="SetAccountStatus(item.Id,2)">
</el-tooltip> </el-button>
</el-tooltip>
</template>
<template v-else>
<el-tooltip class="item" effect="dark" content="启用" placement="top">
<el-button type="primary" size="mini" icon="el-icon-edit" @click="SetAccountStatus(item.Id,0)">
</el-button>
</el-tooltip>
</template>
</el-button-group> </el-button-group>
</td> </td>
</tr> </tr>
...@@ -57,6 +65,11 @@ ...@@ -57,6 +65,11 @@
}, },
loading: false, loading: false,
dataList: [], dataList: [],
//账户修改
editMsg: {
Id: 0,
AccountStatus: 0,
}
}; };
}, },
mounted() { mounted() {
...@@ -74,14 +87,39 @@ ...@@ -74,14 +87,39 @@
this.apipost("ShopGuest_get_GetGuestAccountPageListService", this.msg, res => { this.apipost("ShopGuest_get_GetGuestAccountPageListService", this.msg, res => {
this.loading = false; this.loading = false;
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
console.log(res.data.data);
this.dataList = res.data.data.pageData; this.dataList = res.data.data.pageData;
this.msg.total=res.data.data.count; this.msg.total = res.data.data.count;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}, null); }, null);
}, },
//修改账户类型
SetAccountStatus(Id, AccountStatus) {
this.editMsg.Id = Id;
this.editMsg.AccountStatus = AccountStatus;
var tipStr = "";
if (AccountStatus == 0) {
tipStr = "启用";
} else if (AccountStatus == 1) {
tipStr = "禁用";
} else if (AccountStatus == 2) {
tipStr = "删除";
}
var that = this;
this.Confirm("是否[" + tipStr + "]此账户?", function () {
that.apipost("ShopGuest_post_SetGuestAccountStatusService", that.editMsg, res => {
if (res.data.resultCode === 1) {
that.editMsg.Id = 0;
that.editMsg.AccountStatus = 0;
that.getList();
} else {
that.Error(res.data.message);
}
}, null);
});
}
} }
}; };
......
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