|
@@ -22,6 +22,15 @@
|
|
<TableAction
|
|
<TableAction
|
|
:actions="[
|
|
:actions="[
|
|
{
|
|
{
|
|
|
|
+ label: '设备绑定解除',
|
|
|
|
+ ifShow: permCode === '001',
|
|
|
|
+ popConfirm: {
|
|
|
|
+ title: '确定解除设备绑定吗?',
|
|
|
|
+ placement: 'left',
|
|
|
|
+ confirm: handleUnbind.bind(null, record),
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
label: '编辑',
|
|
label: '编辑',
|
|
onClick: handleEdit.bind(null, record),
|
|
onClick: handleEdit.bind(null, record),
|
|
ifShow: permCode === '001',
|
|
ifShow: permCode === '001',
|
|
@@ -57,7 +66,7 @@ import TokenDrawer from './TokenDrawer.vue';
|
|
import { useI18n } from 'vue-i18n';
|
|
import { useI18n } from 'vue-i18n';
|
|
|
|
|
|
import { columns, searchFormSchema } from './token.data';
|
|
import { columns, searchFormSchema } from './token.data';
|
|
-import { getTokenList, deleteToken, updateToken } from '@/api/wechat/token';
|
|
|
|
|
|
+import { getTokenList, deleteToken, updateToken, clearToken } from '@/api/wechat/token';
|
|
import { getPermCode } from '@/api/sys/user';
|
|
import { getPermCode } from '@/api/sys/user';
|
|
import SelectAIAgentModal from '@/views/components/SelectAIAgentModal.vue';
|
|
import SelectAIAgentModal from '@/views/components/SelectAIAgentModal.vue';
|
|
import { useModal } from '/@/components/Modal';
|
|
import { useModal } from '/@/components/Modal';
|
|
@@ -157,4 +166,9 @@ async function handleUpdateAgent({id, agentId: agent_id }) {
|
|
closeAIAgentModal();
|
|
closeAIAgentModal();
|
|
reload()
|
|
reload()
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+async function handleUnbind(record: Recordable) {
|
|
|
|
+ await clearToken({ id: record.id });
|
|
|
|
+ await reload();
|
|
|
|
+}
|
|
</script>
|
|
</script>
|