|
@@ -22,12 +22,20 @@ export const columns: BasicColumn[] = [
|
|
|
dataIndex: 'status',
|
|
|
width: 130,
|
|
|
sorter: true,
|
|
|
+ customRender({ record }) {
|
|
|
+ const options = ['个人', '单位'];
|
|
|
+ return options[record.status];
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
title: '职务',
|
|
|
dataIndex: 'duty',
|
|
|
width: 130,
|
|
|
sorter: true,
|
|
|
+ customRender({ record }) {
|
|
|
+ const options = ['会长', '副会长', '秘书长', '副秘书长', '理事', '会员'];
|
|
|
+ return options[record.duty];
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
title: '入会时间',
|
|
@@ -249,11 +257,15 @@ export const schemas: FormSchema[] = [
|
|
|
colProps: {
|
|
|
span: adaptWidth.elContainer,
|
|
|
},
|
|
|
- componentProps: {
|
|
|
- options: [
|
|
|
- { label: '个人', value: 0 },
|
|
|
- { label: '单位', value: 1 },
|
|
|
- ],
|
|
|
+ componentProps: (value) => {
|
|
|
+ console.log(`value ---- status`, value);
|
|
|
+ return {
|
|
|
+ // disabled: true,
|
|
|
+ options: [
|
|
|
+ { label: '个人', value: 0 },
|
|
|
+ { label: '单位', value: 1 },
|
|
|
+ ],
|
|
|
+ };
|
|
|
},
|
|
|
defaultValue: 0,
|
|
|
},
|
|
@@ -267,8 +279,7 @@ export const schemas: FormSchema[] = [
|
|
|
},
|
|
|
render: ({ model, field }) => {
|
|
|
return h(CustomInput, {
|
|
|
- value: model[field],
|
|
|
- disabled: true,
|
|
|
+ value: model.name,
|
|
|
placeholder: '添加个人',
|
|
|
onChange(value) {
|
|
|
model[field] = value;
|
|
@@ -276,7 +287,6 @@ export const schemas: FormSchema[] = [
|
|
|
});
|
|
|
},
|
|
|
show: ({ values }) => {
|
|
|
- console.log(`values`, values);
|
|
|
if (!values.status) {
|
|
|
return true;
|
|
|
}
|
|
@@ -290,7 +300,7 @@ export const schemas: FormSchema[] = [
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- field: 'name',
|
|
|
+ field: 'unitName',
|
|
|
component: 'Input',
|
|
|
label: '名称',
|
|
|
labelWidth: adaptWidth.labelWidth,
|
|
@@ -299,9 +309,10 @@ export const schemas: FormSchema[] = [
|
|
|
},
|
|
|
render: ({ model, field }) => {
|
|
|
return h(CustomInput, {
|
|
|
- value: model[field],
|
|
|
+ value: model.name,
|
|
|
placeholder: '添加单位',
|
|
|
onChange(value) {
|
|
|
+ model.name = value;
|
|
|
model[field] = value;
|
|
|
},
|
|
|
});
|
|
@@ -320,7 +331,7 @@ export const schemas: FormSchema[] = [
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- field: 'relation',
|
|
|
+ field: 'relationUnit',
|
|
|
component: 'Input',
|
|
|
label: '相关单位',
|
|
|
labelWidth: adaptWidth.labelWidth,
|