提交 419454dc authored 作者: yanpeng's avatar yanpeng

修复一些合并时出现的问题

上级 816965e6
...@@ -384,7 +384,7 @@ ...@@ -384,7 +384,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="radarChart.loading ? '解读生成中...' : radarChart.interpretation" /> <AiPane :aiContent="radarChart.interpretation" />
</div> </div>
</template> </template>
</custom-container> </custom-container>
...@@ -409,7 +409,7 @@ ...@@ -409,7 +409,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="trendChart.loading ? '解读生成中...' : trendChart.interpretation" /> <AiPane :aiContent="trendChart.interpretation" />
</div> </div>
</template> </template>
</custom-container> </custom-container>
...@@ -1663,7 +1663,7 @@ const handlePerClick = item => { ...@@ -1663,7 +1663,7 @@ const handlePerClick = item => {
const route = router.resolve({ const route = router.resolve({
path: "/characterPage", path: "/characterPage",
query: { query: {
type: item.type || [1, 2, 3][Math.floor(Math.random() * 3)], type: item.personType || [1, 2, 3][Math.floor(Math.random() * 3)],
personId: item.personId personId: item.personId
} }
}); });
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<div class="list-content" v-for="(ele, j) in element.cclChildren" :key="j"> <div class="list-content" v-for="(ele, j) in element.cclChildren" :key="j">
<div class="content-title" @click="ele.isExpand = !ele.isExpand"> <div class="content-title" @click="ele.isExpand = !ele.isExpand">
<div class="code-zone"> <div class="code-zone">
<!-- <div class="dot" v-if="ele.isDot"></div> --> <div class="dot" v-if="ele.changeFlag"></div>
<span class="code">{{ ele.cclCode }}</span> <span class="code">{{ ele.cclCode }}</span>
</div> </div>
<span class="name">{{ ele.cclTitleZh }}</span> <span class="name">{{ ele.cclTitleZh }}</span>
...@@ -121,9 +121,9 @@ const getTechFields = async () => { ...@@ -121,9 +121,9 @@ const getTechFields = async () => {
const res = await getAreaType(); const res = await getAreaType();
if (res && res.code === 200) { if (res && res.code === 200) {
console.log("-----getTechFields", res.data); console.log("-----getTechFields", res.data);
techFields.value = res.data; techFields.value = [{ id: "all", name: "全部领域", checked: true }].concat(res.data);
// 默认选中第一个 // 默认选中第一个
techFields.value[0].checked = true; // techFields.value[0].checked = true;
} }
} catch (error) { } catch (error) {
console.error("获取科技领域字典失败:", error); console.error("获取科技领域字典失败:", error);
...@@ -136,9 +136,9 @@ const getControlReasonList = async () => { ...@@ -136,9 +136,9 @@ const getControlReasonList = async () => {
const res = await getControlReason(); const res = await getControlReason();
if (res && res.code === 200) { if (res && res.code === 200) {
console.log("-----getControlReasonList", res.data); console.log("-----getControlReasonList", res.data);
controlReason.value = res.data; controlReason.value = [{ id: "all", name: "全部", checked: true }].concat(res.data);
// 默认选中第一个 // 默认选中第一个
controlReason.value[0].checked = true; // controlReason.value[0].checked = true;
} }
} catch (error) { } catch (error) {
console.error("获取管控原因字典失败:", error); console.error("获取管控原因字典失败:", error);
...@@ -151,8 +151,19 @@ const viewNew = ref(true); ...@@ -151,8 +151,19 @@ const viewNew = ref(true);
// 获取ccl清单列表 // 获取ccl清单列表
const getCclList = async () => { const getCclList = async () => {
let techDomains = techFields.value.filter(item => item.checked).map(item => +item.id); let techDomains = [];
let controls = controlReason.value.filter(item => item.checked).map(item => +item.id); const allTech = techFields.value.find(item => item.id === "all"); // ✅ 修正点1
if (!allTech || !allTech.checked) {
techDomains = techFields.value.filter(item => item.checked && item.id !== "all").map(item => item.id); // 注意:这里 map 的是 value,假设后端需要的是 value 字段
}
let controls = [];
const allReason = controlReason.value.find(item => item.id === "all"); // ✅ 修正点2
if (!allReason || !allReason.checked) {
controls = controlReason.value.filter(item => item.checked && item.id !== "all").map(item => item.id);
}
// let techDomains = techFields.value.filter(item => item.checked).map(item => +item.id);
// let controls = controlReason.value.filter(item => item.checked).map(item => +item.id);
const params = { const params = {
categoryCode: currentCCLType.value, categoryCode: currentCCLType.value,
techDomainIds: techDomains, techDomainIds: techDomains,
...@@ -161,7 +172,7 @@ const getCclList = async () => { ...@@ -161,7 +172,7 @@ const getCclList = async () => {
isLatest: viewNew.value, isLatest: viewNew.value,
recordId: currentCCLVersion.value || "" recordId: currentCCLVersion.value || ""
}; };
console.log(JSON.stringify(params)); console.log("cclList参数:", params);
try { try {
// const res = await getCclQuery(null); // const res = await getCclQuery(null);
const res = await getCclQuery(params); const res = await getCclQuery(params);
...@@ -272,8 +283,34 @@ const getCCLVersionListApi = async () => { ...@@ -272,8 +283,34 @@ const getCCLVersionListApi = async () => {
}; };
// 筛选逻辑处理 // 筛选逻辑处理
const handleFilterChange = (item, list, type) => { const handleFilterChange = (item, listRef, type) => {
console.log(item, list, type); const list = listRef;
const allItem = list.find(i => i.id === "all"); // ✅ 关键修正
if (!allItem) return;
if (item.id === "all") {
if (item.checked) {
list.forEach(i => {
if (i.id !== "all") i.checked = false;
});
} else {
const hasOtherChecked = list.some(i => i.id !== "all" && i.checked);
if (!hasOtherChecked && list.length > 1) {
const firstNonAll = list.find(i => i.id !== "all");
if (firstNonAll) firstNonAll.checked = true;
}
}
} else {
if (item.checked) {
allItem.checked = false;
} else {
const hasAnyChecked = list.some(i => i.id !== "all" && i.checked);
if (!hasAnyChecked) {
allItem.checked = true;
}
}
}
getCclList(); getCclList();
}; };
...@@ -373,6 +410,9 @@ onMounted(async () => { ...@@ -373,6 +410,9 @@ onMounted(async () => {
:deep(.el-input__wrapper) { :deep(.el-input__wrapper) {
padding: 0 11px; padding: 0 11px;
border: 1px solid rgba(0, 0, 0, 0.1);
background-color: #fff;
border-radius: 3px;
} }
:deep(.el-input__inner) { :deep(.el-input__inner) {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</div> </div>
<div class="department">{{ headerTitle.department }}</div> <div class="department">{{ headerTitle.department }}</div>
</div> </div>
<div class="btn"><img :src="icon01" alt />切换</div> <!-- <div class="btn"><img :src="icon01" alt />切换</div> -->
</div> </div>
<div class="header-nav"> <div class="header-nav">
<div <div
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="sanctionCountChart.loading ? '解读生成中...' : sanctionCountChart.interpretation" /> <AiPane :aiContent="sanctionCountChart.interpretation" />
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="rankChart.loading ? '解读生成中...' : rankChart.interpretation" /> <AiPane :aiContent="rankChart.interpretation" />
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="domainChart.loading ? '解读生成中...' : domainChart.interpretation" /> <AiPane :aiContent="domainChart.interpretation" />
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="typeChart.loading ? '解读生成中...' : typeChart.interpretation" /> <AiPane :aiContent="typeChart.interpretation" />
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="domainChart.loading ? '解读生成中...' : domainChart.interpretation" /> <AiPane :aiContent="domainChart.interpretation" />
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="typeChart.loading ? '解读生成中...' : typeChart.interpretation" /> <AiPane :aiContent="typeChart.interpretation" />
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
...@@ -154,11 +154,7 @@ ...@@ -154,11 +154,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane <AiPane :aiContent="countryDistributionChart.interpretation" />
:aiContent="
countryDistributionChart.loading ? '解读生成中...' : countryDistributionChart.interpretation
"
/>
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
...@@ -202,11 +198,7 @@ ...@@ -202,11 +198,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane <AiPane :aiContent="regionDistributionChart.interpretation" />
:aiContent="
regionDistributionChart.loading ? '解读生成中...' : regionDistributionChart.interpretation
"
/>
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="revenueChart.loading ? '解读生成中...' : revenueChart.interpretation" /> <AiPane :aiContent="revenueChart.interpretation" />
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="marketChart.loading ? '解读生成中...' : marketChart.interpretation" /> <AiPane :aiContent="marketChart.interpretation" />
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
...@@ -249,7 +249,7 @@ ...@@ -249,7 +249,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="rdChart.loading ? '解读生成中...' : rdChart.interpretation" /> <AiPane :aiContent="rdChart.interpretation" />
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="shareChart.loading ? '解读生成中...' : shareChart.interpretation" /> <AiPane :aiContent="shareChart.interpretation" />
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
......
...@@ -60,13 +60,7 @@ ...@@ -60,13 +60,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane <AiPane :aiContent="rdInstrumentDependencyChart.interpretation" />
:aiContent="
rdInstrumentDependencyChart.loading
? '解读生成中...'
: rdInstrumentDependencyChart.interpretation
"
/>
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
...@@ -102,13 +96,7 @@ ...@@ -102,13 +96,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane <AiPane :aiContent="rdInstrumentImportCountryChart.interpretation" />
:aiContent="
rdInstrumentImportCountryChart.loading
? '解读生成中...'
: rdInstrumentImportCountryChart.interpretation
"
/>
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
...@@ -177,13 +165,7 @@ ...@@ -177,13 +165,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane <AiPane :aiContent="internationalCooperationChart.interpretation" />
:aiContent="
internationalCooperationChart.loading
? '解读生成中...'
: internationalCooperationChart.interpretation
"
/>
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
...@@ -252,11 +234,7 @@ ...@@ -252,11 +234,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane <AiPane :aiContent="internationalPaperChart.interpretation" />
:aiContent="
internationalPaperChart.loading ? '解读生成中...' : internationalPaperChart.interpretation
"
/>
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<div class="info-row"> <div class="info-row">
<div class="label">发布人:</div> <div class="label">发布人:</div>
<div class="value link"> <div class="value link">
<img :src="defaultTitle" alt="" class="icon avatar" /> <img :src="formattedData.avartar || defaultTitle" alt="" class="icon avatar" />
<span @click="handleClick">{{ formattedData.postPersonName }} ></span> <span @click="handleClick">{{ formattedData.postPersonName }} ></span>
</div> </div>
</div> </div>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<div class="content-title">制裁实体分布:</div> <div class="content-title">制裁实体分布:</div>
<div class="distribution-list"> <div class="distribution-list">
<div class="list-item" v-for="(item, index) in entityDistribution" :key="index"> <div class="list-item" v-for="(item, index) in entityDistribution" :key="index">
<img :src="flag" alt="" class="flag" /> <img :src="item.imageUrl || flag" alt="" class="flag" />
<div class="country-name">{{ item.name }}</div> <div class="country-name">{{ item.name }}</div>
<div class="progress-bar-container"> <div class="progress-bar-container">
<div <div
...@@ -152,6 +152,7 @@ ...@@ -152,6 +152,7 @@
</div> </div>
<div class="right-content"> <div class="right-content">
<div class="sanction-group-list"> <div class="sanction-group-list">
<el-empty v-if="sanctionList.length === 0" description="暂无制裁清单" />
<div class="sanction-group" v-for="(group, index) in sanctionList" :key="index"> <div class="sanction-group" v-for="(group, index) in sanctionList" :key="index">
<el-table :data="group.entities" style="width: 100%"> <el-table :data="group.entities" style="width: 100%">
<el-table-column label="实体名称" min-width="280"> <el-table-column label="实体名称" min-width="280">
...@@ -302,7 +303,7 @@ const getSanctionOverviewList = async () => { ...@@ -302,7 +303,7 @@ const getSanctionOverviewList = async () => {
removeCount.value = data.removeCount || 0; removeCount.value = data.removeCount || 0;
removeRuleCount.value = data.removeRuleCount || 0; removeRuleCount.value = data.removeRuleCount || 0;
const list = data.sanList || []; const list = activeTab.value === "add" ? data.sanList : data.removeList || [];
sanctionList.value = list.map(item => ({ sanctionList.value = list.map(item => ({
reason: item.sanReason, reason: item.sanReason,
entities: (item.orgList || []).map(org => ({ entities: (item.orgList || []).map(org => ({
...@@ -448,7 +449,8 @@ const formattedData = computed(() => { ...@@ -448,7 +449,8 @@ const formattedData = computed(() => {
fileCode: info.fileCode ? `${info.fileCode} ` : "", fileCode: info.fileCode ? `${info.fileCode} ` : "",
administrativeOrderId: info.administrativeOrderId ? `No. ${info.administrativeOrderId}` : "", administrativeOrderId: info.administrativeOrderId ? `No. ${info.administrativeOrderId}` : "",
postPersonName: info.postPersonName, postPersonName: info.postPersonName,
domains: info.domainNames domains: info.domainNames,
avartar: info.postPersonAvatarUrl
}; };
}); });
......
...@@ -239,8 +239,6 @@ const handlePageChange = async newPage => { ...@@ -239,8 +239,6 @@ const handlePageChange = async newPage => {
// ========== 选择某项 ========== // ========== 选择某项 ==========
const selectSanction = item => { const selectSanction = item => {
selectedSanctionId.value = item.id; selectedSanctionId.value = item.id;
// 可在此处触发其他逻辑,如查看详情
// 替换当前路由参数,并重新加载数据
router.replace({ router.replace({
path: window.location.pathname, path: window.location.pathname,
query: { query: {
...@@ -248,11 +246,8 @@ const selectSanction = item => { ...@@ -248,11 +246,8 @@ const selectSanction = item => {
sanTypeId: item.sanTypeId sanTypeId: item.sanTypeId
} }
}); });
// 3. 立即重新加载数据(关键!)
getSingleSanctionOverviewData();
// 4. 可选:关闭弹窗
sanctionModalVisible.value = false; sanctionModalVisible.value = false;
window.location.reload();
}; };
// ========== 关闭弹窗时重置 ========== // ========== 关闭弹窗时重置 ==========
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论