Browse Source

Merge branch 'master' into cygx_crm_14.4.1

bding 1 year ago
parent
commit
f3fef7b0ce

+ 7 - 0
src/api/modules/rai/raiApi.js

@@ -318,6 +318,13 @@ const raiInterface = {
   getNoTacticsfirst: (params) => {
     return http.get("/cygx/chartPermission/noTacticsfirst", params);
   },
+    /**
+   * 专项调研活动行业分类接口
+   * @returns
+   */
+    getActivitySpecial: (params) => {
+      return http.get("/cygx/chartPermission/activitySpecial", params);
+    },
   /**
    * 通过多个产业获取标的列表接口
    * @param {IndustrialManagementIdStr } params 分类ID,多个使用 ,隔开列如 1,3,5

+ 4 - 0
src/api/modules/rai/reportApi.js

@@ -33,6 +33,10 @@ const raiReport = {
   reportSelectionTarryList: (params) => {
     return http.get("/cygx/reportSelection/tarryList", params);
   },
+  // 文章置顶、取消置顶
+  summaryManageTopChange: (params) => {
+    return http.post("/cygx/summaryManage/top_change", params);
+  },
   
 };
 

+ 4 - 0
src/api/modules/statisticApi.js

@@ -253,6 +253,10 @@ const dataMainInterface = {
 	unusualRenewalCustomStatistic: params => {
 		return http.get('/statistic_report/report/unusual_renew_company',params)
 	},
+	//续约异常客户统计图表数据
+	unusualRenewalCustomStatisticChartData:params=>{
+		return http.get('/statistic_report/report/unusual_renew_company/chart',params)
+	},
 
 	/**
 	 * 新增客户列表

+ 4 - 6
src/views/business_ETA_manage/businessAuth.vue

@@ -9,8 +9,6 @@
         </div>
         <div class="model-wrap">
             <el-button :type="model==='auth'?'primary':''" @click="model='auth'">菜单权限</el-button>
-            <span class="block"></span>
-            <el-button :type="model==='interence'?'primary':''" @click="model='interence'">接口权限</el-button>
         </div>
         <div class="auth-wrap" v-show="model==='auth'">
             <el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" style="margin-bottom: 20px;">全选</el-checkbox>
@@ -26,7 +24,7 @@
                 @check-change="()=>{handleCheckChange()}">
             </el-tree>
         </div>
-        <div class="interence-wrap" v-show="model==='interence'">
+        <!-- <div class="interence-wrap" v-show="model==='interence'">
             <div class="interence-item">
                 <span>研报审批</span>
                 <el-radio-group v-model="isApprove">
@@ -38,7 +36,7 @@
                     <el-checkbox :label="1">研报列表</el-checkbox>
                 </el-checkbox-group>
             </div>
-        </div>
+        </div> -->
     </div>
 </template>
 
@@ -178,7 +176,7 @@ export default {
                 if(res.Ret!==200) return 
                 this.$message.success('权限设置成功')
 
-                if(typeof(this.isApprove)==='string'){
+                /* if(typeof(this.isApprove)==='string'){
                     this.$message.warning('请配置接口权限')
                     this.model='interence'
                     return
@@ -200,7 +198,7 @@ export default {
                     })
                     if(interenceRes.Ret!==200) return 
                     this.$message.success('接口权限设置成功')
-                }
+                } */
             }
             this.$router.push('/businessETAList')
         },

+ 19 - 3
src/views/custom_manage/customList/customShareList.vue

@@ -18,6 +18,7 @@
 			clearable
 			filterable
 			@change="getTableData"
+			v-if="roleType!=='ficc_seller'"
 		  />
           <el-select v-model="sales" placeholder="请选择分配销售" style="width: 214px; margin-right: 20px;" 
           clearable filterable multiple collapse-tags @change="getTableData">
@@ -324,7 +325,7 @@
 										<el-dropdown-menu slot="dropdown">
 											<el-dropdown-item :command="{type:item.type,data:scope.row}" 
 											v-for="item in getToolBtnList(scope.row).slice(3)" :key="item.type">
-												<span>{{item.type}}</span>
+												<span>{{item.type=='设置共享'&&scope.row.IsShare==1?'取消共享':item.type}}</span>
 											</el-dropdown-item>
 										</el-dropdown-menu>
 									</span>
@@ -488,6 +489,9 @@ export default {
 			}else{
 				return 'thisSeller';
 			}
+		},
+		roleType(){
+			return localStorage.getItem('Role') || ''
 		}
 	},
 	data () {
@@ -529,7 +533,8 @@ export default {
 				BtnAddAgreement: '补充协议',
 				BtnTryOut: '增开试用',
 				BtnServiceRecord:'服务记录',
-				BtnRemarkView:'备注'
+				BtnRemarkView:'备注',
+				BtnShare:'设置共享',
 			},	// 按钮命令列表
 			accumulativeFrequencyDlg:false,//路演业阅读的弹框
 			accumulativeFrequencyItem:{},
@@ -633,10 +638,21 @@ export default {
 				this.handleShowRemark(query.data)
 			}else if(["续约申请","补充协议"].includes(query.type)){
 				this.handleOpenContractChoose(query.type,query.data)
-			}else if("增开试用"){
+			}else if(query.type=="增开试用"){
 				this.addTrialHandle(query.data)
+			}else if(query.type=='设置共享' || query.type=='取消共享'){
+				this.shareSetting(query.data)
 			}
 		},
