Initial import
This commit is contained in:
577
one-ui/masterdata/one-md-mcunonlab/modules/mcunonlab.js
Normal file
577
one-ui/masterdata/one-md-mcunonlab/modules/mcunonlab.js
Normal file
@@ -0,0 +1,577 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/mcunonlab.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
last_id: -1,
|
||||
act: 'new',
|
||||
lookup_mcunonlab: 0,
|
||||
lookup_error_message: '',
|
||||
mcunonlabs: [],
|
||||
total_mcunonlabs: 0,
|
||||
total_filter_mcunonlabs: 0,
|
||||
selected_mcunonlab: {
|
||||
name: ""
|
||||
},
|
||||
save_status: 0,
|
||||
save_error_message: '',
|
||||
dialog_form_mcunonlab: false,
|
||||
dialog_edit_form_mcunonlab: false,
|
||||
alert_success: false,
|
||||
msg_success: "",
|
||||
show_all: 'N',
|
||||
errors: [],
|
||||
mcunonlabtypes: [],
|
||||
mcunonlabtype: {},
|
||||
doctors: [],
|
||||
doctor: {},
|
||||
get_data_status: 0,
|
||||
get_data_error_message: '',
|
||||
cities: [],
|
||||
detail_address: {},
|
||||
autocomplete_status: 0,
|
||||
search_status: 0,
|
||||
districts: [],
|
||||
district_address: {},
|
||||
kelurahans: [],
|
||||
kelurahan_address: {},
|
||||
instruments: [],
|
||||
instrument: {},
|
||||
autotemplates: [],
|
||||
autotemplate: {},
|
||||
nonlabs: [],
|
||||
selected_nonlab: {},
|
||||
current_page: 1,
|
||||
x_search: '',
|
||||
selected_filter_sex: {},
|
||||
selected_filter_flag: {},
|
||||
f_sexs: [],
|
||||
f_flags: []
|
||||
},
|
||||
mutations: {
|
||||
update_selected_filter_sex(state, val) {
|
||||
state.selected_filter_sex = val
|
||||
},
|
||||
update_selected_filter_flag(state, val) {
|
||||
state.selected_filter_flag = val
|
||||
},
|
||||
update_f_sexs(state, val) {
|
||||
state.f_sexs = val
|
||||
},
|
||||
update_f_flags(state, val) {
|
||||
state.f_flags = val
|
||||
},
|
||||
update_x_search(state, val) {
|
||||
state.x_search = val
|
||||
},
|
||||
update_current_page(state, val) {
|
||||
state.current_page = val
|
||||
},
|
||||
update_last_id(state, val) {
|
||||
state.last_id = val
|
||||
},
|
||||
update_act(state, val) {
|
||||
state.act = val
|
||||
},
|
||||
update_errors(state, val) {
|
||||
state.errors = val
|
||||
},
|
||||
update_show_all(state, val) {
|
||||
state.show_all = val
|
||||
},
|
||||
update_lookup_error_message(state, status) {
|
||||
state.lookup_error_message = status
|
||||
},
|
||||
update_lookup_mcunonlab(state, status) {
|
||||
state.lookup_mcunonlab = status
|
||||
},
|
||||
update_mcunonlabs(state, data) {
|
||||
state.mcunonlabs = data.records
|
||||
state.total_mcunonlabs = data.total
|
||||
state.total_filter_mcunonlabs = data.total_filter
|
||||
},
|
||||
update_selected_mcunonlab(state, val) {
|
||||
state.selected_mcunonlab = val
|
||||
},
|
||||
update_save_status(state, val) {
|
||||
state.save_status = val
|
||||
},
|
||||
update_save_error_message(state, val) {
|
||||
state.save_error_message = val
|
||||
},
|
||||
update_dialog_form_mcunonlab(state, val) {
|
||||
state.dialog_form_mcunonlab = val
|
||||
},
|
||||
update_dialog_edit_form_mcunonlab(state, val) {
|
||||
state.dialog_edit_form_mcunonlab = val
|
||||
},
|
||||
update_alert_success(state, val) {
|
||||
state.alert_success = val
|
||||
},
|
||||
update_msg_success(state, val) {
|
||||
state.msg_success = val
|
||||
},
|
||||
update_mcunonlabtypes(state, data) {
|
||||
state.mcunonlabtypes = data
|
||||
},
|
||||
update_mcunonlabtype(state, val) {
|
||||
state.mcunonlabtype = val
|
||||
},
|
||||
update_doctors(state, data) {
|
||||
state.doctors = data
|
||||
},
|
||||
update_doctor(state, val) {
|
||||
state.doctor = val
|
||||
},
|
||||
update_get_data_status(state, val) {
|
||||
state.get_data_status = val
|
||||
},
|
||||
update_get_data_error_message(state, val) {
|
||||
state.get_data_error_message = val
|
||||
},
|
||||
update_cities(state, val) {
|
||||
state.cities = val
|
||||
},
|
||||
update_detail_address(state, val) {
|
||||
state.detail_address = val
|
||||
},
|
||||
update_autocomplete_status(state, val) {
|
||||
state.autocomplete_status = val
|
||||
},
|
||||
update_districts(state, val) {
|
||||
state.districts = val
|
||||
},
|
||||
update_district_address(state, val) {
|
||||
state.district_address = val
|
||||
},
|
||||
update_kelurahans(state, val) {
|
||||
state.kelurahans = val
|
||||
},
|
||||
update_kelurahan_address(state, val) {
|
||||
state.kelurahan_address = val
|
||||
},
|
||||
update_instruments(state, data) {
|
||||
state.instruments = data
|
||||
},
|
||||
update_instrument(state, val) {
|
||||
state.instrument = val
|
||||
},
|
||||
update_autotemplates(state, data) {
|
||||
state.autotemplates = data
|
||||
},
|
||||
update_autotemplate(state, val) {
|
||||
state.autotemplate = val
|
||||
},
|
||||
update_nonlabs(state, val) {
|
||||
state.nonlabs = val
|
||||
},
|
||||
update_selected_nonlab(state, val) {
|
||||
state.selected_nonlab = val
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
actions: {
|
||||
async lookup(context, prm) {
|
||||
context.commit("update_lookup_mcunonlab", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.lookup(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_lookup_mcunonlab", 3)
|
||||
context.commit("update_lookup_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_lookup_mcunonlab", 2)
|
||||
context.commit("update_lookup_error_message", "")
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total,
|
||||
total_filter: resp.data.total_filter
|
||||
}
|
||||
context.commit("update_mcunonlabs", data)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_lookup_mcunonlab", 3)
|
||||
context.commit("update_lookup_error_message", e.message)
|
||||
}
|
||||
},
|
||||
async lookupbyname(context, prm) {
|
||||
context.commit("update_lookup_mcunonlab", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.lookupbyname(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_lookup_mcunonlab", 3)
|
||||
context.commit("update_lookup_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_lookup_mcunonlab", 2)
|
||||
context.commit("update_lookup_error_message", "")
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total,
|
||||
total_filter: resp.data.total_filter
|
||||
}
|
||||
context.commit("update_mcunonlabs", data)
|
||||
if (prm.lastid === -1) {
|
||||
var pat = data.records[0]
|
||||
context.commit("update_selected_mcunonlab", data.records[0])
|
||||
if (prm.mcunonlab != "") {
|
||||
context.dispatch("mcunormalnonlab/lookup", {
|
||||
id: pat.id,
|
||||
mcunormalnonlabina: '',
|
||||
mcunormalnonlabeng: '',
|
||||
status: 'A',
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
}, {
|
||||
root: true
|
||||
})
|
||||
context.commit("detail/update_automcunonlabs", [{
|
||||
Nat_NormalValueID: pat.Nat_NormalValueID,
|
||||
Nat_NormalValueName: pat.Nat_NormalValueName
|
||||
}], {
|
||||
root: true
|
||||
})
|
||||
context.commit("detail/update_automcunonlab", {
|
||||
Nat_NormalValueID: pat.Nat_NormalValueID,
|
||||
Nat_NormalValueName: pat.Nat_NormalValueName
|
||||
}, {
|
||||
root: true
|
||||
})
|
||||
}
|
||||
}else{
|
||||
var pat = data.records[prm.lastid]
|
||||
context.commit("update_selected_mcunonlab", data.records[prm.lastid])
|
||||
if (prm.mcunonlab != "") {
|
||||
context.dispatch("mcunormalnonlab/lookup", {
|
||||
id: pat.id,
|
||||
mcunormalnonlabina: '',
|
||||
mcunormalnonlabeng: '',
|
||||
status: 'A',
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
}, {
|
||||
root: true
|
||||
})
|
||||
context.commit("detail/update_automcunonlabs", [{
|
||||
Nat_NormalValueID: pat.Nat_NormalValueID,
|
||||
Nat_NormalValueName: pat.Nat_NormalValueName
|
||||
}], {
|
||||
root: true
|
||||
})
|
||||
context.commit("detail/update_automcunonlab", {
|
||||
Nat_NormalValueID: pat.Nat_NormalValueID,
|
||||
Nat_NormalValueName: pat.Nat_NormalValueName
|
||||
}, {
|
||||
root: true
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_lookup_mcunonlab", 3)
|
||||
context.commit("update_lookup_error_message", e.message)
|
||||
}
|
||||
},
|
||||
async getsexreg(context) {
|
||||
context.commit("update_get_data_status", 1)
|
||||
try {
|
||||
let resp = await api.getsexreg(one_token())
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status", 3)
|
||||
} else {
|
||||
context.commit("update_get_data_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_f_sexs", data.records.f_sexs)
|
||||
context.commit("update_f_flags", data.records.f_flags)
|
||||
context.commit("mcunormalnonlab/update_f_statuss", data.records.f_statuss,{
|
||||
root: true
|
||||
})
|
||||
context.commit("update_selected_filter_sex", data.records.f_sexs[0])
|
||||
context.commit("update_selected_filter_flag", data.records.f_flags[0])
|
||||
context.commit("mcunormalnonlab/update_selected_filter_status", data.records.f_statuss[0],{
|
||||
root: true
|
||||
})
|
||||
prm.sexid = data.records.f_sexs[0].Nat_SexID
|
||||
prm.flagid = data.records.f_flags[0].Nat_FlagID
|
||||
context.dispatch("lookupbyname", prm)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_get_data_status", 3)
|
||||
}
|
||||
},
|
||||
async save(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.save(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
var data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
|
||||
if (data.total !== -1) {
|
||||
context.commit("update_errors", [])
|
||||
context.commit("update_alert_success", true)
|
||||
context.commit("update_dialog_form_mcunonlab", false)
|
||||
var msg = "Kelompok Hasil" + prm.name + " sudah tersimpan dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
context.dispatch("lookupbyname", {
|
||||
mcunonlab: prm.smcunonlab,
|
||||
detail: prm.sdetail,
|
||||
district: prm.sdistrict,
|
||||
kelurahan: prm.skelurahan,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
} else {
|
||||
context.commit("update_errors", resp.data.errors)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async update(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.update(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
|
||||
if (data.total !== -1) {
|
||||
context.commit("update_alert_success", true)
|
||||
context.commit("update_dialog_form_mcunonlab", false)
|
||||
var msg = "Kelompok Hasil" + prm.name + " sudah terupdate dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
context.dispatch("lookupbyname", {
|
||||
mcunonlab: prm.smcunonlab,
|
||||
detail: prm.sdetail,
|
||||
district: prm.sdistrict,
|
||||
kelurahan: prm.skelurahan,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
} else {
|
||||
context.commit("update_errors", resp.data.errors)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async delete(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
let resp = await api.xdelete(one_token(), prm.mcunonlabid)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
context.commit("update_alert_success", true)
|
||||
|
||||
var msg = "Kelompok Hasil" + prm.name + " sudah dihapus dong"
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_alert_success", true)
|
||||
context.commit("update_selected_mcunonlab", {})
|
||||
context.dispatch("lookupbyname", {
|
||||
mcunonlab: prm.smcunonlab,
|
||||
detail: prm.sdetail,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
context.dispatch("detail/lookupbyname", {
|
||||
mcunonlab: prm.smcunonlab,
|
||||
detail: prm.sdetail,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
}, {
|
||||
root: true
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async selectnonlab(context) {
|
||||
context.commit("update_get_data_status", 1)
|
||||
try {
|
||||
let resp = await api.selectnonlab(one_token())
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status", 3)
|
||||
context.commit("update_get_data_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_get_data_status", 2)
|
||||
context.commit("update_get_data_error_message", "")
|
||||
context.commit("update_nonlabs", resp.data.records.nonlabs)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_get_data_status", 3)
|
||||
context.commit("update_get_data_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async selectdoctor(context) {
|
||||
context.commit("update_get_data_status", 1)
|
||||
try {
|
||||
let resp = await api.selectdoctor(one_token())
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status", 3)
|
||||
context.commit("update_get_data_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_get_data_status", 2)
|
||||
context.commit("update_get_data_error_message", "")
|
||||
context.commit("update_doctors", resp.data.records.doctors)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_get_data_status", 3)
|
||||
context.commit("update_get_data_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async searchdetail(context, prm) {
|
||||
context.commit("update_autocomplete_status", 1)
|
||||
try {
|
||||
let resp = await api.searchdetail(one_token(), prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
} else {
|
||||
context.commit("update_autocomplete_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_cities", resp.data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
}
|
||||
},
|
||||
async searchdoctor(context, prm) {
|
||||
context.commit("update_autocomplete_status", 1)
|
||||
try {
|
||||
let resp = await api.searchdoctor(one_token(), prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
} else {
|
||||
context.commit("update_autocomplete_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_doctors", resp.data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
}
|
||||
},
|
||||
async searchinstrument(context, prm) {
|
||||
context.commit("update_autocomplete_status", 1)
|
||||
try {
|
||||
let resp = await api.searchinstrument(one_token(), prm.tes)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
} else {
|
||||
context.commit("update_autocomplete_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_instruments", resp.data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
}
|
||||
},
|
||||
async searchtemplate(context, prm) {
|
||||
context.commit("update_autocomplete_status", 1)
|
||||
try {
|
||||
let resp = await api.searchtemplate(one_token(), prm.tes)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
} else {
|
||||
context.commit("update_autocomplete_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_autotemplates", resp.data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
}
|
||||
},
|
||||
async getdistrict(context, prm) {
|
||||
context.commit("update_get_data_status", 1)
|
||||
try {
|
||||
let resp = await api.getdistrict(one_token(), prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status", 3)
|
||||
} else {
|
||||
context.commit("update_get_data_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_districts", resp.data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_get_data_status", 3)
|
||||
}
|
||||
},
|
||||
async getkelurahan(context, prm) {
|
||||
context.commit("update_get_data_status", 1)
|
||||
try {
|
||||
let resp = await api.getkelurahan(one_token(), prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status", 3)
|
||||
} else {
|
||||
context.commit("update_get_data_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_kelurahans", resp.data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_get_data_status", 3)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
729
one-ui/masterdata/one-md-mcunonlab/modules/mcunormalnonlab.js
Normal file
729
one-ui/masterdata/one-md-mcunonlab/modules/mcunormalnonlab.js
Normal file
@@ -0,0 +1,729 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/mcunormalnonlab.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
mcunormalnonlabs: [],
|
||||
mcunormalnonlabsarans:[],
|
||||
save_status: 0,
|
||||
save_error_message: '',
|
||||
dialog_form_mcunormalnonlab: false,
|
||||
dialog_status_order: false,
|
||||
lookup_mcunormalnonlab: 0,
|
||||
search_status: 0,
|
||||
errors: [],
|
||||
startdate: moment(new Date()).format('YYYY-MM-DD'),
|
||||
enddate: moment(new Date()).format('YYYY-MM-DD'),
|
||||
bases: [],
|
||||
base: {},
|
||||
omzettypes: [],
|
||||
omzettype: {},
|
||||
mcunormalnonlabtypes: [],
|
||||
mcunormalnonlabtype: {},
|
||||
agingtypes: [],
|
||||
agingtype: {},
|
||||
statuss: [],
|
||||
automcunonlabs:[],
|
||||
automcunonlab:{},
|
||||
autocitys:[],
|
||||
autocity:{},
|
||||
autodistricts:[],
|
||||
autodistrict:{},
|
||||
autokelurahans:[],
|
||||
autokelurahan:{},
|
||||
autotests:[],
|
||||
autotest:{},
|
||||
automous:[],
|
||||
automou:{},
|
||||
autodoctors:[],
|
||||
autodoctor:{},
|
||||
addressdoctors:[],
|
||||
addressdoctor:{},
|
||||
current_page:1,
|
||||
current_pagesaran:1,
|
||||
x_search: '',
|
||||
total_data: 0,
|
||||
total_datasaran: 0,
|
||||
selected_mcunormalnonlab: {
|
||||
name: ""
|
||||
},
|
||||
get_data_status: 0,
|
||||
get_data_error_message: '',
|
||||
new_mcunormalnonlab:'',
|
||||
value_new_mcunormalnonlab:'',
|
||||
new_mcunormalnonlabeng:'',
|
||||
value_new_mcunormalnonlabeng:'',
|
||||
selected_filter_status: {},
|
||||
f_statuss: [],
|
||||
mcunormalnonlabtext:'',
|
||||
mcunormalnonlabeng:'',
|
||||
dialog_saran:false,
|
||||
mcunormalnonlabtextsaran:'',
|
||||
mcunormalnonlabengsaran:''
|
||||
},
|
||||
mutations: {
|
||||
update_dialog_saran(state, val) {
|
||||
state.dialog_saran = val
|
||||
},
|
||||
update_mcunormalnonlabtextsaran(state, val) {
|
||||
state.mcunormalnonlabtextsaran = val
|
||||
},
|
||||
update_mcunormalnonlabengsaran(state, val) {
|
||||
state.mcunormalnonlabengsaran = val
|
||||
},
|
||||
update_mcunormalnonlabtext(state, val) {
|
||||
state.mcunormalnonlabtext = val
|
||||
},
|
||||
update_mcunormalnonlabeng(state, val) {
|
||||
state.mcunormalnonlabeng = val
|
||||
},
|
||||
update_selected_filter_status(state, val) {
|
||||
state.selected_filter_status = val
|
||||
},
|
||||
update_f_statuss(state, val) {
|
||||
state.f_statuss = val
|
||||
},
|
||||
update_value_new_mcunormalnonlab(state, val){
|
||||
state.value_new_mcunormalnonlab = val
|
||||
},
|
||||
update_new_mcunormalnonlab(state, val) {
|
||||
state.new_mcunormalnonlab = val
|
||||
},
|
||||
update_value_new_mcunormalnonlabeng(state, val){
|
||||
state.value_new_mcunormalnonlabeng = val
|
||||
},
|
||||
update_new_mcunormalnonlabeng(state, val) {
|
||||
state.new_mcunormalnonlabeng = val
|
||||
},
|
||||
update_selected_mcunormalnonlab(state, val) {
|
||||
state.selected_mcunormalnonlab = val
|
||||
},
|
||||
update_x_search(state, val) {
|
||||
state.x_search = val
|
||||
},
|
||||
update_current_page(state, val) {
|
||||
state.current_page = val
|
||||
},
|
||||
update_total_data(state, val) {
|
||||
state.total_data = val
|
||||
},
|
||||
update_current_pagesaran(state, val) {
|
||||
state.current_pagesaran = val
|
||||
},
|
||||
update_total_datasaran(state, val) {
|
||||
state.total_datasaran = val
|
||||
},
|
||||
update_automcunonlabs(state,data){
|
||||
state.automcunonlabs = data
|
||||
},
|
||||
update_automcunonlab(state,val){
|
||||
state.automcunonlab = val
|
||||
},
|
||||
update_autocitys(state,data){
|
||||
state.autocitys = data
|
||||
},
|
||||
update_autocity(state,val){
|
||||
state.autocity = val
|
||||
},
|
||||
update_autotests(state,data){
|
||||
state.autotests = data
|
||||
},
|
||||
update_autotest(state,val){
|
||||
state.autotest = val
|
||||
},
|
||||
update_automous(state,data){
|
||||
state.automous = data
|
||||
},
|
||||
update_automou(state,val){
|
||||
state.automou = val
|
||||
},
|
||||
update_autodoctors(state,data){
|
||||
state.autodoctors = data
|
||||
},
|
||||
update_autodoctor(state,val){
|
||||
state.autodoctor = val
|
||||
},
|
||||
update_addressdoctors(state,data){
|
||||
state.addressdoctors = data
|
||||
},
|
||||
update_addressdoctor(state,val){
|
||||
state.addressdoctor = val
|
||||
},
|
||||
update_autodistricts(state,data){
|
||||
state.autodistricts = data
|
||||
},
|
||||
update_autodistrict(state,val){
|
||||
state.autodistrict = val
|
||||
},
|
||||
update_autokelurahans(state,data){
|
||||
state.autokelurahans = data
|
||||
},
|
||||
update_autokelurahan(state,val){
|
||||
state.autokelurahan = val
|
||||
},
|
||||
update_errors(state, val) {
|
||||
state.errors = val
|
||||
},
|
||||
update_mcunormalnonlabs(state, data) {
|
||||
state.mcunormalnonlabs = data
|
||||
},
|
||||
update_mcunormalnonlabsarans(state, data) {
|
||||
state.mcunormalnonlabsarans = data
|
||||
},
|
||||
update_save_status(state, val) {
|
||||
state.save_status = val
|
||||
},
|
||||
update_save_error_message(state, val) {
|
||||
state.save_error_message = val
|
||||
},
|
||||
update_dialog_form_mcunormalnonlab(state, val) {
|
||||
state.dialog_form_mcunormalnonlab = val
|
||||
},
|
||||
update_lookup_mcunormalnonlab(state, val) {
|
||||
state.lookup_mcunormalnonlab = val
|
||||
},
|
||||
update_startdate(state, val) {
|
||||
state.startdate = val
|
||||
},
|
||||
update_enddate(state, val) {
|
||||
state.enddate = val
|
||||
},
|
||||
update_bases(state, data) {
|
||||
state.bases = data
|
||||
},
|
||||
update_base(state, val) {
|
||||
state.base = val
|
||||
},
|
||||
update_omzettypes(state, data) {
|
||||
state.omzettypes = data
|
||||
},
|
||||
update_omzettype(state, val) {
|
||||
state.omzettype = val
|
||||
},
|
||||
update_mcunormalnonlabtypes(state, data) {
|
||||
state.mcunormalnonlabtypes = data
|
||||
},
|
||||
update_mcunormalnonlabtype(state, val) {
|
||||
state.mcunormalnonlabtype = val
|
||||
},
|
||||
update_agingtypes(state, data) {
|
||||
state.agingtypes = data
|
||||
},
|
||||
update_agingtype(state, val) {
|
||||
state.agingtype = val
|
||||
},
|
||||
update_search_status(state, val) {
|
||||
state.search_status = val
|
||||
},
|
||||
update_statuss(state, data) {
|
||||
state.statuss = data
|
||||
},
|
||||
update_dialog_status_order(state, val) {
|
||||
state.dialog_status_order = val
|
||||
},
|
||||
update_get_data_status(state, val) {
|
||||
state.get_data_status = val
|
||||
},
|
||||
update_get_data_error_message(state, val) {
|
||||
state.get_data_error_message = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async save(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.save(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
var data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
if (data.total !== -1) {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
context.commit("mcunonlab/update_alert_success", true, {
|
||||
root: true
|
||||
})
|
||||
|
||||
context.commit("update_dialog_form_mcunormalnonlab", false)
|
||||
var msg = "MCU Non Labsudah disimpan dong"
|
||||
context.commit("mcunonlab/update_msg_success", msg, {
|
||||
root: true
|
||||
})
|
||||
context.commit("mcunonlab/update_alert_success", true, {
|
||||
root: true
|
||||
})
|
||||
context.dispatch("lookup", {
|
||||
id: prm.mcunonlabid,
|
||||
mcunormalnonlabtext: '',
|
||||
status: prm.filterstatus,
|
||||
current_page: prm.current_page,
|
||||
lastid: -1
|
||||
})
|
||||
} else {
|
||||
context.commit("update_errors", resp.data.errors)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async saveaddeditmcunormalnonlab(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.saveaddeditmcunormalnonlab(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
var data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
if (data.total !== -1) {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
context.commit("mcunonlab/update_alert_success", true, {
|
||||
root: true
|
||||
})
|
||||
|
||||
context.commit("update_dialog_form_mcunormalnonlab", false)
|
||||
var msg = ''
|
||||
if(prm.status === 'N'){
|
||||
msg = "MCU Non Lab"+prm.name+" batal dipilih"
|
||||
}else{
|
||||
msg = "MCU Non Lab"+prm.name+" berhasil dipilih"
|
||||
}
|
||||
context.commit("mcunonlab/update_msg_success", msg, {
|
||||
root: true
|
||||
})
|
||||
context.commit("mcunonlab/update_alert_success", true, {
|
||||
root: true
|
||||
})
|
||||
context.dispatch("lookup", {
|
||||
id: prm.mcunonlabid,
|
||||
mcunormalnonlabtext: prm.mcunormalnonlabtext,
|
||||
status: prm.filterstatus,
|
||||
current_page: prm.current_page,
|
||||
lastid: -1
|
||||
})
|
||||
} else {
|
||||
context.commit("update_errors", resp.data.errors)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async saveEditSaran(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.saveeditsaran(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
var data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
if (data.total !== -1) {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
context.commit("mcunonlab/update_alert_success", true, {
|
||||
root: true
|
||||
})
|
||||
|
||||
context.commit("update_dialog_form_mcunormalnonlab", false)
|
||||
var msg = ''
|
||||
if(prm.status === 'Y'){
|
||||
msg = "Data telah diubah"
|
||||
}else{
|
||||
msg = "Data telah dihapus"
|
||||
}
|
||||
context.commit("mcunonlab/update_msg_success", msg, {
|
||||
root: true
|
||||
})
|
||||
context.commit("mcunonlab/update_alert_success", true, {
|
||||
root: true
|
||||
})
|
||||
context.dispatch("listing", {
|
||||
mcunormalnonlabtext: prm.mcunormalnonlabtext,
|
||||
current_page: prm.current_page,
|
||||
lastid: -1
|
||||
})
|
||||
context.dispatch("lookup", {
|
||||
id: prm.mcunonlabid,
|
||||
mcunormalnonlabtext: '',
|
||||
status: 'A',
|
||||
current_page: 1
|
||||
})
|
||||
context.commit("update_mcunormalnonlabtext", '')
|
||||
} else {
|
||||
context.commit("update_errors", resp.data.errors)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async saveallmcunormalnonlabdetail(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.saveallmcunormalnonlabdetail(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
var data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
if (data.total !== -1) {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
context.commit("mcunonlab/update_alert_success", true, {
|
||||
root: true
|
||||
})
|
||||
|
||||
context.commit("update_dialog_form_mcunormalnonlab", false)
|
||||
var msg = "MCU Non Labsudah disimpan dong"
|
||||
context.commit("mcunonlab/update_msg_success", msg, {
|
||||
root: true
|
||||
})
|
||||
context.commit("mcunonlab/update_alert_success", true, {
|
||||
root: true
|
||||
})
|
||||
context.dispatch("lookup", {
|
||||
id: prm.mcunonlabid,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
} else {
|
||||
context.commit("update_errors", resp.data.errors)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async lookupx(context, prm) {
|
||||
context.commit("update_lookup_mcunormalnonlab", 1)
|
||||
try {
|
||||
let resp = await api.lookupx(one_token(), prm.id)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_lookup_mcunormalnonlab", 3)
|
||||
} else {
|
||||
context.commit("update_lookup_mcunormalnonlab", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_mcunormalnonlabs", data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_lookup_mcunormalnonlab", 3)
|
||||
}
|
||||
},
|
||||
async lookup(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.lookup(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_mcunormalnonlabs", data.records)
|
||||
console.log('status')
|
||||
console.log(data.records.statuss)
|
||||
context.commit("update_statuss", data.records.statuss)
|
||||
context.commit("update_total_data", data.total)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async listing(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.listing(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_mcunormalnonlabsarans", data.records)
|
||||
context.commit("update_total_datasaran", data.total)
|
||||
console.log(data.total)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async lookupbyname(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.lookupbyname(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_mcunormalnonlabs", data.records)
|
||||
console.log(data.records)
|
||||
context.commit("update_total_data", data.total)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async getstatus(context) {
|
||||
context.commit("update_get_data_status", 1)
|
||||
try {
|
||||
let resp = await api.getstatus(one_token())
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status", 3)
|
||||
} else {
|
||||
context.commit("update_get_data_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_f_statuss", data.records.f_statuss)
|
||||
context.commit("update_selected_filter_status", data.records.f_statuss[0])
|
||||
prm.status = data.records.f_statuss[0].M_StatusID
|
||||
// context.dispatch("lookupbyname", prm)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_get_data_status", 3)
|
||||
}
|
||||
},
|
||||
async delete(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
let resp = await api.xdelete(one_token(), prm.xid)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("mcunonlab/update_save_status", 3, {
|
||||
root: true
|
||||
})
|
||||
context.commit("mcunonlab/update_save_error_message", resp.message, {
|
||||
root: true
|
||||
})
|
||||
} else {
|
||||
context.commit("mcunonlab/update_save_status", 2, {
|
||||
root: true
|
||||
})
|
||||
context.commit("mcunonlab/update_save_error_message", resp.message, {
|
||||
root: true
|
||||
})
|
||||
context.commit("mcunonlab/update_alert_success", true, {
|
||||
root: true
|
||||
})
|
||||
|
||||
//context.commit("update_dialog_form_schedule_promise", false)
|
||||
var msg = "Pemeriksaan sudah dihapus dong"
|
||||
context.commit("mcunonlab/update_msg_success", msg, {
|
||||
root: true
|
||||
})
|
||||
context.commit("mcunonlab/update_alert_success", true, {
|
||||
root: true
|
||||
})
|
||||
context.dispatch("lookupbyname", {
|
||||
mcunonlab: prm.smcunonlab,
|
||||
mcunormalnonlab: prm.smcunormalnonlab,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async searchmcunonlab(context,prm) {
|
||||
context.commit("mcunonlab/update_autocomplete_status",1,{root: true})
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.searchmcunonlab(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("mcunonlab/update_autocomplete_status",3,{root: true})
|
||||
} else {
|
||||
context.commit("mcunonlab/update_autocomplete_status",2,{root: true})
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_automcunonlabs",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("mcunonlab/update_autocomplete_status",3,{root: true})
|
||||
}
|
||||
},
|
||||
async searchcity(context,prm) {
|
||||
context.commit("mcunonlab/update_autocomplete_status",1,{root: true})
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.searchcity(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("mcunonlab/update_autocomplete_status",3,{root: true})
|
||||
} else {
|
||||
context.commit("mcunonlab/update_autocomplete_status",2,{root: true})
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_autocitys",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("mcunonlab/update_autocomplete_status",3,{root: true})
|
||||
}
|
||||
},
|
||||
async searchdistrict(context,prm) {
|
||||
context.commit("mcunonlab/update_autocomplete_status",1,{root: true})
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.searchdistrict(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("mcunonlab/update_autocomplete_status",3,{root: true})
|
||||
} else {
|
||||
context.commit("mcunonlab/update_autocomplete_status",2,{root: true})
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_autodistricts",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("mcunonlab/update_autocomplete_status",3,{root: true})
|
||||
}
|
||||
},
|
||||
async searchkelurahan(context,prm) {
|
||||
context.commit("mcunonlab/update_autocomplete_status",1,{root: true})
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.searchkelurahan(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("mcunonlab/update_autocomplete_status",3,{root: true})
|
||||
} else {
|
||||
context.commit("mcunonlab/update_autocomplete_status",2,{root: true})
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_autokelurahans",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("mcunonlab/update_autocomplete_status",3,{root: true})
|
||||
}
|
||||
},
|
||||
async searchtest(context,prm) {
|
||||
context.commit("mcunonlab/update_autocomplete_status",1,{root: true})
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.searchtest(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("mcunonlab/update_autocomplete_status",3,{root: true})
|
||||
} else {
|
||||
context.commit("mcunonlab/update_autocomplete_status",2,{root: true})
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_autotests",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("mcunonlab/update_autocomplete_status",3,{root: true})
|
||||
}
|
||||
},
|
||||
async searchmou(context,prm) {
|
||||
context.commit("mcunonlab/update_autocomplete_status",1,{root: true})
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.searchmou(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("mcunonlab/update_autocomplete_status",3,{root: true})
|
||||
} else {
|
||||
context.commit("mcunonlab/update_autocomplete_status",2,{root: true})
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_automous",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("mcunonlab/update_autocomplete_status",3,{root: true})
|
||||
}
|
||||
},
|
||||
async searchdoctor(context,prm) {
|
||||
context.commit("mcunonlab/update_autocomplete_status",1,{root: true})
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.searchdoctor(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("mcunonlab/update_autocomplete_status",3,{root: true})
|
||||
} else {
|
||||
context.commit("mcunonlab/update_autocomplete_status",2,{root: true})
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_autodoctors",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("mcunonlab/update_autocomplete_status",3,{root: true})
|
||||
}
|
||||
},
|
||||
async selectaddressdoctor(context,prm) {
|
||||
context.commit("update_get_data_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.selectaddressdoctor(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status", 3)
|
||||
context.commit("update_get_data_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_get_data_status", 2)
|
||||
context.commit("update_get_data_error_message", "")
|
||||
context.commit("update_addressdoctors", resp.data.records.addressdoctors)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_get_data_status", 3)
|
||||
context.commit("update_get_data_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user