Browse Source

Merge branch 'master' into crm16.6

yujinwen 4 weeks ago
parent
commit
1d408b0b08

+ 13 - 1
src/api/modules/crmApi.js

@@ -1140,7 +1140,7 @@ const equityContacts = {
   },
   //用户相关互动接口
   getInteractionRelevant: (params) => {
-    return http.get("/cygx/user/interaction/relevant", params);
+    return http.get("/cygx/use_rai_label/detail", params);
   },
   //机构状态搜索栏互助
   getInteractionNum: (params) => {
@@ -1178,6 +1178,18 @@ const equityContacts = {
   userFeedbackDel:(params)=>{
     return http.post("/cygx/user_feedback/del",params)
   }, 
+  // 删除销售输入标签接口
+  userRaiLabelDel:(params)=>{
+    return http.post("/cygx/use_rai_label/delte",params)
+  }, 
+  // 销售输入标签接口
+  userRaiLabelAdd:(params)=>{
+    return http.post("/cygx/use_rai_label/add",params)
+  }, 
+  // 获取标签详情接口
+  getLabelList:(params)=>{
+    return http.get("/cygx/use_rai_label/list",params)
+  }, 
 };
 
 /*

+ 58 - 0
src/views/custom_manage/contacts/compontents/addLabelDlg.vue

@@ -0,0 +1,58 @@
+<template>
+  <div class="container-feedbackDlg">
+    <el-dialog v-dialogDrag :visible.sync="addIsShow" :close-on-click-modal="false" :modal-append-to-body="false" @close="cancelHandle" center title="添加标签" width="500px">
+      <el-input style="width: 100%" type="text" placeholder="请输入标签名称" v-model="lableText"> </el-input>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="cancelHandle">取 消</el-button>
+        <el-button type="primary" @click="remindBtnHandler">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { equityContacts } from "@/api/api.js";
+
+export default {
+  name: "",
+  components: {},
+  props: {
+    addIsShow: {
+      type: Boolean,
+      default: false,
+    },
+    interactionFrom: {
+      type: Object,
+      default: {},
+    },
+  },
+  data() {
+    return {
+      lableText: "",
+    };
+  },
+  computed: {},
+
+  methods: {
+    // 弹框关闭的事件
+    cancelHandle() {
+      this.$emit("update:addIsShow", false);
+      this.lableText = "";
+    },
+    // 确认事件
+    async remindBtnHandler() {
+      if (!this.lableText) return;
+      const res = await equityContacts.userRaiLabelAdd({
+        Label: this.lableText,
+        UserId: this.interactionFrom.UserId,
+      });
+      if (res.Ret === 200) {
+        this.cancelHandle();
+        this.$emit("updateList");
+        this.$message.success("添加成功!");
+      }
+    },
+  },
+};
+</script>
+<style scoped lang="scss"></style>

+ 135 - 83
src/views/custom_manage/contacts/compontents/contactsColums.js

@@ -375,90 +375,142 @@ export const tableColums = (type) => {
 };
 
 //表格列
-export const interactionColums = [
-  {
-    title: "报告阅读",
-    tableName: "List1",
-    table: [
-      {
-        label: "报告标题",
-        key: "Title",
-        minwidthsty: 140,
-      },
-      {
-        label: "阅读时间",
-        key: "CreateTime",
-      },
-      {
-        label: "阅读时长",
-        key: "StopTime",
-        widthsty: 80,
-      },
-    ],
-  },
-  {
-    title: "报告收藏",
-    tableName: "List2",
-    table: [
-      {
-        label: "报告标题",
-        key: "Title",
-        minwidthsty: 140,
-      },
-      {
-        label: "收藏时间",
-        key: "CreateTime",
-      },
-    ],
-  },
-  {
-    tableName: "List3",
-    title: "活动互动",
-    table: [
-      {
-        label: "活动名称",
-        key: "ActivityName",
-        minwidthsty: 140,
-      },
-      {
-        label: "活动形式",
-        key: "ActivityType",
-      },
-      {
-        label: "活动时间",
-        key: "ActivityTime",
-      },
-      {
-        label: "参会总时长",
-        key: "Duration",
-      },
-    ],
-  },
-  {
-    tableName: "List4",
-    title: "专项调研",
-    table: [
-      {
-        label: "调研主题",
-        key: "ActivityName",
-        minwidthsty: 140,
-      },
-      {
-        label: "行业",
-        key: "PermissionName",
-      },
-      {
-        label: "活动时间",
-        key: "ActivityTime",
-      },
-      {
-        label: "调研形式",
-        key: "ActivityType",
-      },
-    ],
-  },
-];
+export const interactionColums = (type) => {
+  return type === 1
+    ? [
+        {
+          label: "关键字",
+          key: "Label",
+        },
+        {
+          label: "搜索时间",
+          key: "CreateTime",
+        },
+      ]
+    : type === 2
+    ? [
+        {
+          label: "活动名称",
+          key: "ActivityName",
+        },
+        {
+          label: "活动类型",
+          key: "ActivityTypeName",
+        },
+        {
+          label: "活动时间",
+          key: "ActivityTime",
+        },
+        {
+          label: "参会时长",
+          key: "Duration",
+        },
+        {
+          label: "活动标签",
+          key: "Label",
+        },
+      ]
+    : type === 4
+    ? [
+        {
+          label: "活动名称",
+          key: "ActivityName",
+        },
+        {
+          label: "活动类型",
+          key: "ActivityTypeName",
+        },
+        {
+          label: "活动时间",
+          key: "ActivityTime",
+        },
+
+        {
+          label: "活动标签",
+          key: "Label",
+        },
+      ]
+    : type === 3 || type === 5
+    ? [
+        {
+          label: "研究员",
+          key: "ResearcherName",
+        },
+        {
+          label: "路演时间",
+          key: "RoadShowTime",
+        },
+        {
+          label: "路演主题",
+          key: "Theme",
+        },
 
+        {
+          label: "主题标签",
+          key: "Label",
+        },
+      ]
+    : type === 6
+    ? [
+        {
+          label: "输入关键字",
+          key: "Label",
+        },
+        {
+          label: "创建人",
+          key: "SysUserRealName",
+        },
+        {
+          label: "创建时间",
+          key: "CreateTime",
+        },
+      ]
+    : type === 9
+    ? [
+        {
+          label: "音视频名称",
+          key: "Title",
+        },
+        {
+          label: "活动时间",
+          key: "ActivityTime",
+        },
+        {
+          label: "活动标签",
+          key: "Label",
+        },
+        {
+          label: "查看时间",
+          key: "CreateTime",
+        },
+      ]
+    : [
+        {
+          label: "报告标题",
+          key: "Title",
+        },
+        {
+          label: "发布时间",
+          key: "PublishDate",
+        },
+        {
+          label: "阅读时间",
+          key: "CreateTime",
+        },
+        {
+          label: "阅读来源",
+          key: "SourceText",
+        },
+        {
+          label: "阅读时长",
+          key: "StopTime",
+        },
+        {
+          label: type === 8 ? "报告类型" : "报告标签",
+          key: "Label",
+        },
+      ];
+};
 //活动的筛选
 export const screenList = [
   {

+ 53 - 96
src/views/custom_manage/contacts/compontents/interactionDlg.vue

@@ -1,55 +1,19 @@
 <template>
   <div class="container-interaction-dlg">
-    <el-dialog
-      v-dialogDrag
-      :visible.sync="interactionDlg"
-      :close-on-click-modal="false"
-      :modal-append-to-body="false"
-      @close="cancelHandle"
-      center
-      width="800px"
-    >
-      <div slot="title">
-        <i
-          class="el-icon-close"
-          style="fontsize: 24px; cursor: pointer; position: absolute; right: 20px; top: 50%; transform: translateY(-50%)"
-          @click="cancelHandle"
-        ></i>
-        <span style="fontsize: 16px">{{ industryName }} - 相关互动</span>
-      </div>
+    <el-dialog v-dialogDrag :visible.sync="interactionDlg" :close-on-click-modal="false" :modal-append-to-body="false" @close="cancelHandle" :title="dlgTitle" center width="800px">
       <div>
-        <template v-if="isFllow">
-          <img src="~@/assets/img/attention.png" alt="" />
-          关注的产业
-        </template>
-        <div class="tabs-box">
-          <span v-for="item in interactionColums" :key="item.title" :class="tabsActive === item.title ? 'active' : ''" @click="tabsHandle(item)">
-            {{ item.title }}</span
-          >
-        </div>
         <div class="content">
-          <div v-for="item in interactionColums" :key="item.title">
-            <template v-if="tabsActive === item.title">
-              <el-table :data="tableData" v-loading="tableLoading" element-loading-text="数据加载中..." border height="350">
-                <el-table-column
-                  v-for="val in item.table"
-                  :key="val.label"
-                  :label="val.label"
-                  :width="val.widthsty"
-                  :min-width="val.minwidthsty"
-                  align="center"
-                >
-                  <template slot-scope="{ row }">
-                    <span @click="handleRowClick(row, val.key)" :style="handleRowStyle(val.key)">{{ handleRowContent(row, val.key) }}</span>
-                  </template>
-                </el-table-column>
-                <div slot="empty" style="padding: 20px 0">
-                  <img src="~@/assets/img/data_m/table_no.png" alt="" style="display: block; width: 135px; height: 90px; margin: 0 auto" />
-                  <span>暂无数据</span>
-                </div>
-              </el-table>
-            </template>
-          </div>
+          <el-table :data="tableData" v-loading="tableLoading" element-loading-text="数据加载中..." border height="350">
+            <el-table-column v-for="val in dataColums" :key="val.label" :label="val.label" :width="val.widthsty" :min-width="val.minwidthsty" align="center">
+              <template slot-scope="{ row }">
+                <span>{{ row[val.key] }}</span>
+              </template>
+            </el-table-column>
+            <div slot="empty" style="padding: 20px 0">
+              <img src="~@/assets/img/data_m/table_no.png" alt="" style="display: block; width: 135px; height: 90px; margin: 0 auto" />
+              <span>暂无数据</span>
+            </div>
+          </el-table>
         </div>
       </div>
     </el-dialog>
@@ -67,22 +31,41 @@ export default {
       type: Boolean,
       default: false,
     },
-    interactionFrom: {
-      type: Object,
+    raiLabelId: {
+      type: Number,
     },
   },
   data() {
     return {
       tableLoading: false,
       tableData: [],
-      tabsActive: "报告阅读",
-      industryName: "",
-      isFllow: false,
+      sourceType: "",
+      dataColums: [],
     };
   },
   computed: {
-    interactionColums() {
-      return interactionColums;
+    dlgTitle() {
+      switch (this.sourceType) {
+        case 1:
+          return "搜索关键字";
+        case 2:
+          return "线下活动";
+        case 3:
+          return "线下路演";
+        case 4:
+          return "线上活动";
+        case 5:
+          return "线上路演";
+        case 6:
+          return "输入标签";
+        case 7:
+        case 8:
+          return "阅读报告";
+        case 9:
+          return "路演回放";
+        default:
+          return ""; // 返回一个空对象表示没有样式
+      }
     },
   },
   watch: {
@@ -99,59 +82,33 @@ export default {
   methods: {
     async getInteractionRelevant() {
       const res = await equityContacts.getInteractionRelevant({
-        UserId: this.interactionFrom.id,
-        KeyWord: this.interactionFrom.key,
-        Source: this.tabsActive === "报告阅读" ? 1 : this.tabsActive === "报告收藏" ? 2 : this.tabsActive === "活动互动" ? 3 : 4,
+        RaiLabelId: this.raiLabelId,
       });
       if (res.Ret === 200) {
-        this.industryName = res.Data.IndustryName;
-        this.isFllow = res.Data.IsFllow;
-        this.tableData = res.Data.List || [];
+        this.sourceType = res.Data.SourceType;
+        this.dataColums = interactionColums(this.sourceType);
+        this.tableData =
+          res.Data.SourceType == 1
+            ? [res.Data.KeyWord]
+            : res.Data.SourceType == 2 || res.Data.SourceType == 4
+            ? [res.Data.Activity]
+            : res.Data.SourceType == 3 || res.Data.SourceType == 5
+            ? [res.Data.RoadShow]
+            : res.Data.SourceType == 6
+            ? [res.Data.Seller]
+            : res.Data.SourceType == 9
+            ? [res.Data.ActivityVivo]
+            : [res.Data.Article];
       }
     },
     tabsHandle(item) {
-      this.tabsActive = item.title;
       this.tableData = [];
       this.getInteractionRelevant();
     },
     //关闭弹框
     cancelHandle() {
-      this.tabsActive = "报告阅读";
       this.$emit("update:interactionDlg", false);
     },
-    /* 表格行的样式 */
-    handleRowStyle(key) {
-      const style = {
-        Title: "color: #409eff; cursor: pointer",
-      };
-      return style[key] ? style[key] : "";
-    },
-    /* 表格行的数据处理 */
-    handleRowContent(row, key) {
-      if (["ActivityType"].includes(key)) {
-        return row[key] == 1 ? "线上" : "线下";
-      } else {
-        return row[key];
-      }
-    },
-    /* 表格行的点击事件 */
-    handleRowClick(row, key) {
-      if (key === "Title") {
-        if (row.ArticleType == 1) {
-          let url =
-            process.env.NODE_ENV === "production"
-              ? "https://details.hzinsights.com/cygx/report"
-              : process.env.NODE_ENV === "test"
-              ? "http://xcxh5test.hzinsights.com/xcx_h5/cygx/report"
-              : "http://xcxh5test.hzinsights.com/xcx_h5/cygx/report";
-          let href = `${url}?id=${row.ArticleIdMd5}`;
-          window.open(href, "_blank");
-        } else {
-          let href = `https://vmp.hzinsights.com/v2/articles/${row.ArticleId}`;
-          window.open(href, "_blank");
-        }
-      }
-    },
   },
 };
 </script>

