fix Vue warn
This commit is contained in:
parent
5c06f82031
commit
faf9c4c7f3
4 changed files with 14 additions and 26 deletions
|
|
@ -1,11 +1,9 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref, reactive, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import axios from "axios";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
import type { DataOption } from "@/modules/04_registryPerson/interface/index/Main";
|
||||
|
|
@ -15,9 +13,6 @@ import type {
|
|||
} from "@/modules/04_registryPerson/interface/response/Main";
|
||||
import type { FormFilter } from "@/modules/04_registryPerson/interface/request/Main";
|
||||
|
||||
const $q = useQuasar();
|
||||
const { messageError } = useCounterMixin();
|
||||
|
||||
export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
||||
const route = useRoute();
|
||||
const tab = ref<string>("1");
|
||||
|
|
@ -188,7 +183,7 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
|||
|
||||
return res.data["เอกสารหลักฐาน"].uploadUrl;
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -216,7 +211,7 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
|||
);
|
||||
return res.data;
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -233,7 +228,7 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
|||
},
|
||||
});
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -261,6 +256,6 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
|||
createPathUploadFlie,
|
||||
getPathUploadFlie,
|
||||
uploadFile,
|
||||
tab
|
||||
tab,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,13 +1,10 @@
|
|||
import axios from "axios";
|
||||
import config from "@/app.config";
|
||||
|
||||
import { useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const $q = useQuasar();
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
const { showLoader, hideLoader } = mixin;
|
||||
|
||||
async function genReport(
|
||||
data: any,
|
||||
|
|
@ -54,7 +51,7 @@ async function genReport(
|
|||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
|
|||
|
|
@ -1,13 +1,10 @@
|
|||
import axios from "axios";
|
||||
import config from "@/app.config";
|
||||
|
||||
import { useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const $q = useQuasar();
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
const { showLoader, hideLoader } = mixin;
|
||||
|
||||
async function genReportXLSX(
|
||||
data: any,
|
||||
|
|
@ -53,7 +50,7 @@ async function genReportXLSX(
|
|||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -12,8 +11,7 @@ import type {
|
|||
DataActing,
|
||||
} from "@/interface/main";
|
||||
|
||||
const $q = useQuasar();
|
||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||
const { showLoader, hideLoader } = useCounterMixin();
|
||||
|
||||
export const useStructureTree = defineStore("structureTree", () => {
|
||||
const activeId = ref<string>("");
|
||||
|
|
@ -48,7 +46,7 @@ export const useStructureTree = defineStore("structureTree", () => {
|
|||
const data = res.data.result;
|
||||
activeId.value = data.activeId;
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +69,8 @@ export const useStructureTree = defineStore("structureTree", () => {
|
|||
dataStore.value[sysKey] = data;
|
||||
return data;
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
return [];
|
||||
} finally {
|
||||
isLoad && hideLoader();
|
||||
}
|
||||
|
|
@ -89,7 +88,7 @@ export const useStructureTree = defineStore("structureTree", () => {
|
|||
dataStrategy.value = data;
|
||||
return data;
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
|
|
@ -110,7 +109,7 @@ export const useStructureTree = defineStore("structureTree", () => {
|
|||
dataActing.value = data;
|
||||
return data;
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue