Refactoring code module 14_KPI
This commit is contained in:
parent
bd33093d3e
commit
76118a8d11
37 changed files with 827 additions and 1675 deletions
|
|
@ -1,8 +1,9 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import axios from "axios";
|
||||
import { useQuasar } from "quasar";
|
||||
import axios from "axios";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -33,6 +34,7 @@ const isReadonly = ref<boolean>(
|
|||
const documentFile = ref<any>(null);
|
||||
const fileList = ref<ArrayFileList[]>([]);
|
||||
|
||||
/** ดึงข้อมูล */
|
||||
async function getData() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -48,6 +50,11 @@ async function getData() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* อัปโหลดไฟล์
|
||||
* @param uploadUrl url
|
||||
* @param file ไฟล์
|
||||
*/
|
||||
async function uploadFileDoc(uploadUrl: string, file: any) {
|
||||
const Data = new FormData();
|
||||
Data.append("file", documentFile.value);
|
||||
|
|
@ -69,6 +76,8 @@ async function uploadFileDoc(uploadUrl: string, file: any) {
|
|||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/** ฟังชั่น อัปโหลดไฟล์ */
|
||||
async function clickUpload(file: any) {
|
||||
const fileName = { fileName: file.name };
|
||||
|
||||
|
|
@ -101,6 +110,7 @@ async function clickUpload(file: any) {
|
|||
"ต้องการยืนยันการอัปโหลดไฟล์นี้หรือไม่ ?"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ดาวน์โหลดลิงก์ไฟล์
|
||||
* @param fileName file name
|
||||
|
|
@ -187,8 +197,6 @@ onMounted(() => {
|
|||
>
|
||||
</template>
|
||||
</q-file>
|
||||
|
||||
<!-- <div class="col-1 self-center" v-if="formData.documentFile"></div> -->
|
||||
</div>
|
||||
|
||||
<div v-if="fileList.length > 0" class="col-xs-12 row">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue