Commit a84a0647 authored by 张牧越's avatar 张牧越

bugfix

parent 2c0af2a2
......@@ -545,59 +545,6 @@ export default {
document.getElementById("step-scroll").style.width =
20 * res.data.progress_data.length + "%";
}
console.log(this.progressDetail.step);
console.log(this.progressDetail.progress_data);
const timeArray = this.progressDetail.progress_data.map((item) => {
return new Date(item.over_date).getTime();
});
let todayTs = new Date(this.getTime()).getTime();
console.log(timeArray.indexOf(todayTs));
if (timeArray.indexOf(todayTs) == -1) {
let insertIndex = timeArray.findIndex((item) => {
return item > todayTs;
});
if (insertIndex > this.progressDetail.step) {
this.progressDetail.progress_data.splice(
this.progressDetail.step,
0,
{
over_date: this.getTime(),
status_text: "当前进度",
type: "wait",
name: "当时日期",
}
);
this.progressDetail.step = this.progressDetail.step + 1;
this.$nextTick(() => {
let wait_step = document
.getElementById("step-scroll")
.getElementsByClassName("el-step");
let wait_line = wait_step[
insertIndex - 1
].getElementsByClassName("el-step__line-inner")[0];
wait_line.style.cssText =
"transition-delay: 150ms; width: 100%!important;border-width:0px!important";
});
} else {
this.progressDetail.progress_data.splice(insertIndex, 0, {
over_date: this.getTime(),
status_text: "当前进度",
name: "当时日期",
});
this.$nextTick(() => {
let wait_step = document
.getElementById("step-scroll")
.getElementsByClassName("el-step");
let wait_line = wait_step[
insertIndex - 1
].getElementsByClassName("el-step__line-inner")[0];
wait_line.style.cssText =
"transition-delay: 150ms; width: 100%!important";
});
}
}
this.$nextTick(() => {
const element = document.getElementById("scroll-container");
this.autoScrollX(1, 50, 1500, element);
......
import axios from 'axios'
import { Message } from 'element-ui';
const getLocationParams = (keyWords) => {
// 提取路由值(字符串)
let href = window.location.href;
// 从占位符开始截取路由(不包括占位符)
let query = href.substring(href.indexOf("?") + 1);
// 根据 & 切割字符串
let vars = query.split("&");
for (let i = 0; i < vars.length; i++) {
let pair = vars[i].split("=");
// 根据指定的参数名去筛选参数值
if (pair[0] == keyWords) {
return pair[1];
}
}
return "";
};
const noLoadingrequest = axios.create({
withCredentials: false,
})
......
......@@ -6,24 +6,6 @@ import _ from 'lodash';
let loadingInstance; //loading 实例
let needLoadingRequestCount = 0; //当前正在请求的数量
const getLocationParams = (keyWords) => {
// 提取路由值(字符串)
let href = window.location.href;
// 从占位符开始截取路由(不包括占位符)
let query = href.substring(href.indexOf("?") + 1);
// 根据 & 切割字符串
let vars = query.split("&");
for (let i = 0; i < vars.length; i++) {
let pair = vars[i].split("=");
// 根据指定的参数名去筛选参数值
if (pair[0] == keyWords) {
return pair[1];
}
}
return "";
};
function showLoading() {
let main = document.querySelector('#app') //获取dom节点
if (main) {
......
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