提交 169b1f7d 编写于 作者: guangjun.yang's avatar guangjun.yang

加loading

上级 eff87121
...@@ -198,12 +198,10 @@ import { mapGetters, mapMutations } from "vuex"; ...@@ -198,12 +198,10 @@ import { mapGetters, mapMutations } from "vuex";
import BreadCrumb from "@/components/breadcrumb.vue"; import BreadCrumb from "@/components/breadcrumb.vue";
import { doUpload, getFilePath } from "@/utils/qiniu-util"; import { doUpload, getFilePath } from "@/utils/qiniu-util";
import { validateWord } from "@/utils/validate.js"; import { validateWord } from "@/utils/validate.js";
// import { openLoading, closeLoading } from "@/utils/utils";
import { import {
openLoading, openLoading,
closeLoading, closeLoading,
betaHandle, betaHandle,
timeHandle
} from "@/utils/utils"; } from "@/utils/utils";
import * as commonUtil from "@/utils/utils"; import * as commonUtil from "@/utils/utils";
import { getPicaKFAccid, getPhomeDemain } from "@/utils"; import { getPicaKFAccid, getPhomeDemain } from "@/utils";
...@@ -308,41 +306,21 @@ export default { ...@@ -308,41 +306,21 @@ export default {
}, },
mounted() { mounted() {
// this.resizeHeight();
this.$nextTick(() => { this.$nextTick(() => {
_this.containerHeight = _this.containerHeight =
_this.p_getElm('slidebar-container').getBoundingClientRect().height - 15; _this.getElmByID('slidebar-container').getBoundingClientRect().height - 15;
_this.p_getElm('screenSet').style.height = _this.getElmByID('screenSet').style.height =
_this.containerHeight - 152 + "px"; _this.containerHeight - 152 + "px";
console.log('_this.containerHeight', _this.containerHeight); console.log('_this.containerHeight', _this.containerHeight);
_this.p_getElm("sessionListId").style.height = _this.containerHeight - 252 + 'px'; _this.getElmByID("sessionListId").style.height = _this.containerHeight - 252 + 'px';
_this.p_getElm("msgContentId").style.height = _this.containerHeight - 287 + 'px'; _this.getElmByID("msgContentId").style.height = _this.containerHeight - 287 + 'px';
}); });
}, },
methods: { methods: {
//
resizeHeight(
cMinusHeight = 152,
iMinuxHeight = 210,
refHeightId = "slidebar-container",
containerHeightId = "screenSet"
) {
_this.containerHeight =
_this.p_getElm(refHeightId).getBoundingClientRect().height - 15;
_this.p_getElm(containerHeightId).style.height =
_this.containerHeight - cMinusHeight + "px";
console.log("containerHeight", _this.containerHeight);
window.onresize = function() {
console.log("containerHeight2", _this.containerHeight);
_this.containerHeight =
_this.p_getElm(refHeightId).getBoundingClientRect().height - 15;
_this.p_getElm(containerHeightId).style.height =
_this.containerHeight - cMinusHeight + "px";
};
},
p_getElm(elmId) { // 获取元素
getElmByID(elmId) {
return document.getElementById(elmId); return document.getElementById(elmId);
}, },
...@@ -855,6 +833,7 @@ export default { ...@@ -855,6 +833,7 @@ export default {
}); });
return; return;
} }
openLoading(_this);
doUpload( doUpload(
_this, _this,
file, file,
...@@ -863,6 +842,7 @@ export default { ...@@ -863,6 +842,7 @@ export default {
"progress", "progress",
"" ""
).then(function(resData) { ).then(function(resData) {
closeLoading(_this)
let params = {}; let params = {};
params.fileSize = resData.size; params.fileSize = resData.size;
params.fileExt = resData.ext; params.fileExt = resData.ext;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册