|
@@ -30,8 +30,12 @@ const renderTableRef = useCompShallowRef(RenderTable);
|
|
|
const formRef = useCompShallowRef(ElForm);
|
|
|
|
|
|
async function handleQueryBusiness(business) {
|
|
|
+ const url = store.templateTypeList.find(
|
|
|
+ item => item.code === params.templateType
|
|
|
+ )?.url;
|
|
|
+
|
|
|
return await magicApi({
|
|
|
- url: "/public/dashboard/dataSource",
|
|
|
+ url: url,
|
|
|
method: "post",
|
|
|
data: {
|
|
|
isSource: false,
|
|
@@ -50,7 +54,7 @@ async function handleQueryBusiness(business) {
|
|
|
|
|
|
async function handleQuery() {
|
|
|
await formRef.value.validate();
|
|
|
- store.htmlData = await magicApi({
|
|
|
+ const tmp = await magicApi({
|
|
|
url: "/public/dashboard/getTemplate",
|
|
|
method: "get",
|
|
|
params: {
|
|
@@ -59,7 +63,11 @@ async function handleQuery() {
|
|
|
},
|
|
|
});
|
|
|
await nextTick();
|
|
|
- renderTableRef.value.reloadData();
|
|
|
+ if (tmp === store.htmlData) {
|
|
|
+ renderTableRef.value.reloadData();
|
|
|
+ } else {
|
|
|
+ store.htmlData = tmp;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|