Переглянути джерело

Merge branch 'master' into 11.1

bding 1 рік тому
батько
коміт
8ec00ce5f9

+ 8 - 0
src/api/cygx/api.js

@@ -37,6 +37,14 @@ export const RaiApi = {
   userIndustryFollow: (params) => {
     return post("/industry/follow", params);
   },
+  /**
+   * 约访专家
+   * @param {} params:{number ArticleId:ArticleId}
+   * @returns 
+   */
+  appointmentExpert: (params) => {
+    return post("/article/applyAppointmentExpert", params);
+  },
 };
 export const FreeButton = {
   /*获取是否展示免费试用按钮接口*/

BIN
src/assets/cygx/appointment-expert.png


+ 30 - 0
src/views/cygx/raiReportDtl.vue

@@ -87,6 +87,11 @@
         <img src="@/assets/cygx/leaving_message.png" class="img_ico" />
         <div>留言</div>
       </div>
+      <div class="handle-item" v-if="reportInfo?.IsApplyAppointmentExpert" 
+      @click="appointment(reportInfo?.ArticleId)">
+        <img src="@/assets/cygx/appointment-expert.png" class="img_ico" />
+        <div>约访专家</div>
+      </div>
       <div class="handle-item" @click="collectHandle">
         <img src="@/assets/cygx/collect_act.png" class="img_ico" v-if="reportInfo.IsCollect" />
         <img src="@/assets/cygx/collect_ico.png" class="img_ico" v-else />
@@ -326,6 +331,31 @@ const quizBtn = () => {
     url: "/activityPages/generationAsk/generationAsk?id=" + state.reportInfo.ArticleId + "&type=文章",
   });
 };
