bding 1 年之前
父节点
当前提交
94fe3e68d9

+ 8 - 0
src/api/modules/rai/lableApi.js

@@ -33,6 +33,14 @@ const lableApi = {
   video_and_voiceImgActivityVideo: (params) => {
     return http.get("/cygx/activityVideo/video_and_voice/img", params);
   },
+  /* 热门活动接口 */
+  tagHot_activityList: (params) => {
+    return http.get("/cygx/tag/hot_activity/list", params);
+  },
+  /* 热门活动接口 */
+  tagHot_activityListUpdate: (params) => {
+    return http.post("/cygx/tag/hot_activity/update", params);
+  },
 };
 
 export default lableApi;

二进制
src/assets/img/rai_m/edit_icon_GuDing.png


二进制
src/assets/img/rai_m/remove_below_GuDing.png


+ 28 - 21
src/views/rai_manage/activityManage/components/addActivity.vue

@@ -18,6 +18,10 @@
           <el-select placeholder="请选择活动类型" :disabled="!isShowSelect" clearable v-model="cactivityType" @change="activityTypeDetail" style="width: 360px">
             <el-option v-for="item in cactivityTypeList" :label="item.ActivityTypeName" :key="item.ActivityTypeId" :value="item.ActivityTypeId"></el-option>
           </el-select>
+          <template v-if="isResearch">
+            <el-radio style="margin-left: 30px" v-model="areaType" :label="1">国内</el-radio>
+            <el-radio v-model="areaType" :label="2">海外</el-radio>
+          </template>
         </div>
         <div>
           <el-button v-if="isShowSelect" type="primary" @click="templateBtn">活动内容输入模板</el-button>
@@ -355,15 +359,16 @@ export default {
       isShowAddIcon: true, //主题标签的添加的iocn 是否显示
       modifyImgVisible: false,
       defaultImage: "",
-      shareImg:'',
+      shareImg: "",
       videoAndVoiceList: [],
+      areaType: 1,
     };
   },
   computed: {
     // 弘则 研选 是否是研选
-    isResearch(){
-      return this.$route.path.indexOf("Purchaser")!=-1?true:false
-    }
+    isResearch() {
+      return this.$route.path.indexOf("Purchaser") != -1 ? true : false;
+    },
   },
   mixins: [richTextMixins],
   watch: {
@@ -393,19 +398,19 @@ export default {
         this.isCheckAllType(newval === 4 ? true : false);
       },
     },
