|
@@ -168,31 +168,31 @@ export default defineComponent({
|
|
|
dataIndex: 'sort',
|
|
|
width: 80,
|
|
|
},
|
|
|
- {
|
|
|
- title: '是否显示',
|
|
|
- dataIndex: 'isShow',
|
|
|
- ifShow: getCheckPerm('case-display'),
|
|
|
- width: 80,
|
|
|
- customRender: ({ record }) => {
|
|
|
- if (!Reflect.has(record, 'pendingStatus')) {
|
|
|
- record.pendingStatus = false;
|
|
|
- }
|
|
|
- return h(Switch, {
|
|
|
- checked: record.isShow === 1,
|
|
|
- checkedChildren: '是',
|
|
|
- unCheckedChildren: '否',
|
|
|
- loading: false,
|
|
|
- onChange: async (checked: boolean) => {
|
|
|
- record.pendingStatus = true;
|
|
|
- const id: string = record.id || '';
|
|
|
- const newStatus = checked ? 1 : 0;
|
|
|
- Reflect.set(record, 'isShow', newStatus);
|
|
|
- await caseReleaseApi({ id: id, isShow: newStatus });
|
|
|
- createMessage.success(t('common.optSuccess'));
|
|
|
- // reload()
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // title: '是否显示',
|
|
|
+ // dataIndex: 'isShow',
|
|
|
+ // ifShow: getCheckPerm('case-display'),
|
|
|
+ // width: 80,
|
|
|
+ // customRender: ({ record }) => {
|
|
|
+ // if (!Reflect.has(record, 'pendingStatus')) {
|
|
|
+ // record.pendingStatus = false;
|
|
|
+ // }
|
|
|
+ // return h(Switch, {
|
|
|
+ // checked: record.isShow === 1,
|
|
|
+ // checkedChildren: '是',
|
|
|
+ // unCheckedChildren: '否',
|
|
|
+ // loading: false,
|
|
|
+ // onChange: async (checked: boolean) => {
|
|
|
+ // record.pendingStatus = true;
|
|
|
+ // const id: string = record.id || '';
|
|
|
+ // const newStatus = checked ? 1 : 0;
|
|
|
+ // Reflect.set(record, 'isShow', newStatus);
|
|
|
+ // await caseReleaseApi({ id: id, isShow: newStatus });
|
|
|
+ // createMessage.success(t('common.optSuccess'));
|
|
|
+ // // reload()
|
|
|
+ // },
|
|
|
+ // });
|
|
|
+ // },
|
|
|
},
|
|
|
];
|
|
|
const searchForm: Partial<FormProps> = {
|