fix: 测试问题修改

dev_1.0.0
xiangcongshuai 11 months ago
commit 50d123e6e2

@ -11,30 +11,30 @@ import VueChart from "./VueChart.vue";
import { computed } from "vue";
const props = defineProps({
month_data: {
type: Array,
default: () => []
},
day_data: {
type: Array,
default: () => []
},
data: {
type: Array,
default: () => []
}
});
// const props = defineProps({
// month_data: {
// type: Array,
// default: () => []
// },
// day_data: {
// type: Array,
// default: () => []
// },
// data: {
// type: Array,
// default: () => []
// }
// });
const total_data = computed(() => {
if (!props.data || props.data.length === 0) {
return 0;
} else {
return props.data.reduce(function (sum, item: any) {
return sum + item.value;
}, 0);
}
});
// const total_data = computed(() => {
// if (!props.data || props.data.length === 0) {
// return 0;
// } else {
// return props.data.reduce(function (sum, item: any) {
// return sum + item.value;
// }, 0);
// }
// });
// function customLabelFormatter(params) {
// const text = params.value.toString();
// const coloredText = text.replace(
@ -48,14 +48,14 @@ const chartOption = computed(() => {
return {
xAxis: {
type: "category",
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
data: ["Mon", "Tue", "Wed", "Thu", "Fri"]
},
yAxis: {
type: "value"
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130],
data: [170, 160, 210, 120, 120],
type: "bar"
}
]

@ -9,32 +9,32 @@
import VueChart from "./VueChart.vue";
import { computed } from "vue";
const props = defineProps({
month_data: {
type: Array,
default: () => []
},
day_data: {
type: Array,
default: () => []
},
data: {
type: Array,
default: () => []
}
});
// const props = defineProps({
// month_data: {
// type: Array,
// default: () => []
// },
// day_data: {
// type: Array,
// default: () => []
// },
// data: {
// type: Array,
// default: () => []
// }
// });
const name_list = computed(() => {
return props.data.map((item: any) => {
return item.name;
});
});
// const name_list = computed(() => {
// return props.data.map((item: any) => {
// return item.name;
// });
// });
const value_list = computed(() => {
return props.data.map((item: any) => {
return item.value;
});
});
// const value_list = computed(() => {
// return props.data.map((item: any) => {
// return item.value;
// });
// });
const chartOption = computed(() => {
return {
@ -47,7 +47,7 @@ const chartOption = computed(() => {
},
series: [
{
data: [820, 932, 901, 934, 1290, 1330, 1320],
data: [22, 45, 23, 80, 24, 100, 22],
type: "line",
smooth: true
}

@ -11,30 +11,30 @@ import VueChart from "./VueChart.vue";
import { computed } from "vue";
const props = defineProps({
month_data: {
type: Array,
default: () => []
},
day_data: {
type: Array,
default: () => []
},
data: {
type: Array,
default: () => []
}
});
// const props = defineProps({
// month_data: {
// type: Array,
// default: () => []
// },
// day_data: {
// type: Array,
// default: () => []
// },
// data: {
// type: Array,
// default: () => []
// }
// });
const total_data = computed(() => {
if (!props.data || props.data.length === 0) {
return 0;
} else {
return props.data.reduce(function (sum, item: any) {
return sum + item.value;
}, 0);
}
});
// const total_data = computed(() => {
// if (!props.data || props.data.length === 0) {
// return 0;
// } else {
// return props.data.reduce(function (sum, item: any) {
// return sum + item.value;
// }, 0);
// }
// });
// function customLabelFormatter(params) {
// const text = params.value.toString();
// const coloredText = text.replace(
@ -75,8 +75,8 @@ const chartOption = computed(() => {
show: false
},
data: [
{ value: 1048, name: "待审批" },
{ value: 735, name: "已审批" }
{ value: 735, name: "已审批" },
{ value: 2532, name: "待审批" }
]
}
]

@ -35,7 +35,7 @@ const dataList = ref([]);
<div class="header">报送知识数据概览</div>
<div class="content-list">
<div style="background: #e8f1ff" class="content-list-item">
<span style="color: rgba(20, 109, 255, 0.8)" class="title"
<span style="color: rgb(20 109 255 / 80%)" class="title"
>全部知识</span
>
<span style="color: #146dff" class="num">75,485</span>
@ -45,34 +45,28 @@ const dataList = ref([]);
</span>
</div>
<div style="background: #fff3ea" class="content-list-item">
<span style="color: rgba(255, 126, 44, 0.8)" class="title"
>本月新增</span
<span style="color: rgb(255 126 44 / 80%)" class="title"
>全部知识</span
>
<span style="color: #ff7e2c" class="num">75,485</span>
<span style="color: #ff7e2c" class="num">1,235</span>
<span class="desc"
>环比下降3%
<img :src="upIcon" alt="" />
<img :src="downIcon" alt="" />
</span>
</div>
<div style="background: #e7f6ff" class="content-list-item">
<span style="color: rgba(14, 162, 255, 0.8)" class="title"
>本周撤回</span
<span style="color: rgb(14 162 255 / 80%)" class="title"
>全部知识</span
>
<span style="color: #0ea2ff" class="num">75,485</span>
<span style="color: #0ea2ff" class="num">256</span>
<span class="desc"
>环比下降3%
<img :src="downIcon" alt="" />
>环比上升3%
<img :src="upIcon" alt="" />
</span>
</div>
<div style="background: #f2f1ff" class="content-list-item">
<span style="color: rgba(120, 112, 247, 0.8)" class="title"
>今日新增</span
>
<span style="color: #7870f7" class="num">75,485</span>
<span class="desc"
>环比下降3%
<img :src="downIcon" alt="" />
</span>
>环比下降3%
<img :src="downIcon" alt="" />
</div>
</div>
</div>
@ -113,95 +107,112 @@ const dataList = ref([]);
.statisticAnalysis {
display: flex;
margin: 0 80px;
.statisticAnalysis-nav {
padding-top: 8px;
width: 136px;
height: calc(100vh - 200px);
background: #ffffff;
border-radius: 8px 8px 8px 8px;
display: flex;
flex-direction: column;
align-items: center;
display: flex;
width: 136px;
height: calc(100vh - 200px);
padding-top: 8px;
background: #fff;
border-radius: 8px;
.nav-item {
width: 120px;
height: 104px;
background: #ffffff;
border-radius: 6px 6px 6px 6px;
margin-bottom: 16px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 120px;
height: 104px;
margin-bottom: 16px;
cursor: pointer;
background: #fff;
border-radius: 6px;
img {
width: 40px;
height: 40px;
}
span {
margin-top: 8px;
font-size: 18px;
color: #0052d9;
margin-top: 8px;
}
}
.actived {
background: #0052d9;
span {
font-size: 18px;
color: #ffffff;
color: #fff;
}
}
}
.statisticAnalysis-main {
flex: 1;
margin-left: 16px;
.data-view {
display: flex;
flex-direction: row-reverse;
.data-view-pie {
width: 284px;
// height: 288px;
background: #ffffff;
border-radius: 8px 8px 8px 8px;
background: #fff;
border-radius: 8px;
}
.data-view-content {
margin-right: 16px;
background: #ffffff;
border-radius: 8px 8px 8px 8px;
flex: 1;
padding: 24px;
display: flex;
flex: 1;
flex-direction: column;
padding: 24px;
margin-right: 16px;
background: #fff;
border-radius: 8px;
.header {
font-weight: bold;
font-size: 20px;
color: #333333;
font-weight: bold;
color: #333;
}
.content-list {
margin-top: 24px;
display: flex;
justify-content: space-between;
margin-top: 24px;
.content-list-item {
display: flex;
flex-direction: column;
width: 100%;
padding: 32px;
flex-direction: column;
border-radius: 6px 6px 6px 6px;
margin-right: 16px;
border-radius: 6px;
.title {
font-weight: 400;
font-size: 20px;
font-weight: 400;
}
.num {
margin-top: 8px;
font-weight: bold;
font-size: 36px;
font-weight: bold;
}
.desc {
display: flex;
align-items: center;
margin-top: 34px;
font-size: 16px;
color: #666666;
align-items: center;
color: #666;
img {
width: 20px;
height: 12px;
@ -212,23 +223,26 @@ const dataList = ref([]);
}
}
}
.chart-card {
padding: 0 24px;
background: #ffffff;
border-radius: 8px 8px 8px 8px;
margin-top: 16px;
height: calc(100vh - 535px);
display: flex;
flex-direction: column;
height: calc(100vh - 535px);
padding: 0 24px;
margin-top: 16px;
background: #fff;
border-radius: 8px;
.chart-card-header {
display: flex;
height: 70px;
align-items: center;
justify-content: space-between;
height: 70px;
span {
font-weight: bold;
font-size: 20px;
color: #333333;
font-weight: bold;
color: #333;
}
.chart-card-header-time {
@ -236,12 +250,15 @@ const dataList = ref([]);
align-items: center;
}
}
.chart-card-content {
display: flex;
flex: 1;
.left {
width: 50%;
}
.right {
flex: 1;
}

@ -336,14 +336,11 @@ onMounted(() => {
/>
</el-form-item>
</el-form>
<div class="drawer_footer">
<div class="drawer_footer" v-if="props.accountFromType !== 'view'">
<el-button plain @click="resetForm(ruleAccountFormRef)"
>重置</el-button
>
<el-button
type="primary"
@click="submitForm(ruleAccountFormRef)"
v-if="props.accountFromType !== 'view'"
<el-button type="primary" @click="submitForm(ruleAccountFormRef)"
>确定</el-button
>
</div>

Loading…
Cancel
Save