提交 4d9ad6a9 authored 作者: 张伊明's avatar 张伊明

合并分支 'zym-dev' 到 'pre'

Zym dev 查看合并请求 !214
流水线 #16 已失败 于阶段
in 1 分 45 秒
...@@ -29,6 +29,25 @@ import { ElMessage } from "element-plus"; ...@@ -29,6 +29,25 @@ import { ElMessage } from "element-plus";
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
import useTagsViewStore from '@/stores/tagsView.js'
const tagsViewStore = useTagsViewStore()
// 在路由全局守卫中处理
router.beforeEach((to, from, next) => {
// 路由允许添加标签(排除掉隐藏的布局页如 /404, /login 等)
if (to.path.includes('dataLibrary')) {
tagsViewStore.addView({
path: to.path,
name: to.name, // 对应组件的 name,用于缓存
meta: { ...to.meta },
active: true
})
}
next()
})
const isShowAiBox = ref(false); const isShowAiBox = ref(false);
......
<template> <template>
<div class="warnning-pane-wrapper" :style="{ width: width ? width : '1600px', height: height ? height : 'auto', minHeight: height ? undefined : '116px' }" <div class="warnning-pane-wrapper" :style="{ width: width ? width : '1600px' }"
:class="{ :class="{
level1: warnningLevel === '特别重大风险', level1: warnningLevel === '特别重大风险',
level2: warnningLevel === '重大风险', level2: warnningLevel === '重大风险',
...@@ -27,12 +27,22 @@ ...@@ -27,12 +27,22 @@
</div> </div>
</div> </div>
<div class="warnning-pane-content text-regular"> <div class="warnning-pane-content text-regular">
{{ warnningContent }} {{ showContent }}
<div class="show-all-btn" v-if="props.warnningContent.length > 185" @click.stop="handleClickShowAll">
<div class="text text-tip-2">
{{ isShowAllContent? '收起' : '展开' }}
</div>
<div class="icon">
<img v-if="!isShowAllContent" src="./icons/down.png" alt="">
<img v-else src="./icons/up.png" alt="">
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import {ref, computed} from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
...@@ -50,6 +60,14 @@ const props = defineProps( ...@@ -50,6 +60,14 @@ const props = defineProps(
} }
) )
const showContent = computed(() => {
if(!isShowAllContent.value) {
return props.warnningContent.length > 185 ? props.warnningContent.slice(0,185) + '...' : props.warnningContent
} else {
return props.warnningContent
}
})
const emit = defineEmits(['clickPane']) const emit = defineEmits(['clickPane'])
const handleClickPane = () => { const handleClickPane = () => {
...@@ -57,6 +75,12 @@ const handleClickPane = () => { ...@@ -57,6 +75,12 @@ const handleClickPane = () => {
emit('clickPane') emit('clickPane')
} }
const isShowAllContent = ref(false)
const handleClickShowAll = () => {
isShowAllContent.value = !isShowAllContent.value
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -64,7 +88,8 @@ const handleClickPane = () => { ...@@ -64,7 +88,8 @@ const handleClickPane = () => {
border-radius: 10px; border-radius: 10px;
border: 1px solid var(--color-primary-100); border: 1px solid var(--color-primary-100);
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1); box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
cursor: pointer; // cursor: pointer;
height: max-content;
} }
.level1 { .level1 {
...@@ -146,12 +171,40 @@ const handleClickPane = () => { ...@@ -146,12 +171,40 @@ const handleClickPane = () => {
.warnning-pane-content{ .warnning-pane-content{
width: calc(100% - 40px); width: calc(100% - 40px);
margin: 0 auto; margin: 0 auto;
margin-bottom: 16px; // height: 60px;
min-height: 60px; // display: -webkit-box;
height: auto; // /* 2. 设置内部布局方向为垂直 */
display: block; // -webkit-box-orient: vertical;
overflow: visible; // /* 3. 限制显示的行数为 2 行 */
white-space: pre-wrap; // -webkit-line-clamp: 2;
word-break: break-word; // /* 4. 隐藏超出部分 */
// overflow: hidden;
// /* 5. 设置文本溢出显示省略号 */
// text-overflow: ellipsis;
position: relative;
.show-all-btn {
position: absolute;
right: 0px;
bottom: 4px;
width: 48px;
height: 22px;
display: flex;
gap: 4px;
cursor: pointer;
.text{
color: var(--text-primary-50-color);
&:hover{
color: var(--color-primary-100);
}
}
.icon{
width: 16px;
height: 16px;
img{
width: 100%;
height: 100%;
}
}
}
} }
</style> </style>
\ No newline at end of file
...@@ -20,7 +20,7 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs' ...@@ -20,7 +20,7 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// import AnalysisBox from '@/components/base/BoxBackground/AnalysisBox.vue' // import AnalysisBox from '@/components/base/BoxBackground/AnalysisBox.vue'
// import NewsList from '@/components/base/NewsList/index.vue' // import NewsList from '@/components/base/NewsList/index.vue'
// import ModuleHeader from '@/components/base/ModuleHeader/index.vue' // import ModuleHeader from '@/components/base/ModuleHeader/index.vue'
// import RiskSignal from "@/components/base/RiskSignal/index.vue"; // import RiskSignal from "@/components/base/riskSignal/index.vue";
// import MessageBubble from "@/components/base/MessageBubble/index.vue"; // import MessageBubble from "@/components/base/MessageBubble/index.vue";
// import SourceTabLsit from '@/components/base/SourceTabList/index.vue' // import SourceTabLsit from '@/components/base/SourceTabList/index.vue'
// import ActionButton from "@/components/base/ActionButton/index.vue" // import ActionButton from "@/components/base/ActionButton/index.vue"
......
...@@ -65,4 +65,5 @@ router.beforeEach((to, from, next) => { ...@@ -65,4 +65,5 @@ router.beforeEach((to, from, next) => {
next(); next();
}); });
export default router; export default router;
...@@ -11,7 +11,6 @@ const setChart = (option, chartId, allowClick, selectParam) => { ...@@ -11,7 +11,6 @@ const setChart = (option, chartId, allowClick, selectParam) => {
let chart = echarts.init(chartDom); let chart = echarts.init(chartDom);
chart.setOption(option); chart.setOption(option);
if (allowClick) { if (allowClick) {
// 3. 添加点击事件监听
chart.on('click', function (params) { chart.on('click', function (params) {
switch (selectParam.moduleType) { switch (selectParam.moduleType) {
case '国会法案': case '国会法案':
......
...@@ -992,7 +992,9 @@ const handleBox9Data = async () => { ...@@ -992,7 +992,9 @@ const handleBox9Data = async () => {
const selectParam = { const selectParam = {
moduleType: '国会法案', moduleType: '国会法案',
proposedDateStart: box9selectetedTime.value, proposedDateStart: box9selectetedTime.value,
status: box9LegislativeStatus.value === '提出法案' ? 0 : 1 status: box9LegislativeStatus.value === '提出法案' ? 0 : 1,
isInvolveCn: 1
} }
box9ChartInstance = setChart(box9Chart, "box9Chart", true, selectParam); box9ChartInstance = setChart(box9Chart, "box9Chart", true, selectParam);
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</template> </template>
<script setup> <script setup>
import RiskSignal from "@/components/base/RiskSignal/index.vue"; import RiskSignal from "@/components/base/riskSignal/index.vue";
import { ref, onMounted, computed } from "vue"; import { ref, onMounted, computed } from "vue";
import router from "@/router"; import router from "@/router";
import { getCoopRestrictionTrends, getCoopRestrictionSignals } from "@/api/coopRestriction/coopRestriction.js"; import { getCoopRestrictionTrends, getCoopRestrictionSignals } from "@/api/coopRestriction/coopRestriction.js";
......
...@@ -111,13 +111,13 @@ const siderList = ref([ ...@@ -111,13 +111,13 @@ const siderList = ref([
{ {
name: '科技法案', name: '科技法案',
icon: Icon1, icon: Icon1,
active: true, active: false,
isExpanded: true, isExpanded: false,
children: [ children: [
{ {
name: '国会法案', name: '国会法案',
path: '/dataLibrary/countryBill', path: '/dataLibrary/countryBill',
active: true, active: false,
}, },
{ {
name: '州法案', name: '州法案',
...@@ -477,6 +477,118 @@ const handleClickToolBox = () => { ...@@ -477,6 +477,118 @@ const handleClickToolBox = () => {
}; };
onMounted(() => { onMounted(() => {
const path = route.path
switch (path) {
case '/dataLibrary/countryBill':
siderList.value[0].active = true
siderList.value[0].isExpanded = true
siderList.value[0].children[0].active = true
break
case '/dataLibrary/stateBill':
siderList.value[0].active = true
siderList.value[0].isExpanded = true
siderList.value[0].children[1].active = true
break
case '/dataLibrary/dataDecree':
siderList.value[1].active = true
break
case '/dataLibrary/dataThinkTank':
siderList.value[2].active = true
break
case '/dataLibrary/dataEntityList':
siderList.value[3].active = true
siderList.value[3].isExpanded = true
siderList.value[3].children[0].active = true
break
case '/dataLibrary/dataCommerceControlList':
siderList.value[3].active = true
siderList.value[3].isExpanded = true
siderList.value[3].children[1].active = true
break
case '/dataLibrary/dataEntityListEvent':
siderList.value[3].active = true
siderList.value[3].isExpanded = true
siderList.value[3].children[2].active = true
break
case '/dataLibrary/dataCommerceControlListEvent':
siderList.value[3].active = true
siderList.value[3].isExpanded = true
siderList.value[3].children[3].active = true
break
case '/dataLibrary/sDNList':
siderList.value[4].active = true
siderList.value[4].isExpanded = true
siderList.value[4].children[0].active = true
break
case '/dataLibrary/mREList':
siderList.value[4].active = true
siderList.value[4].isExpanded = true
siderList.value[4].children[1].active = true
break
case '/dataLibrary/sDNListEvent':
siderList.value[4].active = true
siderList.value[4].isExpanded = true
siderList.value[4].children[2].active = true
break
case '/dataLibrary/mREListEvent':
siderList.value[4].active = true
siderList.value[4].isExpanded = true
siderList.value[4].children[3].active = true
break
case '/dataLibrary/case337':
siderList.value[5].active = true
siderList.value[5].isExpanded = true
siderList.value[5].children[0].active = true
break
case '/dataLibrary/case232':
siderList.value[5].active = true
siderList.value[5].isExpanded = true
siderList.value[5].children[1].active = true
break
case '/dataLibrary/case301':
siderList.value[5].active = true
siderList.value[5].isExpanded = true
siderList.value[5].children[2].active = true
break
case '/dataLibrary/congressMan':
siderList.value[6].active = true
siderList.value[6].isExpanded = true
siderList.value[6].children[0].active = true
break
case '/dataLibrary/technologyLeader':
siderList.value[6].active = true
siderList.value[6].isExpanded = true
siderList.value[6].children[1].active = true
break
case '/dataLibrary/minister':
siderList.value[6].active = true
siderList.value[6].isExpanded = true
siderList.value[6].children[2].active = true
break
case '/dataLibrary/thinkTankResearcher':
siderList.value[6].active = true
siderList.value[6].isExpanded = true
siderList.value[6].children[3].active = true
break
case '/dataLibrary/technologyCompany':
siderList.value[7].active = true
siderList.value[7].isExpanded = true
siderList.value[7].children[0].active = true
break
case '/dataLibrary/researchUniversity':
siderList.value[7].active = true
siderList.value[7].isExpanded = true
siderList.value[7].children[1].active = true
break
case '/dataLibrary/keyLab':
siderList.value[7].active = true
siderList.value[7].isExpanded = true
siderList.value[7].children[2].active = true
break
}
}) })
...@@ -683,7 +795,8 @@ onMounted(() => { ...@@ -683,7 +795,8 @@ onMounted(() => {
.icon { .icon {
width: 16px; width: 16px;
height: 16px; height: 16px;
&:hover{
&:hover {
border-radius: 8px; border-radius: 8px;
background: var(--color-primary-10); background: var(--color-primary-10);
} }
......
...@@ -703,7 +703,7 @@ ...@@ -703,7 +703,7 @@
<script setup> <script setup>
//这是一个备注 //这是一个备注
import NewsList from "@/components/base/newsList/index.vue"; import NewsList from "@/components/base/newsList/index.vue";
import RiskSignal from "@/components/base/RiskSignal/index.vue"; import RiskSignal from "@/components/base/riskSignal/index.vue";
import { onMounted, ref, computed, reactive, shallowRef, watch, nextTick } from "vue"; import { onMounted, ref, computed, reactive, shallowRef, watch, nextTick } from "vue";
import { useContainerScroll } from "@/hooks/useScrollShow"; import { useContainerScroll } from "@/hooks/useScrollShow";
const homeMainRef = ref(null); const homeMainRef = ref(null);
......
...@@ -459,7 +459,7 @@ ...@@ -459,7 +459,7 @@
</template> </template>
<script setup> <script setup>
import RiskSignal from "@/components/base/RiskSignal/index.vue"; import RiskSignal from "@/components/base/riskSignal/index.vue";
import { onMounted, ref, computed } from "vue"; import { onMounted, ref, computed } from "vue";
import scrollToTop from "@/utils/scrollToTop"; import scrollToTop from "@/utils/scrollToTop";
import setChart from "@/utils/setChart"; import setChart from "@/utils/setChart";
......
...@@ -394,7 +394,7 @@ import { onMounted, ref, nextTick } from "vue"; ...@@ -394,7 +394,7 @@ import { onMounted, ref, nextTick } from "vue";
import LeftBtn from "@/components/base/PageBtn/LeftBtn.vue"; import LeftBtn from "@/components/base/PageBtn/LeftBtn.vue";
import RightBtn from "@/components/base/PageBtn/RightBtn.vue"; import RightBtn from "@/components/base/PageBtn/RightBtn.vue";
import RiskSignal from "@/components/base/RiskSignal/index.vue"; import RiskSignal from "@/components/base/riskSignal/index.vue";
import TipTab from "@/components/base/TipTab/index.vue" import TipTab from "@/components/base/TipTab/index.vue"
import MessageBubble from "@/components/base/MessageBubble/index.vue" import MessageBubble from "@/components/base/MessageBubble/index.vue"
import NewsList from "@/components/base/NewsList/index.vue"; import NewsList from "@/components/base/NewsList/index.vue";
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</template> </template>
<script setup> <script setup>
import RiskSignal from "@/components/base/RiskSignal/index.vue"; import RiskSignal from "@/components/base/riskSignal/index.vue";
import { ref, onBeforeMount, computed } from "vue"; import { ref, onBeforeMount, computed } from "vue";
import router from "@/router"; import router from "@/router";
import { getLatestUpdates, getRiskSignal } from '@/api/ruleRestriction/index.js' import { getLatestUpdates, getRiskSignal } from '@/api/ruleRestriction/index.js'
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
</template> </template>
<script setup> <script setup>
import RiskSignal from "@/components/base/RiskSignal/index.vue"; import RiskSignal from "@/components/base/riskSignal/index.vue";
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import { import {
getNewProject, getRiskSignal getNewProject, getRiskSignal
......
...@@ -317,7 +317,7 @@ ...@@ -317,7 +317,7 @@
</template> </template>
<script setup> <script setup>
import RiskSignal from "@/components/base/RiskSignal/index.vue"; import RiskSignal from "@/components/base/riskSignal/index.vue";
import { onMounted, ref } from "vue"; import { onMounted, ref } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import scrollToTop from "@/utils/scrollToTop"; import scrollToTop from "@/utils/scrollToTop";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论