+ 96 - 25
src/views/custom_manage/contacts/compontents/labelDlg.vue

@@ -1,35 +1,25 @@
 <template>
   <div class="container-labrlDlg">
-    <el-dialog
-      title="标签"
-      v-dialogDrag
-      :visible.sync="isShowLabelDlg"
-      :close-on-click-modal="false"
-      :modal-append-to-body="false"
-      @close="cancelHandle"
-      center
-      width="800px"
-    >
+    <el-dialog title="标签" v-dialogDrag :visible.sync="isShowLabelDlg" :close-on-click-modal="false" :modal-append-to-body="false" @close="cancelHandle" center width="800px">
       <div class="popover-item">
-        <el-tag
-          size="mini"
-          style="margin: 5px 8px; cursor: pointer"
-          v-for="item in lookLabelListNumber()"
-          :key="item"
-          :type="userLabel == item && 'danger'"
-          @click="labelChildren(item)"
-        >
-          {{ item }}
-        </el-tag>
+        <span class="label-tag" :style="lookLabelColor(item)" v-for="item in lableListL" :key="item.RaiLabelId" @click="labelChildren(item.RaiLabelId)">
+          {{ item.Label }}
+          <i @click.stop="deleteLabel(item)" v-if="item.SourceType == 6" class="el-icon-circle-close"></i>
+        </span>
+        <span @click="labelChildrenAdd" class="label-tag" style="margin: 5px 8px; cursor: pointer" effect="dark" color="#EAF3FE"> 添加标签 <i class="el-icon-circle-plus-outline"></i></span>
       </div>
     </el-dialog>
+    <AddLabelDlg :interactionFrom="interactionFrom" :addIsShow.sync="addLabelDlgVisibility" @updateList="getUpdateList" />
   </div>
 </template>
 
 <script>
+import AddLabelDlg from "./addLabelDlg.vue";
+import { equityContacts } from "@/api/api.js";
+
 export default {
   name: "",
-  components: {},
+  components: { AddLabelDlg },
   props: {
     isShowLabelDlg: {
       default: false,
@@ -45,38 +35,119 @@ export default {
     },
   },
   data() {
-    return {};
+    return {
+      lableListL: [],
+      interactionFrom: "",
+      addLabelDlgVisibility: false,
+    };
   },
   computed: {},
-  watch: {},
+  watch: {
+    isShowLabelDlg: {
+      handler(newVal) {
+        newVal && this.getDataList();
+      },
+    },
+  },
   created() {},
   mounted() {},
   methods: {
+    async getDataList() {
+      const res = await equityContacts.getLabelList({
+        UserId: this.dlgLabelList.UserId,
+      });
+      if (res.Ret === 200) {
+        this.lableListL = res.Data.List || [];
+      }
+    },
     // 类型的处理
     lookLabelListNumber() {
       let arr = this.dlgLabelList.Labels ? this.dlgLabelList.Labels.split(",") : [];
       return arr;
     },
     // 点击标签的事件
-    labelChildren(key) {
-      this.$emit("labelChildren", key, this.dlgLabelList);
+    labelChildren(item) {
+      this.$emit("labelClick", item);
+    },
+    // 点击标签的事件
+    deleteLabel(item) {
+      this.$emit("update:isShowLabelDlg", false);
+      if (item.SourceType == 6) {
+        this.$confirm("确定要删除此标签吗?", "删除标签", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }).then(async () => {
+          const res = await equityContacts.userRaiLabelDel({
+            RaiLabelId: item.RaiLabelId,
+          });
+          if (res.Ret == 200) {
+            this.$message({
+              type: "success",
+              message: "删除成功!",
+            });
+            this.getDataList();
+            this.$emit("getUpdateList");
+          }
+        });
+      }
     },
     // 关闭了弹框
     cancelHandle() {
       this.$emit("update:dlgLabelList", {});
       this.$emit("update:isShowLabelDlg", false);
     },
+    // 标签的颜色
+    lookLabelColor(item) {
+      switch (item.SourceType) {
+        case 1:
+          return { backgroundColor: "#FFE5E6", color: "#D60808" };
+        case 2:
+        case 3:
+          return { backgroundColor: "#FDE5FF", color: "#891B98" };
+        case 4:
+        case 5:
+          return { backgroundColor: "#FFEEE5", color: "#DD4D00" };
+        case 7:
+          return { backgroundColor: "#E5FCFF", color: "#076873" };
+        case 8:
+          return { backgroundColor: "#E5EAFF", color: "#1A31C5" };
+        default:
+          return {}; // 返回一个空对象表示没有样式
+      }
+    },
+    // 添加销售输入标签接口
+    labelChildrenAdd() {
+      this.addLabelDlgVisibility = true;
+      this.interactionFrom = this.dlgLabelList;
+    },
+    // 添加标签后的更新列表事件
+    getUpdateList() {
+      this.getDataList();
+      this.$emit("getUpdateList");
+    },
   },
 };
 </script>
 <style scoped lang="scss">
 .container-labrlDlg {
   .popover-item {
+    display: flex;
+    flex-wrap: wrap;
     padding-bottom: 30px;
   }
   .popover-not-have {
     width: 100%;
     text-align: center;
   }
+  .label-tag {
+    padding: 0 10px;
+    font-size: 14px;
+    border-radius: 4px;
+    background-color: #eaf3fe;
+    color: #409eff;
+    margin: 5px 8px;
+    cursor: pointer;
+  }
 }
 </style>

+ 116 - 45
src/views/custom_manage/contacts/contactsList.vue

@@ -33,25 +33,7 @@
         :props="{ value: 'TryStage', label: 'Name', children: 'List', checkStrictly: true }"
         @change="handelGetData"
       ></el-cascader>
-      <el-autocomplete
-        style="width: 200px; margin-bottom: 20px"
-        prefix-icon="el-icon-search"
-        clearable
-        class="inline-input"
-        v-model="userLabel"
-        :fetch-suggestions="querySearchHandler"
-        placeholder="用户标签搜索"
-        @clear="handelGetData"
-        :trigger-on-focus="false"
-        @select="handelGetData"
-      >
-        <template slot-scope="scope">
-          <div v-if="scope.item.IndustryName">
-            {{ scope.item.IndustryName }}
-          </div>
-          <div v-else style="text-align: center">暂无数据</div>
-        </template>
-      </el-autocomplete>
+      <el-input style="width: 200px; margin-bottom: 20px" prefix-icon="el-icon-search" clearable class="inline-input" v-model="userLabel" placeholder="用户标签搜索" @input="handelGetData"> </el-input>
     </div>
     <el-card>
       <el-table :data="tableData" style="width: 100%" border @sort-change="sortChangeHandle" :row-class-name="setRowClass">
@@ -111,26 +93,31 @@
           </template>
         </el-table-column>
         <el-table-column prop="" width="350">
-          <div slot="header" slot-scope="{}" style="text-align: center">标签</div>
+          <div slot="header" slot-scope="{}" style="text-align: center">
+            <el-popover placement="top-start" width="376" trigger="hover">
+              <span slot="reference">
+                <p style="cursor: pointer">标签 <i class="el-icon-info" style="color: #606266" /></p>
+              </span>
+              <div class="popover-item">
+                <span class="label-tag" :style="lookLabelColor(item)" v-for="item in lableDescribe" :key="item.SourceType" @click="labelChildren(item.RaiLabelId)">
+                  {{ item.Label }}
+                  <i @click.stop="deleteLabel(item)" v-if="item.SourceType == 6" class="el-icon-circle-close"></i>
+                </span>
+                <p style="margin:10px 15px">仅标记客户4个月以内的互动行为</p>
+              </div>
+            </el-popover>
+          </div>
           <template slot-scope="{ row }">
             <div class="popover-item">
-              <el-tag size="mini" style="margin: 5px 8px; cursor: pointer" v-for="item in lookLabelListNumber(row)" :key="item" :type="userLabel == item && 'danger'" @click="labelChildren(item, row)">
-                {{ item }}
-              </el-tag>
-              <span @click="showLabelDlg(row)" style="font-weight: 700; padding: 5px 10px" class="editsty" v-if="row.Labels && row.Labels.split(',').length > 10">...</span>
+              <span class="label-tag" :style="lookLabelColor(item)" v-for="item in lookLabelListNumber(row)" :key="item.RaiLabelId" @click="labelChildren(item.RaiLabelId)">
+                {{ item.Label }}
+                <i @click.stop="deleteLabel(item)" v-if="item.SourceType == 6" class="el-icon-circle-close"></i>
+              </span>
+              <span @click="showLabelDlg(row)" style="font-weight: 700; padding: 5px 10px" class="editsty" v-if="row.RaiLabelList && row.RaiLabelList.length > 6">...</span>
+              <span @click="labelChildrenAdd(row)" class="label-tag" style="margin: 5px 8px; cursor: pointer" effect="dark" color="#EAF3FE"> 添加标签 <i class="el-icon-circle-plus-outline"></i></span>
             </div>
           </template>
         </el-table-column>
-        <!-- <el-table-column align="center" prop="" label="备注" width="90">
-          <template slot-scope="{ row }">
-            <div class="remark-list">
-              <div class="button">
-                <span class="editsty" @click="lookOver(row, '添加')">添加</span>
-                <span v-if="row.Content" style="font-weight: 700; padding: 5px 10px" class="editsty" @click="lookOver(row, '历史')">...</span>
-              </div>
-            </div>
-          </template>
-        </el-table-column> -->
         <el-table-column align="center" prop="" label="操作" width="160">
           <template slot-scope="{ row }">
             <span :class="row.IsRemind ? 'deletesty' : 'editsty'" @click="remindHandler(row)">{{ row.IsRemind ? "取消提醒" : "互动提醒" }}</span>
@@ -165,11 +152,12 @@
         </template>
       </div>
     </el-dialog>
-    <InteractionDlg :interactionDlg.sync="interactionDlg" :interactionFrom="interactionFrom" />
-    <label-dlg :isShowLabelDlg.sync="isShowLabelDlg" :dlgLabelList.sync="dlgLabelList" @labelChildren="labelChildren" :userLabel="userLabel" />
+    <InteractionDlg :interactionDlg.sync="interactionDlg" :raiLabelId="raiLabelId" />
+    <label-dlg :isShowLabelDlg.sync="isShowLabelDlg" :dlgLabelList.sync="dlgLabelList" @labelClick="labelChildren" @deleteClick="deleteLabel" @getUpdateList="getCygxContactsList" />
     <remind-dlg :isShowRemindDlg.sync="isShowRemindDlg" :remindList.sync="remindList" />
     <FeedbackDlg :showFeedbackDlg.sync="showFeedbackDlg" :remindList.sync="remindList" />
     <ContactTransfer :contactTransferDlgVisible.sync="contactTransferDlgVisible" :TransferMobile.sync="TransferMobile" />
+    <AddLabelDlg :interactionFrom="interactionFrom" :addIsShow.sync="addLabelDlgVisibility" @updateList="getCygxContactsList" />
   </div>
 </template>
 
@@ -182,10 +170,11 @@ import LabelDlg from "./compontents/labelDlg.vue";
 import RemindDlg from "./compontents/remindDlg.vue";
 import FeedbackDlg from "./compontents/feedbackDlg.vue";
 import ContactTransfer from "../customList/components/ContactTransferDlg.vue";
+import AddLabelDlg from "./compontents/addLabelDlg.vue";
 
 export default {
   name: "",
-  components: { mPage, mDialog, InteractionDlg, LabelDlg, RemindDlg, FeedbackDlg, ContactTransfer },
+  components: { mPage, mDialog, InteractionDlg, LabelDlg, RemindDlg, FeedbackDlg, ContactTransfer, AddLabelDlg },
   props: {},
   data() {
     return {
@@ -246,6 +235,36 @@ export default {
       TransferMobile: 0,
 
       contactTransferDlgVisible: false, //联系人转移的弹框
+
+      addLabelDlgVisibility: false, // 销售输入标签
+      raiLabelId: "",
+
+      lableDescribe: [
+        {
+          Label: "搜索关键词标签",
+          SourceType: 1,
+        },
+        {
+          Label: "产业/个股标签(线上活动/路演/路演回放)",
+          SourceType: 5,
+        },
+        {
+          Label: "报告类型标签",
+          SourceType: 8,
+        },
+        {
+          Label: "产业/个股标签(线下活动/路演)",
+          SourceType: 2,
+        },
+        {
+          Label: "销售输入标签",
+          SourceType: 6,
+        },
+        {
+          Label: "产业/个股标签(报告)",
+          SourceType: 7,
+        },
+      ],
     };
   },
   computed: {},
@@ -399,12 +418,35 @@ export default {
       window.open(href, "_blank");
     },
     /* 标签下的单独的某一个 */
-    labelChildren(key, row) {
+    labelChildren(id) {
       this.interactionDlg = true;
-      this.interactionFrom = {
-        id: row.UserId,
-        key,
-      };
+      this.raiLabelId = id;
+    },
+    // 点击删除标签的某一个
+    deleteLabel(item) {
+      if (item.SourceType == 6) {
+        this.$confirm("确定要删除此标签吗?", "删除标签", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }).then(async () => {
+          const res = await equityContacts.userRaiLabelDel({
+            RaiLabelId: item.RaiLabelId,
+          });
+          if (res.Ret == 200) {
+            this.$message({
+              type: "success",
+              message: "删除成功!",
+            });
+            this.getCygxContactsList();
+          }
+        });
+      }
+    },
+    // 添加销售输入标签接口
+    labelChildrenAdd(item) {
+      this.addLabelDlgVisibility = true;
+      this.interactionFrom = item;
     },
     //鼠标经过了 机构互助量
     async isShowOrganization(row) {
@@ -446,13 +488,12 @@ export default {
       this.isShowRemindDlg = true;
     },
     sortChangeHandle(item) {
-      console.log(item.order);
       this.orderTable = item.order === "ascending" ? "asc" : item.order === "descending" ? "desc" : "";
       this.getCygxContactsList();
     },
     // 处理标签不能超过10个
     lookLabelListNumber(row) {
-      let arr = row.Labels ? row.Labels.split(",").splice(0, 10) : [];
+      let arr = row.RaiLabelList ? _.cloneDeep(row.RaiLabelList).splice(0, 6) : [];
       return arr;
     },
     // 展示弹框
@@ -473,10 +514,28 @@ export default {
     // 设置表格行的样式
     setRowClass({ row }) {
       if (row.IsMaker == 1) {
-        console.log(row);
         return "not-read-seven-days";
       }
     },
+    lookLabelColor(item) {
+      switch (item.SourceType) {
+        case 1:
+          return { backgroundColor: "#FFE5E6", color: "#D60808" };
+        case 2:
+        case 3:
+          return { backgroundColor: "#FDE5FF", color: "#891B98" };
+        case 4:
+        case 5:
+        case 9:
+          return { backgroundColor: "#FFEEE5", color: "#DD4D00" };
+        case 7:
+          return { backgroundColor: "#E5FCFF", color: "#076873" };
+        case 8:
+          return { backgroundColor: "#E5EAFF", color: "#1A31C5" };
+        default:
+          return {}; // 返回一个空对象表示没有样式
+      }
+    },
   },
   /* 页面跳转前记录参数 */
   beforeRouteLeave(to, from, next) {
@@ -568,9 +627,21 @@ export default {
   }
 }
 .popover-item {
+  display: flex;
+  flex-wrap: wrap;
   overflow: hidden;
   overflow-y: auto;
+  .label-tag {
+    padding: 0 10px;
+    font-size: 14px;
+    border-radius: 4px;
+    background-color: #eaf3fe;
+    color: #409eff;
+    margin: 5px 8px;
+    cursor: pointer;
+  }
 }
+
 .popover-not-have {
   width: 100%;
   text-align: center;

+ 23 - 1
src/views/custom_manage/customList/customDetail.vue

@@ -417,6 +417,7 @@
 								>图表权限</span>
 								</block> -->
 								<p v-if="isUserYanXuanButtonShow" class="editsty" @click="isOpenMfyxStatusHandler(scope.row)">{{scope.row.MfyxStatus =='试用'?'关闭研选订阅试用':'开通研选订阅试用'}} </p>
+								<p  class="editsty" @click="lookUserLabler(scope.row)">查看个人标签 </p>
 							</div>
 						</template>
 					</el-table-column>
@@ -733,6 +734,10 @@
 		<HistoricalNotesDlg :historicalNotesDlgVisible.sync="historicalNotesDlgVisible" :CompanyId.sync="historicalNotesId"/>
 		<ContactTransfer :contactTransferDlgVisible.sync="contactTransferDlgVisible" :TransferMobile.sync="TransferMobile"/>
 		<edit-mobile :editMobileDialogVisible.sync="editMobileDialogVisible" :editMobileId="editMobileId" :outboundMobile="outboundMobile" isType="客户" />
+		<!-- <interactionDlg />	 -->
+		<InteractionDlg  :interactionDlg.sync="interactionDlg" :raiLabelId="raiLabelId"/>
+		 
+		 <LabelDlg :isShowLabelDlg.sync="isShowLabelDlg" :dlgLabelList.sync="dlgLabelList" @labelClick="labelChildren"  @getUpdateList="getuserTable"/>
 	</div>	
 </template>
 
@@ -756,9 +761,11 @@ import HistoricalNotesDlg from "@/components/historicalNotesDlg.vue";
 import ContactTransfer from './components/ContactTransferDlg.vue'
 
 import EditMobile from "../../rai_manage/components/editMobile.vue";
+import InteractionDlg from '../contacts/compontents/interactionDlg.vue'
+import LabelDlg from '../contacts/compontents/labelDlg.vue'
 export default {
 	name:'',
-	components: { Ctimeline, Contactdia, Readia, ElImageViewer, CpessionTable, pdf, chartAuthDialog, ExportData, CpessionTableEquity, ProductReadInfo, DeductDetailDlg, HistoryContract, HistoricalNotesDlg, ContactTransfer, EditMobile},
+	components: { Ctimeline, Contactdia, Readia, ElImageViewer, CpessionTable, pdf, chartAuthDialog, ExportData, CpessionTableEquity, ProductReadInfo, DeductDetailDlg, HistoryContract, HistoricalNotesDlg, ContactTransfer, EditMobile, InteractionDlg ,LabelDlg},
 	computed:{
 		Role() {
 			let role = localStorage.getItem('Role') || '';
@@ -896,6 +903,12 @@ export default {
 			editMobileDialogVisible: false,
 			editMobileId :0,
 			outboundMobile :0,
+
+			// 查看权益个人标签模块
+			isShowLabelDlg:false,
+			dlgLabelList:{},
+			interactionDlg:false,
+			raiLabelId:'',
 		};
 	},
 	methods: {
@@ -1729,6 +1742,15 @@ export default {
       this.editMobileId = id;
       this.outboundMobile = value;
     },
+	// 查看个人标签
+	lookUserLabler(row){
+		this.dlgLabelList = row;
+		this.isShowLabelDlg = true
+	},
+	labelChildren(id){
+		this.interactionDlg = true;
+      	this.raiLabelId = id;
+	},
 	},
 	mounted() {
 		this.getDetail();

+ 5 - 4
src/views/rai_manage/activityManage/activityManage.vue

@@ -71,7 +71,8 @@
               <p :class="row.PublishStatus == 3 ? 'grey-color' : 'editsty'" @click="editBtn(row.ActivityId, row.PublishStatus)">编辑</p>
               &nbsp;&nbsp;
               <p class="deletesty" v-if="row.PublishStatus == 0 && tabsPitchon == 0" @click="operationBtn(row.ActivityId, '删除')">删除</p>
-              <p class="editsty" v-if="row.IsShowSigninButton" @click="handleDownLoadImg(row)">下载签到码</p>
+              <p class="editsty" v-if="row.IsShowSigninButton" @click="handleDownLoadImg(row, '签到')">下载签到码</p>
+              <p class="editsty" v-if="row.ActiveState == 1 && !isResearch" @click="handleDownLoadImg(row, '详情')">下载小程序码</p>
               <p v-if="row.ChartPermissionId === 31 && tabsPitchon == 0 && row.PublishStatus == 1" class="editsty" @click="overheadHandler(row.ActivityId, '置顶')">
                 &nbsp;&nbsp;{{ row.TopTime == 0 ? "置顶" : "取消置顶" }}
               </p>
@@ -307,10 +308,10 @@ export default {
       this.dialogVisible = true;
     },
     // 下载图片
-    handleDownLoadImg(row) {
+    handleDownLoadImg(row, type) {
       let img = new Image();
       img.setAttribute("crossOrigin", "anonymous");
-      img.src = row.SigninImg;
+      img.src = type == "签到" ? row.SigninImg : row.XcxDetailImg;
       img.onload = () => {
         let canvas = document.createElement("canvas");
         canvas.width = img.width;
@@ -319,7 +320,7 @@ export default {
         context.drawImage(img, 0, 0, img.width, img.height);
         let dataURL = canvas.toDataURL("image/png", 1);
         const a = document.createElement("a");
-        a.setAttribute("download", "签到码.png");
+        a.setAttribute("download", `${row.ActivityName}签到码.png`);
         a.style.display = "none";
         a.href = dataURL;
         document.body.appendChild(a);

+ 2 - 3
src/views/rai_manage/cygxManage/components/lableDlg.vue

@@ -11,7 +11,7 @@
           添加活动
         </div>
       </div>
-      <div class="text-content" v-else>{{ visibleText }}</div>
+      <div class="text-content" v-else v-html="visibleText"></div>
       <span slot="footer" class="dialog-footer">
         <template v-if="dataRegular.TagType == 1">
           <el-button @click="handleClose">取 消</el-button>
@@ -58,7 +58,7 @@ export default {
           : this.dataRegular.TagType == 4
           ? "所有问答系列音频"
           : this.dataRegular.TagType == 5
-          ? "医药-趋势观察 ,科技-产业跟踪 ,智造-产业跟踪 ,消费-月度调研,策略-每日复盘,固收-债市复盘"
+          ? "医药-趋势观察 ,科技-产业跟踪 ,智造-产业跟踪 ,消费-月度调研,策略-每日复盘<br/>固收-债市复盘,消费-产业跟踪"
           : "";
       return str;
     },
@@ -165,7 +165,6 @@ export default {
 .lable-add-content {
   .text-content {
     width: 620px;
-    height: 40px;
     line-height: 40px;
     border-radius: 4px;
     border: 1px solid #dcdfe6;