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