提交 853da3a4 authored 作者: liujq23's avatar liujq23

出口管制详情接口部分完成

上级 275bc508
......@@ -13,7 +13,7 @@ const request200 = (requestP) => {
type: 'error',
duration: 3 * 1000
})
return {}
return null
})
}
......
......@@ -57,7 +57,7 @@ const line2Option = shallowRef({});
onMounted(async () => {
try {
const [entitiesAreaCountByYearData = [], countThisDomainData4 = [], entitiesDomainCountData, countThisDomainData10 = []] =
const [entitiesAreaCountByYearData, countThisDomainData4, entitiesDomainCountData, countThisDomainData10] =
await Promise.all([
getEntitiesAreaCountByYear(route.query.startTime),
getCountThisDomain("4"),
......@@ -65,9 +65,8 @@ onMounted(async () => {
getCountThisDomain("10")
]);
pie1Option.value = getPieOption1(entitiesAreaCountByYearData);
const list4 = _.reverse(countThisDomainData4);
pie1Option.value = getPieOption1(entitiesAreaCountByYearData ?? []);
const list4 = _.reverse(countThisDomainData4 ?? []);
line1Option.value = getLineChart({
xAxisData: _.map(list4, "year"),
seriesData: _.map(list4, "count"),
......@@ -82,7 +81,7 @@ onMounted(async () => {
"领域数"
);
const list10 = _.reverse(countThisDomainData10);
const list10 = _.reverse(countThisDomainData10 ?? []);
line2Option.value = getLineChart({
xAxisData: _.map(list10, "year"),
seriesData: _.map(list10, "count"),
......
......@@ -56,8 +56,7 @@ const line1Option = shallowRef({});
const line2Option = shallowRef({});
onMounted(async () => {
try {
const [countSanTypeByTimeData = [], countThisTypeData1 = [], countTypeByYearData = [], countThisTypeData2 = []] =
await Promise.all([
const [countSanTypeByTimeData, countThisTypeData1, countTypeByYearData, countThisTypeData2] = await Promise.all([
getCountSanTypeByTime(route.query.startTime),
getCountThisType("1"),
getCountTypeByYear(),
......@@ -65,7 +64,7 @@ onMounted(async () => {
]);
pie1Option.value = getPieOption1(
_.map(countSanTypeByTimeData, item => {
_.map(countSanTypeByTimeData ?? [], item => {
return {
name: item?.type,
value: item?.count
......@@ -73,7 +72,7 @@ onMounted(async () => {
})
);
const list1 = _.reverse(countThisTypeData1);
const list1 = _.reverse(countThisTypeData1 ?? []);
line1Option.value = getLineChart({
xAxisData: _.map(list1, "year"),
seriesData: _.map(list1, "count"),
......@@ -81,7 +80,7 @@ onMounted(async () => {
color: "rgba(255, 149, 77, 1)"
});
const list = _.reverse(countTypeByYearData);
const list = _.reverse(countTypeByYearData ?? []);
bar2Option.value = getBarChart(
_.map(list, "year"),
_.map(list, "count"),
......@@ -89,7 +88,7 @@ onMounted(async () => {
"实体数"
);
const list2 = _.reverse(countThisTypeData2);
const list2 = _.reverse(countThisTypeData2 ?? []);
line2Option.value = getLineChart({
xAxisData: _.map(list2, "year"),
seriesData: _.map(list2, "count"),
......
......@@ -66,7 +66,8 @@ const activePanelId = ref(null);
onMounted(async () => {
try {
const [compareCountSanData] = await Promise.all([getCompareCountSan(route.query.startTime)]);
const { countSanNow, countSanLast, countDomainNow, countDomainLast, countTypeNow, countTypeLast } = compareCountSanData;
const { countSanNow, countSanLast, countDomainNow, countDomainLast, countTypeNow, countTypeLast } =
compareCountSanData ?? {};
compareCountSan.value = [
{
......
......@@ -106,7 +106,10 @@
<el-table-column prop="name" label="实体清单" min-width="180">
<template #default="{ row }">
<div style="font-weight: 500" class="name">
<img :src="row.img" alt="" class="img" />
<img v-if="row.img" :src="row.img" alt="" class="img" />
<div v-else class="imgUndefined">
{{ row.name?.match(/[\u4e00-\u9fa5a-zA-Z0-9]/)?.[0] }}
</div>
{{ row.name }}
</div>
</template>
......@@ -255,7 +258,7 @@ onMounted(async () => {
organizationInfo.value = {
img: panel1_1,
mingcheng: organizationInfoData?.orgName,
cuoshi: organizationInfoData?.orgIntroduction || "--",
cuoshi: organizationInfoData?.cuoshi || "美国商务部工业与安全局",
zhize: organizationInfoData?.orgIntroduction || "--"
};
personLis.value = _.map(personListData, item => {
......@@ -279,7 +282,7 @@ onMounted(async () => {
isUp: true,
revenue: "--",
subCompany: "--",
img: panel5_5
img: ""
};
});
} catch (err) {
......@@ -422,7 +425,7 @@ const panel6 = ref([
}
.panel1 {
height: 100%;
padding: 2px 24px 0 24px;
padding: 2px 35px 0 24px;
display: flex;
.img {
width: 90px;
......@@ -457,6 +460,11 @@ const panel6 = ref([
font-size: 16px;
font-weight: 400;
line-height: 24px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 5; /* 控制行数 */
overflow: hidden;
text-overflow: ellipsis;
}
}
}
......@@ -652,6 +660,7 @@ const panel6 = ref([
flex: 1;
margin-top: 14px;
min-height: 0;
overflow: auto;
}
.name {
display: flex;
......@@ -661,6 +670,20 @@ const panel6 = ref([
height: 40px;
margin-right: 6px;
margin-left: 6px;
flex-shrink: 0;
}
.imgUndefined {
width: 40px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
flex-shrink: 0;
color: rgba(5, 95, 194, 1);
background-color: rgb(236, 245, 255);
border-radius: 20px;
margin-right: 6px;
margin-left: 6px;
}
}
.subCompany {
......
......@@ -139,7 +139,15 @@
v-for="(item, index) in entitiesDataInfoReactive.entityList"
:key="index"
>
<el-image class="box1-bottom-content-item-img" :src="item.img" alt=""></el-image>
<el-image
v-if="item.img"
class="box1-bottom-content-item-img"
:src="item.img"
alt=""
></el-image>
<div v-else class="box1-bottom-content-item-imgUndefined">
{{ (item.name || item.enName)?.match(/[\u4e00-\u9fa5a-zA-Z0-9]/)?.[0] }}
</div>
<div class="box1-bottom-content-item-txt">{{ item.name || item.enName }}</div>
</div>
</div>
......@@ -1481,6 +1489,19 @@ onMounted(async () => {
&-img {
width: 24px;
height: 24px;
flex-shrink: 0;
}
&-imgUndefined {
width: 24px;
height: 24px;
font-size: 14px;
font-weight: 700;
flex-shrink: 0;
color: rgba(5, 95, 194, 1);
background-color: rgb(236, 245, 255);
line-height: 24px;
text-align: center;
border-radius: 12px;
}
&-txt {
font-size: 16px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论