|
@@ -1,7 +1,7 @@
|
|
|
import { BasicColumn } from '/@/components/Table';
|
|
|
import { FormSchema } from '/@/components/Table';
|
|
|
import { h } from 'vue';
|
|
|
-import { Switch } from 'ant-design-vue';
|
|
|
+// import { Switch } from 'ant-design-vue';
|
|
|
import { Time } from '/@/components/Time';
|
|
|
import { ListAllCompanyApi } from '/@/api/corporation/list';
|
|
|
|
|
@@ -26,38 +26,38 @@ export const columns: BasicColumn[] = [
|
|
|
// dataIndex: 'canShow',
|
|
|
// width: 50,
|
|
|
// },
|
|
|
- {
|
|
|
- title: '状态',
|
|
|
- dataIndex: 'canShow',
|
|
|
- width: 120,
|
|
|
- customRender: ({ record }) => {
|
|
|
- if (!Reflect.has(record, 'pendingStatus')) {
|
|
|
- record.pendingStatus = false;
|
|
|
- }
|
|
|
- return h(Switch, {
|
|
|
- checked: record.canShow === 0,
|
|
|
- checkedChildren: '已启用',
|
|
|
- unCheckedChildren: '已禁用',
|
|
|
- loading: record.pendingStatus as any as boolean,
|
|
|
- // onChange(checked: boolean) {
|
|
|
- // record.pendingStatus = true;
|
|
|
- // const newStatus = checked ? '1' : '0';
|
|
|
- // const { createMessage } = useMessage();
|
|
|
- // setRoleStatus(record.id, newStatus)
|
|
|
- // .then(() => {
|
|
|
- // record.status = newStatus;
|
|
|
- // createMessage.success(`已成功修改角色状态`);
|
|
|
- // })
|
|
|
- // .catch(() => {
|
|
|
- // createMessage.error('修改角色状态失败');
|
|
|
- // })
|
|
|
- // .finally(() => {
|
|
|
- // record.pendingStatus = false;
|
|
|
- // });
|
|
|
- // },
|
|
|
- });
|
|
|
- },
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // title: '状态',
|
|
|
+ // dataIndex: 'canShow',
|
|
|
+ // width: 120,
|
|
|
+ // customRender: ({ record }) => {
|
|
|
+ // if (!Reflect.has(record, 'pendingStatus')) {
|
|
|
+ // record.pendingStatus = false;
|
|
|
+ // }
|
|
|
+ // return h(Switch, {
|
|
|
+ // checked: record.canShow === 0,
|
|
|
+ // checkedChildren: '已启用',
|
|
|
+ // unCheckedChildren: '已禁用',
|
|
|
+ // loading: record.pendingStatus as any as boolean,
|
|
|
+ // // onChange(checked: boolean) {
|
|
|
+ // // record.pendingStatus = true;
|
|
|
+ // // const newStatus = checked ? '1' : '0';
|
|
|
+ // // const { createMessage } = useMessage();
|
|
|
+ // // setRoleStatus(record.id, newStatus)
|
|
|
+ // // .then(() => {
|
|
|
+ // // record.status = newStatus;
|
|
|
+ // // createMessage.success(`已成功修改角色状态`);
|
|
|
+ // // })
|
|
|
+ // // .catch(() => {
|
|
|
+ // // createMessage.error('修改角色状态失败');
|
|
|
+ // // })
|
|
|
+ // // .finally(() => {
|
|
|
+ // // record.pendingStatus = false;
|
|
|
+ // // });
|
|
|
+ // // },
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+ // },
|
|
|
{
|
|
|
title: '创建时间',
|
|
|
dataIndex: 'createTime',
|
|
@@ -124,18 +124,18 @@ export const formSchema: FormSchema[] = [
|
|
|
required: true,
|
|
|
},
|
|
|
},
|
|
|
- {
|
|
|
- field: 'canShow',
|
|
|
- label: '状态',
|
|
|
- component: 'RadioButtonGroup',
|
|
|
- defaultValue: 0,
|
|
|
- componentProps: {
|
|
|
- options: [
|
|
|
- { label: '启用', value: 0 },
|
|
|
- { label: '停用', value: 1 },
|
|
|
- ],
|
|
|
- },
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // field: 'canShow',
|
|
|
+ // label: '状态',
|
|
|
+ // component: 'RadioButtonGroup',
|
|
|
+ // defaultValue: 0,
|
|
|
+ // componentProps: {
|
|
|
+ // options: [
|
|
|
+ // { label: '启用', value: 0 },
|
|
|
+ // { label: '停用', value: 1 },
|
|
|
+ // ],
|
|
|
+ // },
|
|
|
+ // },
|
|
|
{
|
|
|
label: '备注',
|
|
|
field: 'remark',
|