|
@@ -4,7 +4,12 @@
|
|
<Search :search="search" :reset="resetQuery">
|
|
<Search :search="search" :reset="resetQuery">
|
|
<template v-slot:body>
|
|
<template v-slot:body>
|
|
<el-form-item label="模板名称">
|
|
<el-form-item label="模板名称">
|
|
- <el-input placeholder="请输入模板名称" v-model="query.keyword" clearable></el-input>
|
|
|
|
|
|
+ <el-input placeholder="请输入模板名称" v-model="query.title" clearable></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="系统类型">
|
|
|
|
+ <el-select v-model="query.type" clearable placeholder="请选择系统类型">
|
|
|
|
+ <el-option v-for="item in systemType" :key="item.id" :label="item.label" :value="item.value" />
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="公众号">
|
|
<el-form-item label="公众号">
|
|
<el-select v-model="query.wechat_authorization_info_id" filterable remote clearable
|
|
<el-select v-model="query.wechat_authorization_info_id" filterable remote clearable
|
|
@@ -20,7 +25,7 @@
|
|
<el-alert title="注:一个公众号对应一套菜单配置,如果重复配置,原内容将被覆盖,以最新配置为准" type="warning" show-icon :closable="false" />
|
|
<el-alert title="注:一个公众号对应一套菜单配置,如果重复配置,原内容将被覆盖,以最新配置为准" type="warning" show-icon :closable="false" />
|
|
</div>
|
|
</div>
|
|
<div class="pt-5 pl-2">
|
|
<div class="pt-5 pl-2">
|
|
- <el-button type="primary" v-action="'wechatPlatform.WechatKeywords.add'" size="default"
|
|
|
|
|
|
+ <el-button type="primary" v-action="'wechatPlatform.WechatMenu.add'" size="default"
|
|
@click="openType('createVisible', null)">新增</el-button>
|
|
@click="openType('createVisible', null)">新增</el-button>
|
|
</div>
|
|
</div>
|
|
<el-table :data="tableData" class="mt-3" v-loading="loading">
|
|
<el-table :data="tableData" class="mt-3" v-loading="loading">
|
|
@@ -43,16 +48,16 @@
|
|
|
|
|
|
<el-table-column label="操作" width="200" fixed="right">
|
|
<el-table-column label="操作" width="200" fixed="right">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-button link type="primary" v-action="'wechatPlatform.WechatKeywords.edit'" size="small"
|
|
|
|
|
|
+ <el-button link type="primary" v-action="'wechatPlatform.WechatMenu.edit'" size="small"
|
|
@click="openType('createVisible', scope.row)">编辑</el-button>
|
|
@click="openType('createVisible', scope.row)">编辑</el-button>
|
|
<br />
|
|
<br />
|
|
- <el-button link type="primary" v-action="'wechatPlatform.WechatKeywords.detail'" size="small"
|
|
|
|
|
|
+ <el-button link type="primary" v-action="'wechatPlatform.WechatMenu.detail'" size="small"
|
|
@click="openType('createVisible', { look: true, ...scope.row })">查看</el-button>
|
|
@click="openType('createVisible', { look: true, ...scope.row })">查看</el-button>
|
|
<br />
|
|
<br />
|
|
- <el-button link type="primary" size="small" v-action="'wechatPlatform.WechatKeywords.del'"
|
|
|
|
|
|
+ <el-button link type="primary" size="small" v-action="'wechatPlatform.WechatMenu.del'"
|
|
@click="deleteChange(scope.row)">删除</el-button>
|
|
@click="deleteChange(scope.row)">删除</el-button>
|
|
<br />
|
|
<br />
|
|
- <el-button link type="primary" size="small" v-action="'wechatPlatform.WechatKeywords.allocation'"
|
|
|
|
|
|
+ <el-button link type="primary" size="small" v-action="'wechatPlatform.WechatMenu.allocation'"
|
|
@click="openType('configPublicVisible', scope.row)">配置公众号</el-button>
|
|
@click="openType('configPublicVisible', scope.row)">配置公众号</el-button>
|
|
<br />
|
|
<br />
|
|
</template>
|
|
</template>
|
|
@@ -76,11 +81,7 @@ import { checkPermission } from '@/directives/permission';
|
|
import Create from './form/create.vue';
|
|
import Create from './form/create.vue';
|
|
import configPublic from '@/views/officialAccount/components/configPublic.vue'
|
|
import configPublic from '@/views/officialAccount/components/configPublic.vue'
|
|
import { useGetList } from '@/hook/curd/useGetList';
|
|
import { useGetList } from '@/hook/curd/useGetList';
|
|
-import {
|
|
|
|
- wechatPlatformKeywordGetConfig,
|
|
|
|
- wechatPlatformKeywordSetConfig,
|
|
|
|
- wechatPlatformKeywordDel
|
|
|
|
-} from '@/api/officialAccount/keywordReply/index'
|
|
|
|
|
|
+import { wechatPlatformMenuDel } from '@/api/officialAccount/publicCustomMenu/index'
|
|
import { wechatPlatformOfficialAccountList } from '@/api/officialAccount/officialList/index'
|
|
import { wechatPlatformOfficialAccountList } from '@/api/officialAccount/officialList/index'
|
|
const api = 'wechatPlatform/menu/list';
|
|
const api = 'wechatPlatform/menu/list';
|
|
import Cache from '@/support/cache';
|
|
import Cache from '@/support/cache';
|
|
@@ -92,7 +93,7 @@ const createTitle = ref('新增')
|
|
const { data, query, search, reset, loading } = useGetList(api);
|
|
const { data, query, search, reset, loading } = useGetList(api);
|
|
const rolesIdentify = inject('rolesIdentify')
|
|
const rolesIdentify = inject('rolesIdentify')
|
|
const tableData = computed(() => data.value?.data);
|
|
const tableData = computed(() => data.value?.data);
|
|
-
|
|
|
|
|
|
+const systemType = ref([{ id: 1, label: 'android', value: 'android' }, { id: 2, label: 'ios', value: 'ios' }])
|
|
|
|
|
|
const openType = (type: string, data: object | null) => {
|
|
const openType = (type: string, data: object | null) => {
|
|
current.value = data;
|
|
current.value = data;
|
|
@@ -135,7 +136,7 @@ const closeType = (type: string) => {
|
|
|
|
|
|
const deleteChange = (row: object) => {
|
|
const deleteChange = (row: object) => {
|
|
ElMessageBox.confirm(
|
|
ElMessageBox.confirm(
|
|
- '确定要删除吗?',
|
|
|
|
|
|
+ '一旦删除此模板,其对应的公众号菜单会一并清空,确定要删除此菜单模板吗?',
|
|
'提示',
|
|
'提示',
|
|
{
|
|
{
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
@@ -144,7 +145,7 @@ const deleteChange = (row: object) => {
|
|
}
|
|
}
|
|
)
|
|
)
|
|
.then(() => {
|
|
.then(() => {
|
|
- wechatPlatformKeywordDel({ ids: row.id }).then(res => {
|
|
|
|
|
|
+ wechatPlatformMenuDel({ ids: row.id }).then(res => {
|
|
console.log(res);
|
|
console.log(res);
|
|
ElMessage.success(res.message)
|
|
ElMessage.success(res.message)
|
|
search()
|
|
search()
|