4d3118ee by lxs

Merge branch 'develop' into release-test

2 parents 2d90a275 ba379027
......@@ -89,3 +89,26 @@ export const setFileName = (name) => {
return name || '--';
}
}
// 已任意长度分割数组
export const chunk = (array, size) => {
//获取数组的长度,如果你传入的不是数组,那么获取到的就是undefined
const length = array.length;
//判断不是数组,或者size没有设置,size小于1,就返回空数组
if (!length || !size || size < 1) {
return [];
}
//核心部分
var index = 0; //用来表示切割元素的范围start
var resIndex = 0; //用来递增表示输出数组的下标
//根据length和size算出输出数组的长度,并且创建它。
var result = new Array(Math.ceil(length / size));
//进行循环
while (index < length) {
//循环过程中设置result[0]和result[1]的值。该值根据array.slice切割得到。
result[resIndex++] = array.slice(index, (index += size));
}
//输出新数组
return result;
}
......
......@@ -1360,7 +1360,7 @@ const formattedDate = (dateVal) => {
</div>
</span>
</div>
<div class="list_item is_block isFile" :style="{ width: '40%' }"
<div class="list_item is_block isFile" :style="{ width: '40%', 'margin-right': '28px' }"
v-if="((detailType != 'asset' || assetDetailInfo.isEvaluationAssessment == 'Y') && assetDetailInfo.registerAttachment?.qualityEvaluationFile?.length) || (evaDetailInfo?.qualityEvaluationFile?.length > 0)">
<span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">数据质量评价收集</span>
<span
......@@ -1475,7 +1475,7 @@ const formattedDate = (dateVal) => {
</div>
</span>
</div>
<div class="list_item is_block isFile" :style="{ width: '40%' }"
<div class="list_item is_block isFile" :style="{ width: '40%', 'margin-right': '28px' }"
v-if="(detailType == 'asset' && assetDetailInfo.isQualityAssessment == 'Y') && assetDetailInfo.registerAttachment?.evaluationFile?.length">
<span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">质量评估报告</span>
<span v-for="(item) in (assetDetailInfo.registerAttachment?.evaluationFile || [])" class="item_value"
......@@ -1592,7 +1592,7 @@ const formattedDate = (dateVal) => {
<!-- <span
v-if="tenantDetail.businessLicense?.length || assetDetailInfo.registerAttachment?.commitmentLetter?.length"
class="small-title" :style="{ marginTop: '10px' }">公司信息</span> -->
<div class="list_item is_block isFile" :style="{ width: '40%' }"
<div class="list_item is_block isFile" :style="{ width: '40%', 'margin-right': '28px' }"
v-if="tenantDetail.businessLicense?.length">
<span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">营业执照</span>
<span v-for="(item) in (tenantDetail?.businessLicense || [])" class="item_value"
......
......@@ -9,7 +9,8 @@ import { ElMessage, ElMessageBox } from 'element-plus';
import { CarouselPanel } from '@/components/CarouselPanel';
import { useRouter, useRoute } from "vue-router";
import { MoreFilled } from "@element-plus/icons-vue";
import { changeNum, tagMethod, tagType, } from "@/utils/common";
import { changeNum } from "@/utils/common";
import { chunk } from "@/api/modules/common";
import { getRegisterList, registerDelete, getExchangeList } from "@/api/modules/dataAsset";
import { passFlowData, rejectFlowData, revokeFlowData } from "@/api/modules/workFlowService";
import useDataAssetStore from "@/store/modules/dataAsset";
......@@ -29,7 +30,7 @@ const loading = ref(false);
const defaultItemLogo = new URL('@/assets/images/home-finance-product.png', import.meta.url).href
const carouselInfo: any = ref({
list: [],
height: '176px',
height: '172px',
loop: false,
autoplay: false,
arrow: 'hover',
......@@ -344,9 +345,7 @@ const getExchangeData = () => {
getExchangeList().then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data || [];
while (data.length) {
exchangeList.value.push(data.splice(0, 4));
}
exchangeList.value = chunk(data, 4);
carouselInfo.value.list = exchangeList.value;
carouselInfo.value.arrow = exchangeList.value.length > 1 ? 'hover' : 'never';
} else {
......@@ -538,28 +537,26 @@ const rejectDialogBtnClick = (btn, info) => {
<CarouselPanel :carousel-info="carouselInfo">
<template v-slot:default="{ carousel }">
<div class="card-content" v-for="(item, i) in carousel" :key="'item-' + i"
:class="{ active: exchangGuid == item.exchangeGuid, mr8: i < carousel.length - 1 && (i + 1) % 4 !== 0 }">
<div class="header">
:class="{ active: exchangGuid == item.exchangeGuid, mr16: i < carousel.length - 1 && (i + 1) % 4 !== 0 }"
@click="btnClick({ value: 'search', ...item })" v-preReClick>
<div class="title" :class="{ active: exchangGuid == item.exchangeGuid }">
<img class="left-img"
:src="(item.picUrl && typeof item.picUrl == 'string') ? item.picUrl : defaultItemLogo" alt="" />
<div class="right-main">
<div class="title" :class="{ active: exchangGuid == item.exchangeGuid }"
@click="btnClick({ value: 'search', ...item })" v-preReClick>{{ item.exchangeName ?? '--' }}</div>
<div class="count-group">
<div class="count-item">
<div class="item-label">已登记产品数</div>
<div class="item-num">{{ changeNum(item.listingNum || 0) }}</div>
</div>
<div class="count-item">
<div class="item-label">审批中产品数</div>
<div class="item-num">{{ changeNum(item.underReviewNum || 0) }}</div>
</div>
</div>
<span>{{ item.exchangeName ?? '--' }}</span>
</div>
<div class="count-group">
<div class="count-item">
<div class="item-label">已登记产品数</div>
<div class="item-num">{{ changeNum(item.listingNum || 0) }}</div>
</div>
<div class="count-item">
<div class="item-label">审批中产品数</div>
<div class="item-num">{{ changeNum(item.underReviewNum || 0) }}</div>
</div>
</div>
<div class="operator-btn">
<!-- <div class="left-btn borderRight" @click="btnClick(item)">更新模板</div> -->
<div class="left-btn is_block" @click="btnClick({ value: 'create', ...item })">资产登记</div>
<!-- <div class="left-btn borderRight" @click.stop="btnClick(item)">更新模板</div> -->
<div class="left-btn is_block" @click.stop="btnClick({ value: 'create', ...item })">资产登记</div>
</div>
</div>
</template>
......@@ -590,7 +587,7 @@ const rejectDialogBtnClick = (btn, info) => {
}
.table_panel_wrap {
height: calc(100% - 176px);
height: calc(100% - 188px);
}
}
......@@ -661,7 +658,7 @@ const rejectDialogBtnClick = (btn, info) => {
width: 22%;
min-width: 220px;
height: auto;
padding: 16px;
padding: 12px;
border: 1px solid var(--el-border-color-regular);
border-radius: 4px;
cursor: pointer;
......@@ -731,67 +728,66 @@ const rejectDialogBtnClick = (btn, info) => {
position: relative;
}
.list-content {
width: 100%;
height: 176px;
overflow: hidden;
:deep(.el-carousel__container) {
margin-bottom: 16px;
.card-content {
width: calc(25% - 6px);
padding: 16px;
width: calc(25% - 12px);
height: 100%;
margin-bottom: 8px;
min-width: 325px;
max-width: 400px;
border: 1px solid var(--el-border-color-regular);
float: left;
&.active {
box-shadow: 0 0 0 1px var(--el-color-primary);
&:hover {
border-color: #44ABB4;
}
&.mr8 {
margin-right: 8px;
&.active {
border-color: #44ABB4;
background: #edf6f7;
}
.header {
display: flex;
margin-bottom: 16px;
&.mr16 {
margin-right: 16px;
}
img {
width: 80px;
margin-right: 16px;
}
img {
width: 20px;
margin-right: 16px;
}
.title {
font-size: 16px;
color: #212121;
font-weight: 600;
margin-bottom: 8px;
cursor: pointer;
.title {
height: 48px;
padding: 0 12px;
font-size: 16px;
color: #212121;
font-weight: 600;
cursor: pointer;
display: flex;
align-items: center;
}
&:hover,
&.active {
color: var(--el-color-primary);
}
}
.count-group {
height: 80px;
display: flex;
justify-content: space-between;
.right-main {
width: calc(100% - 96px);
.count-item {
width: 50%;
padding: 8px 0;
display: flex;
flex-direction: column;
justify-content: space-between;
.count-group {
display: flex;
justify-content: space-between;
align-items: center;
}
.item-num {
font-size: 20px;
font-weight: 600;
color: #212121;
margin-top: 8px;
}
}
.item-num {
line-height: 36px;
font-size: 20px;
font-weight: 600;
color: #44ABB4;
margin-top: 8px;
}
}
......@@ -799,8 +795,8 @@ const rejectDialogBtnClick = (btn, info) => {
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 0 0 1px #4fa1a4;
position: relative;
border-top: 1px solid #d9d9d9;
// &::after {
// content: '';
......@@ -817,8 +813,8 @@ const rejectDialogBtnClick = (btn, info) => {
height: 40px;
line-height: 40px;
text-align: center;
background: #4fa1a4;
color: #fff;
background: #FAFAFA;
color: #666;
cursor: pointer;
&.is_block {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!