|
@@ -57,7 +57,7 @@
|
|
|
<block v-if="item.Source === 'activity' || item.Source === 'activityspecial'">
|
|
|
<ActivityItem :list="item.Activity" />
|
|
|
</block>
|
|
|
- <block v-if="['researchsummary', 'minutessummary', 'meetingreviewchapt', 'productinterior'].includes(item.Source)">
|
|
|
+ <block v-if="['researchsummary', 'minutessummary', 'meetingreviewchapt', 'productinterior','reportselection'].includes(item.Source)">
|
|
|
<item-content :list="dataListItem(item)" @showMorningDialog="showMorningDialog" />
|
|
|
</block>
|
|
|
</view>
|
|
@@ -205,7 +205,7 @@ export default {
|
|
|
Newchart: item.Newchart,
|
|
|
Activity: item.Activity || item.Activityspecial,
|
|
|
Roadshow: item.Roadshow || item.Activityvideo || item.Activityvoice,
|
|
|
- ThreeSummary: item.Researchsummary || item.Minutessummary || item.Meetingreviewchapt || item.ProductInterior,
|
|
|
+ ThreeSummary: item.Researchsummary || item.Minutessummary || item.Meetingreviewchapt || item.ProductInterior || item.ReportSelection,
|
|
|
};
|
|
|
listArr.push({ ...obj, IsShowData: obj.Article || obj.Newchart || obj.Roadshow || obj.Activity || obj.ThreeSummary });
|
|
|
});
|
|
@@ -327,105 +327,72 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async lableKeysHandler(item) {
|
|
|
- const checkList=item.CheckList
|
|
|
- let isFlag=false //是否有交集
|
|
|
+ const checkList = item.CheckList;
|
|
|
+ if (item.isAct) {
|
|
|
+ item.isAct = false;
|
|
|
+ this.lableArrList = this.lableArrList.filter((key) => checkList.includes(key));
|
|
|
+ this.getLableDataList();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let isFlag = false; //是否有交集
|
|
|
for (let e of checkList) {
|
|
|
- if(this.lableArrList.includes(e)){
|
|
|
- isFlag=true
|
|
|
+ if (this.lableArrList.includes(e)) {
|
|
|
+ isFlag = true;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(!isFlag){
|
|
|
- this.lableArrList=[...this.lableArrList,...checkList]
|
|
|
- item.isAct=true
|
|
|
- }else{//有交集
|
|
|
+ if (!isFlag) {
|
|
|
+ this.lableArrList = [...this.lableArrList, ...checkList];
|
|
|
+ item.isAct = true;
|
|
|
+ } else {
|
|
|
+ //有交集
|
|
|
// 找到有交集的那个 设置为false 然后将点击的这个设置为true
|
|
|
- this.lableIsRows.forEach(e1=>{
|
|
|
- e1.forEach(e2=>{
|
|
|
- let flag=false
|
|
|
- for(let i of e2.CheckList){
|
|
|
- if(this.lableArrList.includes(i)){
|
|
|
- flag=true
|
|
|
- break
|
|
|
+ this.lableIsRows.forEach((e1) => {
|
|
|
+ e1.forEach((e2) => {
|
|
|
+ let flag = false;
|
|
|
+ for (let i of e2.CheckList) {
|
|
|
+ if (this.lableArrList.includes(i)) {
|
|
|
+ flag = true;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
- if(flag){
|
|
|
- e2.isAct=false
|
|
|
+ if (flag) {
|
|
|
+ e2.isAct = false;
|
|
|
}
|
|
|
- })
|
|
|
- })
|
|
|
+ });
|
|
|
+ });
|
|
|
|
|
|
- item.isAct=true
|
|
|
+ item.isAct = true;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- // let actId = [];
|
|
|
- // this.$set(item, "isAct", !item.isAct);
|
|
|
- // if (item.isAct) {
|
|
|
- // let index = this.lableArrList.findIndex((val) => val === item);
|
|
|
- // console.log(index);
|
|
|
- // index >= 0 ? (this.lableArrList = this.lableArrList.splice(index, 1)) : "";
|
|
|
- // this.lableArrList.push(item);
|
|
|
- // const firstIndex = this.findFirstIntersectingObjectIndex(this.lableArrList);
|
|
|
- // console.log(this.lableArrList, firstIndex);
|
|
|
- // if (firstIndex >= 0) {
|
|
|
- // this.dataListLable.forEach((item) => {
|
|
|
- // if (item === this.lableArrList[firstIndex]) {
|
|
|
- // item.isAct = !item.isAct;
|
|
|
- // }
|
|
|
- // });
|
|
|
- // this.lableArrList = this.lableArrList.splice(firstIndex, 1);
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // this.lableIsRows.forEach((item) => {
|
|
|
- // item.forEach((_) => {
|
|
|
- // _.isAct && actId.push(_.TagId);
|
|
|
- // });
|
|
|
- // });
|
|
|
- // this.page_no = 1;
|
|
|
- // this.actIdLable = actId.join(",");
|
|
|
- // this.getNewList();
|
|
|
- // if (!item.isAct) return;
|
|
|
- // const res = await Home.tagAddHistory({
|
|
|
- // TagId: item.TagId,
|
|
|
- // });
|
|
|
- },
|
|
|
- findFirstIntersectingObjectIndex(arr) {
|
|
|
- for (let i = 0; i < arr.length - 1; i++) {
|
|
|
- for (let j = i + 1; j < arr.length; j++) {
|
|
|
- const checklist1 = arr[i].CheckList;
|
|
|
- const checklist2 = arr[j].CheckList;
|
|
|
-
|
|
|
- if (this.checklistsHaveIntersection(checklist1, checklist2)) {
|
|
|
- return i;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return -1; // 没有找到相交的对象,返回 -1
|
|
|
+ this.getLableDataList();
|
|
|
+ if (!item.isAct) return;
|
|
|
+ const res = await Home.tagAddHistory({
|
|
|
+ TagId: item.TagId,
|
|
|
+ });
|
|
|
},
|
|
|
- checklistsHaveIntersection(arr1, arr2) {
|
|
|
- for (const item of arr1) {
|
|
|
- if (arr2.includes(item)) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
- return false;
|
|
|
+ getLableDataList() {
|
|
|
+ let actId = [];
|
|
|
+ this.lableIsRows.forEach((item) => {
|
|
|
+ item.forEach((_) => {
|
|
|
+ _.isAct && actId.push(_.TagId);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.page_no = 1;
|
|
|
+ this.actIdLable = actId.join(",");
|
|
|
+ this.getNewList();
|
|
|
},
|
|
|
// 或者标签内容
|
|
|
async homeTagListCustom() {
|
|
|
const res = await Home.homeTagListCustom();
|
|
|
if (res.Ret === 200) {
|
|
|
- const arr=res.Data || [];
|
|
|
- this.dataListLable = arr.map(item=>{
|
|
|
+ const arr = res.Data || [];
|
|
|
+ this.dataListLable = arr.map((item) => {
|
|
|
return {
|
|
|
...item,
|
|
|
- isAct:false
|
|
|
- }
|
|
|
- })
|
|
|
+ isAct: false,
|
|
|
+ };
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
},
|