Merge branch 'main' of git.zdool.com:xs/ggfwjsc

This commit is contained in:
duanxiaohai 2024-06-24 09:06:34 +08:00
commit b01c926109
3 changed files with 20 additions and 4 deletions

View File

@ -138,6 +138,8 @@ const resultData = [
value: 100,
},
];
var max = 0;
var number = 0;
const getOption1 = () => {
// data.list[0].value = data.list.nl17;
// data.list[1].value = data.list.nl1834;
@ -157,11 +159,20 @@ const getOption1 = () => {
data.list[10].value = parseInt(data.list1.nl100);
let sum = 0;
data.list.forEach((item) => {
if (item.value > max) {
max = item.value;
}
sum += item.value;
});
//
number = Math.round(max * 0.2);
data.list.forEach((item) => {
optionData.push({ value: item.value, name: item.name });
optionData.push({
value: item.value + number,
name: item.name,
});
optionData.push({
name: "",
value: sum / 100,
@ -224,7 +235,7 @@ const getOption = () => {
let res = "";
const { marker, name, value } = params;
if (name !== "") {
res += `${marker}${name}:${value}`;
res += `${marker}${name}:${value-number}`;
}
return res;
},

View File

@ -271,7 +271,10 @@ onBeforeMount(async () => {
getData();
});
onMounted(() => {
startAutoScroll();
setTimeout(()=>{
startAutoScroll();
},600)
// console.log(
// mainRef.value.scrollTop,
// mainRef.value.scrollHeight,

View File

@ -454,7 +454,9 @@ const startAutoSwitching = () => {
interval = setInterval(toggleShow, 6000); // 6
};
onMounted(() => {
startAutoScroll();
setTimeout(()=>{
startAutoScroll();
},600)
startAutoSwitching();
});