Commit f4a3e739 authored by 蔡伟's avatar 蔡伟

Merge branch 'feat/layout-style' into 'dev'

feat(*): 补充跳转逻辑及去除打印信息

See merge request !31
parents 4f1ef8fd 02dbb5a7
......@@ -193,6 +193,15 @@ watch(
},
{ deep: true }
);
// 监听默认分页大小变化
watch(
() => props.defaultPageSize,
(newSize) => {
pageSize.value = newSize;
// emitPaginationChange();
}
);
</script>
<style lang="scss" scoped>
......
......@@ -120,7 +120,6 @@ export default {
};
},
created() {
console.log("layout created");
},
};
</script>
......
......@@ -2,7 +2,6 @@
import {defineStore} from 'pinia'
import user from './user';
import menu from './menu';
console.log(user.actions)
//第一个参敬是应用程序中store的唯一id,就是给数据仓库起个名字
//第二个参数是一个对象,store的配置项,比如配置store内的嫩据,修改数据的方法等等
......
......@@ -52,7 +52,6 @@ router.beforeEach(async (to, from, next) => {
try {
next()
} catch (error) {
console.log(error)
// remove token and go to login page to re-login
await store.resetToken()
// Message.warning(error || 'Has Error')
......
......@@ -166,7 +166,7 @@ const formInline = ref({
eventName: "",
name: "",
dusterName: "",
deviceType: "",
deviceType: route.query.deviceType ? Number(route.query.deviceType) : "",
suspendFlag: "0",
date: route.query.startTime
? [
......
......@@ -820,7 +820,6 @@ const dispatchHandle = async (url,param) => {
searchData();
}
} catch (e) {
console.log(e);
}
}
......@@ -1239,7 +1238,6 @@ const pageSize = ref(20);
const handlePaginationChange = (pagination) => {
currentPage.value = pagination.currentPage;
pageSize.value = pagination.pageSize;
console.log("分页变化", pagination);
};
</script>
......
......@@ -202,7 +202,6 @@ const tableData = reactive({
const total = ref(0);
const getAllDustList = () => {
const url = "/bag/cycle/getReplaceListPage";
console.log(formInline.value.date);
const params = {
compart: formInline.value.compart,
dusterName: formInline.value.dusterName,
......
......@@ -42,7 +42,6 @@ watch(
() => props.dustLineInfo,
() => {
initChart();
console.log("props.dustLineInfo", props.dustLineInfo);
},
{ deep: true }
......
......@@ -38,7 +38,6 @@ const initChart = () => {
};
onMounted(() => {
console.log(props.chartData, 'props.chartData')
if (props.chartData) {
initChart();
}
......
......@@ -10,6 +10,7 @@
:class="[{ active: activeSpot === index }, `status-${spot.status}`]"
@mouseenter="handleSpotHover(index)"
@mouseleave="handleSpotLeave"
@click="handleSpotClick(spot)"
:style="{
left: spot.x + '%',
top: spot.y + '%',
......@@ -61,9 +62,8 @@
<script setup>
import { onMounted, onBeforeUnmount, ref, watch } from "vue";
import * as echarts from "echarts";
import { getLineOption } from "@/utils/chart";
import { useRouter } from "vue-router";
const router = useRouter();
const props = defineProps({
mapList: {
type: Array,
......@@ -125,6 +125,15 @@ const activeSpot = ref(null);
const showDetail = ref(false);
const hoverTimer = ref(null);
const handleSpotClick = (spot) => {
router.push({
path: "/monitor",
query: {
dusterNo: spot.no,
},
});
}
const clearTimer = () => {
if (hoverTimer.value) {
clearTimeout(hoverTimer.value);
......@@ -179,7 +188,6 @@ const getStatusText = (status) => {
};
const initMap = () => {
console.log(props.mapList, 'props.mapList')
spots.value = props.mapList || [];
}
......@@ -308,7 +316,7 @@ onBeforeUnmount(() => {
position: absolute;
left: calc(100% + 35px); // 减小与连接线的距离
top: -40px; // 调整垂直位置
width: 200px;
width: 300px;
background: rgba(0, 22, 40, 0.5);
backdrop-filter: blur(8px);
border: 1px solid rgba(255, 255, 255, 0.3);
......
......@@ -36,7 +36,6 @@
<script setup>
import { ref, onMounted, onBeforeUnmount, computed, nextTick } from "vue";
import { getHealthOverview, getHealthStatistic, getExceptionMonitor, getDusterAlarm } from "@/request/api/dashboard";
import { useRoute, useRouter } from "vue-router";
import msgItem from "./components/msg-item.vue";
import chartLine from "./components/chart-line.vue";
import mapSvg from "./components/map-svg.vue";
......@@ -53,8 +52,6 @@ const customColors = [
];
const chartData = ref(null)
const route = useRoute();
const router = useRouter();
const msgList = ref([
]);
......
......@@ -227,7 +227,6 @@ const togglePanel = () => {
};
const handleDeviceChange = (value) => {
console.log("value", value);
initChart();
};
......
......@@ -31,35 +31,21 @@ const props = defineProps({
});
const borderColor = computed(() => {
if (props.progress < 60) {
if (props.progress < 70) {
return 'box-color-60'
} else if (props.progress < 90) {
} else if (props.progress < 100) {
return 'box-color-90'
}
return 'box-color-default'
});
const diagonalPatternColor = computed(() => {
if (props.progress < 60) {
if (props.progress < 70) {
return 'diagonal-pattern-60'
} else if (props.progress < 90) {
} else if (props.progress < 100) {
return 'diagonal-pattern-90'
}
return 'diagonal-pattern-default'
});
const customColors = [
{ color: "#ff6a6a", percentage: 60 },
{ color: "#f5c701", percentage: 80 },
{ color: "#08c733", percentage: 100 },
];
const customColorMethod = (percentage) => {
if (percentage < 60) {
return customColors[0].color;
}
if (percentage < 90) {
return customColors[1].color;
}
return customColors[2].color;
};
watch(
() => props.progress,
(newProgress) => {
......
......@@ -75,7 +75,7 @@
<common-table
:data="tableData"
:columns="tableColumns"
:default-page-size="10"
:default-page-size="pageSize"
@pagination-change="handlePaginationChange"
:total="total"
:pagination-texts="{
......@@ -193,7 +193,7 @@ const formInline = ref({
});
const currentPage = ref(1);
const pageSize = ref(10);
const pageSize = ref(20);
const total = ref(0);
const dusterLeakNum = ref(0);
const healthPercent = ref("100%");
......@@ -319,7 +319,7 @@ const handlePaginationChange = (pagination) => {
const onSubmit = () => {
currentPage.value = 1;
pageSize.value = 10;
pageSize.value = 20;
getData();
};
......@@ -372,6 +372,7 @@ const handleDusterLeakNumClick = () => {
query: {
startTime: moment().subtract(24, 'hours').format("YYYY-MM-DD HH:mm:ss"),
endTime: moment().format("YYYY-MM-DD HH:mm:ss"),
deviceType: 200003 // 默认为布袋告警
},
});
};
......@@ -500,7 +501,7 @@ const getData = () => {
const refreshData = () => {
currentPage.value = 1;
pageSize.value = 10;
pageSize.value = 20;
formInline.value = {
region: "",
deviceName: "",
......
......@@ -151,10 +151,8 @@ const props = defineProps({
watch(
() => props.infoObjProps,
(newVal) => {
console.log(newVal);
// Object.assign(infoObj, newVal);
infoObj = newVal;
console.log(infoObj);
},
{ deep: true, inmediate: true }
);
......
......@@ -140,9 +140,6 @@ const formInline = reactive({
productionLineId: " ",
});
const onSubmit = () => {
console.log("submit!");
};
const tableData = ref([]);
const tableColumns = ref([
{
......
......@@ -554,7 +554,6 @@ export default {
if (getToken("rememberMe") == "true") {
this.loginOldForm.account = encryptUtf8ToBase64(getToken("account"));
this.loginOldForm.password = encryptUtf8ToBase64(getToken("remmberPWS"));
console.log(this.loginOldForm);
} else {
this.loginOldForm.account = "";
this.loginOldForm.password = "";
......@@ -676,7 +675,6 @@ export default {
};
},
handleSelect(item) {
console.log(item);
},
submitForm(formName) {
//debugger;
......@@ -712,7 +710,6 @@ export default {
}
});
} else {
console.log("error submit!!");
return false;
}
});
......@@ -733,11 +730,9 @@ export default {
if (result.data && result.data.captchaKey) {
this.phoneForm.captchaKey = result.data.captchaKey;
} else {
console.log("error fetch verify code!!");
}
})
.catch((e) => {
console.log("error fetch verify code!!" + e);
});
},
calcuCaptchaWaitTime() {
......@@ -756,31 +751,6 @@ export default {
}
},
sendCaptchaCheck() {
/*getData(
"/user/existIphone?iphone=" +
this.phoneForm.iphone +
"&account=" +
this.loginForm.account +
"&password=" +
this.loginForm.password +
"&appCode=bme-dc-tom-service",
true
)
.then((result) => {
console.log(result.data);
if (result.msg == "访问成功") {
this.captchaSendStatus = true;
this.captchaWaitTime = 60;
this.$forceUpdate();
this.calcuCaptchaWaitTime();
this.sendCaptcha();
} else {
console.log(result.msg);
}
})
.catch((e) => {
console.log("error fetch verify code!!" + e);
});*/
this.captchaSendStatus = true;
this.captchaWaitTime = 60;
this.$forceUpdate();
......@@ -802,7 +772,6 @@ export default {
this.loginOldForm.captchaKey = captchaKey;
})
.catch((e) => {
console.log("error fetch verify code!!" + e);
});
},
handleLoginBefore() {
......@@ -857,10 +826,7 @@ export default {
this.store
.login(phoneFormOrigin)
.then((data) => {
console.log(
!bindIphones.includes(this.phoneForm.iphone) &&
this.phoneForm.captcha != "BME202288"
);
if (
!bindIphones.includes(this.phoneForm.iphone) &&
this.phoneForm.captcha != "BME202288"
......@@ -874,7 +840,6 @@ export default {
}
});
} else {
console.log(data);
this.getProfile(data);
}
})
......@@ -886,7 +851,6 @@ export default {
this.loading = false;
});
} else {
console.log("error submit!!");
return false;
}
});
......@@ -996,7 +960,6 @@ export default {
this.store
.captchaLogin(loginOldFormOrigin)
.then(() => {
console.log("登录成功");
this.getOldProfile();
})
.catch((data) => {
......@@ -1017,7 +980,6 @@ export default {
}
});
} else {
console.log("error submit!!");
return false;
}
});
......@@ -1088,7 +1050,6 @@ export default {
});
})
.catch((e) => {
console.log("error fetch verify code!!" + e);
});
},
getPermissionData(userId) {
......
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