|
@@ -34,6 +34,7 @@ function handleCleanFilter(){
|
|
|
listState.permissions=[]
|
|
|
|
|
|
listState.keyWord=''
|
|
|
+ showMoreFilter.value = false
|
|
|
refreshList()
|
|
|
}
|
|
|
|
|
@@ -41,7 +42,7 @@ function handleCleanFilter(){
|
|
|
|
|
|
const classifyOptions = ref([])
|
|
|
const permissionOptions = ref([])
|
|
|
-async function getClassify() {
|
|
|
+async function getClassify(type='') {
|
|
|
|
|
|
const res = await reportExternalInterface.getClasssify()
|
|
|
if (res.Ret !== 200) return
|
|
@@ -49,10 +50,13 @@ async function getClassify() {
|
|
|
classifyOptions.value = res.Data||[];
|
|
|
filterEmpty(classifyOptions.value)
|
|
|
|
|
|
- listState.classifys = collectClassifyOpts.value.length ? collectClassifyOpts.value.map(_ => _.Id) : []
|
|
|
- getList()
|
|
|
+ if(type === 'init') {
|
|
|
+ listState.classifys = collectClassifyOpts.value.length ? collectClassifyOpts.value.map(_ => _.Id) : [];
|
|
|
+ getList()
|
|
|
+ handleShowFilter()
|
|
|
+ }
|
|
|
}
|
|
|
-getClassify()
|
|
|
+getClassify('init')
|
|
|
function filterEmpty(arr) {
|
|
|
arr.length && arr.forEach(item => {
|
|
|
item.Children.length && filterEmpty(item.Children)
|
|
@@ -79,7 +83,7 @@ const collectClassifyOpts = computed(() => {
|
|
|
function findCollectItem(arr) {
|
|
|
let collectArr = []
|
|
|
function traverse(node) {
|
|
|
- if (node.IsCollect === 1) {
|
|
|
+ if (node.IsCollect === 1&&!node.Children?.length) {
|
|
|
collectArr.push(node);
|
|
|
}
|
|
|
if (node.Children && node.Children.length) {
|
|
@@ -107,6 +111,7 @@ const listState = reactive({
|
|
|
async function getList(){
|
|
|
const res = isRise.value
|
|
|
? await reportExternalInterface.getRiseReportList({
|
|
|
+ ChartPermissionIdList: listState.permissions.join(','),
|
|
|
Keyword: listState.keyWord,
|
|
|
PageSize: listState.pageSize,
|
|
|
CurrentIndex: listState.page,
|
|
@@ -149,25 +154,25 @@ function refreshList(){
|
|
|
}
|
|
|
function handleReportChange() {
|
|
|
listState.keyWord = '';
|
|
|
- listState.permissions = [];
|
|
|
+ listState.loading = true;
|
|
|
+ // listState.permissions = [];
|
|
|
showMoreFilter.value = false
|
|
|
refreshList()
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
+//筛选项弹窗
|
|
|
const showMoreFilter=ref(false)
|
|
|
const permissionDropMenuIns = ref(null)
|
|
|
const clasifyDropMenuIns = ref(null)
|
|
|
function handleShowFilter() {
|
|
|
+ if(showMoreFilter.value) return
|
|
|
selectPermissionVal.value=_.cloneDeep(listState.permissions)
|
|
|
selectClassifyVal.value=_.cloneDeep(listState.classifys)
|
|
|
showMoreFilter.value=true
|
|
|
nextTick(()=>{
|
|
|
setTimeout(() => {
|
|
|
- listState.reportType===1
|
|
|
- ?(permissionDropMenuIns.value?.toggle(true))
|
|
|
- :(clasifyDropMenuIns.value?.toggle(true));
|
|
|
+ permissionDropMenuIns.value?.toggle(true)
|
|
|
}, 100);
|
|
|
})
|
|
|
}
|
|
@@ -195,7 +200,6 @@ function handleChangeClassify(item) {
|
|
|
? selectClassifyVal.value.splice(selectClassifyVal.value.findIndex(_ => _===item.Id),1)
|
|
|
: selectClassifyVal.value.push(item.Id)
|
|
|
|
|
|
- console.log(selectClassifyVal.value)
|
|
|
}
|
|
|
}
|
|
|
function handleConfirmClassify() {
|
|
@@ -214,6 +218,33 @@ async function handleChangeCollect(item) {
|
|
|
showToast(item.IsCollect===1?'收藏成功':'取消收藏成功')
|
|
|
}
|
|
|
|
|
|
+//报告收藏是报告分类收藏 神奇的设计
|
|
|
+async function handleChangeReportClassifyCollect(item) {
|
|
|
+
|
|
|
+ item.IsCollect === 1 && await showDialog({
|
|
|
+ title: '提示',
|
|
|
+ message: '确认取消收藏该报告分类吗?',
|
|
|
+ showCancelButton:true
|
|
|
+ })
|
|
|
+
|
|
|
+ let ClassifyId = isRise.value ? (item.ClassifyIdThird||item.ClassifyIdSecond||item.ClassifyIdFirst) : item.ClassifyId;
|
|
|
+ const res = await reportExternalInterface.collectClassify({
|
|
|
+ ClassifyId
|
|
|
+ })
|
|
|
+
|
|
|
+ if(res.Ret !== 200) return
|
|
|
+ item.IsCollect = item.IsCollect?0:1
|
|
|
+
|
|
|
+ listState.list.forEach(_ => {
|
|
|
+ let reportClssifyId = isRise.value ? (_.ClassifyIdThird||_.ClassifyIdSecond||_.ClassifyIdFirst) : _.ClassifyId;
|
|
|
+ if(ClassifyId===reportClssifyId) {
|
|
|
+ _.IsCollect = item.IsCollect;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ showToast(item.IsCollect===1?'收藏报告分类成功':'取消收藏成功')
|
|
|
+ getClassify()
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
|
|
|
// 跳转详情
|
|
@@ -284,7 +315,7 @@ function goDetail(item){
|
|
|
|
|
|
<template v-if="showMoreFilter">
|
|
|
<van-dropdown-menu :close-on-click-overlay="false" :close-on-click-outside="false">
|
|
|
- <van-dropdown-item title="品种标签" ref="permissionDropMenuIns" v-if="!isRise">
|
|
|
+ <van-dropdown-item title="品种标签" ref="permissionDropMenuIns">
|
|
|
<div class="drop-opt-box">
|
|
|
<ul class="list">
|
|
|
<li
|
|
@@ -322,7 +353,7 @@ function goDetail(item){
|
|
|
<ul class="list">
|
|
|
<li
|
|
|
:class="['item',
|
|
|
- {'active':selectClassifyVal.includes(item.Id)},
|
|
|
+ {'active':selectClassifyVal.includes(item.Id)&&!item.Children?.length},
|
|
|
]"
|
|
|
v-for="item in classifyOptions"
|
|
|
:key="item.Id"
|
|
@@ -346,7 +377,7 @@ function goDetail(item){
|
|
|
<ul class="classify-sub-list" v-if="item.Children&&item.isSlide">
|
|
|
<li
|
|
|
:class="['sub-item',
|
|
|
- {'active':selectClassifyVal.includes(subItem.Id)}
|
|
|
+ {'active':selectClassifyVal.includes(subItem.Id)&&!subItem.Children?.length}
|
|
|
]"
|
|
|
v-for="subItem in item.Children"
|
|
|
:key="subItem.Id"
|
|
@@ -462,14 +493,30 @@ function goDetail(item){
|
|
|
@click="goDetail(item)"
|
|
|
>
|
|
|
<div class="list-top">
|
|
|
- <h2 class="van-ellipsis title">{{item.Title}}</h2>
|
|
|
+ <h2 class="van-ellipsis title">
|
|
|
+ {{item.Title}}
|
|
|
+ <template v-if="isRise">
|
|
|
+ ({{ moment(item.MsgSendTime||item.PublishTime||item.CreateTime).format('MMDD')}})
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ ({{ moment(item.CreateTime).format('MMDD') }})
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <svg-icon
|
|
|
+ v-if="isReportWarResearch"
|
|
|
+ class="handle-icon"
|
|
|
+ :name="item.IsCollect?'collect_ico':'cancel_collect_ico'"
|
|
|
+ size="20px"
|
|
|
+ @click.stop="handleChangeReportClassifyCollect(item)"
|
|
|
+ />
|
|
|
+ </h2>
|
|
|
</div>
|
|
|
<p class="van-multi-ellipsis--l2 des">{{item.Abstract}}</p>
|
|
|
<div class="bot-info">
|
|
|
<div class="time">
|
|
|
<span style="margin-right:2px">{{moment(item.ModifyTime).format('YYYY-MM-DD')}}</span>
|
|
|
</div>
|
|
|
- <span style="margin-left:10px">{{item.SysUserName}}</span>
|
|
|
+ <span class="author van-ellipsis">{{item.SysUserName}}</span>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -582,28 +629,17 @@ function goDetail(item){
|
|
|
}
|
|
|
}
|
|
|
.title{
|
|
|
- .tag{
|
|
|
- display: inline-block;
|
|
|
- width: 100px;
|
|
|
- height: 44px;
|
|
|
- line-height: 44px;
|
|
|
- text-align: center;
|
|
|
- font-size: 28px;
|
|
|
- background: rgba(0, 82, 217, 0.1);
|
|
|
- border-radius: 4px;
|
|
|
- color: $theme-color;
|
|
|
- }
|
|
|
- .week{
|
|
|
- color: $font-success;
|
|
|
- background: rgba(43, 164, 113, 0.1);
|
|
|
- }
|
|
|
- .day{
|
|
|
- color: $theme-warning;
|
|
|
- background: rgba(227, 115, 24, 0.1);
|
|
|
- }
|
|
|
+ width: 100%;
|
|
|
font-size: 32px;
|
|
|
line-height: 44px;
|
|
|
margin: 0;
|
|
|
+ padding-right: 50px;
|
|
|
+ position: relative;
|
|
|
+ .handle-icon {
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ top: 0;
|
|
|
+ }
|
|
|
}
|
|
|
.inline-title{
|
|
|
margin-left: -14px;
|
|
@@ -622,18 +658,12 @@ function goDetail(item){
|
|
|
color: $font-grey;
|
|
|
font-size: 28px;
|
|
|
.time{
|
|
|
- flex: 1;
|
|
|
- }
|
|
|
- .active-status{
|
|
|
- color: $font-success;
|
|
|
+ flex-shrink: 0;
|
|
|
}
|
|
|
- .read-count{
|
|
|
- color: $theme-warning;
|
|
|
- margin-right: 30px;
|
|
|
- span{
|
|
|
- display: inline-block;
|
|
|
- margin: 0 10px;
|
|
|
- }
|
|
|
+ .author {
|
|
|
+ flex: 1;
|
|
|
+ margin-left: 15px;
|
|
|
+ text-align: right;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -642,7 +672,7 @@ function goDetail(item){
|
|
|
.drop-opt-box {
|
|
|
/* padding: 0 30px; */
|
|
|
.list {
|
|
|
- padding: 0 40px;
|
|
|
+ padding: 0 40px 40px 60px;
|
|
|
max-height: 40vh;
|
|
|
overflow: auto;
|
|
|
}
|