瀏覽代碼

Merge branch 'master' of http://8.136.199.33:3000/hongze/hz_crm_web

ldong 2 周之前
父節點
當前提交
3fcf94865d

+ 9 - 1
src/api/modules/rai/raiApi.js

@@ -1005,7 +1005,15 @@ const raiInterface = {
   getReportSelectionArticle: (params) => {
     return http.get("/cygx/reportSelection/getArticle", params);
   },
-
+  /**
+   *  获取综述报告
+   * @param {ThirdName} params
+   * @param {ChartPermissionId} params
+   * @returns
+   */
+  getReportSelectionThird_name: (params) => {
+    return http.post("/cygx/reportSelection/add/third_name", params);
+  },
   /**
    * 上
    * 周

+ 1 - 1
src/components/searchDistPicker.vue

@@ -106,7 +106,7 @@ export default {
                     }else{
                         this.city = {cityKey:'',cityName:this.cityInfo}
                     }
-                    if(this.city.cityKey){
+                    if(this.city.cityKey && this.showArea){
                         const areaResult = Object.entries(area_sorce[this.city.cityKey]).find(([key,val])=>val===this.areaInfo)||['',this.areaInfo]
                         this.area={areaKey:areaResult[0],areaName:areaResult[1]}
                     }else{

+ 41 - 35
src/views/rai_manage/components/addChoiceness.vue

@@ -323,7 +323,7 @@ export default {
     editText(item, index) {
       this.dialogText = "编辑";
       this.chartPermissionId = item.ChartPermissionId;
-      this.stateValue = item.IndustrialSubjectName;
+      this.stateValue = item.IndustrialSubjectName || item.ShowName;
       this.addDialogVisible = true;
       this.editNum = index;
     },
@@ -370,34 +370,37 @@ export default {
     async confirmPerson() {
       if (this.stateValue) {
         const arr = this.subjectList.find((item) => item.ShowName === this.stateValue);
-        if (!arr) {
-          this.$message.error("输入正确的标的");
-          return;
-        }
         let overviewList = {};
-        const res = await raiInterface.getReportSelectionArticle({
-          IndustrialSubjectId: arr.IndustrialSubjectId,
-        });
+        const res = !arr
+          ? await raiInterface.getReportSelectionThird_name({
+              ThirdName: this.stateValue,
+              ChartPermissionId: this.chartPermissionId,
+            })
+          : await raiInterface.getReportSelectionArticle({
+              IndustrialSubjectId: arr.IndustrialSubjectId,
+            });
         if (res.Ret === 200) {
           overviewList = res.Data;
           this.industryList.forEach((item) => {
             if (item.ChartPermissionId == this.chartPermissionId) {
               if (item.List.length > 0) {
-                var isNext = item.List.some((item) => item.IndustrialSubjectName == arr.ShowName);
+                var isNext = item.List.some((item) => item.ShowName == (arr ? arr.ShowName : res.Data.ThirdName));
               }
               if (isNext) return this.$message.error("标的重复!");
               item.List.push({
                 Body: "",
                 ChartPermissionId: this.chartPermissionId,
-                IndustrialManagementId: arr.IndustrialManagementId + "",
-                IndustrialManagementName: arr.IndustryName,
-                IndustrialSubjectId: arr.IndustrialSubjectId + "",
-                IndustrialSubjectName: arr.SubjectName,
-                ShowName: arr.ShowName,
+                IndustrialManagementId: arr ? arr.IndustrialManagementId + "" : "",
+                IndustrialManagementName: arr ? arr.IndustryName : "",
+                IndustrialSubjectId: arr ? arr.IndustrialSubjectId + "" : "",
+                IndustrialSubjectName: arr ? arr.SubjectName : "",
+                ShowName: arr ? arr.ShowName || arr.IndustryName : res.Data.ThirdName,
+                ThirdId: res.Data.ThirdId || "",
+                ThirdName: res.Data.ThirdName || "",
                 CompanyLabel: [{ name: "", value: item.List.length + 1 }],
-                OverviewArticleId: overviewList && overviewList.ArticleId,
-                OverviewArticleTitle: overviewList && overviewList.Title,
-                IsShowOverviewArticle: overviewList && overviewList.IsShowOverviewArticle,
+                OverviewArticleId: overviewList.ArticleId || 0,
+                OverviewArticleTitle: overviewList.Title || "",
+                IsShowOverviewArticle: overviewList.IsShowOverviewArticle || 0,
               });
             }
           });
@@ -409,39 +412,42 @@ export default {
     async editconfirmPerson() {
       if (this.stateValue) {
         const arr = this.subjectList.find((item) => item.ShowName === this.stateValue);
-        if (!arr) {
-          this.$message.error("输入正确的标的");
-          return;
-        }
         let overviewList = {};
-        const res = await raiInterface.getReportSelectionArticle({
-          IndustrialSubjectId: arr.IndustrialSubjectId,
-        });
+        const res = !arr
+          ? await raiInterface.getReportSelectionThird_name({
+              ThirdName: this.stateValue,
+              ChartPermissionId: this.chartPermissionId,
+            })
+          : await raiInterface.getReportSelectionArticle({
+              IndustrialSubjectId: arr.IndustrialSubjectId,
+            });
         if (res.Ret === 200) {
           overviewList = res.Data;
           this.overviewList = overviewList;
           this.industryList.forEach((item) => {
             if (item.ChartPermissionId == this.chartPermissionId) {
               if (item.List.length > 0) {
-                var isNext = item.List.some((item) => item.IndustrialSubjectName == arr.SubjectName);
+                var isNext = item.List.some((item) => item.ShowName == (arr ? arr.ShowName : res.Data.ThirdName));
               }
               if (isNext) return this.$message.error("标的重复!");
               const obj = {
                 Body: (this.$refs.twoRich && this.$refs.twoRich.value) || "",
                 ChartPermissionId: this.chartPermissionId,
-                IndustrialManagementId: arr.IndustrialManagementId + "",
-                IndustrialManagementName: arr.IndustryName,
-                IndustrialSubjectId: arr.IndustrialSubjectId + "",
-                IndustrialSubjectName: arr.SubjectName,
-                ShowName: arr.ShowName,
+                IndustrialManagementId: arr ? arr.IndustrialManagementId + "" : "",
+                IndustrialManagementName: arr ? arr.IndustryName : "",
+                IndustrialSubjectId: arr ? arr.IndustrialSubjectId + "" : "",
+                IndustrialSubjectName: arr ? arr.SubjectName : "",
+                ShowName: arr ? arr.ShowName || arr.IndustryName : res.Data.ThirdName,
+                ThirdId: res.Data.ThirdId || "",
+                ThirdName: res.Data.ThirdName || "",
                 CompanyLabel:
                   item.List[this.editNum].CompanyLabel && item.List[this.editNum].CompanyLabel.length > 0 ? item.List[this.editNum].CompanyLabel : [{ name: "", value: item.List.length + 1 }],
-                OverviewArticleId: overviewList.ArticleId,
-                OverviewArticleTitle: overviewList.Title,
-                IsShowOverviewArticle: overviewList.IsShowOverviewArticle,
+                OverviewArticleId: overviewList.ArticleId || 0,
+                OverviewArticleTitle: overviewList.Title || "",
+                IsShowOverviewArticle: overviewList.IsShowOverviewArticle || 0,
               };
               item.List.splice(this.editNum, 1, obj);
-              this.industrialSubjectName = arr.IndustryName || "";
+              this.industrialSubjectName = arr ? arr.IndustryName : res.Data.ThirdName || "";
             }
           });
         }
@@ -491,7 +497,7 @@ export default {
               sessionStorage.removeItem("addChoicenessQY");
               this.$message.success("操作成功!");
               this.init();
-              this.$router.back();
+              type != "保存" && this.$router.back();
             }
           }
         }

+ 4 - 4
src/views/rai_manage/components/report_preview/choicenessPre.vue

@@ -27,7 +27,7 @@
         <div class="industry-li" v-for="(item, index) in dataListSubject" :key="index">
           <div class="industry-name">{{ item.ChartPermissionName }}</div>
           <div class="industry-subject">
-            <div class="subject-item" @click="positionSubject(key)" v-for="key in item.ListSubject" :key="key.IndustrialSubjectId">
+            <div class="subject-item" v-for="key in item.ListSubject" :key="key.IndustrialSubjectId">
               <a :href="`#miao${key.IndustrialSubjectId}${key.SubjectName}`">{{ key.ShowName }}</a>
               <img v-if="key.IsNew" class="icon_subject" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_subject.png" />
             </div>
@@ -42,15 +42,15 @@
             {{ item.ChartPermissionText }}
           </div>
           <div class="report-content-report" v-for="it in item.contetList" :key="it.IndustrialSubjectId">
-            <div class="content-report-title">
-              {{ it.IndustrialSubjectName }}
+            <div class="content-report-title" :id="`miao${it.IndustrialSubjectId}${it.SubjectName}`">
+              {{ it.IndustrialSubjectName || it.ThirdName || it.ShowName }}
             </div>
             <div v-html="it.Body" class="content-report-body"></div>
             <div class="content-report-detail" v-if="it.OverviewArticleId > 0">
               公司综述报告请
               <span @click="goArticle(it.OverviewArticleId)"> 点击查看 </span>
             </div>
-            <div class="company-label" :id="`miao${it.IndustrialSubjectId}${it.SubjectName}`">
+            <div class="company-label">
               <span class="item">{{ it.ShowName }}</span>
               <img v-if="it.IsNew" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_report.png" />
               <span class="item item-subject-name" v-for="val in it.CompanyLabel" :key="val"># {{ val }}</span>