changes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="field is-grouped">
|
||||
<div class="field is-grouped is-flex-wrap-wrap">
|
||||
<div class="file is-primary m-0">
|
||||
<label class="file-label">
|
||||
<input
|
||||
@@ -21,6 +21,12 @@
|
||||
/>
|
||||
</span>
|
||||
<span class="font-medium">Chọn file</span>
|
||||
<span
|
||||
v-if="fileInfo"
|
||||
class="tag is-primary is-light ml-2"
|
||||
>
|
||||
{{ fileInfo.name }}
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
@@ -50,67 +56,70 @@
|
||||
</span>
|
||||
<span>Xuất Excel</span>
|
||||
</button>
|
||||
<template v-if="ready">
|
||||
<button
|
||||
v-if="countNew > 0"
|
||||
:class="['button is-success', isloading && 'is-loading']"
|
||||
@click="insert"
|
||||
>
|
||||
<span class="icon">
|
||||
<Icon
|
||||
name="material-symbols:add-rounded"
|
||||
:size="18"
|
||||
/>
|
||||
</span>
|
||||
<span>Thêm mới ({{ countNew }}/{{ total }})</span>
|
||||
</button>
|
||||
<button
|
||||
v-if="countUdt > 0"
|
||||
:class="['button is-primary', isloading && 'is-loading']"
|
||||
@click="update"
|
||||
>
|
||||
<span class="icon">
|
||||
<Icon
|
||||
name="material-symbols:edit-outline-rounded"
|
||||
:size="18"
|
||||
/>
|
||||
</span>
|
||||
<span>Cập nhật ({{ countUdt }}/{{ total }})</span>
|
||||
</button>
|
||||
</template>
|
||||
</div>
|
||||
<div
|
||||
class="fixed-grid has-12-cols"
|
||||
class="block"
|
||||
v-if="msgInfo.length > 0"
|
||||
>
|
||||
<div class="grid">
|
||||
<div class="cell is-col-span-9">
|
||||
<div class="notification fs-14">
|
||||
<button
|
||||
class="delete"
|
||||
@click="msgInfo = []"
|
||||
></button>
|
||||
<div
|
||||
class="content"
|
||||
style="max-height: 250px; overflow-y: auto"
|
||||
>
|
||||
<p
|
||||
v-for="(ele, i) in msgInfo"
|
||||
:key="i"
|
||||
class="mb-2"
|
||||
>
|
||||
<span class="icon-text">
|
||||
<span class="icon">
|
||||
<Icon
|
||||
:name="classinfo.find((v) => v.type === ele.type).icon"
|
||||
:size="18"
|
||||
:class="classinfo.find((v) => v.type === ele.type).color"
|
||||
/>
|
||||
</span>
|
||||
<span v-html="ele.message"></span>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<p v-if="result">
|
||||
<span class="has-text-primary fsb-18">Thành công: {{ result.success_count || 0 }} / {{ total || "" }}</span>
|
||||
<span class="has-text-danger fsb-18 ml-5">{{ `Lỗi: ${result.error_count || 0}` }} / {{ total || "" }}</span>
|
||||
<div class="notification fs-14">
|
||||
<button
|
||||
class="delete"
|
||||
@click="msgInfo = []"
|
||||
></button>
|
||||
<div
|
||||
class="content"
|
||||
style="max-height: 250px; overflow-y: auto"
|
||||
>
|
||||
<p
|
||||
v-for="(ele, i) in msgInfo"
|
||||
:key="i"
|
||||
class="mb-2"
|
||||
>
|
||||
<span class="icon-text">
|
||||
<span class="icon">
|
||||
<Icon
|
||||
:name="classinfo.find((v) => v.type === ele.type).icon"
|
||||
:size="18"
|
||||
:class="classinfo.find((v) => v.type === ele.type).color"
|
||||
/>
|
||||
</span>
|
||||
<span v-html="ele.message"></span>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
v-if="ready"
|
||||
class="cell is-col-span-3"
|
||||
>
|
||||
<div class="buttons">
|
||||
<button
|
||||
v-if="countNew > 0"
|
||||
:class="['button is-success', isloading && 'is-loading']"
|
||||
@click="insert"
|
||||
>
|
||||
Thêm mới ({{ countNew }}/{{ total }})
|
||||
</button>
|
||||
<button
|
||||
v-if="countUdt > 0"
|
||||
:class="['button is-primary is-light', isloading && 'is-loading']"
|
||||
@click="update"
|
||||
>
|
||||
Cập nhật ({{ countUdt }}/{{ total }})
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p v-if="result">
|
||||
<span class="has-text-primary fsb-18">Thành công: {{ result.success_count || 0 }} / {{ total || "" }}</span>
|
||||
<span class="has-text-danger fsb-18 ml-5">{{ `Lỗi: ${result.error_count || 0}` }} / {{ total || "" }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<DataTable
|
||||
v-if="pagedata"
|
||||
|
||||
Reference in New Issue
Block a user