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

View File

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

View File

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