Commit 02dbb5a7 authored by Cai Wei's avatar Cai Wei

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

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