mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 12:31:07 +03:30
add qrcode and arcode for test type
This commit is contained in:
@@ -141,7 +141,7 @@
|
||||
<v-icon class="white--text mr-1 caption">fas fa-eye</v-icon>
|
||||
<span>Show</span>
|
||||
</v-btn>
|
||||
<v-btn color="orange" class="mr-2" @click="generateBarcode(item.id)">
|
||||
<v-btn color="orange" class="mr-2" @click="generateBarcode(item.id, 'TestResult')">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-eye</v-icon>
|
||||
<span>generate Barcode</span>
|
||||
</v-btn>
|
||||
@@ -313,8 +313,8 @@ export default {
|
||||
this.testTypes = result.data.data.TestTypes;
|
||||
}
|
||||
},
|
||||
async generateBarcode(id) {
|
||||
const result = await ApiService.post(urls.TestResultQRcode(id));
|
||||
async generateBarcode(id, type) {
|
||||
const result = await ApiService.post(urls.Barcode(id, type));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-barcode-barcode",
|
||||
|
||||
@@ -116,6 +116,10 @@
|
||||
<v-icon class="white--text mr-1 caption">fas fa-folder</v-icon>
|
||||
<span>Archive</span>
|
||||
</v-btn>
|
||||
<v-btn color="orange darken-1" @click="generateBarcode(item.id, 'TestType')">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-barcode</v-icon>
|
||||
<span>Generate Barcode</span>
|
||||
</v-btn>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
@@ -140,6 +144,8 @@
|
||||
<script>
|
||||
import { ApiService } from "@/services";
|
||||
import { urls } from "@/config/urls";
|
||||
import { mapMutations, mapGetters } from "vuex";
|
||||
|
||||
export default {
|
||||
data: () => ({
|
||||
headers: [
|
||||
@@ -187,6 +193,7 @@ export default {
|
||||
this.load();
|
||||
},
|
||||
methods: {
|
||||
...mapMutations("modal", ["changeCurrentModal"]),
|
||||
async load(page = 1) {
|
||||
let filter = "?";
|
||||
for (const key in this.filter) {
|
||||
@@ -215,6 +222,15 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
async generateBarcode(code, type) {
|
||||
const result = await ApiService.post(urls.Barcode(code, type));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-barcode-barcode",
|
||||
properties: { result }
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
currentPage(page) {
|
||||
|
||||
Reference in New Issue
Block a user