+// 约访专家
+const appointment=(articleId)=>{
+  console.log(articleId);
+  if(!articleId){
+    Toast("ArticleId 值错误");
+    return
+  }
+  Dialog.confirm({
+    message: "约访专家的请求会提醒您的对口销售,确定要发起吗?",
+    messageAlign:'left',
+    showCancelButton:true,
+    confirmButtonColor:'blue'
+  }).then(() => {
+    RaiApi.appointmentExpert({ArticleId:articleId}).then(res=>{
+      if (res.Ret === 200 || res.Ret === 403) {
+        Dialog.confirm({
+          message: "约访申请已提醒您的对口销售,请等待销售与您联系",
+          messageAlign:'left',
+          showConfirmButton:false,
+          cancelButtonText:'知道了'
+        }).then(() => {}).catch(()=>{})
+      }
+    })
+  }).catch(()=>{})
+}
 /* 获取报告详情 */
 const getReport = (id, token, type) => {
   if (type == "mpwechat") {

+ 22 - 10
src/views/hzyb/chart/Detail.vue

@@ -393,10 +393,10 @@ const getRelevanceDetail=async ()=>{
     if(res.code===200){
         resData.value=res.data
         
-        if([3,4].includes(res.data.ChartInfo.Source)) { //相关性
+        if([3].includes(res.data.ChartInfo.Source)) { //相关性
             relevanceChartData.value=res.data
             initRelevanceChart(res.data);
-        }else if([6,7,8].includes(res.data.ChartInfo.Source)) { //拟合方程曲线 标准差 百分比
+        }else if([4,6,7,8].includes(res.data.ChartInfo.Source)) { //滚动相关性 拟合方程曲线 标准差 百分比
             setSplineOpt([res.data.DataResp])
         }else if(res.data.ChartInfo.Source===9) { //统计频率
             statisticFrequencyData.value = res.data.DataResp;
@@ -463,11 +463,11 @@ const initRelevanceChart=(data)=>{
           },
           align: 'center',
         },
-        min: -1,
-        max: 1,
+        // min: -1,
+        // max: 1,
         opposite: false,
         tickWidth: 1,
-        tickInterval:0.2,
+        // tickInterval:0.2,
     }
 
     //处理series
@@ -500,11 +500,11 @@ const initRelevanceChart=(data)=>{
     }
     
     nextTick(()=>{
-        if(data.ChartInfo.Source===3) {
-            const hEl=document.getElementById('chart-box')
-            console.log(hEl.offsetHeight);
-            xAxis.offset=-(hEl.offsetHeight-74)/2
-        }
+        // if(data.ChartInfo.Source===3) {
+        //     const hEl=document.getElementById('chart-box')
+        //     console.log(hEl.offsetHeight);
+        //     xAxis.offset=-(hEl.offsetHeight-74)/2
+        // }
         chartData.value = {
             isRelevanceChart:data.ChartInfo.Source===3,
             title: {
@@ -1199,6 +1199,18 @@ const setSplineOpt=(data)=>{
     chartData.value.yAxis=yAxis
     chartData.value.rangeSelector={ enabled: false}
 
+     //滚动相关性独立tooltip
+    if(resData.value.ChartInfo.Source === 4) {
+        const { LeadValue,LeadUnit } = resData.value.CorrelationChartInfo;
+        chartData.value.tooltip = {
+          formatter: function() {
+            let str = `${Highcharts.dateFormat('%Y/%m/%d',this.x)}<br><p>相关性系数:${this.y.toFixed(4)}</p><br><p>领先${LeadValue+LeadUnit}</p>`
+           
+            return str
+          }
+        }
+    }
+
 }
 
 /* 堆叠图/组合图设置  

+ 6 - 3
src/views/hzyb/chart/positionAnalysis/Index.vue

@@ -17,6 +17,7 @@ const isPcShow=ref(route.query.showType||'')
 let showDate=ref(false)
 const minDate=ref(new Date('2000/01/01'))
 let currentDate=ref('')//这是绑定在时间选择器的时间防止用户滑动了时间但是没点确定 这时候又把这个时间改成selectDate
+let latestDate=ref('') //最新更新时间
 let selectDate=ref('')
 function confirmSelectDate(e){
     // 如果选择的是 周六日 提示
@@ -152,6 +153,7 @@ async function getInfo(){
             selectDate.value=moment(res.data.data_time).toDate()
             currentDate.value=moment(res.data.data_time).toDate()
         }
+        latestDate.value = res.data.last_data_time
         document.title=`${route.query.classify_type} ${moment(selectDate.value).format('YYYYMMDD')}持仓`
     }else{
         // 清空数据
@@ -183,6 +185,7 @@ async function getInfo(){
         window.parent.postMessage({
             opt:'updateInfo',
             data_time:selectDate.value?moment(selectDate.value).format('YYYY-MM-DD'):'',
+            latestDate:latestDate.value,
             classify_name:route.query.classify_name,
             classify_type:route.query.classify_type,
             exchange:route.query.exchange,
@@ -230,7 +233,7 @@ window.addEventListener('message',e=>{
 </script>
 
 <template>
-    <PullRefresh v-model="isRefresh" @refresh="onRefresh">
+    <!-- <PullRefresh v-model="isRefresh" @refresh="onRefresh"> -->
     <div :class="['chart-position-analysis-page',isPcShow?'chart-position-analysis-page-pc':'']" v-if="!pageLoading">
         <div class="top-sticky-wrap">
             <div class="notice-box">如无法滑动,请在左侧空白处尝试</div>
@@ -241,7 +244,7 @@ window.addEventListener('message',e=>{
                     @click="showDate=true"
                 >{{selectDate?moment(selectDate).format('YYYY-MM-DD'):'选择日期'}}</div>
                 <span style="color:#E3B377" @click="handleDateChange('before')">前一天</span>
-                <span style="color:#E3B377" @click="handleDateChange('next')">后一天</span>
+                <span style="color:#E3B377" @click="handleDateChange('next')" v-show="selectDate?moment(selectDate).valueOf()<moment(latestDate).valueOf():true">后一天</span>
             </div>
         </div>
         <div class="empty-wrap" v-if="!chartListState.buy_list.list">
@@ -265,7 +268,7 @@ window.addEventListener('message',e=>{
         </div>
 
     </div>
-    </PullRefresh>
+    <!-- </PullRefresh> -->
     <!-- 选择时间弹窗 -->
     <Popup
         v-model:show="showDate"