changes
This commit is contained in:
@@ -46,10 +46,10 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
approvalcode: {
|
||||
get: function () {
|
||||
get() {
|
||||
return this.$store.state["approvalcode"];
|
||||
},
|
||||
set: function (val) {
|
||||
set(val) {
|
||||
this.$store.commit("updateStore", { name: "approvalcode", data: val });
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
<template>
|
||||
<div>
|
||||
<p v-html="content"></p>
|
||||
<p class="border-bottom mt-4 mb-5"></p>
|
||||
<div class="field is-grouped">
|
||||
<div class="control is-expanded">
|
||||
<div class="block">
|
||||
<p v-html="content"></p>
|
||||
</div>
|
||||
<div class="is-flex">
|
||||
<div class="buttons mb-0">
|
||||
<button
|
||||
class="button is-danger"
|
||||
@click="remove()"
|
||||
@click="remove"
|
||||
>
|
||||
Đồng ý
|
||||
</button>
|
||||
<button
|
||||
class="button is-dark ml-5"
|
||||
@click="cancel()"
|
||||
class="button is-white"
|
||||
@click="cancel"
|
||||
>
|
||||
Hủy bỏ
|
||||
Hủy
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
@@ -22,9 +23,9 @@
|
||||
v-if="duration"
|
||||
>
|
||||
<CountDown
|
||||
v-bind="{ duration: duration }"
|
||||
@close="cancel()"
|
||||
></CountDown>
|
||||
:duration="duration"
|
||||
@close="cancel"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -38,7 +39,7 @@ export default {
|
||||
},
|
||||
async remove() {
|
||||
let pagename = this.vbind.pagename;
|
||||
let pagedata = this.$store.state[pagename];
|
||||
let pagedata = this.$store[pagename];
|
||||
let name = pagedata.origin_api.name || this.vbind.api;
|
||||
let id = this.vbind.row.id;
|
||||
let result;
|
||||
@@ -50,7 +51,7 @@ export default {
|
||||
if (result === "error") return this.$dialog("Đã xảy ra lỗi, xóa dữ liệu thất bại", "Lỗi", "Error");
|
||||
this.$snackbar("Dữ liệu đã được xoá khỏi hệ thống", "Success");
|
||||
let arr = Array.isArray(id) ? id : [{ id: id }];
|
||||
let copy = this.$copy(this.$store.state[pagename].data);
|
||||
let copy = this.$copy(this.$store[pagename].data);
|
||||
arr.map((x) => {
|
||||
let index = copy.findIndex((v) => v.id === x.id);
|
||||
index >= 0 ? this.$delete(copy, index) : false;
|
||||
|
||||
Reference in New Issue
Block a user