调整军团产品详情页 交付状态显示

This commit is contained in:
hzz 2023-05-25 17:14:46 +08:00
parent 8352d3042b
commit a39227e043
2 changed files with 23 additions and 27 deletions

View File

@ -115,7 +115,8 @@ const setData = (value: any) => {
} }
if (value.status == '已完成') { if (value.status == '已完成') {
dateColor.value = 2 dateColor.value = 2
data.countdown = value.status calctime(data.date)
// data.countdown = value.status
} }
if (value.status == '已交付') { if (value.status == '已交付') {
dateColor.value = 2 dateColor.value = 2
@ -152,7 +153,7 @@ const calctime = (value: any) => {
// data.countdown = store.DeviceInfo.status // data.countdown = store.DeviceInfo.status
time = setInterval(function () { time = setInterval(function () {
if (data.status == '安装中' || value.status == '调试中') { if (data.status == '安装中' || data.status == '调试中'|| data.status == '已完成') {
data.countdown = "距交付剩余:" + clacendTime(endtime, new Date().getTime()) data.countdown = "距交付剩余:" + clacendTime(endtime, new Date().getTime())
} else { } else {
data.countdown = clacendTime(endtime, new Date().getTime()) data.countdown = clacendTime(endtime, new Date().getTime())

View File

@ -12,12 +12,7 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div style="display: flex"> <div style="display: flex">
<chart <chart :title="gasOption.title" :option="gasOption.option" ref="ratio" @click="clickPowerChart"></chart>
:title="gasOption.title"
:option="gasOption.option"
ref="ratio"
@click="clickPowerChart"
></chart>
<!-- <power <!-- <power
ref="yields" ref="yields"
@ -45,7 +40,7 @@ import chart from "./chart/chartRatio.vue";
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
import { useEnergyConsumeStore } from "@/store/module/energyConsume"; import { useEnergyConsumeStore } from "@/store/module/energyConsume";
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
let {t} = useI18n(); let { t } = useI18n();
const store = useEnergyConsumeStore(); const store = useEnergyConsumeStore();
const router = useRouter(); const router = useRouter();
@ -74,7 +69,7 @@ let gasOption = reactive({
textStyle: { textStyle: {
color: "rgb(255,255,255,0.9)", color: "rgb(255,255,255,0.9)",
}, },
top:'1%' top: '1%'
}, },
tooltip: { tooltip: {
trigger: "item", trigger: "item",
@ -103,9 +98,9 @@ let gasOption = reactive({
}, },
yAxis: { yAxis: {
type: "value", type: "value",
show:false, show: false,
splitLine:{ splitLine: {
show:false show: false
} }
}, },
series: [], series: [],
@ -148,7 +143,7 @@ let gasOption2 = reactive({
}, },
yAxis: { yAxis: {
type: "value", type: "value",
show:false show: false
}, },
series: [], series: [],
}, },
@ -164,9 +159,9 @@ function reset(val: any) {
const powerBox = (width: any, height: any) => { const powerBox = (width: any, height: any) => {
let a = calcWH(height, width, 5, 2, 0); let a = calcWH(height, width, 5, 2, 0);
// //
power1.value.setchartWH(a.oWidth +90, a.oHeight*3 - 30); power1.value.setchartWH(a.oWidth + 90, a.oHeight * 3 - 30);
yields.value.setchartWH(a.oWidth+120, a.oHeight*2 - 30); yields.value.setchartWH(a.oWidth + 120, a.oHeight * 2 - 20);
ratio.value.setchartWH(a.oWidth-120, a.oHeight*5); ratio.value.setchartWH(a.oWidth - 120, a.oHeight * 5);
}; };
const clickPowerChart = () => { const clickPowerChart = () => {
router.push({ router.push({
@ -257,7 +252,7 @@ watch(
// console.log(newVal.listData[key]); // console.log(newVal.listData[key]);
if (newVal.listData[key]) { if (newVal.listData[key]) {
newVal.listData[key].forEach((res, index) => { newVal.listData[key].forEach((res, index) => {
if (res == "0.0000"||res == "0.000") { if (res == "0.0000" || res == "0.000") {
res = null; res = null;
} }
if (index != storekey) { if (index != storekey) {
@ -310,7 +305,7 @@ watch(
backgroundStyle: { backgroundStyle: {
color: "rgba(180, 180, 180, 0.2)", color: "rgba(180, 180, 180, 0.2)",
}, },
barWidth:'60%', barWidth: '60%',
label: { label: {
show: true, show: true,
formatter: function (value, index) { formatter: function (value, index) {
@ -329,7 +324,7 @@ watch(
backgroundStyle: { backgroundStyle: {
color: "rgba(180, 180, 180, 0.2)", color: "rgba(180, 180, 180, 0.2)",
}, },
barWidth:'22%', barWidth: '22%',
label: { label: {
show: true, show: true,
formatter: function (value, index) { formatter: function (value, index) {
@ -345,7 +340,7 @@ watch(
data: noData, data: noData,
type: "bar", type: "bar",
showBackground: true, showBackground: true,
barWidth:'20%', barWidth: '20%',
backgroundStyle: { backgroundStyle: {
color: "rgba(180, 180, 180, 0.2)", color: "rgba(180, 180, 180, 0.2)",
}, },