|
@@ -69,15 +69,18 @@
|
|
|
const companyLayoutList = ref<companyLayoutType[]>([]);
|
|
const companyLayoutList = ref<companyLayoutType[]>([]);
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
- getCompanyLayoutList().then((res) => {
|
|
|
|
|
|
|
+ getList('');
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ const getList = (searchCom) => {
|
|
|
|
|
+ getCompanyLayoutList({ name: searchCom }).then((res) => {
|
|
|
companyLayoutList.value = res;
|
|
companyLayoutList.value = res;
|
|
|
companyLayoutList.value = companyLayoutList.value.map((item) => {
|
|
companyLayoutList.value = companyLayoutList.value.map((item) => {
|
|
|
item.layout = JSON.parse(item.layout);
|
|
item.layout = JSON.parse(item.layout);
|
|
|
return item;
|
|
return item;
|
|
|
});
|
|
});
|
|
|
- console.log('companyLayoutList.value', companyLayoutList.value);
|
|
|
|
|
});
|
|
});
|
|
|
- });
|
|
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
|
|
|
|
@@ -115,16 +118,12 @@
|
|
|
const deleteItem = (item) => {
|
|
const deleteItem = (item) => {
|
|
|
// 处理删除逻辑
|
|
// 处理删除逻辑
|
|
|
delCompanyLayout(item.id).then(() => {
|
|
delCompanyLayout(item.id).then(() => {
|
|
|
- getCompanyLayoutList().then((res) => {
|
|
|
|
|
- companyLayoutList.value = res;
|
|
|
|
|
- companyLayoutList.value = companyLayoutList.value.map((item) => {
|
|
|
|
|
- item.layout = JSON.parse(item.layout);
|
|
|
|
|
- return item;
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ getList('');
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ defineExpose({ getList });
|
|
|
|
|
+
|
|
|
// const label = ref('');
|
|
// const label = ref('');
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|