- Add admin-web/ with Vite + Vue 3 + Element Plus + Vue Router - Add 8 management pages: dashboard, channel subject/account, conversation, person, tag, send record (with test send), inbound flow - Add API client modules for account/channel/crm/send/flow - Add Dockerfile and nginx config for admin-web - Add Dockerfile for mci-server - Add docker-compose.app.yml for one-command app deployment - Add K8s deployment manifests for backend/admin-web/channel-service - Update scripts/local-up.sh with shared network and --with-apps option
61 lines
1.9 KiB
Vue
61 lines
1.9 KiB
Vue
<template>
|
|
<div>
|
|
<el-form :model="form" inline>
|
|
<el-form-item label="账号类型">
|
|
<el-select v-model="form.accountType" placeholder="类型">
|
|
<el-option label="企微内部账号" :value="1" />
|
|
<el-option label="企微应用" :value="2" />
|
|
<el-option label="pywechat 个人号" :value="3" />
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="渠道">
|
|
<el-input v-model="form.channelType" placeholder="wecom" />
|
|
</el-form-item>
|
|
<el-form-item label="账号ID">
|
|
<el-input v-model="form.accountId" placeholder="账号唯一标识" />
|
|
</el-form-item>
|
|
<el-form-item label="名称">
|
|
<el-input v-model="form.accountName" placeholder="名称" />
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-button type="primary" @click="handleCreate">创建</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<el-table :data="accounts" border>
|
|
<el-table-column prop="id" label="ID" width="80" />
|
|
<el-table-column prop="accountType" label="类型" />
|
|
<el-table-column prop="channelType" label="渠道" />
|
|
<el-table-column prop="accountId" label="账号ID" />
|
|
<el-table-column prop="accountName" label="名称" />
|
|
<el-table-column prop="loginStatus" label="登录状态" />
|
|
<el-table-column prop="onlineStatus" label="在线状态" />
|
|
</el-table>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { reactive, ref } from 'vue'
|
|
import { ElMessage } from 'element-plus'
|
|
import { createChannelAccount } from '@/api/channel'
|
|
|
|
const form = reactive({
|
|
accountType: 1,
|
|
channelType: 'wecom',
|
|
accountId: '',
|
|
accountName: '',
|
|
})
|
|
|
|
const accounts = ref<any[]>([])
|
|
|
|
async function handleCreate() {
|
|
try {
|
|
const res: any = await createChannelAccount(form)
|
|
accounts.value.unshift(res.data)
|
|
ElMessage.success('创建成功')
|
|
} catch (e: any) {
|
|
ElMessage.error(e.message)
|
|
}
|
|
}
|
|
</script>
|