|
|
@ -63,7 +63,7 @@ |
|
|
|
cancelText="取消" |
|
|
|
@ok="handleOk" |
|
|
|
@cancel="handleClose"> |
|
|
|
<ns-form :schemas="formSchema2" :model="formData2" /> |
|
|
|
<ns-form :schemas="formSchema2" :model="formData2" formLayout="vertical" /> |
|
|
|
</a-modal> |
|
|
|
</div> |
|
|
|
</template> |
|
|
@ -106,7 +106,7 @@ |
|
|
|
]); |
|
|
|
const mockData2 = ref([ |
|
|
|
{ |
|
|
|
information: '1', |
|
|
|
information: '铁路局1/产品部1/产品总监1', |
|
|
|
}, |
|
|
|
]); |
|
|
|
|
|
|
@ -152,12 +152,18 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
const onEdit = () => { |
|
|
|
console.log(formData.value, 'formData.value'); |
|
|
|
opMap.fuc && opMap.fuc(formData.value); |
|
|
|
visible.value = false; |
|
|
|
}; |
|
|
|
|
|
|
|
const handleOk = () => { |
|
|
|
// opMap.fuc && opMap.fuc(formData2.value); |
|
|
|
console.log(formData2.value, 'formData2.value'); |
|
|
|
console.log(opMap.type, 'type'); |
|
|
|
if (opMap.type === 'add') { |
|
|
|
mockData2.value.push({ information: casData.value.join('/') }); |
|
|
|
} else { |
|
|
|
} |
|
|
|
addformvisible.value = false; |
|
|
|
}; |
|
|
|
const handleClose = () => { |
|
|
@ -207,12 +213,14 @@ |
|
|
|
label: '批量删除', |
|
|
|
type: 'primary', |
|
|
|
name: 'RoleTypeAdd', |
|
|
|
handle: () => {}, |
|
|
|
dynamicDisabled: (data: any) => { |
|
|
|
return data.list.length === 0; |
|
|
|
}, |
|
|
|
confirm: true, |
|
|
|
isReload: true, |
|
|
|
handle: (data: any) => { |
|
|
|
console.log(data.list); |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
params: { |
|
|
@ -310,9 +318,7 @@ |
|
|
|
// .then((res) => { |
|
|
|
// mainRef.value.nsTableRef.reload(); |
|
|
|
// }); |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
NsMessage.success('冻结成功'); |
|
|
|
}).catch(() => console.log('Oops errors!')); |
|
|
|
}, |
|
|
|
class: 'test', |
|
|
|
}); |
|
|
@ -347,7 +353,7 @@ |
|
|
|
uuid: 'uuid', |
|
|
|
}, |
|
|
|
confirm: true, |
|
|
|
handle: (record: any, name, reload) => { |
|
|
|
handle: (record: any, name: any, reload: any) => { |
|
|
|
console.log(record, name, reload, 'record'); |
|
|
|
mockData.value.splice(0, 1); |
|
|
|
}, |
|
|
@ -466,7 +472,7 @@ |
|
|
|
label: '删除', |
|
|
|
name: 'RoleTypeEdit', |
|
|
|
confirm: true, |
|
|
|
handle: (record: any, name, reload) => { |
|
|
|
handle: (record: any, name: any, reload: any) => { |
|
|
|
console.log(record, name, reload, 'record'); |
|
|
|
mockData2.value.splice(0, 1); |
|
|
|
}, |
|
|
@ -493,6 +499,7 @@ |
|
|
|
], |
|
|
|
}, |
|
|
|
}; |
|
|
|
const casData = ref([]); |
|
|
|
|
|
|
|
const formSchema = reactive([ |
|
|
|
{ |
|
|
@ -591,18 +598,22 @@ |
|
|
|
component: 'NsCascader', |
|
|
|
componentProps: { |
|
|
|
placeholder: '请选择', |
|
|
|
displayRender: ({ labels }: any) => { |
|
|
|
casData.value = labels; |
|
|
|
return labels.join('/'); |
|
|
|
}, |
|
|
|
options: [ |
|
|
|
{ |
|
|
|
value: 'zhejiang', |
|
|
|
value: '1', |
|
|
|
label: '铁路局', |
|
|
|
children: [ |
|
|
|
{ |
|
|
|
value: 'hangzhou', |
|
|
|
label: '铁路局1', |
|
|
|
value: '2', |
|
|
|
label: '产品部', |
|
|
|
children: [ |
|
|
|
{ |
|
|
|
value: 'xihu', |
|
|
|
label: '铁路局2', |
|
|
|
value: '3', |
|
|
|
label: '产品总监', |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|