Commit 398bf3ff by 张超军

loading样式

parent 7029d214
......@@ -6,15 +6,19 @@
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\store\modules\zwbj.js
*/
import { SET_LOADING } from "./mutations-types";
import { SET_LOADING, SET_JUMPROUTE } from "./mutations-types";
const state = {
// 是否处于加载中
loading: false
loading: false,
jumproute: true
};
const mutations = {
[SET_LOADING] (state, content) {
state.loading = content
},
[SET_JUMPROUTE] (state, content) {
state.jumproute = content
}
};
......
......@@ -21,3 +21,6 @@ export const SET_AJINFO = 'setAjInfo'
// 全局loading
export const SET_LOADING = 'setLoading'
// 跳转路由
export const SET_JUMPROUTE = 'setJumpRoute'
<!--
* @Author: your name
* @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
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\ryzwbjLeft.vue
......@@ -198,9 +198,9 @@ export default {
* 获取案件指纹原图
*/
getCaseOrigin (seq) {
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
this.$store.commit('zwbj/setSeq', seq)
let self = this
self.$store.commit('loading/setLoading', true)
this.$store.commit('zwbj/setSeq', seq)
this.$axios({
method: 'post',
url: `/api/org/caseBybarcode/barcode/seq`,
......@@ -223,9 +223,8 @@ export default {
})
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
},
/**
* 获取案件指纹
......
......@@ -3861,6 +3861,7 @@ export default {
if (sessionArr.length == this.sessionCount) {
return;
} else {
this.$store.commit('loading/setJumpRoute', false)
this.$message.error("当前页面有未保存的指位!");
}
}
......
......@@ -2104,6 +2104,8 @@ export default {
file = event.target.files[0];
console.log(file, 222222222);
imageEditor.loadImageFromFile(file).then(function (result) {
// 清除所有
self.clearALL()
// 导入图片成功,可以保存入库
self.bcrkActive = true
console.log(result);
......@@ -2130,6 +2132,38 @@ export default {
);
self.isTpdr_flag = true
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 => {
console.log(err);
self.isTpdr_flag = false
......@@ -4306,7 +4340,12 @@ export default {
this.imageEditor.clearObjects();
self.historys.push("清空");
this.$message.success("已清空!");
this.clearALL()
},
/**
* 清除所有
*/
clearALL() {
this.$store.commit('zwbj/setTzdall', null);
this.$store.commit('zwbj/setAutoTzdall', null);
this.$store.commit('zwbj/setZyhz', null);
......@@ -4995,7 +5034,7 @@ export default {
"&seq=" +
self.seq,
data: JSON.stringify(fpt5TraitMinutiaList),
loading: false
loading: true
}).then((res) => {
console.log(res);
if (res.data.message == "success") {
......@@ -5495,7 +5534,7 @@ export default {
xczhw_xcwzbh: self.seq > 9 ? self.seq : "0" + self.seq
};
console.log(8888);
self.$store.commit('loading/setLoading', true)
this.$axios({
method: "post",
headers: {
......@@ -5575,7 +5614,8 @@ export default {
this.$axios({
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) => {
console.log(res);
if (res.data.code === 0) {
......@@ -5583,6 +5623,7 @@ export default {
} else {
self.$message.error("图片保存失败!");
}
self.$store.commit('loading/setLoading', false)
});
}
},
......
<!--
* @Author: your name
* @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
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\ryzwbjLeft.vue
......@@ -293,10 +293,10 @@ export default {
* @return {*}
*/
getRollFingerOrigin (seq) {
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
let self = this
self.$store.commit('loading/setLoading', true)
this.$store.commit('zwbj/setSeq', seq)
// ip:port/api/org/roll/{id}/{seq}
let self = this
this.$axios({
method: 'post',
// url: `/api/org/roll/${self.id}/${seq}?mnt=1`,
......@@ -320,9 +320,8 @@ export default {
})
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
},
/**
* @description: 获取平面指纹原图
......@@ -330,10 +329,10 @@ export default {
* @return {*}
*/
getPainFingerOrigin (seq) {
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
let self = this
self.$store.commit('loading/setLoading', true)
this.$store.commit('zwbj/setSeq', seq)
// ip:port/api/org/plain/{id}/{seq}
let self = this
this.$axios({
method: 'post',
// url: `/api/org/plain/${self.id}/${seq}?mnt=1`,
......@@ -357,9 +356,8 @@ export default {
})
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
},
/**
* @description: 获取滚动指纹
......@@ -367,8 +365,8 @@ export default {
* @return {*}
*/
async getRollFingers () {
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
let self = this
self.$store.commit('loading/setLoading', true)
// 请求之前先清空图片数据
self.rollFingersLeft.forEach((item) => {
item.image = null
......@@ -467,9 +465,8 @@ export default {
}
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
},
/**
* @description: 切换单个指纹
......
......@@ -1185,7 +1185,7 @@ export default {
// }
let zcseq = sessionStorage.getItem("zcseq");
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}`, {
srcbarcode: sessionStorage.getItem("srcbarcode"),
destbarcode: self.input3.trim()
......@@ -1194,12 +1194,10 @@ export default {
//console.log(response);
self.tableData = response.data.ret;
self.total = self.tableData.length;
clearTimeout(self.timer);
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null;
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
});
},
/**
......@@ -1226,7 +1224,7 @@ export default {
// 存储目的数据序号
sessionStorage.setItem("destseqno", val.destseqno);
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." });
self.$store.commit('loading/setLoading', true)
// 平面 --- 换压缩图
if (val.destseqno > 10) {
this.$axios
......@@ -1248,11 +1246,10 @@ export default {
self.$bus.emit("changImageEditTarget", response.data.ret[0].image);
});
}
clearTimeout(self.timer);
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null;
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
// this.$axios.get(`/api/api/org/plainByBarcode/R1100002487002018050034/1/`)
// this.$axios
......
......@@ -245,7 +245,7 @@ export default {
handleCurrentChange(val, old) {
let self = this;
// 发送请求
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." });
self.$store.commit('loading/setLoading', true)
// 被删除
if(val.removeFlag === 1) {
self.$bus.emit('deleteMessage', {
......@@ -273,16 +273,16 @@ export default {
sessionStorage.setItem("srcseqno", 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") })
.then(response => {
//console.log(response);
self.$bus.emit("initCandidate", response.data.ret);
});
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null;
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
});
} else {
// 没有被删除
......@@ -319,11 +319,10 @@ export default {
self.isActive = "";
}
clearTimeout(self.timer);
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null;
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
},
/**
* @description: 获取列表数据
......@@ -331,9 +330,9 @@ export default {
* @return {*}
*/
getDetailData() {
let self = this
// 发送请求
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." });
let self = this;
self.$store.commit('loading/setLoading', true)
if (this.type == "father") {
this.$axios
.post("/api/queryque/standardAll", { contrastCustomSearchReq: { qid: Number(self.qid) } })
......@@ -363,10 +362,10 @@ export default {
});
});
}
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null;
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
},
// 获取选择的任务详情
getFirgerPrintDetail(row) {
......@@ -398,16 +397,16 @@ export default {
sessionStorage.setItem("zcseq", imageInfo.seq);
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") })
.then(response => {
//console.log(response);
self.$bus.emit("initCandidate", response.data.ret);
});
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null;
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
}
},
/**
......
......@@ -99,11 +99,10 @@ export default {
//console.log(response);
self.tableData = response.data.ret;
self.total = self.tableData.total;
clearTimeout(self.timer);
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null;
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
});
},
/**
......@@ -128,7 +127,7 @@ export default {
sessionStorage.setItem("backcheckXh", val.destseqno);
// this.$axios.get(`/api/api/org/plainByBarcode/R1100002487002018050034/1/`)
if (!self.isFirstMounted) {
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." });
self.$store.commit('loading/setLoading', true)
}
this.$axios
......@@ -140,11 +139,10 @@ export default {
//console.log(response);
self.$bus.emit("changImageEditTarget", response.data.ret[0].image);
if (!self.isFirstMounted) {
clearTimeout(self.timer);
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null;
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
}
});
// this.$axios
......
......@@ -465,7 +465,7 @@ export default {
async handleCurrentChange(val, old) {
let self = this;
// 发送请求
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." });
self.$store.commit('loading/setLoading', true)
// 被删除
if(val.removeFlag === 1) {
self.painFlag = false
......@@ -841,19 +841,18 @@ export default {
}
}
clearTimeout(self.timer);
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null;
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
},
// 获取列表数据
async getDetailData() {
let self = this;
// 发送请求
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." });
self.$store.commit('loading/setLoading', true)
NProgress.start();
//console.info(this.dataList);
let self = this;
if (self.type == "father") {
await this.$axios
.post("/api/queryque/standardAll", { contrastCustomSearchReq: { qid: Number(self.qid) } }, {
......@@ -1027,7 +1026,7 @@ export default {
}
NProgress.start();
if (!this.isFirstMounted) {
this.loading = Loading.service({ fullscreen: true, text: "正在加载..." });
self.$store.commit('loading/setLoading', true)
}
this.$axios({
method: "post",
......@@ -1051,11 +1050,10 @@ export default {
});
NProgress.done();
if (!this.isFirstMounted) {
clearTimeout(self.timer);
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null;
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
}
self.isFirstMounted = false
......@@ -1085,7 +1083,7 @@ export default {
}
NProgress.start();
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") }, {
loading: false,
......@@ -1104,11 +1102,10 @@ export default {
});
NProgress.done();
if (!this.isFirstMounted) {
clearTimeout(self.timer);
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null;
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
}
self.isFirstMounted = false
......@@ -1138,7 +1135,7 @@ export default {
}
NProgress.start();
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") }, {
loading: false,
......@@ -1157,11 +1154,10 @@ export default {
});
NProgress.done();
if(!this.isFirstMounted) {
clearTimeout(self.timer);
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null;
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
}
self.isFirstMounted = false
......@@ -1191,7 +1187,7 @@ export default {
}
NProgress.start();
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") }, {
......@@ -1211,11 +1207,10 @@ export default {
});
NProgress.done();
if(!this.isFirstMounted) {
clearTimeout(self.timer);
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null;
}, 1200);
self.$store.commit('loading/setLoading', false)
}, 500);
}
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