feat: 企微应用租户下拉选择 + corp_id 自动填入
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
- 租户表增加 corp_id 字段(企业微信企业ID) - 租户管理页面支持配置 corp_id - 企微应用页面租户从下拉选择 - 选择租户后自动填入 corp_id 并禁用编辑 - 提示用户如租户未配置 corp_id 需先去配置
This commit is contained in:
@@ -26,6 +26,7 @@ const formRef = ref(null)
|
||||
const form = reactive({
|
||||
code: '',
|
||||
name: '',
|
||||
corp_id: '',
|
||||
status: 'active',
|
||||
expired_at: null,
|
||||
contact_info: {
|
||||
@@ -69,6 +70,7 @@ function handleCreate() {
|
||||
Object.assign(form, {
|
||||
code: '',
|
||||
name: '',
|
||||
corp_id: '',
|
||||
status: 'active',
|
||||
expired_at: null,
|
||||
contact_info: { contact: '', phone: '', email: '' }
|
||||
@@ -82,6 +84,7 @@ function handleEdit(row) {
|
||||
Object.assign(form, {
|
||||
code: row.code,
|
||||
name: row.name,
|
||||
corp_id: row.corp_id || '',
|
||||
status: row.status,
|
||||
expired_at: row.expired_at,
|
||||
contact_info: row.contact_info || { contact: '', phone: '', email: '' }
|
||||
@@ -172,6 +175,7 @@ onMounted(() => {
|
||||
<el-table-column prop="id" label="ID" width="80" />
|
||||
<el-table-column prop="code" label="代码" width="120" />
|
||||
<el-table-column prop="name" label="名称" min-width="150" />
|
||||
<el-table-column prop="corp_id" label="企业ID" width="200" show-overflow-tooltip />
|
||||
<el-table-column prop="status" label="状态" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="getStatusType(row.status)" size="small">
|
||||
@@ -210,6 +214,9 @@ onMounted(() => {
|
||||
<el-form-item label="租户名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="公司/组织名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="企业ID">
|
||||
<el-input v-model="form.corp_id" placeholder="企业微信企业ID,ww开头" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="form.status" style="width: 100%">
|
||||
<el-option label="活跃" value="active" />
|
||||
|
||||
Reference in New Issue
Block a user