Commit a1bccaec by 胡悦

一客一群按钮权限

1 parent e6f17ee6
......@@ -80,6 +80,17 @@ const nameVaild = params => {
})
}
const updateNameVaild = params => {
params.method = 'entmicro.api.one.template.name.update.valid'
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
export default {
templateList,
insert,
......@@ -87,5 +98,6 @@ export default {
status,
update,
listDepartmentTree,
nameVaild
nameVaild,
updateNameVaild
}
......@@ -145,8 +145,12 @@ export default {
const params = {
templateName: value
}
if (this.$route.params.id) params.id = this.$route.params.id
this.$apis.groupGuest.nameVaild(params).then(res => {
let api = 'nameVaild'
if (this.$route.params.id) {
params.id = this.$route.params.id
api = 'updateNameVaild'
}
this.$apis.groupGuest[api](params).then(res => {
if (res) {
callback(new Error('群聊名称不可重复'))
} else {
......
<template>
<div class="scrm-sub-client-container">
<div class="btn-header">
<button class="addBtn" @click="btnClick('create')">新建群组</button>
<!-- <el-button class="addBtn" @click="btnClick('create')">新建群组</el-button> -->
<GLButton class="addBtn" @click="btnClick('create')" fn="新建群组">新建群组</GLButton>
<span class="toptips">
<span>配置群聊不会自动拉群,邀请客户入群后群聊才会正式生效,一个客户默认拉一个群聊。</span>
</span>
......@@ -69,11 +70,13 @@
>{{ scope.scope.status == '1' ? '启用' : '停用' }}</span>
</span>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="btnClick('edit', scope.scope)">修改</el-button>
<el-button
<!-- <el-button type="text" @click="btnClick('edit', scope.scope)">修改</el-button> -->
<GLButton type="text" @click="btnClick('edit', scope.scope)" fn="修改群组">修改</GLButton>
<GLButton type="text" @click="btnClick('status', scope.scope)" fn="启用禁用">{{ scope.scope.status == 1 ? '停用' : '启用' }}</GLButton>
<!-- <el-button
type="text"
@click="btnClick('status', scope.scope)"
>{{ scope.scope.status == 1 ? '停用' : '启用' }}</el-button>
>{{ scope.scope.status == 1 ? '停用' : '启用' }}</el-button> -->
</div>
</GLTable>
<!-- 表格区域 end -->
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!