Commit 398bf3ff by 张超军

loading样式

parent 7029d214
...@@ -6,15 +6,19 @@ ...@@ -6,15 +6,19 @@
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\store\modules\zwbj.js * @FilePath: \指纹系统\founder_vue\src\store\modules\zwbj.js
*/ */
import { SET_LOADING } from "./mutations-types"; import { SET_LOADING, SET_JUMPROUTE } from "./mutations-types";
const state = { const state = {
// 是否处于加载中 // 是否处于加载中
loading: false loading: false,
jumproute: true
}; };
const mutations = { const mutations = {
[SET_LOADING] (state, content) { [SET_LOADING] (state, content) {
state.loading = content state.loading = content
},
[SET_JUMPROUTE] (state, content) {
state.jumproute = content
} }
}; };
......
...@@ -21,3 +21,6 @@ export const SET_AJINFO = 'setAjInfo' ...@@ -21,3 +21,6 @@ export const SET_AJINFO = 'setAjInfo'
// 全局loading // 全局loading
export const SET_LOADING = 'setLoading' export const SET_LOADING = 'setLoading'
// 跳转路由
export const SET_JUMPROUTE = 'setJumpRoute'
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-22 09:42:07 * @Date: 2021-10-22 09:42:07
* @LastEditTime: 2021-11-22 11:00:22 * @LastEditTime: 2021-11-27 17:04:54
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\ryzwbjLeft.vue * @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\ryzwbjLeft.vue
...@@ -198,9 +198,9 @@ export default { ...@@ -198,9 +198,9 @@ export default {
* 获取案件指纹原图 * 获取案件指纹原图
*/ */
getCaseOrigin (seq) { getCaseOrigin (seq) {
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
this.$store.commit('zwbj/setSeq', seq)
let self = this let self = this
self.$store.commit('loading/setLoading', true)
this.$store.commit('zwbj/setSeq', seq)
this.$axios({ this.$axios({
method: 'post', method: 'post',
url: `/api/org/caseBybarcode/barcode/seq`, url: `/api/org/caseBybarcode/barcode/seq`,
...@@ -223,9 +223,8 @@ export default { ...@@ -223,9 +223,8 @@ export default {
}) })
clearTimeout(self.timer) clearTimeout(self.timer)
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null }, 500);
}, 1200);
}, },
/** /**
* 获取案件指纹 * 获取案件指纹
......
...@@ -3861,6 +3861,7 @@ export default { ...@@ -3861,6 +3861,7 @@ export default {
if (sessionArr.length == this.sessionCount) { if (sessionArr.length == this.sessionCount) {
return; return;
} else { } else {
this.$store.commit('loading/setJumpRoute', false)
this.$message.error("当前页面有未保存的指位!"); this.$message.error("当前页面有未保存的指位!");
} }
} }
......
...@@ -2104,6 +2104,8 @@ export default { ...@@ -2104,6 +2104,8 @@ export default {
file = event.target.files[0]; file = event.target.files[0];
console.log(file, 222222222); console.log(file, 222222222);
imageEditor.loadImageFromFile(file).then(function (result) { imageEditor.loadImageFromFile(file).then(function (result) {
// 清除所有
self.clearALL()
// 导入图片成功,可以保存入库 // 导入图片成功,可以保存入库
self.bcrkActive = true self.bcrkActive = true
console.log(result); console.log(result);
...@@ -2130,6 +2132,38 @@ export default { ...@@ -2130,6 +2132,38 @@ export default {
); );
self.isTpdr_flag = true self.isTpdr_flag = true
imageEditor.clearUndoStack(); imageEditor.clearUndoStack();
// 重置图像编辑器
self.zoomLevel = 1
imageEditor.rotate(0)
imageEditor.zoom({
x: self.newWidth / 2,
y: self.newHeight / 2,
zoomLevel: 1
});
imageEditor._graphics.setImageProperties({
left: 0,
top: 0,
originX: 'left',
originY: 'top'
}, true)
Fcanvas.absolutePan({
x: 0,
y: 0
});
//计算缩放中心
let zoomPoint = new fabric_irregular.Point(
Fcanvas.width / 2,
Fcanvas.height / 2
);
//开始缩放
Fcanvas.zoomToPoint(zoomPoint, 1);
$(".tzdDrawing").css("transform", "rotate(0deg)")
$(".tzdDrawing2").css("transform", "rotate(0deg)")
$(".irregular").css("transform", "rotate(0deg)")
$(".small-drawing-img").css("transform", "rotate(0deg)")
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
self.isTpdr_flag = false self.isTpdr_flag = false
...@@ -4306,7 +4340,12 @@ export default { ...@@ -4306,7 +4340,12 @@ export default {
this.imageEditor.clearObjects(); this.imageEditor.clearObjects();
self.historys.push("清空"); self.historys.push("清空");
this.$message.success("已清空!"); this.$message.success("已清空!");
this.clearALL()
},
/**
* 清除所有
*/
clearALL() {
this.$store.commit('zwbj/setTzdall', null); this.$store.commit('zwbj/setTzdall', null);
this.$store.commit('zwbj/setAutoTzdall', null); this.$store.commit('zwbj/setAutoTzdall', null);
this.$store.commit('zwbj/setZyhz', null); this.$store.commit('zwbj/setZyhz', null);
...@@ -4995,7 +5034,7 @@ export default { ...@@ -4995,7 +5034,7 @@ export default {
"&seq=" + "&seq=" +
self.seq, self.seq,
data: JSON.stringify(fpt5TraitMinutiaList), data: JSON.stringify(fpt5TraitMinutiaList),
loading: false loading: true
}).then((res) => { }).then((res) => {
console.log(res); console.log(res);
if (res.data.message == "success") { if (res.data.message == "success") {
...@@ -5495,7 +5534,7 @@ export default { ...@@ -5495,7 +5534,7 @@ export default {
xczhw_xcwzbh: self.seq > 9 ? self.seq : "0" + self.seq xczhw_xcwzbh: self.seq > 9 ? self.seq : "0" + self.seq
}; };
console.log(8888); self.$store.commit('loading/setLoading', true)
this.$axios({ this.$axios({
method: "post", method: "post",
headers: { headers: {
...@@ -5575,7 +5614,8 @@ export default { ...@@ -5575,7 +5614,8 @@ export default {
this.$axios({ this.$axios({
method: "post", method: "post",
url: `/api/upload/trait/case/image?angle=${canvasImage_angle}&barcode=${self.barcode}&hpseqno=${self.seq}&fingerPosition=${tj_lr_finger}` url: `/api/upload/trait/case/image?angle=${canvasImage_angle}&barcode=${self.barcode}&hpseqno=${self.seq}&fingerPosition=${tj_lr_finger}`,
loading: false
}).then((res) => { }).then((res) => {
console.log(res); console.log(res);
if (res.data.code === 0) { if (res.data.code === 0) {
...@@ -5583,6 +5623,7 @@ export default { ...@@ -5583,6 +5623,7 @@ export default {
} else { } else {
self.$message.error("图片保存失败!"); self.$message.error("图片保存失败!");
} }
self.$store.commit('loading/setLoading', false)
}); });
} }
}, },
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-22 09:42:07 * @Date: 2021-10-22 09:42:07
* @LastEditTime: 2021-11-15 14:41:58 * @LastEditTime: 2021-11-27 17:05:04
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\ryzwbjLeft.vue * @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\ryzwbjLeft.vue
...@@ -293,10 +293,10 @@ export default { ...@@ -293,10 +293,10 @@ export default {
* @return {*} * @return {*}
*/ */
getRollFingerOrigin (seq) { getRollFingerOrigin (seq) {
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' }); let self = this
self.$store.commit('loading/setLoading', true)
this.$store.commit('zwbj/setSeq', seq) this.$store.commit('zwbj/setSeq', seq)
// ip:port/api/org/roll/{id}/{seq} // ip:port/api/org/roll/{id}/{seq}
let self = this
this.$axios({ this.$axios({
method: 'post', method: 'post',
// url: `/api/org/roll/${self.id}/${seq}?mnt=1`, // url: `/api/org/roll/${self.id}/${seq}?mnt=1`,
...@@ -320,9 +320,8 @@ export default { ...@@ -320,9 +320,8 @@ export default {
}) })
clearTimeout(self.timer) clearTimeout(self.timer)
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null }, 500);
}, 1200);
}, },
/** /**
* @description: 获取平面指纹原图 * @description: 获取平面指纹原图
...@@ -330,10 +329,10 @@ export default { ...@@ -330,10 +329,10 @@ export default {
* @return {*} * @return {*}
*/ */
getPainFingerOrigin (seq) { getPainFingerOrigin (seq) {
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' }); let self = this
self.$store.commit('loading/setLoading', true)
this.$store.commit('zwbj/setSeq', seq) this.$store.commit('zwbj/setSeq', seq)
// ip:port/api/org/plain/{id}/{seq} // ip:port/api/org/plain/{id}/{seq}
let self = this
this.$axios({ this.$axios({
method: 'post', method: 'post',
// url: `/api/org/plain/${self.id}/${seq}?mnt=1`, // url: `/api/org/plain/${self.id}/${seq}?mnt=1`,
...@@ -357,9 +356,8 @@ export default { ...@@ -357,9 +356,8 @@ export default {
}) })
clearTimeout(self.timer) clearTimeout(self.timer)
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null }, 500);
}, 1200);
}, },
/** /**
* @description: 获取滚动指纹 * @description: 获取滚动指纹
...@@ -367,8 +365,8 @@ export default { ...@@ -367,8 +365,8 @@ export default {
* @return {*} * @return {*}
*/ */
async getRollFingers () { async getRollFingers () {
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
let self = this let self = this
self.$store.commit('loading/setLoading', true)
// 请求之前先清空图片数据 // 请求之前先清空图片数据
self.rollFingersLeft.forEach((item) => { self.rollFingersLeft.forEach((item) => {
item.image = null item.image = null
...@@ -467,9 +465,8 @@ export default { ...@@ -467,9 +465,8 @@ export default {
} }
clearTimeout(self.timer) clearTimeout(self.timer)
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null }, 500);
}, 1200);
}, },
/** /**
* @description: 切换单个指纹 * @description: 切换单个指纹
......
...@@ -1185,7 +1185,7 @@ export default { ...@@ -1185,7 +1185,7 @@ export default {
// } // }
let zcseq = sessionStorage.getItem("zcseq"); let zcseq = sessionStorage.getItem("zcseq");
let qqid = sessionStorage.getItem("qqid"); let qqid = sessionStorage.getItem("qqid");
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." }); self.$store.commit('loading/setLoading', true)
this.$axios.post(`/api/query/matchcand/dest/${qqid}/${zcseq}`, { this.$axios.post(`/api/query/matchcand/dest/${qqid}/${zcseq}`, {
srcbarcode: sessionStorage.getItem("srcbarcode"), srcbarcode: sessionStorage.getItem("srcbarcode"),
destbarcode: self.input3.trim() destbarcode: self.input3.trim()
...@@ -1194,12 +1194,10 @@ export default { ...@@ -1194,12 +1194,10 @@ export default {
//console.log(response); //console.log(response);
self.tableData = response.data.ret; self.tableData = response.data.ret;
self.total = self.tableData.length; self.total = self.tableData.length;
clearTimeout(self.timer)
clearTimeout(self.timer);
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null; }, 500);
}, 1200);
}); });
}, },
/** /**
...@@ -1226,7 +1224,7 @@ export default { ...@@ -1226,7 +1224,7 @@ export default {
// 存储目的数据序号 // 存储目的数据序号
sessionStorage.setItem("destseqno", val.destseqno); sessionStorage.setItem("destseqno", val.destseqno);
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." }); self.$store.commit('loading/setLoading', true)
// 平面 --- 换压缩图 // 平面 --- 换压缩图
if (val.destseqno > 10) { if (val.destseqno > 10) {
this.$axios this.$axios
...@@ -1248,11 +1246,10 @@ export default { ...@@ -1248,11 +1246,10 @@ export default {
self.$bus.emit("changImageEditTarget", response.data.ret[0].image); self.$bus.emit("changImageEditTarget", response.data.ret[0].image);
}); });
} }
clearTimeout(self.timer); clearTimeout(self.timer)
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null; }, 500);
}, 1200);
// this.$axios.get(`/api/api/org/plainByBarcode/R1100002487002018050034/1/`) // this.$axios.get(`/api/api/org/plainByBarcode/R1100002487002018050034/1/`)
// this.$axios // this.$axios
......
...@@ -245,7 +245,7 @@ export default { ...@@ -245,7 +245,7 @@ export default {
handleCurrentChange(val, old) { handleCurrentChange(val, old) {
let self = this; let self = this;
// 发送请求 // 发送请求
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." }); self.$store.commit('loading/setLoading', true)
// 被删除 // 被删除
if(val.removeFlag === 1) { if(val.removeFlag === 1) {
self.$bus.emit('deleteMessage', { self.$bus.emit('deleteMessage', {
...@@ -273,16 +273,16 @@ export default { ...@@ -273,16 +273,16 @@ export default {
sessionStorage.setItem("srcseqno", imageInfo.seq); sessionStorage.setItem("srcseqno", imageInfo.seq);
sessionStorage.setItem("zcseq", imageInfo.seq); sessionStorage.setItem("zcseq", imageInfo.seq);
// 发送请求 // 发送请求
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." }); self.$store.commit('loading/setLoading', true)
this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.seq}`, { srcbarcode: sessionStorage.getItem("srcbarcode") }) this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.seq}`, { srcbarcode: sessionStorage.getItem("srcbarcode") })
.then(response => { .then(response => {
//console.log(response); //console.log(response);
self.$bus.emit("initCandidate", response.data.ret); self.$bus.emit("initCandidate", response.data.ret);
}); });
clearTimeout(self.timer)
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null; }, 500);
}, 1200);
}); });
} else { } else {
// 没有被删除 // 没有被删除
...@@ -319,11 +319,10 @@ export default { ...@@ -319,11 +319,10 @@ export default {
self.isActive = ""; self.isActive = "";
} }
clearTimeout(self.timer); clearTimeout(self.timer)
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null; }, 500);
}, 1200);
}, },
/** /**
* @description: 获取列表数据 * @description: 获取列表数据
...@@ -331,9 +330,9 @@ export default { ...@@ -331,9 +330,9 @@ export default {
* @return {*} * @return {*}
*/ */
getDetailData() { getDetailData() {
let self = this
// 发送请求 // 发送请求
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." }); self.$store.commit('loading/setLoading', true)
let self = this;
if (this.type == "father") { if (this.type == "father") {
this.$axios this.$axios
.post("/api/queryque/standardAll", { contrastCustomSearchReq: { qid: Number(self.qid) } }) .post("/api/queryque/standardAll", { contrastCustomSearchReq: { qid: Number(self.qid) } })
...@@ -363,10 +362,10 @@ export default { ...@@ -363,10 +362,10 @@ export default {
}); });
}); });
} }
clearTimeout(self.timer)
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null; }, 500);
}, 1200);
}, },
// 获取选择的任务详情 // 获取选择的任务详情
getFirgerPrintDetail(row) { getFirgerPrintDetail(row) {
...@@ -398,16 +397,16 @@ export default { ...@@ -398,16 +397,16 @@ export default {
sessionStorage.setItem("zcseq", imageInfo.seq); sessionStorage.setItem("zcseq", imageInfo.seq);
this.$bus.emit("changImageEdit", imageInfo.image); this.$bus.emit("changImageEdit", imageInfo.image);
// 发送请求 // 发送请求
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." }); self.$store.commit('loading/setLoading', true)
this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.seq}`, { srcbarcode: sessionStorage.getItem("srcbarcode") }) this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.seq}`, { srcbarcode: sessionStorage.getItem("srcbarcode") })
.then(response => { .then(response => {
//console.log(response); //console.log(response);
self.$bus.emit("initCandidate", response.data.ret); self.$bus.emit("initCandidate", response.data.ret);
}); });
clearTimeout(self.timer)
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null; }, 500);
}, 1200);
} }
}, },
/** /**
......
...@@ -99,11 +99,10 @@ export default { ...@@ -99,11 +99,10 @@ export default {
//console.log(response); //console.log(response);
self.tableData = response.data.ret; self.tableData = response.data.ret;
self.total = self.tableData.total; self.total = self.tableData.total;
clearTimeout(self.timer); clearTimeout(self.timer)
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null; }, 500);
}, 1200);
}); });
}, },
/** /**
...@@ -128,7 +127,7 @@ export default { ...@@ -128,7 +127,7 @@ export default {
sessionStorage.setItem("backcheckXh", val.destseqno); sessionStorage.setItem("backcheckXh", val.destseqno);
// this.$axios.get(`/api/api/org/plainByBarcode/R1100002487002018050034/1/`) // this.$axios.get(`/api/api/org/plainByBarcode/R1100002487002018050034/1/`)
if (!self.isFirstMounted) { if (!self.isFirstMounted) {
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." }); self.$store.commit('loading/setLoading', true)
} }
this.$axios this.$axios
...@@ -140,11 +139,10 @@ export default { ...@@ -140,11 +139,10 @@ export default {
//console.log(response); //console.log(response);
self.$bus.emit("changImageEditTarget", response.data.ret[0].image); self.$bus.emit("changImageEditTarget", response.data.ret[0].image);
if (!self.isFirstMounted) { if (!self.isFirstMounted) {
clearTimeout(self.timer); clearTimeout(self.timer)
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null; }, 500);
}, 1200);
} }
}); });
// this.$axios // this.$axios
......
...@@ -465,7 +465,7 @@ export default { ...@@ -465,7 +465,7 @@ export default {
async handleCurrentChange(val, old) { async handleCurrentChange(val, old) {
let self = this; let self = this;
// 发送请求 // 发送请求
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." }); self.$store.commit('loading/setLoading', true)
// 被删除 // 被删除
if(val.removeFlag === 1) { if(val.removeFlag === 1) {
self.painFlag = false self.painFlag = false
...@@ -841,19 +841,18 @@ export default { ...@@ -841,19 +841,18 @@ export default {
} }
} }
clearTimeout(self.timer); clearTimeout(self.timer)
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null; }, 500);
}, 1200);
}, },
// 获取列表数据 // 获取列表数据
async getDetailData() { async getDetailData() {
let self = this;
// 发送请求 // 发送请求
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." }); self.$store.commit('loading/setLoading', true)
NProgress.start(); NProgress.start();
//console.info(this.dataList); //console.info(this.dataList);
let self = this;
if (self.type == "father") { if (self.type == "father") {
await this.$axios await this.$axios
.post("/api/queryque/standardAll", { contrastCustomSearchReq: { qid: Number(self.qid) } }, { .post("/api/queryque/standardAll", { contrastCustomSearchReq: { qid: Number(self.qid) } }, {
...@@ -1027,7 +1026,7 @@ export default { ...@@ -1027,7 +1026,7 @@ export default {
} }
NProgress.start(); NProgress.start();
if (!this.isFirstMounted) { if (!this.isFirstMounted) {
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." }); self.$store.commit('loading/setLoading', true)
} }
this.$axios({ this.$axios({
method: "post", method: "post",
...@@ -1051,11 +1050,10 @@ export default { ...@@ -1051,11 +1050,10 @@ export default {
}); });
NProgress.done(); NProgress.done();
if (!this.isFirstMounted) { if (!this.isFirstMounted) {
clearTimeout(self.timer); clearTimeout(self.timer)
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null; }, 500);
}, 1200);
} }
self.isFirstMounted = false self.isFirstMounted = false
...@@ -1085,7 +1083,7 @@ export default { ...@@ -1085,7 +1083,7 @@ export default {
} }
NProgress.start(); NProgress.start();
if (!this.isFirstMounted) { if (!this.isFirstMounted) {
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." }); self.$store.commit('loading/setLoading', true)
} }
this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.code}`, { srcbarcode: sessionStorage.getItem("srcbarcode") }, { this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.code}`, { srcbarcode: sessionStorage.getItem("srcbarcode") }, {
loading: false, loading: false,
...@@ -1104,11 +1102,10 @@ export default { ...@@ -1104,11 +1102,10 @@ export default {
}); });
NProgress.done(); NProgress.done();
if (!this.isFirstMounted) { if (!this.isFirstMounted) {
clearTimeout(self.timer); clearTimeout(self.timer)
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null; }, 500);
}, 1200);
} }
self.isFirstMounted = false self.isFirstMounted = false
...@@ -1138,7 +1135,7 @@ export default { ...@@ -1138,7 +1135,7 @@ export default {
} }
NProgress.start(); NProgress.start();
if(!this.isFirstMounted) { if(!this.isFirstMounted) {
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." }); self.$store.commit('loading/setLoading', true)
} }
this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.code}`, { srcbarcode: sessionStorage.getItem("srcbarcode") }, { this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.code}`, { srcbarcode: sessionStorage.getItem("srcbarcode") }, {
loading: false, loading: false,
...@@ -1157,11 +1154,10 @@ export default { ...@@ -1157,11 +1154,10 @@ export default {
}); });
NProgress.done(); NProgress.done();
if(!this.isFirstMounted) { if(!this.isFirstMounted) {
clearTimeout(self.timer); clearTimeout(self.timer)
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null; }, 500);
}, 1200);
} }
self.isFirstMounted = false self.isFirstMounted = false
...@@ -1191,7 +1187,7 @@ export default { ...@@ -1191,7 +1187,7 @@ export default {
} }
NProgress.start(); NProgress.start();
if(!this.isFirstMounted) { if(!this.isFirstMounted) {
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." }); self.$store.commit('loading/setLoading', true)
} }
this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.code}`, { "srcbarcode": sessionStorage.getItem("srcbarcode") }, { this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.code}`, { "srcbarcode": sessionStorage.getItem("srcbarcode") }, {
...@@ -1211,11 +1207,10 @@ export default { ...@@ -1211,11 +1207,10 @@ export default {
}); });
NProgress.done(); NProgress.done();
if(!this.isFirstMounted) { if(!this.isFirstMounted) {
clearTimeout(self.timer); clearTimeout(self.timer)
self.timer = setTimeout(() => { self.timer = setTimeout(() => {
self.loading && self.loading.close(); self.$store.commit('loading/setLoading', false)
self.loading = null; }, 500);
}, 1200);
} }
self.isFirstMounted = false self.isFirstMounted = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment