init
This commit is contained in:
@@ -224,3 +224,8 @@ export const userCallStatusList = [
|
|||||||
{ value: 7, label: '已接听', listClass: listClass.primary},
|
{ value: 7, label: '已接听', listClass: listClass.primary},
|
||||||
{ value: 8, label: '通话结束', listClass: listClass.primary},
|
{ value: 8, label: '通话结束', listClass: listClass.primary},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
export const forbidStatusList = [
|
||||||
|
{ value: 1, label: '封禁中',listClass: listClass.danger},
|
||||||
|
{ value: 2, label: '已解封',listClass: listClass.primary},
|
||||||
|
]
|
||||||
|
|||||||
@@ -7,47 +7,36 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['cai:userForbid:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="userForbidList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="userForbidList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="类型" align="center" prop="type" >
|
<el-table-column label="类型" align="center" prop="type" >
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<cai-dict-tag :options="forbidTimeList" :value="scope.row.type" />
|
<cai-dict-tag :options="forbidTypeList" :value="scope.row.type" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="封号对象" align="center" prop="member" />
|
<el-table-column label="封号对象" align="center" prop="member" />
|
||||||
<el-table-column label="封号时长" align="center" prop="forbidTime" >
|
|
||||||
<template v-slot="scope">
|
|
||||||
<cai-dict-tag :options="forbidTimeList" :value="scope.row.forbidTime" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="开始时间" align="center" prop="beginTime" />
|
<el-table-column label="开始时间" align="center" prop="beginTime" />
|
||||||
<el-table-column label="结束时间" align="center" prop="endTime" />
|
<el-table-column label="结束时间" align="center" prop="endTime" />
|
||||||
<el-table-column label="理由" align="center" prop="reason" />
|
<el-table-column label="最后封禁理由" align="center" prop="reason" />
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
<el-table-column label="状态" align="center" prop="forbidStatus" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<cai-dict-tag :options="forbidStatusList" :value="scope.row.forbidStatus" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="60">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="60">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
v-if="scope.row.forbidStatus === 1"
|
||||||
v-hasPermi="['cai:userForbid:remove']"
|
@click="handleForbid(scope.row)"
|
||||||
>删除</el-button>
|
>解封</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleForbidLogInfo(scope.row)"
|
||||||
|
>封禁记录</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -64,13 +53,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { delUserForbid, listUserForbid } from '@/api/cai/userForbid'
|
import { delUserForbid, listUserForbid } from '@/api/cai/userForbid'
|
||||||
import { forbidTimeList, forbidTypeList } from '@/constant/statusMap'
|
import {forbidStatusList, forbidTimeList, forbidTypeList} from '@/constant/statusMap'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "UserForbid",
|
name: "UserForbid",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
forbidTimeList,forbidTypeList,
|
forbidTimeList,forbidTypeList,forbidStatusList,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@@ -129,20 +118,11 @@ export default {
|
|||||||
this.single = selection.length!==1
|
this.single = selection.length!==1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
handleForbid(){
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
},
|
||||||
this.$modal.confirm('是否确认删除封号列表编号为"' + ids + '"的数据项?').then(() => {
|
handleForbidLogInfo(){
|
||||||
this.loading = true;
|
|
||||||
return delUserForbid(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {
|
|
||||||
}).finally(() => {
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user