Commit a1bccaec by 胡悦

一客一群按钮权限

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