-    '$route.path':{
-      handler(value){
-        console.log(value,'value');
+    "$route.path": {
+      handler(value) {
+        console.log(value, "value");
       },
-      immediate:true
-    }
+      immediate: true,
+    },
   },
   created() {},
   mounted() {
-    if(!this.isResearch){
+    if (!this.isResearch) {
       this.chartPermission();
-    }else{
-      this.optionFormregion="买方研选"
+    } else {
+      this.optionFormregion = "买方研选";
     }
     this.getActivityType();
     this.customerTypelist();
@@ -507,8 +512,8 @@ export default {
       raiInterface.activityDetail({ ActivityId: Number(this.$route.query.id) }).then((res) => {
         if (res.Ret !== 200) return;
         const { Data } = res;
-        this.defaultImage = Data.BackgroundImg
-        this.shareImg = Data.ShareImg
+        this.defaultImage = Data.BackgroundImg;
+        this.shareImg = Data.ShareImg;
         this.activeIsState = Data.ActiveState;
         this.cactivityType = Data.ActivityTypeId;
         this.optionFormregion = Data.ChartPermissionName;
@@ -526,6 +531,7 @@ export default {
         this.isMark = Data.IsShowSubjectName == 1 ? true : false;
         this.valTemporary = Data.TemporaryLabel;
         this.radioTemporary = this.valTemporary ? true : false;
+        this.areaType = Data.AreaType;
         // 复选框模块
         this.$nextTick(() => {
           let RefPage = this.$refs.researchSelect;
@@ -539,7 +545,7 @@ export default {
           RefPage.SiginupDeadline = Data.SiginupDeadline;
           RefPage.PointsSet = Data.PointsSet;
           RefPage.institutionName = Data.PointsSet.CompanyName;
-          RefPage.isShowHz = !!Data.IsShowHz
+          RefPage.isShowHz = !!Data.IsShowHz;
         });
         this.addEditVideo = Data.VideoDetail
           ? [Data.VideoDetail].map((item) => {
@@ -667,10 +673,11 @@ export default {
         IsBClass: RefPage.isBClass ? 1 : 0,
         SiginupDeadline: RefPage.SiginupDeadline,
         PointsSet,
-        BackgroundImg:this.defaultImage,
-        ShareImg:this.shareImg,
-        IsResearch:this.optionFormregion.includes('研选')?true:false,
-        IsShowHz:RefPage.isShowHz?1:0
+        BackgroundImg: this.defaultImage,
+        ShareImg: this.shareImg,
+        IsResearch: this.optionFormregion.includes("研选") ? true : false,
+        IsShowHz: RefPage.isShowHz ? 1 : 0,
+        AreaType: this.areaType,
       });
 
       if (res.Ret !== 200) return;
@@ -679,7 +686,7 @@ export default {
     },
     //获取行业
     chartPermission() {
-      raiInterface.chartPermissionList({IsHideResearch:!this.isResearch}).then((res) => {
+      raiInterface.chartPermissionList({ IsHideResearch: !this.isResearch }).then((res) => {
         if (res.Ret === 200) {
           this.chartPermissionList = res.Data.List;
         }
@@ -687,7 +694,7 @@ export default {
     },
     //获取活动类型
     getActivityType() {
-      raiInterface.getActivityType({IsResearch:this.isResearch}).then((res) => {
+      raiInterface.getActivityType({ IsResearch: this.isResearch }).then((res) => {
         if (res.Ret === 200) {
           this.isShowAddIcon = res.Data.IsShowAddIcon;
           this.cactivityTypeList = res.Data.List;

+ 84 - 15
src/views/rai_manage/cygxManage/components/lableDlg.vue

@@ -1,17 +1,23 @@
 <template>
   <div class="container lable-add-content">
-    <el-dialog :title="visibleText" :visible.sync="showRegularDlg" width="600px" v-dialogDrag :close-on-click-modal="false" :modal-append-to-body="false" center @close="handleClose">
-      <div>
-        <div v-for="(item, index) in addDataList" :key="index" style="add-name-item">
-          <el-autocomplete style="width: 80%" v-model="item.name" :fetch-suggestions="querySearchAsync" placeholder="请输入内容"></el-autocomplete>
+    <el-dialog :title="visibleTitle" :visible.sync="showRegularDlg" width="600px" v-dialogDrag :close-on-click-modal="false" :modal-append-to-body="false" center @close="handleClose">
+      <div v-if="dataRegular.TagType == 1">
+        <div v-for="(item, index) in addDataList" :key="index" class="add-name-item">
+          <el-autocomplete style="width: 90%" v-model="item.name" clearable :fetch-suggestions="querySearchAsync" @select="tableSelectHandel(item)" placeholder="请输入内容"></el-autocomplete>
           <img style="width: 20px; height: 20px" @click="deleteChildren(index)" src="~@/assets/img/icons/delete-Item.png" />
         </div>
-        <img style="width: 40px; height: 40px" src="~@/assets/img/icons/add-img.png" @click="addActivityNameHandler" />
+        <div style="display: flex; align-items: center; cursor: pointer; width: 100px" @click="addActivityNameHandler">
+          <img style="width: 20px; height: 20px; margin-right: 10px" src="~@/assets/img/document_m/add-label.png" />
+          添加活动
+        </div>
       </div>
-      <div></div>
+      <div class="text-content" v-else>{{ visibleText }}</div>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="handleClose">取 消</el-button>
-        <el-button type="primary" @click="addBannerHandler">确 定</el-button>
+        <template v-if="dataRegular.TagType == 1">
+          <el-button @click="handleClose">取 消</el-button>
+          <el-button type="primary" @click="addBannerHandler">确 定</el-button>
+        </template>
+        <el-button v-else type="primary" @click="handleClose">关闭</el-button>
       </span>
     </el-dialog>
   </div>
@@ -40,20 +46,48 @@ export default {
     };
   },
   computed: {
-    visibleText() {
+    visibleTitle() {
       return this.dataRegular.TagName || "";
     },
+    visibleText() {
+      let str =
+        this.dataRegular.TagType == 2
+          ? "所有【海外】的活动,和报告类型为【海外研究】的报告"
+          : this.dataRegular.TagType == 3
+          ? "所有路演回放音视频"
+          : this.dataRegular.TagType == 4
+          ? "所有问答系列音频"
+          : "";
+      return str;
+    },
   },
   watch: {},
   created() {},
   mounted() {},
   methods: {
     handleClose() {
+      this.querySearchList = [];
+      this.addDataList = [];
       this.$emit("update:showRegularDlg", false);
       this.$emit("update:dataRegular", {});
     },
-    addBannerHandler() {
-      this.handleClose();
+    async addBannerHandler() {
+      let isOk = this.addDataList.every((item) => item.name !== "");
+      if (isOk && this.addDataList.length > 0) {
+        let arr = [];
+        this.addDataList.forEach((_) => {
+          arr.push(_.id);
+        });
+        const res = await raiInterface.tagHot_activityListUpdate({
+          ActivityIds: arr,
+        });
+        if (res.Ret === 200) {
+          this.$message.success("保存成功");
+          this.handleClose();
+        }
+      } else {
+        this.$message.error("活动名称不能为空");
+      }
     },
     // 删除
     deleteChildren(index) {
@@ -62,9 +96,15 @@ export default {
     async querySearchAsync(query, cb) {
       cb([]);
       if (query) {
-        const res = await raiInterface.getActivityLossCompany({ KeyWord: query });
+        const res = await raiInterface.tagHot_activityList({ KeyWord: query });
         if (res.Ret === 200) {
-          this.querySearchList = res.Data.List;
+          console.log(res);
+          this.querySearchList = res.Data.List.map((_) => {
+            return {
+              ..._,
+              value: _.ActivityName + "," + _.ActivityTime,
+            };
+          });
           cb(this.querySearchList);
         }
       }
@@ -72,16 +112,45 @@ export default {
     addActivityNameHandler() {
       this.addDataList.push({
         name: "",
+        id: "",
+      });
+    },
+    tableSelectHandel(item) {
+      this.querySearchList.forEach((_) => {
+        if (_.value === item.name) {
+          item.id = _.ActivityId;
+        }
       });
-      console.log(this.addDataList);
     },
   },
 };
 </script>
-<style scoped lang="scss">
+<style lang="scss">
 .lable-add-content {
   .add-name-item {
     display: flex;
+    align-items: center;
+    margin-bottom: 20px;
+    .el-input {
+      width: 100% !important;
+    }
+    img {
+      margin-left: 20px;
+    }
+  }
+}
+</style>
+<style scoped lang="scss">
+.lable-add-content {
+  .text-content {
+    width: 487px;
+    height: 40px;
+    line-height: 40px;
+    border-radius: 4px;
+    border: 1px solid #dcdfe6;
+    padding-left: 12px;
+    color: #c0c4cc;
+    margin: 0 auto 50px;
   }
 }
 </style>

+ 39 - 20
src/views/rai_manage/cygxManage/lableManage.vue

@@ -2,13 +2,21 @@
   <div class="container lable-manage-page">
     <el-card style="overflow: hidden">
       <div class="top-comtent">
-        <span>当前标签</span>
+        <div>
+          <span>当前标签</span>
+          <span>自定义标签</span>
+          <span>固定标签</span>
+        </div>
         <el-button type="primary" @click="addOfEitdHandler('添加')">添加标签</el-button>
       </div>
       <div ref="lableSortable" class="lable-content">
-        <div class="lable-item" v-for="item in lableList" :key="item.TagId">
+        <div :class="['lable-item', item.TagType > 0 && 'regular-lable']" v-for="item in lableList" :key="item.TagId">
           <div class="text_oneLine">{{ item.TagName }}</div>
-          <div class="lable-img">
+          <div class="lable-img" v-if="item.TagType">
+            <img src="~@/assets/img/rai_m/edit_icon_GuDing.png" alt="" @click="addOfEitdHandler('编辑', item)" />
+            <img src="~@/assets/img/rai_m/remove_below_GuDing.png" alt="" @click="lableButtonHandel('撤下', item)" />
+          </div>
+          <div class="lable-img" v-else>
             <img src="~@/assets/img/rai_m/edit_icon.png" alt="" @click="addOfEitdHandler('编辑', item)" />
             <img src="~@/assets/img/rai_m/remove_below.png" alt="" @click="lableButtonHandel('撤下', item)" />
           </div>
@@ -190,22 +198,6 @@ export default {
       const res = await raiInterface.getLableTagListCustom();
       if (res.Ret === 200) {
         this.lableList = res.Data || [];
-        this.lableList.push({
-          TagId: 540,
-          TagName: "热门活动",
-          ArticleTypes: "",
-          ActivityTypes: "专家电话会,分析师电话会",
-          Industries: "热门活动",
-          SubjectNames: "",
-          Sort: 9,
-          ModifyTime: "2023-10-30 13:45:54",
-          CreateTime: "2023-10-23 10:05:24",
-          OnlineTime: "2023-10-23 10:05:24",
-          OfflineTime: "",
-          Status: 1,
-          Pv: 0,
-          Uv: 0,
-        });
       }
     },
 
@@ -306,7 +298,7 @@ export default {
     },
     // 添加或者编辑标签
     addOfEitdHandler(type, item) {
-      if (item && item.TagName === "热门活动") {
+      if (item && item.TagType > 0) {
         this.dataRegular = item;
         this.showRegularDlg = true;
         return;
@@ -418,6 +410,28 @@ export default {
     display: flex;
     align-items: center;
     justify-content: space-between;
+    div {
+      :nth-child(2),
+      :nth-child(3) {
+        font-size: 12px;
+        font-weight: 400;
+        text-align: center;
+        display: inline-block;
+        width: 80px;
+        height: 30px;
+        line-height: 30px;
+        background: #ecf5ff;
+        border: 1px solid #b3d8ff;
+        color: #409eff;
+        border-radius: 4px;
+        margin-left: 10px;
+      }
+      :nth-child(3) {
+        background-color: #fff8e4;
+        border: 1px solid #ffd9c2;
+        color: #e37318;
+      }
+    }
     span {
       font-weight: 500;
       font-size: 16px;
@@ -460,6 +474,11 @@ export default {
       border: 2px solid #409eff;
       overflow: hidden;
     }
+    .regular-lable {
+      background-color: #fff8e4 !important;
+      border: 1px solid #ffd9c2;
+      color: #e37318;
+    }
   }
   .pv-uv-download {
     display: flex;