chore: clean unuse
This commit is contained in:
parent
5c03a12aa9
commit
56cdfa5016
1 changed files with 1 additions and 40 deletions
|
|
@ -6,17 +6,13 @@ import { getUserId, getRole } from 'src/services/keycloak';
|
|||
import { storeToRefs } from 'pinia';
|
||||
import { useQuasar, type QTableProps } from 'quasar';
|
||||
import ItemCard from 'components/ItemCard.vue';
|
||||
import AppBox from 'components/app/AppBox.vue';
|
||||
import AddButton from 'components/AddButton.vue';
|
||||
import ProductCardComponent from 'components/04_product-service/ProductCardComponent.vue';
|
||||
import StatCard from 'components/StatCardComponent.vue';
|
||||
import DrawerInfo from 'components/DrawerInfo.vue';
|
||||
import BasicInformation from 'components/04_product-service/BasicInformation.vue';
|
||||
import TooltipComponent from 'components/TooltipComponent.vue';
|
||||
import ButtonAddComponent from 'components/ButtonAddCompoent.vue';
|
||||
import BasicInfoProduct from 'components/04_product-service/BasicInfoProduct.vue';
|
||||
import PriceDataComponent from 'components/04_product-service/PriceDataComponent.vue';
|
||||
import ProfileUpload from 'components/ProfileUpload.vue';
|
||||
import TotalProductCardComponent from 'components/04_product-service/TotalProductCardComponent.vue';
|
||||
import FormServiceWork from 'components/04_product-service/FormServiceWork.vue';
|
||||
import ServiceProperties from 'components/04_product-service/ServiceProperties.vue';
|
||||
|
|
@ -96,8 +92,6 @@ const {
|
|||
createWork,
|
||||
editWork,
|
||||
deleteWork,
|
||||
|
||||
fetchListProductAndService,
|
||||
} = productServiceStore;
|
||||
|
||||
const { workNameItems, recordTreeProductType } =
|
||||
|
|
@ -455,26 +449,6 @@ const branchOption = ref<{ id: string; name: string }[]>([]);
|
|||
|
||||
const currentStatus = ref<Status | 'All'>('All');
|
||||
|
||||
const inputFile = (() => {
|
||||
const element = document.createElement('input');
|
||||
element.type = 'file';
|
||||
element.accept = 'image/*';
|
||||
|
||||
const reader = new FileReader();
|
||||
reader.addEventListener('load', () => {
|
||||
if (typeof reader.result === 'string') profileUrl.value = reader.result;
|
||||
});
|
||||
|
||||
element.addEventListener('change', () => {
|
||||
imageProduct.value = element.files?.[0];
|
||||
if (imageProduct.value) {
|
||||
reader.readAsDataURL(imageProduct.value);
|
||||
}
|
||||
});
|
||||
|
||||
return element;
|
||||
})();
|
||||
|
||||
async function searchProduct(isAdd: boolean = true) {
|
||||
const res = await fetchListProduct({
|
||||
query: inputSearchProductAndService.value,
|
||||
|
|
@ -1314,18 +1288,6 @@ function handleHold(node: ProductGroup) {
|
|||
};
|
||||
}
|
||||
|
||||
async function handleImageUpload(file: File | null, url: string | null) {
|
||||
// if (!infoProductEdit.value && !dialogProductEdit.value) {
|
||||
// infoProductEdit.value = true;
|
||||
// await submitProduct();
|
||||
// infoProductEdit.value = false;
|
||||
// }
|
||||
// if (infoProductEdit.value && !dialogProductEdit.value) {
|
||||
// await submitProduct();
|
||||
// }
|
||||
// imageDialog.value = false;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
utilsStore.currentTitle.title = 'mainProductTitle';
|
||||
utilsStore.currentTitle.path = [
|
||||
|
|
@ -4653,10 +4615,9 @@ watch(
|
|||
ref="refImageUpload"
|
||||
v-model:dialogState="imageDialog"
|
||||
v-model:file="profileFileImg"
|
||||
:hidden-footer="!infoProductEdit && !infoServiceEdit"
|
||||
v-model:image-url="profileUrl as string"
|
||||
:hidden-footer="!infoProductEdit && !infoServiceEdit"
|
||||
clearButton
|
||||
@save="handleImageUpload"
|
||||
>
|
||||
<template #error>
|
||||
<div class="full-height full-width" style="background: var(--surface-1)">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue