fix: 测试问题修改

dev_1.0.0
xiangcongshuai 11 months ago
commit 50d123e6e2

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

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

@ -11,30 +11,30 @@ import VueChart from "./VueChart.vue";
import { computed } from "vue"; import { computed } from "vue";
const props = defineProps({ // const props = defineProps({
month_data: { // month_data: {
type: Array, // type: Array,
default: () => [] // default: () => []
}, // },
day_data: { // day_data: {
type: Array, // type: Array,
default: () => [] // default: () => []
}, // },
data: { // data: {
type: Array, // type: Array,
default: () => [] // default: () => []
} // }
}); // });
const total_data = computed(() => { // const total_data = computed(() => {
if (!props.data || props.data.length === 0) { // if (!props.data || props.data.length === 0) {
return 0; // return 0;
} else { // } else {
return props.data.reduce(function (sum, item: any) { // return props.data.reduce(function (sum, item: any) {
return sum + item.value; // return sum + item.value;
}, 0); // }, 0);
} // }
}); // });
// function customLabelFormatter(params) { // function customLabelFormatter(params) {
// const text = params.value.toString(); // const text = params.value.toString();
// const coloredText = text.replace( // const coloredText = text.replace(
@ -75,8 +75,8 @@ const chartOption = computed(() => {
show: false show: false
}, },
data: [ 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="header">报送知识数据概览</div>
<div class="content-list"> <div class="content-list">
<div style="background: #e8f1ff" class="content-list-item"> <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
> >
<span style="color: #146dff" class="num">75,485</span> <span style="color: #146dff" class="num">75,485</span>
@ -45,34 +45,28 @@ const dataList = ref([]);
</span> </span>
</div> </div>
<div style="background: #fff3ea" class="content-list-item"> <div style="background: #fff3ea" class="content-list-item">
<span style="color: rgba(255, 126, 44, 0.8)" class="title" <span style="color: rgb(255 126 44 / 80%)" class="title"
>本月新增</span >全部知识</span
> >
<span style="color: #ff7e2c" class="num">75,485</span> <span style="color: #ff7e2c" class="num">1,235</span>
<span class="desc" <span class="desc"
>环比下降3% >环比下降3%
<img :src="upIcon" alt="" /> <img :src="downIcon" alt="" />
</span> </span>
</div> </div>
<div style="background: #e7f6ff" class="content-list-item"> <div style="background: #e7f6ff" class="content-list-item">
<span style="color: rgba(14, 162, 255, 0.8)" class="title" <span style="color: rgb(14 162 255 / 80%)" class="title"
>本周撤回</span >全部知识</span
> >
<span style="color: #0ea2ff" class="num">75,485</span> <span style="color: #0ea2ff" class="num">256</span>
<span class="desc" <span class="desc"
>环比下降3% >环比上升3%
<img :src="downIcon" alt="" /> <img :src="upIcon" alt="" />
</span> </span>
</div> </div>
<div style="background: #f2f1ff" class="content-list-item"> <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% >环比下降3%
<img :src="downIcon" alt="" /> <img :src="downIcon" alt="" />
</span>
</div> </div>
</div> </div>
</div> </div>
@ -113,95 +107,112 @@ const dataList = ref([]);
.statisticAnalysis { .statisticAnalysis {
display: flex; display: flex;
margin: 0 80px; margin: 0 80px;
.statisticAnalysis-nav { .statisticAnalysis-nav {
padding-top: 8px; display: flex;
width: 136px;
height: calc(100vh - 200px);
background: #ffffff;
border-radius: 8px 8px 8px 8px;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
display: flex; width: 136px;
height: calc(100vh - 200px);
padding-top: 8px;
background: #fff;
border-radius: 8px;
.nav-item { .nav-item {
width: 120px;
height: 104px;
background: #ffffff;
border-radius: 6px 6px 6px 6px;
margin-bottom: 16px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 120px;
height: 104px;
margin-bottom: 16px;
cursor: pointer; cursor: pointer;
background: #fff;
border-radius: 6px;
img { img {
width: 40px; width: 40px;
height: 40px; height: 40px;
} }
span { span {
margin-top: 8px;
font-size: 18px; font-size: 18px;
color: #0052d9; color: #0052d9;
margin-top: 8px;
} }
} }
.actived { .actived {
background: #0052d9; background: #0052d9;
span { span {
font-size: 18px; font-size: 18px;
color: #ffffff; color: #fff;
} }
} }
} }
.statisticAnalysis-main { .statisticAnalysis-main {
flex: 1; flex: 1;
margin-left: 16px; margin-left: 16px;
.data-view { .data-view {
display: flex; display: flex;
flex-direction: row-reverse; flex-direction: row-reverse;
.data-view-pie { .data-view-pie {
width: 284px; width: 284px;
// height: 288px; // height: 288px;
background: #ffffff; background: #fff;
border-radius: 8px 8px 8px 8px; border-radius: 8px;
} }
.data-view-content { .data-view-content {
margin-right: 16px;
background: #ffffff;
border-radius: 8px 8px 8px 8px;
flex: 1;
padding: 24px;
display: flex; display: flex;
flex: 1;
flex-direction: column; flex-direction: column;
padding: 24px;
margin-right: 16px;
background: #fff;
border-radius: 8px;
.header { .header {
font-weight: bold;
font-size: 20px; font-size: 20px;
color: #333333; font-weight: bold;
color: #333;
} }
.content-list { .content-list {
margin-top: 24px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 24px;
.content-list-item { .content-list-item {
display: flex; display: flex;
flex-direction: column;
width: 100%; width: 100%;
padding: 32px; padding: 32px;
flex-direction: column;
border-radius: 6px 6px 6px 6px;
margin-right: 16px; margin-right: 16px;
border-radius: 6px;
.title { .title {
font-weight: 400;
font-size: 20px; font-size: 20px;
font-weight: 400;
} }
.num { .num {
margin-top: 8px; margin-top: 8px;
font-weight: bold;
font-size: 36px; font-size: 36px;
font-weight: bold;
} }
.desc { .desc {
display: flex; display: flex;
align-items: center;
margin-top: 34px; margin-top: 34px;
font-size: 16px; font-size: 16px;
color: #666666; color: #666;
align-items: center;
img { img {
width: 20px; width: 20px;
height: 12px; height: 12px;
@ -212,23 +223,26 @@ const dataList = ref([]);
} }
} }
} }
.chart-card { .chart-card {
padding: 0 24px;
background: #ffffff;
border-radius: 8px 8px 8px 8px;
margin-top: 16px;
height: calc(100vh - 535px);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: calc(100vh - 535px);
padding: 0 24px;
margin-top: 16px;
background: #fff;
border-radius: 8px;
.chart-card-header { .chart-card-header {
display: flex; display: flex;
height: 70px;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
height: 70px;
span { span {
font-weight: bold;
font-size: 20px; font-size: 20px;
color: #333333; font-weight: bold;
color: #333;
} }
.chart-card-header-time { .chart-card-header-time {
@ -236,12 +250,15 @@ const dataList = ref([]);
align-items: center; align-items: center;
} }
} }
.chart-card-content { .chart-card-content {
display: flex; display: flex;
flex: 1; flex: 1;
.left { .left {
width: 50%; width: 50%;
} }
.right { .right {
flex: 1; flex: 1;
} }

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

Loading…
Cancel
Save