+		// 设置/取消 共享
+		shareSetting(row){
+			customInterence.setCustomShare({CompanyId:row.CompanyId,IsShare:row.IsShare==0?1:0}).then(res=>{
+				if(res.Ret==200){
+					this.$message.success(row.IsShare==0?'设置共享成功':'取消共享成功')
+					this.getTableData()
+				}
+			})
+		},
 		/* 查看权限 */
 		lookHandle(item) {
 			this.lookTitle = item.CompanyName;

+ 162 - 0
src/views/dataReport_manage/components/abnormalRenewalChart.vue

@@ -0,0 +1,162 @@
+<template>
+    <div class="abnormal-renewal-chart-wrap">
+        <div class="top-wrap">
+            <el-date-picker
+                v-model="date"
+                type="monthrange"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+                :clearable="false"
+                value-format="yyyy-MM"
+                @change="handleDateChange"
+            />
+            <div style="color:#409EFF;cursor: pointer;" @click="handleClose">
+                <img src="~@/assets/img/icons/changeLang.png" alt="">
+                <span style="display:inline-block;position: relative;top:-3px;left:3px">数据表</span>
+            </div>
+        </div>
+        <div class="chart-main-wrap">
+            <h2 style="text-align:center;font-size:30px;margin:30px 0;">续约异常客户统计图</h2>
+            <div class="chart-box" ref="chartBox"></div>
+        </div>
+    </div>
+</template>
+
+<script>
+import { dataMainInterface } from '@/api/api.js';
+import { nextTick } from 'vue';
+export default {
+    data() {
+        return {
+            date:'',
+            myChart:null
+        }
+    },
+    created() {
+        this.date=[this.$moment().format('YYYY-01'),this.$moment().format('YYYY-MM')]
+    },
+    mounted() {
+        this.getData()
+    },
+    methods: {
+        async getData(){
+            const res=await dataMainInterface.unusualRenewalCustomStatisticChartData({
+                StartDate:this.date[0],
+                EndDate:this.date[1]
+            })
+            if(res.Ret===200){
+                this.$nextTick(()=>{
+                    this.renderChart(res.Data)
+                })
+            }
+        },
+        handleDateChange(){
+            this.getData()
+        },
+        handleClose(){
+            this.$emit('close')
+        },
+        renderChart(data){
+            const arr=data.List||[]
+
+            const options={
+				legend: {
+					name: [],
+                    icon:'circle',
+					left: 'center',
+				},
+				tooltip: {
+                    formatter:function(params){
+                        let str=`${params.name}<br>
+                        <span style='display:inline-block;width:15px;height:15px;background:#FDB863;border-radius:100%'></span>
+                        ${params.seriesName}&nbsp;&nbsp;${params.value}`
+
+                        return str
+                    }
+                },
+				title: {
+					text: '',
+				},
+				color: ['#FDB863'],
+				textStyle: {
+					fontSize: 12,
+				},
+				xAxis: {
+					type: '',
+					data: [],
+					// /* x轴文字 */
+					axisLabel: {
+						show: true,
+						rotate: '40', //字体倾斜
+						textStyle: {
+							color: '#999', //更改坐标轴文字颜色
+							fontSize: 12, //更改坐标轴文字大小
+						},
+					},
+				},
+				yAxis: {
+					type: 'value',
+					minInterval:1,
+                    position: 'left',
+                    name:'家',
+                    splitLine:{
+                        lineStyle:{
+                            type:'dotted'
+                        }
+                    }
+				},
+				series: [
+                    {
+                        data:[],
+                        name:'续约异常客户合计',
+                        type:'bar',
+                        yAxisIndex: 0,
+                    }
+                ],
+			}
+
+            arr.forEach(item => {
+                options.xAxis.data.push(item.Date)
+                options.series[0].data.push(item.CompanyNum)
+            });
+
+            console.log(options);
+
+            const chart = this.$refs.chartBox;
+            if(chart){
+                this.$nextTick(()=>{
+                    if(!this.myChart){
+                        this.myChart = echarts.init(chart);
+                        this.myChart.setOption(options);
+                    }else{
+                        this.myChart.setOption(options,true);
+                    }
+                    
+                })
+            }
+        }
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.abnormal-renewal-chart-wrap{
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    background-color: #fff;
+    padding: 30px;
+    .top-wrap{
+        display: flex;
+        justify-content: space-between;
+    }
+    .chart-box{
+        margin: 0 auto;
+        width: 80%;
+        height: 500px;
+    }
+}
+</style>

+ 17 - 3
src/views/dataReport_manage/statistic/abnormalRenewal.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="statistic-container" ref="reference">
-        <div class="frequency-cont">
+        <div class="frequency-cont" style="position: relative;">
 			<ul class="frequency-ul">
 				<li v-for="tab in staticTabs" :key="tab" :class="{act: tab=== default_tab}" @click="changeTabHandle(tab)">{{ tab }}</li>
 			</ul>
@@ -14,6 +14,11 @@
                 placeholder="请选择统计时间"
             />
             <span style="color:#A3A3A3;display:inline-block;margin-left:20px">续约异常:合同到期后两个月内未签约</span>
+
+            <div style="color:#409EFF;position: absolute;top:10px;right:10px;cursor: pointer;" @click="showChart=true">
+                <img src="~@/assets/img/icons/changeLang.png" alt="">
+                <span style="display:inline-block;position: relative;top:-3px;left:3px">统计图</span>
+            </div>
         </div>
         <div class="table-cont" v-show="dataLoading">
             <div class="table-body-wrapper">
@@ -76,16 +81,18 @@
                 </table>
             </div>
         </div>
-
+        <abnormalRenewalChart v-if="showChart" @close="showChart=false"/>
     </div>
 </template>
 
 <script>
 import { dataMainInterface } from '@/api/api.js';
 import mixin from './mixin';
+import abnormalRenewalChart from '../components/abnormalRenewalChart.vue';
 export default {
     name:'abnormalRenewal',
     mixins: [ mixin ],
+    components:{abnormalRenewalChart},
     computed:{
         tableThead:function(){
             if(['周度统计表','月度统计表'].includes(this.default_tab)){
@@ -98,7 +105,8 @@ export default {
     data() {
         return {
             sellerList:[],
-            summaryList:[]
+            summaryList:[],
+            showChart:false,
         }
     },
     created() {
@@ -108,6 +116,8 @@ export default {
 
         getTableData(){
             this.dataLoading=true
+            this.sellerList=[]
+            this.summaryList=[]
             dataMainInterface.unusualRenewalCustomStatistic({
                 DataType: this.default_tab === '周度统计表' ? 'week' : this.default_tab === '月度统计表' ? 'month' : 'time_interval',
 				StartDate: this.select_date ? this.select_date[0] : '',
@@ -155,4 +165,8 @@ export default {
 
 <style lang="scss" scoped>
 @import './index.scss';
+.statistic-container{
+    height: calc(100vh - 180px);
+    position: relative;
+}
 </style>

+ 3 - 1
src/views/rai_manage/activityManage/activityManage.vue

@@ -72,7 +72,9 @@
               &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 v-if="row.ChartPermissionId === 31 && tabsPitchon == 0" class="editsty" @click="overheadHandler(row.ActivityId, '置顶')">&nbsp;&nbsp;{{ row.TopTime == 0 ? "置顶" : "取消置顶" }}</p>
+              <p v-if="row.ChartPermissionId === 31 && tabsPitchon == 0 && row.PublishStatus == 1" class="editsty" @click="overheadHandler(row.ActivityId, '置顶')">
+                &nbsp;&nbsp;{{ row.TopTime == 0 ? "置顶" : "取消置顶" }}
+              </p>
             </div>
           </template>
         </el-table-column>

+ 1 - 1
src/views/rai_manage/activityManage/specialResearch.vue

@@ -177,7 +177,7 @@ export default {
     },
     //获取行业
     chartPermission() {
-      raiInterface.getNoTacticsfirst().then((res) => {
+      raiInterface.getActivitySpecial().then((res) => {
         if (res.Ret === 200) {
           this.chartPermissionList = res.Data.List;
         }

+ 1 - 1
src/views/rai_manage/activityManage/specialResearch/addResearch.vue

@@ -263,7 +263,7 @@ export default {
   methods: {
     //获取行业
     chartPermission() {
-      raiInterface.getNoTacticsfirst().then((res) => {
+      raiInterface.getActivitySpecial().then((res) => {
         if (res.Ret === 200) {
           this.chartPermissionList = res.Data.List;
         }

+ 1 - 1
src/views/rai_manage/activityManage/specialResearch/determineTravel.vue

@@ -317,7 +317,7 @@ export default {
   methods: {
     //获取行业
     chartPermission() {
-      raiInterface.getNoTacticsfirst().then((res) => {
+      raiInterface.getActivitySpecial().then((res) => {
         if (res.Ret === 200) {
           this.chartPermissionList = res.Data.List;
         }

+ 119 - 132
src/views/rai_manage/components/addChoiceness.vue

@@ -11,7 +11,7 @@
           </el-select>
         </el-col>
         <el-col :span="12">
-          <el-select v-if="updateMode == '继承往期'" v-model="inheritNum" placeholder="选择继承第几期" clearable @clear="inheritNumClear" @change="getDetail">
+          <el-select v-if="updateMode == '继承往期'" v-model="inheritNum" placeholder="选择继承第几期" clearable @change="getDetail">
             <el-option v-for="item in updateModeList" :key="item.Periods" :label="item.InheritPeriodsName" :value="item.Periods"></el-option>
           </el-select>
         </el-col>
@@ -42,7 +42,7 @@
           </el-form-item>
           <!-- 变更说明 -->
           <!-- 富文本 -->
-          <rich-text ref="oneRich" :spareId="contentValue" :isText="contentText" />
+          <rich-text ref="oneRich" v-model="marketStrategy" :spareId="contentValue" :isText="contentText" />
           <el-form-item prop="reportLink">
             <div style="display: flex; align-items: center; margin-top: 10px">
               <span style="flex-shrink: 0">详细报告链接:</span>
@@ -58,47 +58,54 @@
             </div>
           </draggable>
           <div v-for="(item, index) in industryList" :key="item.ChartPermissionId">
-            <RichText v-show="industryIndex == index" :ref="'logic' + index" :spareId="'logictest' + index" :isText="contentTextLogic" />
-          </div>
-          <draggable :list="industryListItem" animation="300" class="classification" filter=".addIndustrial" :move="onMove" @update="ificationSortChange">
-            <div v-for="(val, num) in industryListItem" :key="val.IndustrialSubjectId" class="industrial" @click="ificationIndustrialBtn(val, num)" :class="num == ificationIndustrial ? 'pitch' : ''">
-              <span style="margin-right: 19px">{{ val.IndustrialSubjectName }}</span>
-              <span v-if="num == ificationIndustrial">
-                <img src="~@/assets/img/icons/edit1.png" style="width: 12px; height: 12px; marginright: 10px" @click="editText(val, num)" />
-                <i class="el-icon-close" @click="deleteClassify(val, num)"></i>
-              </span>
-            </div>
-            <div class="addIndustrial" @click="addMulti">
-              <i class="el-icon-plus"></i>
-              <span>添加标的</span>
-            </div>
-          </draggable>
-          <template v-for="(val, num) in industryListItem">
-            <div class="industrial-is-new" :key="val.IndustrialSubjectId" v-if="num == ificationIndustrial">
-              <el-checkbox v-model="val.IsNew" :true-label="1" :false-label="0">显示new标签</el-checkbox>
+            <div v-show="industryIndex == index">
+              <RichText v-model="item.BodyChartSummary" :ref="'logic' + index" :spareId="'logictest' + index" :isText="contentTextLogic" />
+              <draggable :list="item.List" animation="300" class="classification" filter=".addIndustrial" :move="onMove" @update="ificationSortChange">
+                <div v-for="(val, num) in item.List" :key="val.IndustrialSubjectId" class="industrial" @click="ificationIndustrialBtn(val, num)" :class="num == ificationIndustrial ? 'pitch' : ''">
+                  <span style="margin-right: 19px">{{ val.IndustrialSubjectName }}</span>
+                  <span v-if="num == ificationIndustrial">
+                    <img src="~@/assets/img/icons/edit1.png" style="width: 12px; height: 12px; marginright: 10px" @click="editText(val, num)" />
+                    <i class="el-icon-close" @click="deleteClassify(val, num)"></i>
+                  </span>
+                </div>
+                <div class="addIndustrial" @click="addMulti" v-if="industryIndex == index">
+                  <i class="el-icon-plus"></i>
+                  <span>添加标的</span>
+                </div>
+              </draggable>
+              <template v-for="(val, num) in item.List">
+                <div :key="val.IndustrialSubjectId" v-show="industryIndex == index">
+                  <div class="industrial-is-new" v-show="num == ificationIndustrial">
+                    <el-checkbox v-model="val.IsNew" :true-label="1" :false-label="0">显示new标签</el-checkbox>
+                  </div>
+                  <div style="margin-bottom: 20px; display: flex; align-items: center" v-show="num == ificationIndustrial">
+                    <div style="display: flex; align-items: center" v-for="(son, num) in val.CompanyLabel" :key="num">
+                      <el-input style="width: 260px; margin-right: 15px" v-model="son.name" placeholder="请输入公司标签"></el-input>
+                      <img class="delete-item-icon" v-if="num > 0" @click="deleteLabelItem(val, num)" src="~@/assets/img/icons/delete-Item.png" alt="" />
+                    </div>
+                    <el-tooltip class="item" effect="dark" content="添加标签" placement="top-start">
+                      <img @click="addLabelClick(val)" class="editsty" src="~@/assets/img/set_m/add_ico.png" />
+                    </el-tooltip>
+                  </div>
+                  <rich-text :ref="'twoRich' + num" v-model="val.Body" :spareId="contentValueTwo" :isText="contentTextTwo" v-show="num == ificationIndustrial" />
+                </div>
+              </template>
             </div>
-          </template>
-          <div v-if="industryListItem.length" style="margin-bottom: 20px; display: flex; align-items: center">
-            <div style="display: flex; align-items: center" v-for="(val, num) in industryListItem[ificationIndustrial].CompanyLabel" :key="num">
-              <el-input style="width: 260px; margin-right: 15px" v-model="val.name" placeholder="请输入公司标签"></el-input>
-              <img class="delete-item-icon" v-if="num > 0" @click="deleteLabelItem(val, num)" src="~@/assets/img/icons/delete-Item.png" alt="" />
-            </div>
-            <el-tooltip class="item" effect="dark" content="添加标签" placement="top-start">
-              <img @click="addLabelClick" class="editsty" src="~@/assets/img/set_m/add_ico.png" />
-            </el-tooltip>
           </div>
         </div>
 
-        <rich-text ref="twoRich" :spareId="contentValueTwo" :isText="contentTextTwo" />
-        <div class="content-resource">
-          <span class="resource">产业资源包:</span>
-          <span class="show">{{ industrialSubjectName }}</span>
-        </div>
-        <div class="content-resource">
-          <span class="resource">综述报告:</span>
-          <span class="show">{{ overviewList.Title }}</span>
-          <div style="margin-left: 20px">
-            <el-switch @change="switchChangeHandler" v-model="overviewList.IsShowOverviewArticle" :active-value="1" :inactive-value="0" active-text="显示链接" inactive-text="不显示链接"> </el-switch>
+        <div>
+          <div class="content-resource">
+            <span class="resource">产业资源包:</span>
+            <span class="show">{{ industrialSubjectName }}</span>
+          </div>
+          <div class="content-resource">
+            <span class="resource">综述报告:</span>
+            <span class="show">{{ overviewList.Title }}</span>
+            <div style="margin-left: 20px">
+              <el-switch @change="switchChangeHandler" v-model="overviewList.IsShowOverviewArticle" :active-value="1" :inactive-value="0" active-text="显示链接" inactive-text="不显示链接">
+              </el-switch>
+            </div>
           </div>
         </div>
         <div class="content-bottom">
@@ -131,10 +138,11 @@
 import RichText from "./richText.vue";
 import { raiInterface } from "@/api/api.js";
 import draggable from "vuedraggable";
+import TemplateMessage from "./apply/templateMessage.vue";
 
 export default {
   name: "",
-  components: { RichText, draggable },
+  components: { RichText, draggable, TemplateMessage },
   props: {},
   data() {
     return {
@@ -154,10 +162,6 @@ export default {
       },
       rules: {
         title: [{ required: true, message: "请输入标题", trigger: "blur" }],
-        // author: [{ required: true, message: "请输入作者", trigger: "blur" }],
-        // time: [{ required: true, message: "请输入时间", trigger: "change" }],
-        // explain: [{ required: true, message: "请输入产品说明", trigger: "blur" }],
-        // reportLink: [{ required: true, message: "请输入报告链接", trigger: "blur" }],
       },
       industryList: [], //行业
       industryIndex: 0, //
@@ -168,61 +172,76 @@ export default {
       companyList: [],
       timeout: null,
       isShowStatus: true,
-      industryListItem: [],
       industrialSubjectName: "",
       chartPermissionId: "", //分类id
       subjectList: [],
       updateModeList: [], //期数的数组
       editNum: "",
       overviewList: {},
+      marketStrategy: "",
+      timeInterval: null, // 定时器
     };
   },
   computed: {},
-  watch: {
-    industryListItem: {
-      handler(nval) {
-        if (nval.length > 0) {
-          this.industrialSubjectName = this.industryListItem[this.ificationIndustrial].IndustrialManagementName || "";
-          this.overviewList = {
-            ArticleId: this.industryListItem[this.ificationIndustrial].OverviewArticleId,
-            Title: this.industryListItem[this.ificationIndustrial].OverviewArticleTitle,
-            IsShowOverviewArticle: this.industryListItem[this.ificationIndustrial].IsShowOverviewArticle,
-          };
-        } else {
-          this.industrialSubjectName = "";
-          this.overviewList = { ArticleId: 0, Title: "", IsShowOverviewArticle: 0 };
-        }
-      },
-      deep: true,
-    },
-  },
-  created() {},
   mounted() {
     if (this.$route.query.id) {
       this.isShowStatus = this.$route.query.status == 0;
       this.getDetail();
     } else {
       this.getNoTacticsfirst();
+      this.dataInit();
     }
     this.getListPeriods();
   },
   methods: {
+    // 报告的缓存处理数据
+    dataInit() {
+      if (sessionStorage.getItem("addChoicenessQY")) {
+        let data = JSON.parse(sessionStorage.getItem("addChoicenessQY"));
+        setTimeout(async () => {
+          this.industryList = data.industryList;
+          this.industryIndex = data.industryIndex;
+          this.ificationIndustrial = data.ificationIndustrial;
+          this.updateMode = data.updateMode;
+          this.inheritNum = data.inheritNum;
+          this.companyList = data.companyList;
+          this.industrialSubjectName = data.industrialSubjectName;
+          this.chartPermissionId = data.chartPermissionId;
+          this.subjectList = data.subjectList;
+          this.updateModeList = data.updateModeList;
+          this.editNum = data.editNum;
+          this.overviewList = data.overviewList;
+          this.ruleForm = data.ruleForm;
+          this.marketStrategy = data.MarketStrategy;
+        }, 200);
+      }
+      this.timeInterval = setInterval(() => {
+        let params = {
+          industryList: this.industryList,
+          industryIndex: this.industryIndex,
+          ificationIndustrial: this.ificationIndustrial,
+          updateMode: this.updateMode,
+          inheritNum: this.inheritNum,
+          companyList: this.companyList,
+          industrialSubjectName: this.industrialSubjectName,
+          chartPermissionId: this.chartPermissionId,
+          subjectList: this.subjectList,
+          updateModeList: this.updateModeList,
+          editNum: this.editNum,
+          overviewList: this.overviewList,
+          ruleForm: this.ruleForm,
+          MarketStrategy: this.marketStrategy,
+        };
+        sessionStorage.setItem("addChoicenessQY", JSON.stringify(params));
+      }, 120000);
+    },
     updateModeChange() {
       if (this.updateMode == "重新编辑") {
         this.init();
         this.industryList = [];
-        this.industryListItem = [];
         this.getNoTacticsfirst();
       }
     },
-    inheritNumClear() {
-      if (this.inheritNum == "") {
-        // this.init();
-        // this.industryList=[]
-        // this.industryListItem=[]
-        // this.getNoTacticsfirst();
-      }
-    },
     //获取编辑详情
     async getDetail() {
       const res = await raiInterface.reportSelectionDetail({ ArticleId: this.$route.query.id || "", Periods: this.inheritNum || "" });
@@ -240,13 +259,12 @@ export default {
           explain: res.Data.ProductDescription, //说明
           reportLink: res.Data.ReportLink, //变更
         };
-        this.$refs["oneRich"].value = res.Data.MarketStrategy;
+        this.marketStrategy = res.Data.MarketStrategy;
         this.inheritNum = this.inheritNum ? this.inheritNum : res.Data.InheritPeriods;
         this.industryList = res.Data.List;
         setTimeout(() => {
           res.Data.List.forEach((item, index) => {
-            this.$refs["logic" + index][0].value = item.BodyChartSummary && item.BodyChartSummary;
-            item.List.forEach((key) => {
+            item.List.forEach((key, i) => {
               key.CompanyLabel = key.CompanyLabel
                 ? key.CompanyLabel.map((val, i) => {
                     let obj = {
@@ -265,8 +283,6 @@ export default {
           });
         }, 300);
         this.chartPermissionId = res.Data.List[0].ChartPermissionId;
-        this.industryListItem = res.Data.List[0].List || [];
-        this.$refs.twoRich.value = res.Data.List[0].List ? res.Data.List[0].List[0].Body : "";
         this.industrialSubjectName = res.Data.List[0].List ? res.Data.List[0].List[0].IndustrialManagementName : "";
         this.overviewList = {
           ArticleId: res.Data.List[0].List && res.Data.List[0].List[0].OverviewArticleId,
@@ -281,50 +297,20 @@ export default {
       if (res.Ret === 200) {
         this.industryList = res.Data.List;
         this.chartPermissionId = res.Data.List[0].ChartPermissionId;
-        this.industryListItem = res.Data.List[0].List || [];
       }
     },
     //点击产业的事件
     industryBtn(item, index) {
-      if (this.industryListItem.length > 0) {
-        this.industryListItem[this.ificationIndustrial].Body = this.$refs["twoRich"].value;
-      }
-      this.industryList[this.industryIndex].BodyChartSummary = this.$refs["logic" + this.industryIndex][0].value;
       if (index !== this.industryIndex) {
         this.industryIndex = index;
-        this.industryListItem = item.List || [];
-        this.industryListItem.forEach((item) => {
-          if (item.CompanyLabel && typeof item.CompanyLabel[0] === "string") {
-            item.CompanyLabel = item.CompanyLabel
-              ? item.CompanyLabel.map((key, index) => {
-                  let obj = {
-                    name: key,
-                    value: index + 1,
-                  };
-                  return obj;
-                })
-              : [
-                  {
-                    name: "",
-                    value: 1,
-                  },
-                ];
-          }
-        });
-
-        this.$refs.twoRich.value = item.List[0] ? item.List[0].Body : "";
         this.chartPermissionId = item.ChartPermissionId;
         this.ificationIndustrial = 0;
       }
     },
     //标的的点击事件 处理
     ificationIndustrialBtn(item, index) {
-      if (this.industryListItem.length > 0) {
-        this.industryListItem[this.ificationIndustrial].Body = this.$refs["twoRich"].value;
-      }
       if (index !== this.ificationIndustrial) {
         this.ificationIndustrial = index;
-        this.$refs.twoRich.value = item.Body || "";
         this.industrialSubjectName = item.IndustrialManagementName || "";
         this.overviewList = {
           ArticleId: item.OverviewArticleId,
@@ -351,7 +337,6 @@ export default {
         .then(() => {
           this.industryList[this.industryIndex].List.splice(index, 1);
           this.ificationIndustrial = 0;
-          this.$refs["twoRich"].value = this.industryList[this.industryIndex].List.length > 0 ? this.industryList[this.industryIndex].List[0].Body : "";
           this.$message({
             type: "success",
             message: "删除成功!",
@@ -440,8 +425,8 @@ export default {
               IndustrialManagementName: arr.IndustryName,
               IndustrialSubjectId: arr.IndustrialSubjectId + "",
               IndustrialSubjectName: arr.SubjectName,
-              CompanyLabel: item.List[this.editNum].CompanyLabel && item.List[this.editNum].CompanyLabel.length>0?
-                            item.List[this.editNum].CompanyLabel : [{ name: "", value: item.List.length + 1 }],
+              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,
@@ -473,12 +458,6 @@ export default {
     confirm(type) {
       this.$refs.ruleForm.validate(async (val) => {
         if (val) {
-          if (this.industryListItem.length > 0) {
-            this.industryListItem[this.ificationIndustrial].Body = this.$refs["twoRich"].value;
-          } else if (this.$refs["twoRich"].value) {
-            this.$message.error("文本内容无对应标的,请选择标的!");
-            return;
-          }
           let isText = [];
           this.industryList.forEach((item) => {
             item.List.forEach((key) => {
@@ -489,7 +468,6 @@ export default {
             return this.$message.error("请输入公司标签");
           }
           let params = this.dataHandle(type);
-          // console.log(params);
           if (type == "预览") {
             sessionStorage.setItem("choicenessPre", JSON.stringify(params));
             let { href } = this.$router.resolve({ name: "预览报告精选" });
@@ -497,6 +475,8 @@ export default {
           } else {
             const res = await raiInterface.industrialSubjectPreserveAndPublish(params);
             if (res.Ret === 200) {
+              clearInterval(this.timeInterval);
+              sessionStorage.removeItem("addChoicenessQY");
               this.$message.success("操作成功!");
               this.init();
               this.$router.back();
@@ -507,8 +487,10 @@ export default {
     },
     //取消
     cancel() {
-      this.$router.back();
+      clearInterval(this.timeInterval);
+      sessionStorage.removeItem("addChoicenessQY");
       this.$refs["ruleForm"].resetFields();
+      this.$router.back();
     },
     async getListPeriods() {
       const res = await raiInterface.industrialSubjectListPeriods();
@@ -525,12 +507,11 @@ export default {
         reportLink: "", //变更
       };
       this.$refs["ruleForm"].resetFields();
-      this.$refs["oneRich"].value = "";
-      this.$refs["twoRich"].value = "";
+      this.marketStrategy = "";
     },
     // 标的下添加公司标签
-    addLabelClick() {
-      this.industryListItem[this.ificationIndustrial].CompanyLabel.push({ name: "", value: this.industryListItem.length + 1 });
+    addLabelClick(item) {
+      item.CompanyLabel.push({ name: "", value: item.CompanyLabel.length + 1 });
     },
     // 处理保存的数据
     dataHandle(type) {
@@ -549,7 +530,7 @@ export default {
           ListSubject: [...item.List],
         });
       });
-      if (this.$refs["oneRich"].value == "") {
+      if (this.marketStrategy == "") {
         this.$message.error("市场策略核心逻辑汇总不能为空");
       }
       let params = {
@@ -558,7 +539,7 @@ export default {
         Department: this.ruleForm.author,
         Title: this.ruleForm.title,
         DoType: type == "发布" ? 1 : 0,
-        MarketStrategy: this.$refs["oneRich"].value,
+        MarketStrategy: this.marketStrategy,
         InheritPeriods: this.inheritNum,
         List: arr,
         ProductDescription: this.ruleForm.explain,
@@ -569,13 +550,15 @@ export default {
       return params;
     },
     deleteLabelItem(item, index) {
-      this.industryListItem[this.ificationIndustrial].CompanyLabel.splice(index, 1);
+      item.CompanyLabel.splice(index, 1);
     },
     switchChangeHandler(e) {
-      this.industryListItem.forEach((item) => {
-        if (item.OverviewArticleId === this.overviewList.ArticleId) {
-          item.IsShowOverviewArticle = e;
-        }
+      this.industryList.forEach((_) => {
+        _.List.forEach((item) => {
+          if (item.OverviewArticleId === this.overviewList.ArticleId) {
+            item.IsShowOverviewArticle = e;
+          }
+        });
       });
     },
     // 拖拽排序更新
@@ -588,7 +571,6 @@ export default {
     },
     // 排序更新后的逻辑
     sortChangeFun(currentIndex, oldIndex, newIndex) {
-      console.log({ currentIndex, oldIndex, newIndex });
       let bigger, smaller;
       if (oldIndex > newIndex) {
         bigger = oldIndex;
@@ -614,7 +596,12 @@ export default {
       // 返回false表示不允许停靠
       return !!e.relatedContext.element;
     },
-  }
+  },
+  // 路由离开了 清除定时器
+  beforeRouteLeave(to, from, next) {
+    clearInterval(this.timeInterval);
+    next();
+  },
 };
 </script>
 <style lang="scss">

+ 38 - 48
src/views/rai_manage/components/addMorningMeeting.vue

@@ -12,23 +12,19 @@
               <h3>段落{{ index + 1 }}:</h3>
               <span class="dele" v-if="index !== 0" @click="deleteSection(index)"> <img src="~@/assets/img/icons/delete-Item.png" /></span>
             </div>
+            <div>
+              <el-checkbox v-model="item.isJumpNot">可跳转报告详情</el-checkbox>
+              <template v-if="item.isJumpNot">
+                <el-input style="margin: 20px 0" v-model="item.reportLink" placeholder="请输入报告链接"></el-input>
+                <el-input v-model="item.headTitle" placeholder="请输入首行标题"></el-input>
+              </template>
+            </div>
             <div class="fr-wrapper">
-              <froala
-              :id="`froala-editor-${index}`"
-              :ref="`froalaEditor${index}`"
-              :tag="'textarea'"
-              :config="froalaConfig"
-              v-model="item.content"
-              ></froala>
+              <froala :id="`froala-editor-${index}`" :ref="`froalaEditor${index}`" :tag="'textarea'" :config="froalaConfig" v-model="item.content"></froala>
             </div>
           </div>
           <div class="classify-box">
-            <el-select
-              placeholder="请选择行业"
-              v-model="item.industry"
-              value-key="ChartPermissionId"
-              @change="handleSelectChange(item, index, 'industry')"
-            >
+            <el-select placeholder="请选择行业" v-model="item.industry" value-key="ChartPermissionId" @change="handleSelectChange(item, index, 'industry')">
               <el-option
                 v-for="industry in industryData"
                 :key="industry.ChartPermissionId"
@@ -36,27 +32,11 @@
                 :value="{ ChartPermissionId: industry.ChartPermissionId, PermissionName: industry.PermissionName }"
               />
             </el-select>
-            <el-select
-              placeholder="请选择产业"
-              filterable
-              v-model="item.property"
-              value-key="ChartPermissionId"
-              @change="handleSelectChange(item, index, 'property')"
-            >
-              <el-option
-                v-for="property in getPropertyData(item.industry)"
-                :key="property.ChartPermissionId"
-                :label="property.PermissionName"
-                :value="property"
-              />
+            <el-select placeholder="请选择产业" filterable v-model="item.property" value-key="ChartPermissionId" @change="handleSelectChange(item, index, 'property')">
+              <el-option v-for="property in getPropertyData(item.industry)" :key="property.ChartPermissionId" :label="property.PermissionName" :value="property" />
             </el-select>
             <el-select multiple placeholder="请选择标的" v-model="item.subject" @focus="getSubjectData(item.property)">
-              <el-option
-                v-for="subject in subjectData"
-                :key="subject.IndustrialSubjectId"
-                :label="subject.SubjectName"
-                :value="subject.IndustrialSubjectId"
-              />
+              <el-option v-for="subject in subjectData" :key="subject.IndustrialSubjectId" :label="subject.SubjectName" :value="subject.IndustrialSubjectId" />
             </el-select>
           </div>
         </div>
@@ -74,25 +54,15 @@
 
 <script>
 import { raiInterface } from "@/api/api.js";
-export default {    
+export default {
   data() {
     var that = this;
     return {
       meettingDate: "",
       meetingId: 0,
       froalaConfig: {
-        toolbarButtons: [
-          "bold",
-          "italic",
-          "underline",
-          "strikeThrough",
-          "insertHR",
-          "fontSize",
-          "align",
-          "undo",
-          "redo",
-        ],
-        height: 150,
+        toolbarButtons: ["bold", "italic", "underline", "strikeThrough", "insertHR", "fontSize", "align", "undo", "redo"],
+        height: 260,
         fontSizeDefaultSelection: "16",
         quickInsertEnabled: false,
         theme: "dark", //主题
@@ -107,6 +77,9 @@ export default {
       },
       sectionData: [
         {
+          isJumpNot: false, //是否跳转
+          reportLink: "", //报告链接
+          headTitle: "", //报告标题
           content: "", //晨会内容
           industry: "", //行业
           property: "", //行业
@@ -130,6 +103,9 @@ export default {
         industry: "",
         property: "",
         subject: "",
+        isJumpNot: false, //是否跳转
+        reportLink: "", //报告链接
+        headTitle: "", //报告标题
       };
       this.sectionData.push(section);
     },
@@ -200,6 +176,9 @@ export default {
           content: item.content,
           industry: { ChartPermissionId: item.chartPermissionId, PermissionName: item.chartPermissionName },
           property: { ChartPermissionId: item.industryId, PermissionName: item.industryName },
+          reportLink: item.reportLink,
+          headTitle: item.title,
+          isJumpNot: item.reportLink ? true : false,
         };
         let subject = [];
         let industrialSubjectList = item.industrialSubjectList || [];
@@ -288,6 +267,8 @@ export default {
           IndustryId: item.property.ChartPermissionId,
           IndustryName: item.property.PermissionName,
           IndustrialSubjectIds: item.subject.join(),
+          ReportLink: item.reportLink,
+          Title: item.headTitle,
         };
         list.push(temp);
       });
@@ -296,6 +277,14 @@ export default {
     //检查晨会内容
     checkContent() {
       for (let i = 0; i < this.sectionData.length; i++) {
+        if (this.sectionData[i].isJumpNot && this.sectionData[i].reportLink.length === 0) {
+          this.$message.warning(`请输入段落${i + 1}报告链接`);
+          return false;
+        }
+        if (this.sectionData[i].isJumpNot && this.sectionData[i].headTitle.length === 0) {
+          this.$message.warning(`请输入段落${i + 1}报告标题`);
+          return false;
+        }
         //所有的段落有值
         if (this.sectionData[i].content.length === 0) {
           this.$message.warning(`请输入段落${i + 1}的内容`);
@@ -400,8 +389,9 @@ export default {
     }
   }
   .fr-wrapper {
-  border-top: 1px solid #cccccc !important;
-  border-bottom: 1px solid #cccccc !important;
-}
+    margin-top: 20px;
+    border-top: 1px solid #cccccc !important;
+    border-bottom: 1px solid #cccccc !important;
+  }
 }
 </style>

+ 58 - 9
src/views/rai_manage/components/addRoadshow.vue

@@ -70,6 +70,7 @@
 import RichText from "./richText.vue";
 
 import { raiInterface } from "@/api/api.js";
+import { async } from "@antv/x6/lib/registry/marker/main";
 export default {
   name: "",
   components: { RichText },
@@ -101,6 +102,7 @@ export default {
       contentValue: "请输入内容",
       propertyDetai: [],
       isShowStatus: true,
+      timeInterval: null,
     };
   },
   computed: {},
@@ -110,14 +112,53 @@ export default {
     this.getIndustryList();
     if (this.$route.query.id) {
       this.getDetail();
+    } else {
+      this.dataInit();
     }
   },
   methods: {
-    //
+    // 报告的缓存处理数据
+    dataInit() {
+      if (sessionStorage.getItem("addRoadshowReportQY")) {
+        let data = JSON.parse(sessionStorage.getItem("addRoadshowReportQY"));
+        setTimeout(async () => {
+          this.listForm = {
+            title: data.Title, //标题
+            author: data.SellerAndMobile, //作者
+            time: data.PublishDate, //时间
+            industry: data.ChartPermissionId, //行业
+            abstract: data.Abstract,
+            reportLink: data.ReportLink,
+            property: data.IndustrialManagementId,
+            target: data.IndustrialSubjectIdStr,
+          };
+          this.$refs.twoRich.value = data.Body;
+          if (this.listForm.industry) {
+            await this.getPropertyList();
+            await this.getTargetList();
+          }
+        }, 200);
+      }
+      this.timeInterval = setInterval(() => {
+        let params = {
+          Abstract: this.listForm.abstract,
+          Body: this.$refs.twoRich.value,
+          ChartPermissionId: this.listForm.industry,
+          IndustrialManagementId: this.listForm.property,
+          IndustrialSubjectIdStr: this.listForm.target,
+          ReportLink: this.listForm.reportLink,
+          PublishDate: this.listForm.time,
+          SellerAndMobile: this.listForm.author,
+          Title: this.listForm.title,
+        };
+        sessionStorage.setItem("addRoadshowReportQY", JSON.stringify(params));
+      }, 120000);
+    },
+    // 获取数据
     async getDetail() {
       const res = await raiInterface.roadshowEssenceDetail({ ArticleId: Number(this.$route.query.id) });
       if (res.Ret === 200) {
-        this.isShowStatus=res.Data.PublishStatus==0
+        this.isShowStatus = res.Data.PublishStatus == 0;
         this.listForm = {
           title: res.Data.Title, //标题
           author: res.Data.SellerAndMobile, //作者
@@ -176,20 +217,21 @@ export default {
             Title: this.listForm.title,
             DoType: type == "发布" ? 1 : 0,
             ArticleId: this.$route.query.id ? Number(this.$route.query.id) : 0,
-          }
-          if(type == "预览"){
-            sessionStorage.setItem('roadShowPre', JSON.stringify(params));
-            let { href } = this.$router.resolve({ name: '预览路演精华' });
-            window.open(href, '_blank');
-          }else{
+          };
+          if (type == "预览") {
+            sessionStorage.setItem("roadShowPre", JSON.stringify(params));
+            let { href } = this.$router.resolve({ name: "预览路演精华" });
+            window.open(href, "_blank");
+          } else {
             const res = await raiInterface.roadshowEssencePreserveAndPublish(params);
             if (res.Ret === 200) {
               this.$message.success(`${type}成功!`);
               this.$refs.ruleForm.resetFields();
+              clearInterval(this.timeInterval);
+              sessionStorage.removeItem("addRoadshowReportQY");
               this.$router.back();
             }
           }
-
         }
       });
     },
@@ -205,10 +247,17 @@ export default {
     },
     //取消事件
     cancel() {
+      clearInterval(this.timeInterval);
+      sessionStorage.removeItem("addRoadshowReportQY");
       this.$refs.ruleForm.resetFields();
       this.$router.back();
     },
   },
+  // 路由离开了 清除定时器
+  beforeRouteLeave(to, from, next) {
+    clearInterval(this.timeInterval);
+    next();
+  },
 };
 </script>
 <style lang="scss">

+ 55 - 2
src/views/rai_manage/components/addSummary.vue

@@ -210,6 +210,8 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`,
       synopsisText: [], //
       articleTypeName: "", //报告类型的名称
       isSource: "",
+      numNum: 0,
+      timeInterval: null,
     };
   },
   computed: {},
@@ -223,9 +225,53 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`,
     if (this.$route.query.id) {
       // 编辑进来的
       this.getsummaryManagedetail();
+    } else {
+      this.dataInit();
     }
   },
   methods: {
+    // 报告的缓存处理数据
+    dataInit() {
+      if (sessionStorage.getItem(this.isSource == "HZ" ? "addSummaryParamsHZ" : "addSummaryParamsQY")) {
+        let data = JSON.parse(sessionStorage.getItem(this.isSource == "HZ" ? "addSummaryParamsHZ" : "addSummaryParamsQY"));
+        setTimeout(() => {
+          this.addOfEditForm = {
+            industry: data.ChartPermissionId, //HZ  行业
+            regions: data.ArticleTypeId,
+            title: data.Title,
+            content: data.Body,
+            synopsis: data.Abstract,
+            mobile: data.SellerAndMobile,
+            ImgUrl: data.ImgUrl,
+            nickName: data.NickName,
+            reportLink: data.ReportLink,
+            publishTime: data.PublishDate,
+            property: data.IndustrialManagementIds,
+          };
+          this.articleTypeName = data.ArticleTypeName;
+          this.markValue = data.IndustrialSubjectIds;
+          data.IndustrialManagementIds && this.markSelectFocus();
+        }, 200);
+      }
+      this.timeInterval = setInterval(() => {
+        let params = {
+          Abstract: this.addOfEditForm.synopsis,
+          Body: this.addOfEditForm.content,
+          SellerAndMobile: this.addOfEditForm.mobile,
+          NickName: this.addOfEditForm.nickName,
+          ImgUrl: this.addOfEditForm.ImgUrl,
+          Title: this.addOfEditForm.title,
+          ArticleTypeId: this.addOfEditForm.regions,
+          IndustrialSubjectIds: this.markValue,
+          IndustrialManagementIds: this.addOfEditForm.property, //产业
+          PublishDate: this.addOfEditForm.publishTime,
+          ReportLink: this.addOfEditForm.reportLink,
+          ChartPermissionId: this.addOfEditForm.industry,
+        };
+        sessionStorage.setItem(this.isSource == "HZ" ? "addSummaryParamsHZ" : "addSummaryParamsQY", JSON.stringify(params));
+        this.numNum++;
+      }, 120000);
+    },
     //点击了添加产业
     addIndustryDlgIsShow() {
       if (this.addOfEditForm.regions) {
@@ -239,7 +285,6 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`,
     regionsChange(e) {
       this.articleTypeName = this.chartPermissionList.find((item) => item.ArticleTypeId == e).ArticleTypeName;
       let str = this.synopsisText.find((item) => item.ArticleTypeId == e);
-      this.addOfEditForm.synopsis = str ? str.Abstract : "";
     },
     //进来编辑的 获取内容的事件
     async getsummaryManagedetail() {
@@ -306,7 +351,9 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`,
         } else {
           const res = this.isSource === "HZ" ? await raiInterface.reportPreserveAndPublish(params) : await raiInterface.preserveAndPublish(params);
           if (res.Ret === 200) {
+            clearInterval(this.timeInterval);
             this.$message.success("操作成功!");
+            sessionStorage.removeItem(this.isSource == "HZ" ? "addSummaryParamsHZ" : "addSummaryParamsQY");
             this.$refs.addOfEditForm.resetFields();
             this.$router.back();
           }
@@ -315,7 +362,9 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`,
     },
     //表单取消事件
     cancelBtn() {
+      clearInterval(this.timeInterval);
       this.$refs.addOfEditForm.resetFields();
+      sessionStorage.removeItem(this.isSource == "HZ" ? "addSummaryParamsHZ" : "addSummaryParamsQY");
       this.$router.back();
     },
     //获取行业
@@ -388,7 +437,6 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`,
       }
     },
     propertyChange() {
-      console.log("change");
       this.markOptions = [];
       this.markValue = "";
     },
@@ -471,6 +519,11 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`,
       });
     },
   },
+  // 路由离开了 清除定时器
+  beforeRouteLeave(to, from, next) {
+    clearInterval(this.timeInterval);
+    next();
+  },
 };
 </script>
 <style lang="scss">

+ 1 - 2
src/views/rai_manage/components/apply/applyDialog.vue

@@ -110,8 +110,7 @@ export default {
     isType() {
       if (this.selectionArr.length > 0) {
         return this.selectionArr.some(
-          (item) =>
-            (item.ActivityTypeName == "公司调研电话会" && item.LimitPeopleNum !== 0) || item.ActivityTypeName == "专家电话会" || item.ActivityTypeName == "分析师电话会" || item.IsYidongConduct == 1
+          (item) => item.ActivityTypeName == "公司调研电话会" || item.ActivityTypeName == "专家电话会" || item.ActivityTypeName == "分析师电话会" || item.IsYidongConduct == 1
         );
       }
     },

+ 1 - 0
src/views/rai_manage/components/reportComponents/RichTextMixins.js

@@ -3,6 +3,7 @@ export default {
     var that = this;
     return {
       froalaConfig: {
+        key: "BWC6D-16D3B2F3C2H1A6A7wdwgacxuB-33c1fB2twtfG3A7A6B6A3B3B2G3D2H2==",
         toolbarButtons: [
           "textColor",
           "bold",

+ 14 - 1
src/views/rai_manage/components/richText.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="richtext">
-    <froala :id="'editor' + spareId" :tag="'textarea'" :config="froalaConfig" v-model="value"></froala>
+    <froala :id="'editor' + spareId" :tag="'textarea'" :config="froalaConfig" v-model="valueText" @input="inputHandler"></froala>
   </div>
 </template>
 
@@ -9,6 +9,10 @@ import VueFroala from "vue-froala-wysiwyg";
 export default {
   name: "",
   components: {},
+  model: {
+    prop: "valueText",
+    event: "contentText",
+  },
   props: {
     spareId: {
       type: String,
@@ -19,6 +23,10 @@ export default {
       required: true,
       default: "",
     },
+    valueText: {
+      type: String,
+      required: true,
+    },
   },
   watch: {
     isText: {
@@ -105,6 +113,11 @@ export default {
       value: "",
     };
   },
+  methods: {
+    inputHandler() {
+      this.$emit("contentText", this.valueText);
+    },
+  },
 };
 </script>
 <style lang="scss">

+ 56 - 43
src/views/rai_manage/reportManage/components/addHaveReport.vue

@@ -9,45 +9,19 @@
           <el-input style="width: 360px" clearable v-model="addOfEditForm.title" placeholder="请输入报告标题"></el-input>
         </el-form-item>
         <el-form-item prop="publishTime">
-          <el-date-picker
-            style="width: 360px"
-            v-model="addOfEditForm.publishTime"
-            type="date"
-            placeholder="请选择发布时间"
-            format="yyyy-MM-dd"
-            value-format="yyyy-MM-dd"
-          >
-          </el-date-picker>
+          <el-date-picker style="width: 360px" v-model="addOfEditForm.publishTime" type="date" placeholder="请选择发布时间" format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
         </el-form-item>
         <el-form-item>
           <el-input style="width: 360px" clearable v-model="addOfEditForm.department" placeholder="请输入作者(选填)"></el-input>
         </el-form-item>
         <el-form-item prop="industry">
           <el-select placeholder="请选择行业" style="width: 360px" clearable v-model="addOfEditForm.industry" @change="industryChangeHandler">
-            <el-option
-              v-for="item in chartPermissionList"
-              :label="item.PermissionName"
-              :key="item.ChartPermissionId"
-              :value="item.ChartPermissionId"
-            />
+            <el-option v-for="item in chartPermissionList" :label="item.PermissionName" :key="item.ChartPermissionId" :value="item.ChartPermissionId" />
           </el-select>
         </el-form-item>
         <el-form-item prop="property">
-          <el-select
-            v-model="addOfEditForm.property"
-            multiple
-            placeholder="请选择关联产业(选填)"
-            @change="propertyChangeHandler"
-            clearable
-            filterable
-            style="width: 360px"
-          >
-            <el-option
-              :label="item.IndustryName"
-              :value="item.IndustrialManagementId"
-              v-for="item in selectedIndustryArr"
-              :key="item.IndustrialManagementId"
-            />
+          <el-select v-model="addOfEditForm.property" multiple placeholder="请选择关联产业(选填)" @change="propertyChangeHandler" clearable filterable style="width: 360px">
+            <el-option :label="item.IndustryName" :value="item.IndustrialManagementId" v-for="item in selectedIndustryArr" :key="item.IndustrialManagementId" />
           </el-select>
         </el-form-item>
         <el-form-item prop="subject">
@@ -72,16 +46,7 @@
         </div>
       </el-card>
     </el-form>
-    <el-dialog
-      v-dialogDrag
-      :close-on-click-modal="false"
-      :modal-append-to-body="false"
-      center
-      title="新建报告类型"
-      :visible.sync="addMatchTypeDlg"
-      :before-close="confirmMatchType"
-      width="500px"
-    >
+    <el-dialog v-dialogDrag :close-on-click-modal="false" :modal-append-to-body="false" center title="新建报告类型" :visible.sync="addMatchTypeDlg" :before-close="confirmMatchType" width="500px">
       <p style="margin-bottom: 10px">所属行业:{{ dlgTextRender }}</p>
       <el-form :model="addMatchTypeData" :rules="matchTypeRules" ref="addMatchTypeData">
         <el-form-item prop="type">
@@ -143,6 +108,7 @@ export default {
         type: [{ required: true, message: "请选择类型归属", trigger: "change" }],
       },
       dlgTextRender: "",
+      timeInterval: null,
     };
   },
   mixins: [RichTextMixins],
@@ -152,10 +118,50 @@ export default {
     if (this.$route.query.id) {
       // 编辑进来的
       this.getDetail();
+    } else {
+      this.dataInit();
     }
     this.chartPermission();
   },
   methods: {
+    // 报告的缓存处理数据
+    dataInit() {
+      if (sessionStorage.getItem("addHaveReportQY")) {
+        let data = JSON.parse(sessionStorage.getItem("addHaveReportQY"));
+        setTimeout(async () => {
+          this.addOfEditForm = {
+            regions: data.Detail.ColumnName,
+            content: data.Detail.Body,
+            title: data.Detail.Title,
+            synopsis: data.Detail.Abstract,
+            department: data.Detail.Department,
+            publishTime: data.Detail.PublishTime,
+            property: data.Detail.ListIndustrial,
+            subject: data.Detail.ListSubject,
+            industry: data.Detail.ChartPermissionId,
+            matchTypeName: data.Detail.MatchTypeId,
+          };
+          this.isShowStatus = data.Detail.Status == 0;
+          await this.industryChangeHandler();
+          await this.propertyChangeHandler();
+        }, 200);
+      }
+      this.timeInterval = setInterval(() => {
+        let params = {
+          PublishTime: this.addOfEditForm.publishTime,
+          ColumnName: this.addOfEditForm.regions,
+          Title: this.addOfEditForm.title,
+          Abstract: this.addOfEditForm.synopsis,
+          Department: this.addOfEditForm.department,
+          Body: this.addOfEditForm.content,
+          IndustrialManagementIds: this.addOfEditForm.property,
+          IndustrialSubjectIds: this.addOfEditForm.subject,
+          ChartPermissionId: this.addOfEditForm.industry,
+          MatchTypeId: this.addOfEditForm.matchTypeName,
+        };
+        sessionStorage.setItem("addHaveReportQY", JSON.stringify(params));
+      }, 120000);
+    },
     // 产业的change事件
     propertyChangeHandler(val) {
       if (this.addOfEditForm.property && this.addOfEditForm.property.length) {
@@ -177,9 +183,7 @@ export default {
         }
         this.getIndustryList();
         this.getMatchTypeNameList();
-        this.chartPermissionList.forEach(
-          (item) => item.ChartPermissionId === this.addOfEditForm.industry && (this.dlgTextRender = item.PermissionName)
-        );
+        this.chartPermissionList.forEach((item) => item.ChartPermissionId === this.addOfEditForm.industry && (this.dlgTextRender = item.PermissionName));
       } else {
         this.industryDataInit();
       }
@@ -276,6 +280,8 @@ export default {
           const res = await raiInterface.internalPreserveAndPublish(params);
           if (res.Ret === 200) {
             this.$message.success("操作成功!");
+            clearInterval(this.timeInterval);
+            sessionStorage.removeItem("addHaveReportQY");
             this.$refs.addOfEditForm.resetFields();
             this.$router.push("/internalTesting");
           }
@@ -284,6 +290,8 @@ export default {
     },
     //表单取消事件
     cancelBtn() {
+      clearInterval(this.timeInterval);
+      sessionStorage.removeItem("addHaveReportQY");
       this.$refs.addOfEditForm.resetFields();
       this.$router.push("/internalTesting");
     },
@@ -317,6 +325,11 @@ export default {
       };
     },
   },
+  // 路由离开了 清除定时器
+  beforeRouteLeave(to, from, next) {
+    clearInterval(this.timeInterval);
+    next();
+  },
 };
 </script>
 <style scoped lang="scss">

+ 9 - 0
src/views/rai_manage/reportManage/summaryManage.vue

@@ -72,6 +72,7 @@
             <span class="editsty" @click="operationBtn(scope.row.ArticleId, '发布')">{{ scope.row.PublishStatus == 0 ? "发布" : "取消发布" }} &nbsp;&nbsp;</span>
             <span class="editsty" @click="editBtn(scope.row.ArticleId)">编辑 &nbsp;&nbsp;</span>
             <span class="deletesty" v-if="scope.row.PublishStatus == 0" @click="operationBtn(scope.row.ArticleId, '删除')">删除 &nbsp;&nbsp;</span>
+            <span class="editsty" v-if="scope.row.PublishStatus != 0" @click="toppingHandler(scope.row)">{{ scope.row.TopTime > 0 ? "取消置顶" : "置顶" }} &nbsp;&nbsp;</span>
           </template>
         </el-table-column>
       </el-table>
@@ -351,6 +352,14 @@ export default {
     clearAuthor() {
       this.remoteMethodAuthor();
     },
+    // 置顶 取消置顶
+    async toppingHandler(item) {
+      const res = await raiInterface.summaryManageTopChange({ ArticleId: item.ArticleId });
+      if (res.Ret === 200) {
+        this.getsummaryManageList();
+        this.$message.success("操作成功");
+      }
+    },
   },
   //路由离开
   beforeRouteLeave(to, from, next) {