|
@@ -5,6 +5,7 @@ import { updateWhatsappChannel } from '@/api/whatsapp_channel/whatsappChannel';
|
|
import { Switch } from 'ant-design-vue';
|
|
import { Switch } from 'ant-design-vue';
|
|
import { h } from 'vue';
|
|
import { h } from 'vue';
|
|
import { getDepartmentList } from '/@/api/sys/department';
|
|
import { getDepartmentList } from '/@/api/sys/department';
|
|
|
|
+import { getWhatsappChannelList } from '@/api/whatsapp_channel/whatsappChannel';
|
|
|
|
|
|
import { useUserStore } from '@/store/modules/user';
|
|
import { useUserStore } from '@/store/modules/user';
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
@@ -50,15 +51,33 @@ export const columns: BasicColumn[] = [
|
|
export const searchFormSchema: FormSchema[] = [
|
|
export const searchFormSchema: FormSchema[] = [
|
|
{
|
|
{
|
|
ifShow: isSuper,
|
|
ifShow: isSuper,
|
|
- field: 'organizationName',
|
|
|
|
|
|
+ field: 'organizationId',
|
|
label: t('whatsapp_channel.whatsappChannel.organizationName'),
|
|
label: t('whatsapp_channel.whatsappChannel.organizationName'),
|
|
- component: 'Input',
|
|
|
|
|
|
+ component: 'ApiSelect',
|
|
|
|
+ componentProps: () => ({
|
|
|
|
+ api: (params) => getDepartmentList(params).then(response => {
|
|
|
|
+ return response.data.data.map((label) => ({
|
|
|
|
+ label: label.name,
|
|
|
|
+ value: label.id
|
|
|
|
+ }));
|
|
|
|
+ }),
|
|
|
|
+ params: { page: 1, pageSize: 1000, type: 1 },
|
|
|
|
+ }),
|
|
colProps: { span: 8 },
|
|
colProps: { span: 8 },
|
|
},
|
|
},
|
|
{
|
|
{
|
|
field: 'waName',
|
|
field: 'waName',
|
|
label: t('whatsapp_channel.whatsappChannel.waName'),
|
|
label: t('whatsapp_channel.whatsappChannel.waName'),
|
|
- component: 'Input',
|
|
|
|
|
|
+ component: 'ApiSelect',
|
|
|
|
+ componentProps: () => ({
|
|
|
|
+ api: (params) => getWhatsappChannelList(params).then(response => {
|
|
|
|
+ return response.data.data.map((label) => ({
|
|
|
|
+ label: label.waName,
|
|
|
|
+ value: label.waName
|
|
|
|
+ }));
|
|
|
|
+ }),
|
|
|
|
+ params: { page: 1, pageSize: 1000, type: 1 },
|
|
|
|
+ }),
|
|
colProps: { span: 8 },
|
|
colProps: { span: 8 },
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -70,7 +89,13 @@ export const searchFormSchema: FormSchema[] = [
|
|
{
|
|
{
|
|
field: 'wabaId',
|
|
field: 'wabaId',
|
|
label: t('whatsapp_channel.whatsappChannel.wabaId'),
|
|
label: t('whatsapp_channel.whatsappChannel.wabaId'),
|
|
- component: 'Input',
|
|
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
+ componentProps: {
|
|
|
|
+ style: {
|
|
|
|
+ width: '100%'
|
|
|
|
+ },
|
|
|
|
+ controls: false,
|
|
|
|
+ },
|
|
colProps: { span: 8 },
|
|
colProps: { span: 8 },
|
|
},
|
|
},
|
|
{
|
|
{
|