fix:profileId To citizenId
This commit is contained in:
parent
79d1a14ec4
commit
ae4e874f42
11 changed files with 68 additions and 18 deletions
|
|
@ -19,6 +19,7 @@ const { showLoader, hideLoader, messageError } = useCounterMixin();
|
|||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const command = defineModel<string>("command", { required: true });
|
||||
const commandId = defineModel<string>("commandId", { required: true });
|
||||
const citizenId = defineModel<string>("citizenId", { required: true });
|
||||
const promises = ref<any>([]);
|
||||
|
||||
const tab = ref<string>("main"); //tab
|
||||
|
|
@ -37,6 +38,7 @@ function closeDialog() {
|
|||
modal.value = false;
|
||||
command.value = "";
|
||||
commandId.value = "";
|
||||
citizenId.value = "";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -88,13 +90,25 @@ async function downloadCover(type: string) {
|
|||
*/
|
||||
async function fetchDataCommand(type: string) {
|
||||
let newType = type === "cover" ? "คำสั่ง" : "แนบท้าย";
|
||||
const pathAPI =
|
||||
type === "cover"
|
||||
? config.API.fileByFile(
|
||||
"ระบบออกคำสั่ง",
|
||||
newType,
|
||||
commandId.value,
|
||||
newType
|
||||
)
|
||||
: config.API.subFileByFileName(
|
||||
"ระบบออกคำสั่ง",
|
||||
newType,
|
||||
commandId.value,
|
||||
citizenId.value,
|
||||
newType
|
||||
);
|
||||
await http
|
||||
.get(
|
||||
config.API.fileByFile("ระบบออกคำสั่ง", newType, commandId.value, newType)
|
||||
)
|
||||
.get(pathAPI)
|
||||
.then(async (res) => {
|
||||
const data = res.data;
|
||||
console.log(res);
|
||||
|
||||
if (type === "cover") {
|
||||
dataCover.value = data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue