Pārlūkot izejas kodu

Merge branch 'master' into xqc_935

bding 1 gadu atpakaļ
vecāks
revīzija
5aa4551c85

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

@@ -49,6 +49,14 @@ const YanXuanApi = {
   getShareRecordList: (params) => {
     return http.get("/cygx/mfyx/admin/share/list", params);
   },
+  // 修改推荐人 备注信息
+  yanxuan_specialAuthorUpdate: (params) => {
+    return http.post("/cygx/yanxuan_special/author/update", params);
+  },
+  // 作者模糊查询
+  yanxuan_specialAuthorSearch: (params) => {
+    return http.get("/cygx/yanxuan_special/author/search", params);
+  },
 };
 
 export default YanXuanApi;

+ 52 - 2
src/views/rai_manage/reportManage/components/specialDlg.vue

@@ -12,6 +12,8 @@
         :trigger-on-focus="false"
       ></el-autocomplete>
       <p v-show="!isShowKey" style="color: #f00">系统中无此人,请先将其添加到对应公司的联系人列表下</p>
+      <el-input v-model="referrer" placeholder="请输入引荐人" clearable style="display: inline-block; margin-bottom: 20px"> </el-input>
+      <el-input type="textarea" :rows="4" placeholder="请输入备注" v-model="remarksKeys"> </el-input>
       <span slot="footer" class="dialog-footer">
         <el-button @click="handleCloseAuthor">取 消</el-button>
         <el-button type="primary" @click="addAuthorHandler">确 定</el-button>
@@ -24,6 +26,15 @@
         <el-button type="primary" @click="submitRejectHandler">确 定</el-button>
       </span>
     </el-dialog>
+
+    <el-dialog title="编辑" :visible.sync="lookEditRemarkDlgShow" width="500px" v-dialogDrag :close-on-click-modal="false" :modal-append-to-body="false" center @close="handleCloseRemark">
+      <el-input v-model="lookRemarkInfo.InviteName" placeholder="请输入引荐人" clearable style="display: inline-block; margin-bottom: 20px"> </el-input>
+      <el-input type="textarea" :rows="4" placeholder="请输入备注" v-model="lookRemarkInfo.Remark"> </el-input>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="handleCloseRemark">取 消</el-button>
+        <el-button type="primary" @click="submitRemarkHandler">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -45,6 +56,14 @@ export default {
       default: 0,
       type: Number,
     },
+    lookEditRemarkInfo: {
+      default: {},
+      type: Object,
+    },
+    lookEditRemarkDlgShow: {
+      default: false,
+      type: Boolean,
+    },
   },
   data() {
     return {
@@ -52,10 +71,20 @@ export default {
       companyList: [],
       textReject: "",
       isShowKey: true,
+      referrer: "",
+      remarksKeys: "",
+      lookRemarkInfo: {},
     };
   },
-  computed: {},
-  watch: {},
+  watch: {
+    lookEditRemarkInfo: {
+      handler(newValue) {
+        this.lookRemarkInfo = _.cloneDeep(newValue);
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
   created() {},
   mounted() {},
   methods: {
@@ -93,6 +122,8 @@ export default {
         UserId: params[0].UserId,
         RealName: params[0].RealName,
         Mobile: params[0].Mobile,
+        InviteName: this.referrer, //邀请人
+        Remark: this.remarksKeys, //备注
       });
       if (res.Ret === 200) {
         this.handleCloseAuthor();
@@ -128,6 +159,25 @@ export default {
     selectCompany() {
       this.isShowKey = this.companyList.some((item) => item.value === this.keyAuthor);
     },
+
+    // 关闭备注的弹框
+    handleCloseRemark() {
+      this.$emit("update:lookEditRemarkDlgShow", false);
+      this.$emit("update:lookEditRemarkInfo", {});
+    },
+    // q确定事件
+    async submitRemarkHandler() {
+      const res = await raiInterface.yanxuan_specialAuthorUpdate({
+        UserId: this.lookRemarkInfo.UserId,
+        InviteName: this.lookRemarkInfo.InviteName, //邀请人
+        Remark: this.lookRemarkInfo.Remark, //备注
+      });
+      if (res.Ret === 200) {
+        this.$emit("update:lookEditRemarkDlgShow", false);
+        this.$emit("update:lookEditRemarkInfo", {});
+        this.$parent.getyanxuanReportSpecial();
+      }
+    },
   },
 };
 </script>

+ 10 - 0
src/views/rai_manage/reportManage/components/yanXuanLable.js

@@ -150,6 +150,16 @@ export const AuthorTableColums = [
     key: "CompanyName",
     widthsty: 200,
   },
+  {
+    label: "引荐人",
+    key: "InviteName",
+    widthsty: 100,
+  },
+  {
+    label: "备注",
+    key: "Remark",
+    widthsty: 200,
+  },
   {
     label: "开通时间",
     key: "CreateTime",

+ 47 - 4
src/views/rai_manage/reportManage/yanXuanSpecial.vue

@@ -27,9 +27,12 @@
             />
           </el-select>
           <date-picker style="margin: 0 20px; width: 240px" v-model="issueTime" type="date" range placeholder="发布时间" value-type="format" @change="conditionChange"> </date-picker>
-          <el-input @input="reportTitleHandle" v-model="reportTitle" placeholder="请输入文章标题" clearable style="display: inline-block; width: 240px">
+          <el-input @input="reportTitleHandle" v-model="reportTitle" placeholder="请输入文章标题" clearable style="display: inline-block; width: 240px; margin-right: 20px">
             <i slot="prefix" class="el-input__icon el-icon-search"></i>
           </el-input>
+          <el-autocomplete v-model="authorName" :fetch-suggestions="querySearchAsync" placeholder="请输入作者昵称" @select="conditionChange">
+            <i slot="prefix" class="el-input__icon el-icon-search"></i>
+          </el-autocomplete>
         </div>
       </template>
       <div v-else style="margin-bottom: 20px; display: flex; justify-content: space-between">
@@ -45,9 +48,12 @@
               :value="item.value"
             />
           </el-select>
-          <el-input @input="authorColumnValueHandler" v-model="authorColumnValue" placeholder="请输入专栏名称" clearable style="display: inline-block; width: 240px">
+          <el-input @input="authorColumnValueHandler" v-model="authorColumnValue" placeholder="请输入专栏名称" clearable style="display: inline-block; width: 240px; margin-right: 20px">
             <i slot="prefix" class="el-input__icon el-icon-search"></i>
           </el-input>
+          <el-autocomplete v-model="authorName" :fetch-suggestions="querySearchAsync" placeholder="请输入作者昵称" @select="conditionChange">
+            <i slot="prefix" class="el-input__icon el-icon-search"></i>
+          </el-autocomplete>
         </div>
         <div>
           <el-button type="primary" @click="addAuthorDlgVisible = true">新建作者</el-button>
@@ -85,7 +91,11 @@
           <template v-else>
             <el-table-column v-for="item in authorTableColums" :width="item.widthsty" :key="item.key" :prop="item.key" :label="item.label" align="center" :sortable="isShowSortable(item)">
               <template slot-scope="{ row }">
-                <span v-if="item.label != '总PV/UV'" @click="handleRowClick(row, item.key)" :style="handleRowStyle(item.key)">{{ handleRowContent(row, item.key) }}</span>
+                <span v-if="item.label != '总PV/UV' && item.key != 'Remark'" @click="handleRowClick(row, item.key)" :style="handleRowStyle(item.key)">{{ handleRowContent(row, item.key) }}</span>
+                <div v-else-if="item.key == 'Remark'">
+                  {{ handleRowContent(row, item.key) }}
+                  <span @click="lookEditRemark(row)" class="editsty" style="font-size: 22px"> ... </span>
+                </div>
                 <span v-else>{{ row.Pv }} / {{ row.Uv }}</span>
               </template>
             </el-table-column>
@@ -112,7 +122,7 @@
       </div>
     </el-card>
     <collect-fans-dlg :iscollectFansDlgShow.sync="iscollectFansDlgShow" :collectFansDlgText.sync="collectFansDlgText" :collectFansDlgItem.sync="collectFansDlgItem" />
-    <special-dlg :addAuthorDlgVisible.sync="addAuthorDlgVisible" :submitRejectDlgVisible.sync="submitRejectDlgVisible" :submitRejectId="submitRejectId" />
+    <special-dlg :addAuthorDlgVisible.sync="addAuthorDlgVisible" :lookEditRemarkDlgShow.sync="lookEditRemarkDlgShow" :lookEditRemarkInfo.sync="lookEditRemarkInfo" />
   </div>
 </template>
 
@@ -144,9 +154,12 @@ export default {
       collectFansDlgText: "",
       collectFansDlgItem: {},
       addAuthorDlgVisible: false,
+      lookEditRemarkDlgShow: false, // 查看编辑备注
+      lookEditRemarkInfo: {},
       topLableList: [],
       sortType: "",
       sortParam: "",
+      authorName: "", // 作者名称
     };
   },
   computed: {
@@ -171,6 +184,7 @@ export default {
     // 点击了头部的tlble
     tlableClickHandler(item) {
       this.topLableActive = item.value;
+      this.authorName = "";
       this.page_no = 1;
       this.getyanxuanReportSpecial();
     },
@@ -220,6 +234,8 @@ export default {
         return row[key] == 1 ? "线上" : `线下(${row["City"]})`;
       } else if (key == "RegisterPlatform") {
         return row[key] == 1 ? "小程序" : row[key] == 2 ? "网页版" : row[key] == 3 ? "策略平台" : "";
+      } else if (key == "Remark") {
+        return row[key] ? row[key].substring(0, 15) : "";
       } else {
         return row[key];
       }
@@ -252,6 +268,7 @@ export default {
         EndDate: this.issueTime[1],
         SortType: this.sortType,
         SortParam: this.sortParam,
+        NickName: this.authorName,
       };
       const res =
         this.topLableActive == 1 && (this.reportStatusActive == 1 || this.reportStatusActive == 2)
@@ -327,6 +344,32 @@ export default {
         }
       }
     },
+
+    //查看或修改
+    lookEditRemark(row) {
+      this.lookEditRemarkInfo = row;
+      this.lookEditRemarkDlgShow = true;
+    },
+
+    async querySearchAsync(queryString, cb) {
+      cb([]);
+      if (!queryString) {
+        this.conditionChange();
+      } else {
+        const res = await raiInterface.yanxuan_specialAuthorSearch({
+          KeyWord: queryString,
+        });
+        if (res.Ret === 200) {
+          let arr = res.Data.List.map((item) => {
+            return {
+              ...item,
+              value: item.KeyWord,
+            };
+          });
+          cb(arr);
+        }
+      }
+    },
   },
 };
 </script>