Commit a5505c7d authored by youjie's avatar youjie

no message

parent 6240d281
...@@ -47,6 +47,26 @@ ...@@ -47,6 +47,26 @@
empty-text="暂无数据" style="width: 100%;" border empty-text="暂无数据" style="width: 100%;" border
> >
<el-table-column label="账号名称" prop="Name"></el-table-column> <el-table-column label="账号名称" prop="Name"></el-table-column>
<el-table-column width="130" prop="State" label="状态">
<template slot-scope="scope">
<template v-if="!scope.row.Show">
<span class="activeState" @click="scope.row.Show=true">
<a v-if="scope.row.State==1">正常</a>
<a v-if="scope.row.State==2">限流</a>
<a v-if="scope.row.State==3">封号</a>
</span>
</template>
<template v-if="scope.row.Show">
<el-select style="width: 80px;" size="mini" v-model="scope.row.State" placeholder="请选择"
@change="EditState($event,scope.row)">
<el-option v-for="item in scope.row.optionList" :key="item.Id" :label="item.Name"
:value="item.Id"></el-option>
</el-select>
<i class="iconfnt el-icon-close left10 activeState" @click="scope.row.Show=false"></i>
</template>
</template>
</el-table-column>
<el-table-column label="所属平台" prop="PlatformTypeName"></el-table-column> <el-table-column label="所属平台" prop="PlatformTypeName"></el-table-column>
<el-table-column label="所属板块" prop="ModuleTypeName"></el-table-column> <el-table-column label="所属板块" prop="ModuleTypeName"></el-table-column>
<el-table-column label="运营人" prop="EmpName"></el-table-column> <el-table-column label="运营人" prop="EmpName"></el-table-column>
...@@ -119,6 +139,20 @@ ...@@ -119,6 +139,20 @@
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="12">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="状态" prop="EmpIds">
<el-select v-model="form.State" placeholder="请选择状态">
<el-option
v-for="item in ptionList"
:label='item.Name'
:value='item.Id'
:key='item.Id'>
</el-option>
</el-select>
</el-form-item>
</div>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
...@@ -156,6 +190,7 @@ ...@@ -156,6 +190,7 @@
PlatformType:1,// 平台 枚举 是 [int] 查看 PlatformType:1,// 平台 枚举 是 [int] 查看
ModuleType:1,// 版块 枚举 是 [int] 查看 ModuleType:1,// 版块 枚举 是 [int] 查看
EmpIds:[],// 运营人 Ids 英文逗号分隔 EmpIds:[],// 运营人 Ids 英文逗号分隔
State:1,
}, },
rules: { rules: {
Name: [{ Name: [{
...@@ -178,10 +213,20 @@ ...@@ -178,10 +213,20 @@
message: "请选择运营人", message: "请选择运营人",
trigger: "blur" trigger: "blur"
}, ], }, ],
State: [{
required: true,
message: "请选择状态",
trigger: "blur"
}, ],
}, },
total: 0, total: 0,
tableData: [], tableData: [],
loading: false, loading: false,
ptionList:[
{Name:'正常',Id:1},
{Name:'限流',Id:2},
{Name:'封号',Id:3},
]
}; };
}, },
provide() { provide() {
...@@ -197,6 +242,34 @@ ...@@ -197,6 +242,34 @@
this.init(); this.init();
}, },
methods: { methods: {
EditState(e,row) {
let datas = {
AccountId:row.Id,
State:row.State
}
this.$confirm('此操作将修改该账号状态否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('/api/IntroduceFlowStat/SetFlowAccountState',datas, res=>{
if (res.data.resultCode == 1) {
this.init()
this.$message.success(res.data.message)
} else {
this.init()
this.$message.error(res.data.message)
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
this.init()
});
},
delAccount(row){ delAccount(row){
this.$confirm('此操作将删除该账号是否继续?', '提示', { this.$confirm('此操作将删除该账号是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -248,12 +321,16 @@ ...@@ -248,12 +321,16 @@
if (this.form.EmpIds&&this.form.EmpIds.length==0) { if (this.form.EmpIds&&this.form.EmpIds.length==0) {
return this.$message.error('请选择运营人') return this.$message.error('请选择运营人')
} }
if (!this.form.State) {
return this.$message.error('请选择状态')
}
let datas = { let datas = {
Id:this.form.Id?this.form.Id:0, Id:this.form.Id?this.form.Id:0,
Name:this.form.Name, Name:this.form.Name,
PlatformType:this.form.PlatformType, PlatformType:this.form.PlatformType,
ModuleType:this.form.ModuleType, ModuleType:this.form.ModuleType,
EmpIds:this.form.EmpIds.join(','), EmpIds:this.form.EmpIds.join(','),
State:this.form.State
} }
this.apipost('/api/IntroduceFlowStat/SetFlowAccount',datas, res=>{ this.apipost('/api/IntroduceFlowStat/SetFlowAccount',datas, res=>{
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -288,6 +365,7 @@ ...@@ -288,6 +365,7 @@
PlatformType:1,// 平台 枚举 是 [int] 查看 PlatformType:1,// 平台 枚举 是 [int] 查看
ModuleType:1,// 版块 枚举 是 [int] 查看 ModuleType:1,// 版块 枚举 是 [int] 查看
EmpIds:'',// 运营人 Ids 英文逗号分隔 EmpIds:'',// 运营人 Ids 英文逗号分隔
State:1
} }
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
}, },
...@@ -345,6 +423,18 @@ ...@@ -345,6 +423,18 @@
"/api/IntroduceFlowStat/GetFlowAccountPageList", "/api/IntroduceFlowStat/GetFlowAccountPageList",
this.msg, this.msg,
(res) => { (res) => {
let datas = res.data.data&&res.data.data.pageData
let addList = function (arr) {
arr.forEach(item => {
item.Show = false
item.optionList = [
{Name:'正常',Id:1},
{Name:'限流',Id:2},
{Name:'封号',Id:3},
]
});
};
addList(datas);
this.loading = false; this.loading = false;
this.tableData = res.data.data.pageData; this.tableData = res.data.data.pageData;
this.total = res.data.data.count; this.total = res.data.data.count;
...@@ -368,6 +458,13 @@ ...@@ -368,6 +458,13 @@
<style> <style>
@import "../../assets/css/customerManage.css"; @import "../../assets/css/customerManage.css";
.left10{
margin-left: 10px;
}
.activeState{
color: #00b0f0;
cursor: pointer;
}
.el-table__fixed-body-wrapper table { .el-table__fixed-body-wrapper table {
padding-bottom: 8px !important; padding-bottom: 8px !important;
} }
......
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