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