Compare commits
29 Commits
67a673cd4d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6dc7d00e6a | ||
|
|
890be2e3e9 | ||
|
|
8445e95ba3 | ||
|
|
21e16f543f | ||
|
|
c4cbd5a11f | ||
|
|
995ee7f220 | ||
|
|
eeca65538c | ||
|
|
b957844c6b | ||
|
|
16ba613a82 | ||
|
|
0a2dab4936 | ||
|
|
1c13386dfc | ||
|
|
44d8ecf318 | ||
|
|
e2610ccd9c | ||
|
|
1bce4b8e6c | ||
|
|
bb1da58a5d | ||
|
|
cbcffb40f1 | ||
|
|
441f4c7360 | ||
|
|
22286f26d9 | ||
|
|
5ffaac8fb2 | ||
|
|
38fc352096 | ||
|
|
4f211dcd5f | ||
|
|
da90511b86 | ||
|
|
3c6e5392cc | ||
|
|
1a7b632c59 | ||
|
|
c535f6ec2e | ||
|
|
95441d649f | ||
|
|
21dc6aeefe | ||
|
|
dc82f4a57c | ||
|
|
7ebd0d0a06 |
@@ -5,13 +5,14 @@
|
||||
<image class="icon" src="/static/icon/home/conceptCenter/pre.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="yearMonth flex1">
|
||||
<picker mode="date" fields="month" @change="monthChange">
|
||||
<picker mode="date" fields="month">
|
||||
<view style="display: flex; align-items: center; justify-content: center;">
|
||||
<image style="width: 26rpx; height: 26rpx; margin-right: 10rpx;"
|
||||
src="/pagesStock/static/icon/all-icon-2.png" mode="widthFix"></image>
|
||||
<view style="color: #2B2B2B; font-size: 32rpx; font-weight: bold;">{{selectDateStr}}</view>
|
||||
</view>
|
||||
</picker>
|
||||
|
||||
</view>
|
||||
<view class="btn" @click="clickNextMonth()">
|
||||
<image class="icon" src="/static/icon/home/conceptCenter/next.png" mode="widthFix"></image>
|
||||
@@ -24,16 +25,28 @@
|
||||
</view>
|
||||
<view class="monthDateList" style="display: grid; grid-template-columns: repeat(7, 1fr); gap: 17rpx;">
|
||||
<view class="item" v-for="(item,index) in monthDateList[selectMonthIndex]" :key="index"
|
||||
@click="clickSelectDate(item)">
|
||||
@click="clickSelectDate(item, index)">
|
||||
<block v-if="item.date==selectDateStr">
|
||||
<view
|
||||
:class="'date select '+(item.avg_change_pct?(getRateUpOrDown(item.avg_change_pct)?'down':'up'):'')">
|
||||
<view :class="[
|
||||
'date',
|
||||
'select',
|
||||
getZtCountBgClass(getCalendarItemByDate(item.date)?.zt_count),selectedDateKey === item.date ? 'selected-border' : ''
|
||||
]">
|
||||
{{item.day}}
|
||||
<view v-if="index % 7 == 0 || index % 7 == 6" style="color: #999999; font-size: 18rpx;">休市
|
||||
</view>
|
||||
<view v-else style="text-align: center;">
|
||||
<view style="font-size: 18rpx;">66家</view>
|
||||
<view style="font-size: 16rpx;">商业航天</view>
|
||||
<view v-if="getCalendarItemByDate(item.date)?.zt_count > 0">
|
||||
<view style="font-size: 18rpx;"
|
||||
:style="{color: getZtCountTextColor(getCalendarItemByDate(item.date)?.zt_count)}">
|
||||
{{getCalendarItemByDate(item.date)?.zt_count}}家
|
||||
</view>
|
||||
<!-- 板块名称文字颜色动态设置 -->
|
||||
<view style="font-size: 16rpx;"
|
||||
:style="{color: getZtCountTextColor(getCalendarItemByDate(item.date)?.zt_count)}">
|
||||
{{getCalendarItemByDate(item.date)?.top_sector || '-'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
@@ -42,8 +55,10 @@
|
||||
<!-- <view class="date notCurrentMonth">{{item.day}}</view> -->
|
||||
</block>
|
||||
<block v-else>
|
||||
<view
|
||||
:class="'date '+(item.avg_change_pct?(getRateUpOrDown(item.avg_change_pct)?'down':'up'):'')">
|
||||
<view :class="[
|
||||
'date',
|
||||
getZtCountBgClass(getCalendarItemByDate(item.date)?.zt_count),selectedDateKey === item.date ? 'selected-border' : ''
|
||||
]">
|
||||
|
||||
<view :style="{color: (index % 7 == 0 || index % 7 == 6 ? '#999999' : '#2A2A2A')}">
|
||||
{{item.day}}
|
||||
@@ -51,10 +66,18 @@
|
||||
<view v-if="index % 7 == 0 || index % 7 == 6" style="color: #999999; font-size: 18rpx;">休市
|
||||
</view>
|
||||
<view v-else style="text-align: center;">
|
||||
<view style="font-size: 18rpx;">66家</view>
|
||||
<view style="font-size: 16rpx;">商业航天</view>
|
||||
<view v-if="getCalendarItemByDate(item.date)?.zt_count > 0">
|
||||
<view style="font-size: 18rpx;"
|
||||
:style="{color: getZtCountTextColor(getCalendarItemByDate(item.date)?.zt_count)}">
|
||||
{{getCalendarItemByDate(item.date)?.zt_count}}家
|
||||
</view>
|
||||
<!-- 板块名称文字颜色动态设置 -->
|
||||
<view style="font-size: 16rpx;"
|
||||
:style="{color: getZtCountTextColor(getCalendarItemByDate(item.date)?.zt_count)}">
|
||||
{{getCalendarItemByDate(item.date)?.top_sector || '-'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
@@ -64,6 +87,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
calendarCombinedData
|
||||
} from '@/request/api'
|
||||
|
||||
export default {
|
||||
name: "LCCalendar",
|
||||
data() {
|
||||
@@ -75,6 +102,11 @@
|
||||
selectDateStr: '', //选中日期
|
||||
startDateStr: '', //开始日期
|
||||
endDateStr: '', //结束日期
|
||||
selectYear: '',
|
||||
Month: '',
|
||||
calendarApiData: [], // 新增:存储接口返回的日历数据
|
||||
|
||||
selectedDateKey: '', // 新增:选中日期的唯一标识(格式:YYYY-MM-DD)
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -88,12 +120,104 @@
|
||||
//开始日期默认为当前月份第一天
|
||||
this.startDateStr = currentYear + '-' + (currentMonth > 9 ? currentMonth : ('0' + currentMonth)) + '-' + '01'
|
||||
//结束日期默认为当前日期
|
||||
this.endDateStr = this.selectDateStr = currentYear + '-' + (currentMonth > 9 ? currentMonth : ('0' +
|
||||
currentMonth)) + '-' + (currentDay > 9 ? currentDay : ('0' + currentDay))
|
||||
// this.getYesterdayDateData()
|
||||
// this.endDateStr = this.selectDateStr = currentYear + '-' + (currentMonth > 9 ? currentMonth : ('0' +
|
||||
// currentMonth)) + '-' + (currentDay > 9 ? currentDay : ('0' + currentDay))
|
||||
|
||||
|
||||
this.endDateStr = this.selectDateStr =
|
||||
`${currentYear}-${currentMonth > 9 ? currentMonth : '0' + currentMonth}-${currentDay > 9 ? currentDay : '0' + currentDay}`
|
||||
this.getYesterdayDateData()
|
||||
this.generateMonthDateListData()
|
||||
// 新增:初始化时触发一次事件,传递当天数据给父页面
|
||||
//this.emitDateChange(currentYear, currentMonth, currentDay, this.getTodayItem(currentYear, currentMonth, currentDay))
|
||||
|
||||
this.emitDateChange(
|
||||
currentYear,
|
||||
currentMonth,
|
||||
currentDay,
|
||||
this.getTodayItem(currentYear, currentMonth, currentDay),
|
||||
this.getPrevDayItem(currentYear, currentMonth, currentDay) // 新增上一天数据
|
||||
)
|
||||
},
|
||||
mounted() {
|
||||
this.getCalendarCombinedData()
|
||||
},
|
||||
methods: {
|
||||
// 3. 在日历组件methods中新增getPrevDayItem方法
|
||||
/**
|
||||
* 获取指定日期的上一天数据
|
||||
*/
|
||||
getPrevDayItem(year, month, day) {
|
||||
// 计算上一天日期
|
||||
const currentDate = new Date(`${year}-${month}-${day}`);
|
||||
const prevDate = new Date(currentDate.getTime() - 24 * 60 * 60 * 1000);
|
||||
const prevYear = prevDate.getFullYear();
|
||||
const prevMonth = prevDate.getMonth() + 1;
|
||||
const prevDay = prevDate.getDate();
|
||||
|
||||
// 获取上一天的完整数据
|
||||
const targetDate =
|
||||
`${prevYear}-${prevMonth > 9 ? prevMonth : '0' + prevMonth}-${prevDay > 9 ? prevDay : '0' + prevDay}`;
|
||||
const currentMonthList = this.monthDateList[this.selectMonthIndex] || [];
|
||||
const localItem = currentMonthList.find(item => item.date === targetDate) || null;
|
||||
const apiData = this.getCalendarItemByDate(targetDate) || {};
|
||||
|
||||
return {
|
||||
...localItem,
|
||||
zt_count: apiData.zt_count || 0,
|
||||
top_sector: apiData.top_sector || '-',
|
||||
zaban_rate: apiData.zaban_rate || '0%'
|
||||
};
|
||||
},
|
||||
/**
|
||||
* 获取当天的item数据(合并接口数据)
|
||||
*/
|
||||
getTodayItem(year, month, day) {
|
||||
const targetDate = `${year}-${month > 9 ? month : '0' + month}-${day > 9 ? day : '0' + day}`;
|
||||
const currentMonthList = this.monthDateList[this.selectMonthIndex] || [];
|
||||
// 先获取本地日期item
|
||||
const localItem = currentMonthList.find(item => item.date === targetDate) || null;
|
||||
if (!localItem) return null;
|
||||
// 获取接口数据并合并
|
||||
const apiData = this.getCalendarItemByDate(targetDate) || {};
|
||||
// 合并本地item和接口数据
|
||||
return {
|
||||
...localItem,
|
||||
zt_count: apiData.zt_count || 0,
|
||||
top_sector: apiData.top_sector || '-',
|
||||
// 可补充其他接口字段
|
||||
zaban_rate: apiData.zaban_rate || '0%' // 示例:炸板率
|
||||
};
|
||||
},
|
||||
|
||||
emitDateChange(year, month, day, item, prevItem = {
|
||||
zt_count: 0
|
||||
}) { // 新增prevItem参数,设置默认值兜底
|
||||
const yearMonth = `${year}-${month > 9 ? month : '0' + month}`;
|
||||
const fullDate = `${year}-${month > 9 ? month : '0' + month}-${day > 9 ? day : '0' + day}`;
|
||||
this.$emit('date-change', {
|
||||
yearMonth,
|
||||
fullDate,
|
||||
item: item || { // 兜底:无当前item时赋值空对象+默认值
|
||||
date: fullDate,
|
||||
year,
|
||||
month,
|
||||
day,
|
||||
zt_count: 0,
|
||||
top_sector: '-',
|
||||
zaban_rate: '0%'
|
||||
},
|
||||
prevItem: prevItem || { // 新增:传递上一天数据,兜底默认值
|
||||
zt_count: 0,
|
||||
top_sector: '-',
|
||||
zaban_rate: '0%'
|
||||
},
|
||||
year,
|
||||
month,
|
||||
day
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取当前时间前一天的数据
|
||||
*/
|
||||
@@ -104,8 +228,97 @@
|
||||
let selectYear = selectDate.getFullYear();
|
||||
let selectMonth = selectDate.getMonth() + 1;
|
||||
let selectDay = selectDate.getDate();
|
||||
this.selectDateStr = selectYear + '-' + (selectMonth > 9 ? selectMonth : ('0' + selectMonth)) + '-' + (
|
||||
selectDay > 9 ? selectDay : ('0' + selectDay))
|
||||
this.selectYear = selectDate.getFullYear()
|
||||
this.Month = selectDate.getMonth() + 1;
|
||||
// this.selectDateStr = selectYear + '-' + (selectMonth > 9 ? selectMonth : ('0' + selectMonth)) + '-' + (
|
||||
// selectDay > 9 ? selectDay : ('0' + selectDay))
|
||||
|
||||
//this.selectDateStr = selectYear + '-' + (selectMonth > 9 ? selectMonth : ('0' + selectMonth))
|
||||
},
|
||||
/**
|
||||
* 根据日期查找接口中的日历数据
|
||||
* @param {String} dateStr 格式:2026-01-01
|
||||
* @returns {Object} 匹配的日历数据
|
||||
*/
|
||||
getCalendarItemByDate(dateStr) {
|
||||
if (!dateStr || !this.calendarApiData.length) return null;
|
||||
// 格式化本地日期(2026-01-01 → 20260101)以匹配接口格式
|
||||
const formatDate = dateStr.replace(/-/g, '');
|
||||
// 查找匹配的数据项
|
||||
return this.calendarApiData.find(item => item.date === formatDate) || null;
|
||||
},
|
||||
/**
|
||||
* 根据zt_count和是否休市获取背景色样式类
|
||||
* @param {Number} count zt_count数值
|
||||
* @param {Number} index 日期下标(判断是否休市)
|
||||
* @returns {String} 样式类名
|
||||
*/
|
||||
getZtCountBgClass(count, index) {
|
||||
// 休市(周日/周六)或zt_count为0/null/undefined → 默认样式
|
||||
if ((index % 7 === 0 || index % 7 === 6) || count === 0 || count === null || count === undefined) {
|
||||
return '';
|
||||
}
|
||||
// 按数值范围返回对应样式类
|
||||
if (count >= 80) return 'zt-bg-80';
|
||||
if (count >= 60) return 'zt-bg-60';
|
||||
if (count >= 40) return 'zt-bg-40';
|
||||
return 'zt-bg-40-less';
|
||||
},
|
||||
/**
|
||||
* 根据zt_count值获取文字颜色
|
||||
* @param {Number} count zt_count数值
|
||||
* @param {Number} index 日期下标(用于判断周末)
|
||||
* @returns {String} 文字颜色值
|
||||
*/
|
||||
getZtCountTextColor(count, index) {
|
||||
// 周末强制显示#999999
|
||||
if (index !== undefined && (index % 7 === 0 || index % 7 === 6)) {
|
||||
return '#999999';
|
||||
}
|
||||
// 无数据或0值显示默认颜色
|
||||
if (count === undefined || count === null || count === 0) {
|
||||
return '#2A2A2A';
|
||||
}
|
||||
// 根据数值范围返回对应颜色
|
||||
if (count >= 80) return '#5D288F';
|
||||
if (count >= 60) return '#BE1B1B';
|
||||
if (count >= 40) return '#F59B38';
|
||||
return '#2958AA';
|
||||
},
|
||||
/**
|
||||
* 获取日历接口数据
|
||||
*/
|
||||
async getCalendarCombinedData() {
|
||||
|
||||
try {
|
||||
let param = {
|
||||
year: this.selectYear,
|
||||
month: this.Month
|
||||
}
|
||||
const res = await calendarCombinedData(param);
|
||||
if (res.success && Array.isArray(res.data)) {
|
||||
this.calendarApiData = res.data;
|
||||
//console.log('日历数据加载成功', this.calendarApiData);
|
||||
// 接口数据加载后,重新触发一次当前选中日期的事件,更新数据
|
||||
if (this.selectDateStr) {
|
||||
const [year, month, day] = this.selectDateStr.split('-').map(Number);
|
||||
//this.emitDateChange(year, month, day, this.getTodayItem(year, month, day));
|
||||
// this.emitDateChange(
|
||||
// year,
|
||||
// month,
|
||||
// day,
|
||||
// this.getTodayItem(year, month, day),
|
||||
// this.getPrevDayItem(year, month, day) // 新增上一天数据
|
||||
// )
|
||||
}
|
||||
} else {
|
||||
this.calendarApiData = [];
|
||||
console.warn('日历接口返回数据格式异常', res);
|
||||
}
|
||||
} catch (error) {
|
||||
this.calendarApiData = [];
|
||||
console.error('获取日历数据失败', error);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 生成日期数组
|
||||
@@ -213,6 +426,8 @@
|
||||
*/
|
||||
clickPreMonth() {
|
||||
if (this.selectMonthIndex > 0) {
|
||||
// 新增:切换月份时清空选中标识
|
||||
this.selectedDateKey = '';
|
||||
this.selectMonthIndex--
|
||||
let monthList = this.monthDateList[this.selectMonthIndex]
|
||||
let year = ''
|
||||
@@ -234,15 +449,22 @@
|
||||
this.selectMonth = year + '年' + month + '月'
|
||||
this.startDateStr = year + '-' + (month > 9 ? month : ('0' + month)) + '-' + '01'
|
||||
this.endDateStr = year + '-' + (month > 9 ? month : ('0' + month)) + '-' + lastDay
|
||||
|
||||
console.log('点击上个月');
|
||||
|
||||
this.selectYear = year
|
||||
this.Month = month;
|
||||
this.selectDateStr =this.startDateStr ;
|
||||
this.getCalendarCombinedData()
|
||||
console.log('点击上个月');
|
||||
}
|
||||
|
||||
},
|
||||
/**
|
||||
* 点击下个月
|
||||
*/
|
||||
clickNextMonth() {
|
||||
if (this.selectMonthIndex < this.monthDateList.length - 1) {
|
||||
// 新增:切换月份时清空选中标识
|
||||
this.selectedDateKey = '';
|
||||
this.selectMonthIndex++
|
||||
let monthList = this.monthDateList[this.selectMonthIndex]
|
||||
let year = ''
|
||||
@@ -265,8 +487,20 @@
|
||||
this.startDateStr = year + '-' + (month > 9 ? month : ('0' + month)) + '-' + '01'
|
||||
this.endDateStr = year + '-' + (month > 9 ? month : ('0' + month)) + '-' + lastDay
|
||||
console.log('点击下个月');
|
||||
this.selectYear = year
|
||||
this.Month = month;
|
||||
this.selectDateStr =this.startDateStr ; // 统一格式 YYYY-MM
|
||||
this.getCalendarCombinedData()
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 通用补零函数:确保数字为两位数,不足则前面补0
|
||||
* @param {number|string} num - 需要补零的数字
|
||||
* @returns {string} 补零后的字符串
|
||||
*/
|
||||
padZero(num) {
|
||||
return String(num).padStart(2, '0');
|
||||
},
|
||||
monthChange(e) {
|
||||
let currentDate = new Date();
|
||||
//当前年份
|
||||
@@ -282,19 +516,77 @@
|
||||
this.endDateStr = selectYear + '-' + (selectMonth > 9 ? selectMonth : ('0' + selectMonth)) + '-' +
|
||||
lastDayOfMonth.getDate()
|
||||
console.log('月份变更');
|
||||
// 月份切换时更新接口数据
|
||||
this.selectYear = selectYear;
|
||||
this.Month = selectMonth;
|
||||
this.getCalendarCombinedData();
|
||||
},
|
||||
/**
|
||||
* 点击选择开始日期和结束日期
|
||||
* @param {Object} item
|
||||
*/
|
||||
clickSelectDate(item) {
|
||||
clickSelectDate(item, index) { // 新增index参数
|
||||
if (!item.isCurrentMonth) return
|
||||
if (this.selectDateStr != item.date) {
|
||||
|
||||
this.selectedDateKey = item.date;
|
||||
this.selectDateStr = item.date
|
||||
this.chgStockData = item
|
||||
console.log('点击某天');
|
||||
// 1. 获取该日期的接口数据
|
||||
const apiData = this.getCalendarItemByDate(item.date) || {};
|
||||
// 2. 合并本地item和接口数据,补充默认值
|
||||
const mergedItem = {
|
||||
...item, // 本地日期基础数据
|
||||
zt_count: apiData.zt_count || 0, // 涨停家数,默认0
|
||||
top_sector: apiData.top_sector || '-', // 热门板块,默认'-'
|
||||
zaban_rate: apiData.zaban_rate || '0%', // 炸板率,示例字段
|
||||
isWeekend: index % 7 === 0 || index % 7 === 6 // 是否周末
|
||||
};
|
||||
|
||||
// ===== 新增:获取上一天的日期和数据 =====
|
||||
// 2.1 计算上一天的日期
|
||||
const currentDate = new Date(item.date);
|
||||
const prevDate = new Date(currentDate.getTime() - 24 * 60 * 60 * 1000); // 减一天
|
||||
const prevYear = prevDate.getFullYear();
|
||||
const prevMonth = prevDate.getMonth() + 1;
|
||||
const prevDay = prevDate.getDate();
|
||||
const prevDateStr =
|
||||
`${prevYear}-${prevMonth > 9 ? prevMonth : '0' + prevMonth}-${prevDay > 9 ? prevDay : '0' + prevDay}`;
|
||||
|
||||
// 2.2 获取上一天的接口数据
|
||||
const prevApiData = this.getCalendarItemByDate(prevDateStr) || {};
|
||||
// 2.3 查找上一天的本地item(用于补全基础信息)
|
||||
let prevLocalItem = null;
|
||||
// 先在当前月份列表找
|
||||
const currentMonthList = this.monthDateList[this.selectMonthIndex] || [];
|
||||
prevLocalItem = currentMonthList.find(i => i.date === prevDateStr);
|
||||
// 如果当前月份没有(跨月),找对应月份的列表
|
||||
if (!prevLocalItem) {
|
||||
const prevMonthIndex = this.selectMonthIndex - (prevMonth < item.month ? 1 : 0);
|
||||
const prevMonthList = this.monthDateList[prevMonthIndex] || [];
|
||||
prevLocalItem = prevMonthList.find(i => i.date === prevDateStr);
|
||||
}
|
||||
|
||||
// 2.4 合并上一天的完整数据
|
||||
const prevMergedItem = {
|
||||
...(prevLocalItem || {}),
|
||||
zt_count: prevApiData.zt_count || 0,
|
||||
top_sector: prevApiData.top_sector || '-',
|
||||
zaban_rate: prevApiData.zaban_rate || '0%',
|
||||
isWeekend: false // 兜底默认值
|
||||
};
|
||||
// =======================================
|
||||
|
||||
this.chgStockData = mergedItem;
|
||||
// 3. 解析日期,触发事件传递【当前数据+上一天数据】
|
||||
const [year, month, day] = item.date.split('-').map(Number);
|
||||
this.emitDateChange(year, month, day, mergedItem, prevMergedItem); // 新增传递上一天数据
|
||||
console.log('点击某天(含接口数据)', {
|
||||
current: mergedItem,
|
||||
prev: prevMergedItem
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -354,6 +646,7 @@
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
|
||||
|
||||
.chg {
|
||||
font-size: 18rpx;
|
||||
}
|
||||
@@ -365,6 +658,30 @@
|
||||
.chg.down {
|
||||
color: #38A169;
|
||||
}
|
||||
&.selected-border {
|
||||
border: 1px solid #FFCC00; // 黄色边框(可根据需求调整色值)
|
||||
box-sizing: border-box; // 保证边框不超出容器
|
||||
}
|
||||
}
|
||||
|
||||
// zt_count ≥80 背景色
|
||||
.date.zt-bg-80 {
|
||||
background-color: #FAEEFF;
|
||||
}
|
||||
|
||||
// zt_count ≥60 背景色
|
||||
.date.zt-bg-60 {
|
||||
background-color: #FFE9E9;
|
||||
}
|
||||
|
||||
// zt_count ≥40 背景色
|
||||
.date.zt-bg-40 {
|
||||
background-color: #FFF8F0;
|
||||
}
|
||||
|
||||
// zt_count <40 背景色
|
||||
.date.zt-bg-40-less {
|
||||
background-color: #EEF4FF;
|
||||
}
|
||||
|
||||
.date.up {
|
||||
|
||||
@@ -78,6 +78,8 @@
|
||||
currentMonth)) + '-' + (currentDay > 9 ? currentDay : ('0' + currentDay))
|
||||
// this.getYesterdayDateData()
|
||||
this.generateMonthDateListData()
|
||||
// 初始化时就派发一次当前日期事件
|
||||
this.$emit('date-change', this.selectDateStr)
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
@@ -92,6 +94,8 @@
|
||||
let selectDay = selectDate.getDate();
|
||||
this.selectDateStr = selectYear + '-' + (selectMonth > 9 ? selectMonth : ('0' + selectMonth)) + '-' + (
|
||||
selectDay > 9 ? selectDay : ('0' + selectDay))
|
||||
// 派发日期变更事件
|
||||
this.$emit('date-change', this.selectDateStr)
|
||||
},
|
||||
/**
|
||||
* 生成日期数组
|
||||
@@ -279,6 +283,7 @@
|
||||
this.selectDateStr = item.date
|
||||
this.chgStockData = item
|
||||
console.log('点击某天');
|
||||
this.$emit('date-change', this.selectDateStr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
288
components/WordCloud/WordCloud.vue
Normal file
@@ -0,0 +1,288 @@
|
||||
<template>
|
||||
<view class="word-cloud-container">
|
||||
<!-- uni-app / 小程序 canvas,2d 模式 -->
|
||||
<canvas
|
||||
type="2d"
|
||||
class="word-cloud-canvas"
|
||||
:style="{ width: width + 'px', height: height + 'px' }"
|
||||
></canvas>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'WordCloud',
|
||||
|
||||
props: {
|
||||
// 词云数据:[{ text: '关键词', value: 100 }]
|
||||
wordData: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
// 画布宽度
|
||||
width: {
|
||||
type: Number,
|
||||
default: 300
|
||||
},
|
||||
// 画布高度
|
||||
height: {
|
||||
type: Number,
|
||||
default: 300
|
||||
},
|
||||
// 颜色:外 / 中 / 内
|
||||
colorList: {
|
||||
type: Array,
|
||||
default: () => ['#60A5FA', '#FEC200', '#EF4444']
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
ctx: null, // canvas 2d 上下文
|
||||
placedWords: [], // 已放置文字的包围盒(用于碰撞检测)
|
||||
centerWords: [], // value 最大的 3 个
|
||||
otherWords: [] // 其余词
|
||||
};
|
||||
},
|
||||
|
||||
watch: {
|
||||
// 词云数据变化时重绘
|
||||
wordData: {
|
||||
deep: true,
|
||||
handler() {
|
||||
this.drawWordCloud();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.initCanvas();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 初始化 canvas
|
||||
async initCanvas() {
|
||||
// 延迟,确保 canvas 已渲染(小程序必需)
|
||||
await new Promise(r => setTimeout(r, 50));
|
||||
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query
|
||||
.select('.word-cloud-canvas')
|
||||
.fields({ node: true })
|
||||
.exec(res => {
|
||||
if (!res || !res[0] || !res[0].node) return;
|
||||
|
||||
const canvas = res[0].node;
|
||||
const ctx = canvas.getContext('2d');
|
||||
|
||||
// 适配高清屏
|
||||
const dpr = uni.getSystemInfoSync().pixelRatio || 1;
|
||||
canvas.width = this.width * dpr;
|
||||
canvas.height = this.height * dpr;
|
||||
ctx.scale(dpr, dpr);
|
||||
|
||||
this.ctx = ctx;
|
||||
this.drawWordCloud();
|
||||
});
|
||||
},
|
||||
|
||||
// 绘制词云
|
||||
drawWordCloud() {
|
||||
if (!this.ctx || !this.wordData.length) return;
|
||||
|
||||
// 清空画布
|
||||
this.ctx.clearRect(0, 0, this.width, this.height);
|
||||
this.placedWords = [];
|
||||
|
||||
// 按 value 从大到小排序
|
||||
const sorted = [...this.wordData].sort((a, b) => b.value - a.value);
|
||||
|
||||
// 中心层:取前 3 个
|
||||
this.centerWords = sorted.slice(0, 3);
|
||||
this.otherWords = sorted.slice(3);
|
||||
|
||||
// 先画中心层(优先级最高)
|
||||
this.centerWords.forEach((word, index) => {
|
||||
this.placeWord(word, 'center', index);
|
||||
});
|
||||
|
||||
// 再画中 / 外层
|
||||
this.otherWords.forEach(word => {
|
||||
this.placeWord(word, 'other');
|
||||
});
|
||||
// ⭐ 通知父组件:canvas 绘制完成
|
||||
this.$emit('rendered');
|
||||
},
|
||||
|
||||
// 放置单个词
|
||||
placeWord(word, type, index = 0) {
|
||||
const ctx = this.ctx;
|
||||
const text = word.text || word.name;
|
||||
const maxAttempts = 200;
|
||||
|
||||
let fontSize = 24;
|
||||
let layer = 'middle';
|
||||
|
||||
// 根据层级设置字号
|
||||
if (type === 'center') {
|
||||
fontSize = 32; // ⭐ 最中间三个:32px
|
||||
layer = 'center';
|
||||
} else {
|
||||
layer = Math.random() > 0.5 ? 'middle' : 'outer';
|
||||
fontSize = layer === 'outer' ? 18 : 24;
|
||||
}
|
||||
|
||||
// 随机两档旋转角度
|
||||
const angleLimit =
|
||||
Math.random() > 0.5
|
||||
? 60 * Math.PI / 180
|
||||
: 30 * Math.PI / 180;
|
||||
|
||||
const angle = (Math.random() - 0.5) * 2 * angleLimit;
|
||||
|
||||
// 设置字体(全部加粗)
|
||||
ctx.font = `bold ${fontSize}px sans-serif`;
|
||||
|
||||
// 测量文字尺寸
|
||||
const textWidth = ctx.measureText(text).width;
|
||||
const textHeight = fontSize * 1.05;
|
||||
|
||||
for (let i = 0; i < maxAttempts; i++) {
|
||||
let x, y;
|
||||
|
||||
// ===== 中心层:固定布局,保证 3 个一定能放下 =====
|
||||
if (layer === 'center') {
|
||||
const centerX = this.width / 2;
|
||||
const centerY = this.height / 2;
|
||||
|
||||
// 中心三个固定位置
|
||||
const offsets = [
|
||||
{ x: 0, y: 0 }, // 最大的,正中
|
||||
{ x: -80, y: 0 }, // 左
|
||||
{ x: 80, y: 0 } // 右
|
||||
];
|
||||
|
||||
const pos = offsets[index] || offsets[0];
|
||||
x = centerX + pos.x;
|
||||
y = centerY + pos.y;
|
||||
} else {
|
||||
// 中 / 外层:随机位置
|
||||
x = this.width * 0.05 + Math.random() * this.width * 0.9;
|
||||
y = this.height * 0.05 + Math.random() * this.height * 0.9;
|
||||
}
|
||||
|
||||
// 计算旋转后的包围盒
|
||||
const rect = this.getBoundingRect(
|
||||
x,
|
||||
y,
|
||||
textWidth,
|
||||
textHeight,
|
||||
angle,
|
||||
2
|
||||
);
|
||||
|
||||
// 外层:超出画布直接跳过,继续尝试
|
||||
if (layer === 'outer') {
|
||||
if (
|
||||
rect.left < 0 ||
|
||||
rect.right > this.width ||
|
||||
rect.top < 0 ||
|
||||
rect.bottom > this.height
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 碰撞检测
|
||||
if (this.checkOverlapRect(rect)) continue;
|
||||
|
||||
// 根据层级设置颜色
|
||||
ctx.fillStyle =
|
||||
layer === 'center'
|
||||
? this.colorList[2]
|
||||
: layer === 'middle'
|
||||
? this.colorList[1]
|
||||
: this.colorList[0];
|
||||
|
||||
// 绘制文字
|
||||
this.drawText(text, x, y, angle);
|
||||
|
||||
// 保存包围盒
|
||||
this.placedWords.push({ rect });
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
// 碰撞检测(AABB)
|
||||
checkOverlapRect(current) {
|
||||
for (const item of this.placedWords) {
|
||||
const r = item.rect;
|
||||
if (
|
||||
current.left < r.right &&
|
||||
current.right > r.left &&
|
||||
current.top < r.bottom &&
|
||||
current.bottom > r.top
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
// 计算旋转后的包围盒
|
||||
getBoundingRect(x, y, width, height, angle, gap = 2) {
|
||||
const cos = Math.cos(angle);
|
||||
const sin = Math.sin(angle);
|
||||
|
||||
const halfW = (width - gap) / 2;
|
||||
const halfH = (height - gap) / 2;
|
||||
|
||||
const points = [
|
||||
{ x: -halfW, y: -halfH },
|
||||
{ x: halfW, y: -halfH },
|
||||
{ x: halfW, y: halfH },
|
||||
{ x: -halfW, y: halfH }
|
||||
];
|
||||
|
||||
const xs = [];
|
||||
const ys = [];
|
||||
|
||||
points.forEach(p => {
|
||||
xs.push(x + p.x * cos - p.y * sin);
|
||||
ys.push(y + p.x * sin + p.y * cos);
|
||||
});
|
||||
|
||||
return {
|
||||
left: Math.min(...xs),
|
||||
right: Math.max(...xs),
|
||||
top: Math.min(...ys),
|
||||
bottom: Math.max(...ys)
|
||||
};
|
||||
},
|
||||
|
||||
// 绘制文字
|
||||
drawText(text, x, y, angle) {
|
||||
const ctx = this.ctx;
|
||||
ctx.save();
|
||||
ctx.translate(x, y);
|
||||
ctx.rotate(angle);
|
||||
ctx.textAlign = 'center';
|
||||
ctx.textBaseline = 'middle';
|
||||
ctx.fillText(text, 0, 0);
|
||||
ctx.restore();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.word-cloud-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.word-cloud-canvas {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -1,187 +0,0 @@
|
||||
<template>
|
||||
<view class="cyl_view">
|
||||
<view class="top">
|
||||
<view class="child_1">产业链分析</view>
|
||||
<view class="child_2">目标公司供应链图谱</view>
|
||||
<view class="child_3">节点 18</view>
|
||||
</view>
|
||||
<view class="center">
|
||||
<view class="child" :class="{action: center_index == 0}" @click="changeCenterIndex(0)">
|
||||
层级视图
|
||||
</view>
|
||||
<view class="child" :class="{action: center_index == 1}" @click="changeCenterIndex(1)">
|
||||
流向关系
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="type">
|
||||
<view v-for="(item,index) in types" :key="index" class="item">
|
||||
<template v-if="item.title">
|
||||
<view @click="typeIndex = index"
|
||||
style="display: flex; flex-direction: column; align-items: center; justify-content: center; background-color: #FAFAFC; border-radius: 10rpx; width: 100%; padding: 26rpx 0; box-sizing: border-box;"
|
||||
:style="{'background-color' : (typeIndex == index ? item.backColor : '#FAFAFC'), border : (typeIndex == index ? `1rpx solid ${item.color}` : 'none')}">
|
||||
<view style="color: #2B2B2B; font-size: 24rpx; font-weight: bold;">
|
||||
{{item.title}}
|
||||
<text
|
||||
style="min-width: 24rpx; text-align: center; margin-left: 6rpx; padding: 0 5rpx; border-radius: 5rpx; font-weight: 500;"
|
||||
:style="{'background-color' : (typeIndex == index ? item.color : '#F2C369'), 'color' : (typeIndex == index ? '#ffffff' : '#070707')}">
|
||||
{{item.count}}
|
||||
</text>
|
||||
</view>
|
||||
<view style="color: #999999; font-size: 22rpx; font-weight: 500; margin-top: 10rpx;">
|
||||
{{item.desc}}
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<image style="width: 100%; height: auto;" src="/pagesStock/static/icon/rightArrow.png"
|
||||
mode="widthFix"></image>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list" @click="clickAction"
|
||||
style="margin: 20rpx; background-color: #FAFAFC; border-radius: 10rpx; padding: 25rpx 20rpx; box-sizing: border-box;">
|
||||
<view style="color: #2B2B2B; font-size: 28rpx; font-weight: bold;">央行/政策性银行</view>
|
||||
<view style="color: #999999; font-size: 24rpx; font-weight: 500;">提供再贷款、再贴现、同业存放等基础货币与流动性支持</view>
|
||||
<view style="display: flex; align-items: center; font-size: 20rpx; font-weight: 500; margin: 15rpx 0;">
|
||||
<view style="border-radius: 5rpx; padding: 0 10rpx; margin-right: 10rpx;"
|
||||
:style="{'background-color' : (types[typeIndex].backColor), 'color' : (types[typeIndex].color)}">
|
||||
Supplier</view>
|
||||
<view style="border-radius: 5rpx; padding: 0 10rpx;"
|
||||
:style="{'color' : types[typeIndex].color, border : `1rpx solid ${types[typeIndex].color}`}">份额:
|
||||
12.5%</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center;">
|
||||
<view style="color: #71675D; font-size: 22rpx; font-weight: 500;">影响度</view>
|
||||
<view
|
||||
style="flex: 1; height: 10rpx; background-color: #EFEFEF; border-radius: 5rpx; margin: 0 15rpx; overflow: hidden;">
|
||||
<view style="height: 100%; border-radius: 5rpx;"
|
||||
:style="{width: `${95}%`, background: `linear-gradient(to right, ${types[typeIndex].sColor}, ${types[typeIndex].color})`}">
|
||||
</view>
|
||||
</view>
|
||||
<view style="color: #71675D; font-size: 24rpx; font-weight: 500;">95</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "cyl-view",
|
||||
data() {
|
||||
return {
|
||||
isShow: false,
|
||||
center_index: 0,
|
||||
types: [{
|
||||
title: '上游供应链',
|
||||
count: 5,
|
||||
desc: '原材料与供应商',
|
||||
sColor: '#FF8C53',
|
||||
color: '#FF5501',
|
||||
backColor: '#FFF4EF'
|
||||
},
|
||||
{},
|
||||
{
|
||||
title: '核心企业',
|
||||
count: 1,
|
||||
desc: '公司主体与产品',
|
||||
sColor: '#518BFF',
|
||||
color: '#175CE6',
|
||||
backColor: '#F2F6FD'
|
||||
},
|
||||
{},
|
||||
{
|
||||
title: '下游客户',
|
||||
count: 12,
|
||||
desc: '原材料与供应商',
|
||||
sColor: '#48D394',
|
||||
color: '#1DB26F',
|
||||
backColor: '#E7F5F0'
|
||||
}
|
||||
],
|
||||
typeIndex: 0
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
changeCenterIndex(index) {
|
||||
this.center_index = index
|
||||
},
|
||||
clickAction() {
|
||||
console.log(123);
|
||||
this.$emit('detail')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.cyl_view {
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: 500;
|
||||
|
||||
.child_1 {
|
||||
color: #2B2B2B;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.child_2 {
|
||||
color: #71675D;
|
||||
font-size: 24rpx;
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
|
||||
.child_3 {
|
||||
border: 1rpx solid #F3C368;
|
||||
border-radius: 5rpx;
|
||||
padding: 0 5rpx;
|
||||
color: #F2C369;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.center {
|
||||
margin: 20rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
font-weight: 500;
|
||||
|
||||
.child {
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 10rpx 10rpx 0 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 26rpx;
|
||||
color: #939393;
|
||||
padding: 10rpx 40rpx;
|
||||
|
||||
&.action {
|
||||
background-color: #F2C369;
|
||||
color: #070707;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
.type {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 19rpx 1fr 19rpx 1fr;
|
||||
gap: 6rpx;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,445 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 主营数据 -->
|
||||
<template v-if="showType == 0">
|
||||
<view>
|
||||
<view
|
||||
style="display: flex; align-items: center; font-size: 22rpx; color: #999999; font-weight: 500; margin: 20rpx; padding: 20rpx; box-sizing: border-box ;border: 1rpx solid #F5F5F5; border-radius: 10rpx;">
|
||||
<view style="width: 195rpx;">
|
||||
<view style="font-weight: bold; color: #1DB26F; font-size: 30rpx;">+12.50%</view>
|
||||
<view style="margin-top: 10rpx;">利润增长</view>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<view style="display: flex; align-items: center;">
|
||||
<text
|
||||
style="font-weight: bold; color: #070707; font-size: 26rpx; margin-right: 10rpx;">成长能力</text>
|
||||
<text
|
||||
style="color: #A97F53; font-size: 20rpx; padding: 2rpx 5rpx; background-color: #F8F4ED; border: 1rpx solid #F1E7D8; border-radius: 3rpx;">增长动力</text>
|
||||
</view>
|
||||
<view style="margin-top: 10rpx;">
|
||||
<text>营收增长</text>
|
||||
<text style="color: #1DB26F; margin: 0 10rpx;">+8.20%</text>
|
||||
<text style="color: #F59B38;">(稳健增长)</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
style="display: flex; align-items: center; font-size: 22rpx; color: #999999; font-weight: 500; margin: 20rpx; padding: 20rpx; box-sizing: border-box ;border: 1rpx solid #F5F5F5; border-radius: 10rpx;">
|
||||
<view style="width: 195rpx;">
|
||||
<view style="font-weight: bold; color: #F59B38; font-size: 30rpx;">16.23%</view>
|
||||
<view style="margin-top: 10rpx;">ROE</view>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<view style="display: flex; align-items: center;">
|
||||
<text
|
||||
style="font-weight: bold; color: #070707; font-size: 26rpx; margin-right: 10rpx;">盈利与回报</text>
|
||||
<text
|
||||
style="color: #A97F53; font-size: 20rpx; padding: 2rpx 5rpx; background-color: #F8F4ED; border: 1rpx solid #F1E7D8; border-radius: 3rpx;">赚钱能力</text>
|
||||
</view>
|
||||
<view style="margin-top: 10rpx;">
|
||||
<text style="color: #F59B38;">良好</text>
|
||||
<text style="margin-left: 10rpx;">净利率 32.56%|毛利率 71.92%</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
style="display: flex; align-items: center; font-size: 22rpx; color: #999999; font-weight: 500; margin: 20rpx; padding: 20rpx; box-sizing: border-box ;border: 1rpx solid #F5F5F5; border-radius: 10rpx;">
|
||||
<view style="width: 195rpx;">
|
||||
<view style="font-weight: bold; color: #EC3440; font-size: 30rpx;">93.52%</view>
|
||||
<view style="margin-top: 10rpx;">资产负债率</view>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<view style="display: flex; align-items: center;">
|
||||
<text
|
||||
style="font-weight: bold; color: #070707; font-size: 26rpx; margin-right: 10rpx;">风险与运营</text>
|
||||
<text
|
||||
style="color: #A97F53; font-size: 20rpx; padding: 2rpx 5rpx; background-color: #F8F4ED; border: 1rpx solid #F1E7D8; border-radius: 3rpx;">安全边际</text>
|
||||
</view>
|
||||
<view style="margin-top: 10rpx;">
|
||||
<text style="color: #EC3440;">风险</text>
|
||||
<text style="margin-left: 10rpx;">流动比率 0.73|研发费用率 5.48%</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="text-align: center; font-size: 26rpx; color: #2B2B2B; font-weight: bold; margin: 20rpx;">
|
||||
营收与利润趋势</view>
|
||||
<view
|
||||
style="height: 400rpx; display: flex; align-items: center; justify-content: center; background-color: red;">
|
||||
柱状图占位 </view>
|
||||
|
||||
<view style="text-align: left; font-size: 26rpx; color: #2B2B2B; font-weight: bold; margin: 20rpx;">主营业务
|
||||
</view>
|
||||
<view
|
||||
style="height: 400rpx; display: flex; align-items: center; justify-content: center; background-color: blue;">
|
||||
饼状图占位 </view>
|
||||
|
||||
<view style="text-align: left; font-size: 26rpx; color: #2B2B2B; font-weight: bold; margin: 20rpx;">
|
||||
主营业务明细与历史对比</view>
|
||||
|
||||
<view
|
||||
style="display: grid; grid-template-columns: 130rpx repeat(4, 1fr); color: #666666; font-size: 20rpx; font-weight: 500; background-color: #FAFAFC; margin: 20rpx; margin-bottom: 0; padding: 10rpx; box-sizing: border-box;">
|
||||
<view v-for="(item, index) in ['业务', '毛利率', '利润', '营收', '营收']"
|
||||
style="display: flex;align-items: center;justify-content: center; flex-direction: column;"
|
||||
:style="{'text-align': index == 0 ? 'left' : 'center', 'align-items': index == 0 ? 'flex-start' : 'center'}">
|
||||
<view>{{item}}</view>
|
||||
<view v-if="['', '(2025年中报)', '(2025年中报)', '(2025年中报)', '(2024年年报)'][index].length > 0"
|
||||
style="font-size: 18rpx;" :style="{'text-align': index == 0 ? 'left' : 'center'}">
|
||||
{{['', '(2025年中报)', '(2025年中报)', '(2025年中报)', '(2024年年报)'][index]}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-for="(item, index) in ['零售金融业务', '批发金融业务', '其他业务']"
|
||||
style="display: grid; grid-template-columns: 130rpx repeat(4, 1fr); color: #666666; font-size: 20rpx; font-weight: 500; margin: 0 20rpx; padding: 10rpx; box-sizing: border-box;"
|
||||
:style="{'background-color': (index % 2 == 0 ? '#FFFFFF' : '#FAFAFC')}">
|
||||
<view v-for="(item, index) in [item, '64.53%', '200.57亿', '310.81亿', '712.55亿']"
|
||||
:style="{'text-align': index == 0 ? 'left' : 'center'}">{{item}}</view>
|
||||
</view>
|
||||
|
||||
<view style="height: 80rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- 财务分析 -->
|
||||
<template v-if="showType == 1">
|
||||
<view>
|
||||
<view style="color: #2B2B2B; font-weight: 500; font-size: 24rpx;">
|
||||
<view style="display: flex;align-items: center; padding: 20rpx; box-sizing: border-box;">
|
||||
<image src="/pagesStock/static/icon/cwfx-1.png" mode="widthFix"
|
||||
style="width: 40rpx; height: 40rpx;"></image>
|
||||
<view class="flex1" style="margin: 0 10rpx; font-size: 28rpx;">盈利能力</view>
|
||||
<image src="/static/icon/home/conceptCenter/next.png" mode="widthFix"
|
||||
style="width: 13rpx; height: 22rpx;"></image>
|
||||
</view>
|
||||
|
||||
<view style="display: grid; gap: 20rpx; grid-template-columns: repeat(4, 1fr); margin: 0 20rpx;">
|
||||
<view
|
||||
style="display: flex; align-items: center; justify-content: center; text-align: center; font-size: 20rpx; color: #999999; border: 1rpx solid #D2D2D2; padding: 3rpx 5rpx; box-sizing: border-box;"
|
||||
:style="{color: index == 0 ? '#BB8520' : '#999999', border: `1rpx solid ${index == 0 ? '#F2C369' : '#D2D2D2'}`, 'background-color': (index == 0 ? '#FFFAF1' : '#FFFFFF')}"
|
||||
v-for="(item,index) in ['净资产收益率(ROE)%', '净资产收益率(扣非)%', '净资产收益率(加权)%', '总资产报酬率(ROA)%', '毛利率%', '净利率%', '营业利润率%', '成本费用利润率%']"
|
||||
:key="index">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="display: flex;align-items: center; padding: 20rpx; box-sizing: border-box;">
|
||||
<view class="flex1" style="font-size: 28rpx;">查看详细数据</view>
|
||||
<view
|
||||
style="color: #F2C369; font-size: 22rpx; padding: 2rpx 10rpx; border-radius: 5rpx; border: 1rpx solid #F2C369; text-align: center; margin: 0 10rpx;">
|
||||
单季度</view>
|
||||
<view
|
||||
style="display: flex; align-items: center; padding: 3rpx 10rpx; box-sizing: border-box; border: 1rpx solid #D2D2D2;">
|
||||
<image style="width: 23rpx; height: 23rpx;" src="/pagesStock/static/icon/all-icon.png"
|
||||
mode="widthFix"></image>
|
||||
<view style="margin: 0 10rpx; color: #999999; font-size: 22rpx;">全部</view>
|
||||
<image style="width: 11rpx; height: 6rpx;" src="/pagesStock/static/icon/all-down.png"
|
||||
mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
style="height: 400rpx; display: flex; align-items: center; justify-content: center; background-color: red;">
|
||||
柱状图占位 </view>
|
||||
|
||||
</view>
|
||||
|
||||
<view style="color: #2B2B2B; font-weight: 500; font-size: 24rpx;">
|
||||
<view style="display: flex;align-items: center; padding: 20rpx; box-sizing: border-box;">
|
||||
<image src="/pagesStock/static/icon/cwfx-2.png" mode="widthFix"
|
||||
style="width: 40rpx; height: 40rpx;"></image>
|
||||
<view class="flex1" style="margin: 0 10rpx; font-size: 28rpx;">每股指标</view>
|
||||
<image src="/static/icon/home/conceptCenter/next.png" mode="widthFix"
|
||||
style="width: 13rpx; height: 22rpx;"></image>
|
||||
</view>
|
||||
|
||||
<view style="display: grid; gap: 20rpx; grid-template-columns: repeat(4, 1fr); margin: 0 20rpx;">
|
||||
<view
|
||||
style="display: flex; align-items: center; justify-content: center; text-align: center; font-size: 20rpx; color: #999999; border: 1rpx solid #D2D2D2; padding: 3rpx 5rpx; box-sizing: border-box;"
|
||||
:style="{color: index == 0 ? '#BB8520' : '#999999', border: `1rpx solid ${index == 0 ? '#F2C369' : '#D2D2D2'}`, 'background-color': (index == 0 ? '#FFFAF1' : '#FFFFFF')}"
|
||||
v-for="(item,index) in ['每股收益(EPS)', '基本每股收益', '稀释每股收益', '扣非每股收益', '每股净资产', '每股经营现金流', '每股资本公积', '每股未分配利润']"
|
||||
:key="index">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="display: flex;align-items: center; padding: 20rpx; box-sizing: border-box;">
|
||||
<view class="flex1" style="font-size: 28rpx;">查看详细数据</view>
|
||||
<view
|
||||
style="color: #F2C369; font-size: 22rpx; padding: 2rpx 10rpx; border-radius: 5rpx; border: 1rpx solid #F2C369; text-align: center; margin: 0 10rpx;">
|
||||
单季度</view>
|
||||
<view
|
||||
style="display: flex; align-items: center; padding: 3rpx 10rpx; box-sizing: border-box; border: 1rpx solid #D2D2D2;">
|
||||
<image style="width: 23rpx; height: 23rpx;" src="/pagesStock/static/icon/all-icon.png"
|
||||
mode="widthFix"></image>
|
||||
<view style="margin: 0 10rpx; color: #999999; font-size: 22rpx;">全部</view>
|
||||
<image style="width: 11rpx; height: 6rpx;" src="/pagesStock/static/icon/all-down.png"
|
||||
mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
style="height: 400rpx; display: flex; align-items: center; justify-content: center; background-color: blue;">
|
||||
柱状图占位 </view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- 财务数据 -->
|
||||
<template v-if="showType == 2">
|
||||
<view>
|
||||
<!-- 资产负债表 -->
|
||||
<view @click="itemClick(0)" style="color: #2B2B2B; font-weight: 500; font-size: 24rpx;">
|
||||
<view style="display: flex;align-items: center; padding: 20rpx; box-sizing: border-box;">
|
||||
<image src="/pagesStock/static/icon/cwfx-1.png" mode="widthFix"
|
||||
style="width: 40rpx; height: 40rpx;"></image>
|
||||
<view class="flex1" style="margin: 0 10rpx; font-size: 28rpx;">资产负债表</view>
|
||||
<image src="/static/icon/home/conceptCenter/next.png" mode="widthFix"
|
||||
style="width: 13rpx; height: 22rpx;"></image>
|
||||
</view>
|
||||
|
||||
<view style="display: grid; gap: 20rpx; grid-template-columns: repeat(3, 1fr); margin: 0 20rpx;">
|
||||
<view
|
||||
style="display: flex; align-items: center; justify-content: center; text-align: center; font-size: 20rpx; color: #999999; border: 1rpx solid #D2D2D2; padding: 10rpx 10rpx; box-sizing: border-box;"
|
||||
:style="{color: index == 0 ? '#BB8520' : '#999999', border: `1rpx solid ${index == 0 ? '#F2C369' : '#D2D2D2'}`, 'background-color': (index == 0 ? '#FFFAF1' : '#FFFFFF')}"
|
||||
v-for="(item,index) in ['货币资金', '所有者权益', '关键指标']" :key="index">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="display: flex;align-items: center; padding: 20rpx; box-sizing: border-box;">
|
||||
<view class="flex1" style="font-size: 28rpx;">查看详细数据</view>
|
||||
<view
|
||||
style="color: #F2C369; font-size: 22rpx; padding: 2rpx 10rpx; border-radius: 5rpx; border: 1rpx solid #F2C369; text-align: center; margin: 0 10rpx;">
|
||||
单季度</view>
|
||||
<view
|
||||
style="display: flex; align-items: center; padding: 3rpx 10rpx; box-sizing: border-box; border: 1rpx solid #D2D2D2;">
|
||||
<image style="width: 23rpx; height: 23rpx;" src="/pagesStock/static/icon/all-icon.png"
|
||||
mode="widthFix"></image>
|
||||
<view style="margin: 0 10rpx; color: #999999; font-size: 22rpx;">全部</view>
|
||||
<image style="width: 11rpx; height: 6rpx;" src="/pagesStock/static/icon/all-down.png"
|
||||
mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
style="height: 400rpx; display: flex; align-items: center; justify-content: center; background-color: red;">
|
||||
折线图占位
|
||||
</view>
|
||||
|
||||
<view style="background-color: #FAFAFC; border-radius: 10rpx; margin: 0 20rpx; padding: 20rpx 0;">
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">资产总计</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">29.21亿</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">负债合计</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">17.94亿</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">所有者权益</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">11.27亿</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">货币资金</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">5.45亿</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">资本公积金</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">4.61亿</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">盈余公积金</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">1.02亿</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">未分配利润</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">1.61亿</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
<!-- 现金流量表 -->
|
||||
<view @click="itemClick(1)" style="color: #2B2B2B; font-weight: 500; font-size: 24rpx;">
|
||||
<view style="display: flex;align-items: center; padding: 20rpx; box-sizing: border-box;">
|
||||
<image src="/pagesStock/static/icon/cwfx-1.png" mode="widthFix"
|
||||
style="width: 40rpx; height: 40rpx;"></image>
|
||||
<view class="flex1" style="margin: 0 10rpx; font-size: 28rpx;">现金流量表</view>
|
||||
<image src="/static/icon/home/conceptCenter/next.png" mode="widthFix"
|
||||
style="width: 13rpx; height: 22rpx;"></image>
|
||||
</view>
|
||||
|
||||
<view style="display: grid; gap: 20rpx; grid-template-columns: repeat(3, 1fr); margin: 0 20rpx;">
|
||||
<view
|
||||
style="display: flex; align-items: center; justify-content: center; text-align: center; font-size: 20rpx; color: #999999; border: 1rpx solid #D2D2D2; padding: 10rpx 10rpx; box-sizing: border-box;"
|
||||
:style="{color: index == 0 ? '#BB8520' : '#999999', border: `1rpx solid ${index == 0 ? '#F2C369' : '#D2D2D2'}`, 'background-color': (index == 0 ? '#FFFAF1' : '#FFFFFF')}"
|
||||
v-for="(item,index) in ['经营现金流', '筹资现金流', '投资现金流']" :key="index">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="display: flex;align-items: center; padding: 20rpx; box-sizing: border-box;">
|
||||
<view class="flex1" style="font-size: 28rpx;">查看详细数据</view>
|
||||
<view
|
||||
style="color: #F2C369; font-size: 22rpx; padding: 2rpx 10rpx; border-radius: 5rpx; border: 1rpx solid #F2C369; text-align: center; margin: 0 10rpx;">
|
||||
单季度</view>
|
||||
<view
|
||||
style="display: flex; align-items: center; padding: 3rpx 10rpx; box-sizing: border-box; border: 1rpx solid #D2D2D2;">
|
||||
<image style="width: 23rpx; height: 23rpx;" src="/pagesStock/static/icon/all-icon.png"
|
||||
mode="widthFix"></image>
|
||||
<view style="margin: 0 10rpx; color: #999999; font-size: 22rpx;">全部</view>
|
||||
<image style="width: 11rpx; height: 6rpx;" src="/pagesStock/static/icon/all-down.png"
|
||||
mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
style="height: 400rpx; display: flex; align-items: center; justify-content: center; background-color: red;">
|
||||
柱状折线图占位
|
||||
</view>
|
||||
|
||||
<view style="background-color: #FAFAFC; border-radius: 10rpx; margin: 0 20rpx; padding: 20rpx 0;">
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">经营性现金流</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">3.50亿</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">经营性现金流增长率</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">16.94%</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">投资性现金流</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">-5544.90万</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">筹资性现金流</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">-1.16亿</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">合计现金流</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">1.79亿</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">合计现金流增长率</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">935.58%</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 利润表 -->
|
||||
<view @click="itemClick(2)" style="color: #2B2B2B; font-weight: 500; font-size: 24rpx;">
|
||||
<view style="display: flex;align-items: center; padding: 20rpx; box-sizing: border-box;">
|
||||
<image src="/pagesStock/static/icon/cwfx-1.png" mode="widthFix"
|
||||
style="width: 40rpx; height: 40rpx;"></image>
|
||||
<view class="flex1" style="margin: 0 10rpx; font-size: 28rpx;">利润表</view>
|
||||
<image src="/static/icon/home/conceptCenter/next.png" mode="widthFix"
|
||||
style="width: 13rpx; height: 22rpx;"></image>
|
||||
</view>
|
||||
|
||||
<view style="display: grid; gap: 20rpx; grid-template-columns: repeat(3, 1fr); margin: 0 20rpx;">
|
||||
<view
|
||||
style="display: flex; align-items: center; justify-content: center; text-align: center; font-size: 20rpx; color: #999999; border: 1rpx solid #D2D2D2; padding: 10rpx 10rpx; box-sizing: border-box;"
|
||||
:style="{color: index == 0 ? '#BB8520' : '#999999', border: `1rpx solid ${index == 0 ? '#F2C369' : '#D2D2D2'}`, 'background-color': (index == 0 ? '#FFFAF1' : '#FFFFFF')}"
|
||||
v-for="(item,index) in ['净利润', '营业收入', '期间费用']" :key="index">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="display: flex;align-items: center; padding: 20rpx; box-sizing: border-box;">
|
||||
<view class="flex1" style="font-size: 28rpx;">查看详细数据</view>
|
||||
<view
|
||||
style="color: #F2C369; font-size: 22rpx; padding: 2rpx 10rpx; border-radius: 5rpx; border: 1rpx solid #F2C369; text-align: center; margin: 0 10rpx;">
|
||||
单季度</view>
|
||||
<view
|
||||
style="display: flex; align-items: center; padding: 3rpx 10rpx; box-sizing: border-box; border: 1rpx solid #D2D2D2; margin-right: 10rpx;">
|
||||
<image style="width: 23rpx; height: 23rpx;" src="/pagesStock/static/icon/all-icon.png"
|
||||
mode="widthFix"></image>
|
||||
<view style="margin: 0 10rpx; color: #999999; font-size: 22rpx;">全部</view>
|
||||
<image style="width: 11rpx; height: 6rpx;" src="/pagesStock/static/icon/all-down.png"
|
||||
mode="widthFix"></image>
|
||||
</view>
|
||||
<view
|
||||
style="display: flex; align-items: center; padding: 3rpx 10rpx; box-sizing: border-box; border: 1rpx solid #D2D2D2;">
|
||||
<image style="width: 23rpx; height: 23rpx;" src="/pagesStock/static/icon/all-icon.png"
|
||||
mode="widthFix"></image>
|
||||
<view style="margin: 0 10rpx; color: #999999; font-size: 22rpx;">汇总</view>
|
||||
<image style="width: 11rpx; height: 6rpx;" src="/pagesStock/static/icon/all-down.png"
|
||||
mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
style="height: 400rpx; display: flex; align-items: center; justify-content: center; background-color: red;">
|
||||
柱状折线图占位
|
||||
</view>
|
||||
|
||||
<view style="background-color: #FAFAFC; border-radius: 10rpx; margin: 0 20rpx; padding: 20rpx 0;">
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">净利润</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">-6525.56万</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">净利润增长率</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">-1600.69%</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">营业总收入</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">3.64亿</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">营业总收入增长率</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">-26.28%</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">营业利润</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">-7539.55万</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
|
||||
<view style="flex: 1; color: #999999; margin-right: 20rpx;">营业利润增长率</view>
|
||||
<view style="text-align: right; color: #2A2A2A;">-201.00%</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "zysj-view",
|
||||
data() {
|
||||
return {
|
||||
showType: 0
|
||||
};
|
||||
},
|
||||
props: { // 0 主营数据 1 财务分析 2 财务数据
|
||||
type: Number
|
||||
},
|
||||
watch: {
|
||||
type: {
|
||||
handler(newVal, oldVal) {
|
||||
this.showType = newVal
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
itemClick(index) {
|
||||
uni.navigateTo({
|
||||
url: `/pagesStock/stockCenterDetails/cwDetails?index=${index}`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
|
||||
</style>
|
||||
@@ -23,6 +23,12 @@ Component({
|
||||
"iconPath": "/static/icon/tabbar/home.png",
|
||||
"selectedIconPath": "/static/icon/tabbar/home_s.png"
|
||||
},
|
||||
// {
|
||||
// "pagePath": "/pages/invest/invest",
|
||||
// "text": "投资日历",
|
||||
// "iconPath": "/static/icon/tabbar/invest.png",
|
||||
// "selectedIconPath": "/static/icon/tabbar/invest_s.png"
|
||||
// },
|
||||
{
|
||||
"pagePath": "/pages/concept/concept",
|
||||
"text": "概念中心",
|
||||
@@ -64,7 +70,7 @@ Component({
|
||||
const index = data.index
|
||||
if(index==3)
|
||||
{
|
||||
//如果是购物车和我的,需要登录
|
||||
//如果是个人中心,需要登录
|
||||
let token = wx.getStorageSync('token')
|
||||
if (!token) {
|
||||
wx.navigateTo({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "JiaZhiQianYan",
|
||||
"appid" : "__UNI__83518F0",
|
||||
"appid" : "__UNI__1836EC9",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
|
||||
27
node_modules/.package-lock.json
generated
vendored
@@ -40,6 +40,15 @@
|
||||
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
|
||||
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
|
||||
},
|
||||
"node_modules/echarts": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/echarts/-/echarts-6.0.0.tgz",
|
||||
"integrity": "sha512-Tte/grDQRiETQP4xz3iZWSvoHrkCQtwqd6hs+mifXcjrCuo2iKWbajFObuLJVBlDIJlOzgQPd1hsaKt/3+OMkQ==",
|
||||
"dependencies": {
|
||||
"tslib": "2.3.0",
|
||||
"zrender": "6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fflate": {
|
||||
"version": "0.4.8",
|
||||
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.4.8.tgz",
|
||||
@@ -98,6 +107,11 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",
|
||||
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
|
||||
},
|
||||
"node_modules/web-vitals": {
|
||||
"version": "4.2.4",
|
||||
"resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-4.2.4.tgz",
|
||||
@@ -116,6 +130,19 @@
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/wordcloud": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/wordcloud/-/wordcloud-1.2.3.tgz",
|
||||
"integrity": "sha512-9by77b7Sd9e1K75kSmVeAD+JnGpiLR1Z4EX1mYQL91jKrU1/4bHw4h4DExQ+dzfT+PvihDcH7OS7V4Y5UkbF2w=="
|
||||
},
|
||||
"node_modules/zrender": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/zrender/-/zrender-6.0.0.tgz",
|
||||
"integrity": "sha512-41dFXEEXuJpNecuUQq6JlbybmnHaqqpGlbH1yxnA5V9MMP4SbohSVZsJIwz+zdjQXSSlR1Vc34EgH1zxyTDvhg==",
|
||||
"dependencies": {
|
||||
"tslib": "2.3.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
31
package-lock.json
generated
@@ -9,7 +9,9 @@
|
||||
"version": "1.2.4",
|
||||
"dependencies": {
|
||||
"crypto-js": "^4.2.0",
|
||||
"posthog-js": "^1.298.0"
|
||||
"echarts": "^6.0.0",
|
||||
"posthog-js": "^1.298.0",
|
||||
"wordcloud": "^1.2.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@posthog/core": {
|
||||
@@ -48,6 +50,15 @@
|
||||
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
|
||||
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
|
||||
},
|
||||
"node_modules/echarts": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/echarts/-/echarts-6.0.0.tgz",
|
||||
"integrity": "sha512-Tte/grDQRiETQP4xz3iZWSvoHrkCQtwqd6hs+mifXcjrCuo2iKWbajFObuLJVBlDIJlOzgQPd1hsaKt/3+OMkQ==",
|
||||
"dependencies": {
|
||||
"tslib": "2.3.0",
|
||||
"zrender": "6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fflate": {
|
||||
"version": "0.4.8",
|
||||
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.4.8.tgz",
|
||||
@@ -106,6 +117,11 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",
|
||||
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
|
||||
},
|
||||
"node_modules/web-vitals": {
|
||||
"version": "4.2.4",
|
||||
"resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-4.2.4.tgz",
|
||||
@@ -124,6 +140,19 @@
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/wordcloud": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/wordcloud/-/wordcloud-1.2.3.tgz",
|
||||
"integrity": "sha512-9by77b7Sd9e1K75kSmVeAD+JnGpiLR1Z4EX1mYQL91jKrU1/4bHw4h4DExQ+dzfT+PvihDcH7OS7V4Y5UkbF2w=="
|
||||
},
|
||||
"node_modules/zrender": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/zrender/-/zrender-6.0.0.tgz",
|
||||
"integrity": "sha512-41dFXEEXuJpNecuUQq6JlbybmnHaqqpGlbH1yxnA5V9MMP4SbohSVZsJIwz+zdjQXSSlR1Vc34EgH1zxyTDvhg==",
|
||||
"dependencies": {
|
||||
"tslib": "2.3.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"crypto-js": "^4.2.0",
|
||||
"posthog-js": "^1.298.0"
|
||||
"echarts": "^6.0.0",
|
||||
"posthog-js": "^1.298.0",
|
||||
"wordcloud": "^1.2.3"
|
||||
}
|
||||
}
|
||||
|
||||
73
pages.json
@@ -162,6 +162,13 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "components/WordCloud/WordCloud",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [
|
||||
@@ -191,11 +198,25 @@
|
||||
"path": "stockCenterDetails/stockCenterDetails",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
"navigationBarTitleText" : "",
|
||||
"usingComponents": {
|
||||
"cwfx-view":"../components/cwfx-view/cwfx-view",
|
||||
"cwsj-view":"../components/cwsj-view/cwsj-view",
|
||||
"cyl-view":"../components/cyl-view/cyl-view",
|
||||
"fzjg-view":"../components/fzjg-view/fzjg-view",
|
||||
"fzlc-view":"../components/fzlc-view/fzlc-view",
|
||||
"gltd-view":"../components/gltd-view/gltd-view",
|
||||
"gqjg-view":"../components/gqjg-view/gqjg-view",
|
||||
"gsxx-view":"../components/gsxx-view/gsxx-view",
|
||||
"news-view":"../components/news-view/news-view",
|
||||
"ywjg-view":"../components/ywjg-view/ywjg-view",
|
||||
"zlfx-view":"../components/zlfx-view/zlfx-view",
|
||||
"zysj-view":"../components/zysj-view/zysj-view"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "stockCenterDetails/cwDetails",
|
||||
"path": "stockCenterDetails/cwDetails/cwDetails",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
@@ -211,6 +232,48 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "板块异动明细"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "stockCenterDetails/webView/webView",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "components/cwfx-view/cwfx-view"
|
||||
},
|
||||
{
|
||||
"path": "components/cwsj-view/cwsj-view"
|
||||
},
|
||||
{
|
||||
"path": "components/cyl-view/cyl-view"
|
||||
},
|
||||
{
|
||||
"path": "components/fzjg-view/fzjg-view"
|
||||
},
|
||||
{
|
||||
"path": "components/fzlc-view/fzlc-view"
|
||||
},
|
||||
{
|
||||
"path": "components/gltd-view/gltd-view"
|
||||
},
|
||||
{
|
||||
"path": "components/gqjg-view/gqjg-view"
|
||||
},
|
||||
{
|
||||
"path": "components/gsxx-view/gsxx-view"
|
||||
},
|
||||
{
|
||||
"path": "components/news-view/news-view"
|
||||
},
|
||||
{
|
||||
"path": "components/ywjg-view/ywjg-view"
|
||||
},
|
||||
{
|
||||
"path": "components/zlfx-view/zlfx-view"
|
||||
},
|
||||
{
|
||||
"path": "components/zysj-view/zysj-view"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -228,6 +291,12 @@
|
||||
"text": "首页",
|
||||
"pagePath": "pages/index/index"
|
||||
},
|
||||
// {
|
||||
// "iconPath": "/static/icon/tabbar/invest.png",
|
||||
// "selectedIconPath": "/static/icon/tabbar/invest_s.png",
|
||||
// "text": "投资日历",
|
||||
// "pagePath": "pages/invest/invest"
|
||||
// },
|
||||
{
|
||||
"iconPath": "/static/icon/tabbar/invest.png",
|
||||
"selectedIconPath": "/static/icon/tabbar/invest_s.png",
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
<view class="content" @click.stop="clickConceptItem(item.concept)">{{item.description}}</view>
|
||||
<view class="hotStockC flex">
|
||||
<view class="title">热门个股</view>
|
||||
<view class="stockList flex">
|
||||
<view v-if="memberInfo&&memberInfo.is_member&&(memberInfo.subscription_type=='pro'||memberInfo.subscription_type=='max')" class="stockList flex">
|
||||
<view class="stockItem" v-for="(sitem,sindex) in item.stocks.slice(0,3)" :key="sindex">{{sitem.name}}</view>
|
||||
<view class="more" @click.stop="clickStockMore(item)">+{{item.stock_count-3}}更多</view>
|
||||
</view>
|
||||
<!-- <view v-else class="notVipC flex" @click.stop="clickNotVip()">
|
||||
<view v-else class="notVipC flex" @click.stop="clickNotVip()">
|
||||
<image class="icon" src="/static/icon/home/conceptCenter/lock.png" mode="widthFix"></image>
|
||||
<view>需升级Pro会员查看{{item.stock_count}}只个股</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="transactionDateHistoryTimeC flex">
|
||||
<view class="transactionDate flex1">交易时间:{{item.price_info?item.price_info.trade_date:''}}</view>
|
||||
@@ -761,6 +761,9 @@
|
||||
clickUpgradeAtOnce()
|
||||
{
|
||||
this.clickLater()
|
||||
uni.navigateTo({
|
||||
url:'/pagesMine/vipMeal/vipMeal'
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 点击查看相关概念
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<view class="list">
|
||||
<view class="item" v-for="(item,index) in stockList" :key="index">
|
||||
<view class="stockInfoC flex" @click="clickExpandOrRetract(index)">
|
||||
<view class="titleCodeC">
|
||||
<view class="titleCodeC" @click.stop="clickStockName(item.code)">
|
||||
<view class="title">{{item.name}}</view>
|
||||
<view class="code">{{item.code}}</view>
|
||||
</view>
|
||||
@@ -21,7 +21,7 @@
|
||||
<view v-else class="chg flex1">-</view>
|
||||
<!-- <view class="industry flex1">食品行业</view> -->
|
||||
<view class="reasonProjectC flex">
|
||||
<view>REASON/项目</view>
|
||||
<view>REASON</view>
|
||||
<image v-if="item.isExpand" class="arrow expand"
|
||||
src="/static/icon/home/conceptCenter/reasonExpand.png" mode="widthFix"></image>
|
||||
<image v-else class="arrow" src="/static/icon/home/conceptCenter/reasonRetract.png"
|
||||
@@ -33,10 +33,10 @@
|
||||
<text class="title">REASON:</text>
|
||||
<text>{{item.reason}}</text>
|
||||
</view>
|
||||
<view class="projectC">
|
||||
<!-- <view class="projectC">
|
||||
<text class="title">项目:</text>
|
||||
<text>已进入芥末味夏威夷果仁/黑金蒜香茉莉翡翠豆两款产品</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -364,6 +364,16 @@
|
||||
this.selectDateStr = monthAgoYear + '-' + (monthAgoMonth > 9 ? monthAgoMonth : ('0' + monthAgoMonth)) +
|
||||
'-' + (monthAgoDay > 9 ? monthAgoDay : ('0' + monthAgoDay))
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击股票名称查看个股详情
|
||||
* @param {Object} code
|
||||
*/
|
||||
clickStockName(code)
|
||||
{
|
||||
// uni.navigateTo({
|
||||
// url:'/pagesStock/stockCenterDetails/stockCenterDetails?code='+code
|
||||
// })
|
||||
},
|
||||
/**
|
||||
* 获取概念相关个股数据
|
||||
@@ -380,7 +390,6 @@
|
||||
if (item.code != null) return item.code
|
||||
return ''
|
||||
});
|
||||
console.log(codes);
|
||||
|
||||
conceptOtherDetails(this.conceptId, {
|
||||
days: 1,
|
||||
|
||||
@@ -5,13 +5,19 @@
|
||||
<view class="searchC fixed flex" :style="'top:'+navH+'px;'">
|
||||
<image class="icon" src="/static/icon/home/conceptCenter/search.png" mode="widthFix"></image>
|
||||
<input class="flex1" type="text" v-model="keywords" placeholder="输入股票代码或名称"
|
||||
placeholder-style="color:#eeeeee" confirm-type="search" @confirm="clickSearch()" />
|
||||
placeholder-style="color:#eeeeee" confirm-type="search" @input="clickSearch()" />
|
||||
</view>
|
||||
<view v-if="searchShow" class="searchResultList fixed" :style="'top:'+searchResultTop+'px;'" @click="clickSearchResultBg()">
|
||||
<view class="list">
|
||||
<view class="item" v-for="(item,index) in searchResultList" :key="index" @click.stop="clickSearchResultListItem(item)">
|
||||
{{item.stock_code}} {{item.stock_name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-y class="stockDetailsC fixed" :style="'top:'+contentTop+'px;'">
|
||||
<view>
|
||||
<view style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 16rpx; margin: 0 20rpx;">
|
||||
<view @click="list2Index = index" v-for="(item,index) in topLists" :key="index"
|
||||
<view @click="handleTypeClick(index)" v-for="(item,index) in topLists" :key="index"
|
||||
style="padding: 12rpx;"
|
||||
:style="{'border-bottom': (list2Index == index ? '1rpx solid #F2C369' : 'none')}">
|
||||
<view style="font-size: 24rpx; color: #070707; font-weight: bold; text-align: center;"
|
||||
@@ -21,8 +27,8 @@
|
||||
<view style="font-size: 20rpx; font-weight: 400; text-align: center;"
|
||||
:style="{color: (list2Index == index ? '#BB8520' : '#070707')}">{{item.value}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view style="height: 1rpx; margin: 0 20rpx; background-color: #E7E7E7;"></view>
|
||||
<!-- '股票名称', '涨跌幅', '市值', '成交额', '行业' -->
|
||||
<view
|
||||
@@ -33,14 +39,20 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- '股票名称', '涨跌幅', '市值', '成交额', '行业' 的 内容 -->
|
||||
<view v-for="(obj, j) in 10"
|
||||
style="display: grid; grid-template-columns: repeat(5, 1fr); gap: 10rpx; min-height: 60rpx; margin: 0 20rpx;"
|
||||
:style="{'background-color': (j % 2 == 0 ? '#fff' : '#FAFAFC')}">
|
||||
<view v-for="(item,index) in ['云南白药', '+0.04%', '996.85 亿元', '4.44 亿元', '医药生物']" :key="index"
|
||||
style="padding: 10rpx 0; color: #666666; font-size: 20rpx; font-weight: 500; text-align: center; display: flex; justify-content: center; align-items: center; flex-direction: column;" :style="{color: (index == 0 ? '#222222' : index == 1 ? '#EC3440' : '#666666')}">
|
||||
<view>{{item}}</view>
|
||||
<view v-if="index == 0" style="color: #666666; font-size: 20rpx; font-weight: 500;">000768</view>
|
||||
</view>
|
||||
<view v-for="(obj, j) in filteredData" @click="itemDetails(obj)"
|
||||
style="display: grid; grid-template-columns: repeat(5, 1fr); gap: 10rpx; min-height: 60rpx; margin: 0 20rpx;"
|
||||
:style="{'background-color': (j % 2 == 0 ? '#fff' : '#FAFAFC')}">
|
||||
<!-- 外层循环:每一行数据 -->
|
||||
<view v-for="(item,index) in getTableItem(obj)" :key="index"
|
||||
style="padding: 10rpx 0; color: #666666; font-size: 20rpx; font-weight: 500; text-align: center; display: flex; justify-content: center; align-items: center; flex-direction: column;"
|
||||
|
||||
:style="{
|
||||
color: (index == 0 ? '#222222' :
|
||||
index == 1 ? (item[2] === 'positive' ? '#EC3440' : '#01AB5D') : '#666666')
|
||||
}">
|
||||
<view>{{item[0]}}</view>
|
||||
<view v-if="index == 0" style="color: #666666; font-size: 20rpx; font-weight: 500;">{{item[1]}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 25rpx;"></view>
|
||||
</view>
|
||||
@@ -53,12 +65,26 @@
|
||||
import {
|
||||
inject
|
||||
} from 'vue'
|
||||
import {
|
||||
marketHeatmap,
|
||||
searchStockInfo,
|
||||
stockBasicInfo
|
||||
} from '@/request/api'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
navH: inject('navHeight'),
|
||||
contentTop: '',
|
||||
allStockData: [],
|
||||
filteredData: [],
|
||||
currentDate: '', // 最终要赋值的日期
|
||||
searchResultTop:'', //搜索结果
|
||||
contentTop: '',
|
||||
keywords: '', //搜索关键字
|
||||
searchShow:false, //是否展示搜索结果
|
||||
searchResultList:[], //搜索结果
|
||||
selectSearchStockInfo:null, //选中的搜索股票信息
|
||||
topLists: [{
|
||||
title: '超大盘股',
|
||||
value: '(>1000亿)',
|
||||
@@ -76,11 +102,148 @@
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.activeIndex = e.index
|
||||
this.currentDate = e.currentDate
|
||||
this.searchResultTop = this.navH + (20 + 70) / 750 * inject('windowWidth')
|
||||
this.contentTop = this.navH + (20 + 70 + 25) / 750 * inject('windowWidth')
|
||||
this.marketHeatmap()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击搜索
|
||||
*/
|
||||
clickSearch() {
|
||||
if(this.keywords) {
|
||||
this.getSearchStockInfoListData()
|
||||
}else
|
||||
this.selectSearchStockInfo = null
|
||||
},
|
||||
/**
|
||||
* 点击搜索结果背景
|
||||
*/
|
||||
clickSearchResultBg()
|
||||
{
|
||||
this.searchShow = false
|
||||
},
|
||||
/**
|
||||
* 点击搜索结果列表项
|
||||
*/
|
||||
clickSearchResultListItem(item) {
|
||||
this.selectSearchStockInfo = item
|
||||
this.searchShow = false
|
||||
this.getStockBasicInfoData()
|
||||
//this.getQuoteDetailsData()
|
||||
},
|
||||
/**
|
||||
* 根据输入内容获取搜索列表项
|
||||
*/
|
||||
getSearchStockInfoListData() {
|
||||
let param = {q:this.keywords,limit:10}
|
||||
searchStockInfo(param).then(res=>{
|
||||
this.searchResultList = res.data
|
||||
this.searchShow = this.searchResultList.length>0
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取股票基本信息
|
||||
*/
|
||||
getStockBasicInfoData() {
|
||||
let code = this.stockCode
|
||||
if (this.selectSearchStockInfo) {
|
||||
code = this.selectSearchStockInfo.stock_code
|
||||
}
|
||||
// stockBasicInfo(code).then(res=>{
|
||||
// this.stockBasicInfo = res.data
|
||||
// this.navTitle = res.data.SECNAME+'('+res.data.SECCODE+')'
|
||||
// }).catch(error=>{
|
||||
|
||||
// })
|
||||
uni.navigateTo({
|
||||
url: '/pagesStock/stockCenterDetails/stockCenterDetails?code=' + code
|
||||
})
|
||||
},
|
||||
handleTypeClick(index) {
|
||||
this.list2Index = index;
|
||||
// 先请求数据,再筛选
|
||||
this.marketHeatmap();
|
||||
},
|
||||
getTableItem(obj) {
|
||||
// 1. 处理空值,避免 toFixed 调用时报错
|
||||
const marketCap = obj.market_cap ? obj.market_cap.toFixed(2) : '0.00';
|
||||
const amount = obj.amount ? obj.amount.toFixed(2) : '0.00';
|
||||
// 统一处理涨跌幅:空值默认0,转数字避免字符串干扰判断
|
||||
const changePercent = obj.change_percent ? Number(obj.change_percent) : 0;
|
||||
|
||||
// 2. 处理涨跌幅的符号和类型标记
|
||||
let changePercentStr = '';
|
||||
let changeType = ''; // 标记正负:positive/negative/zero
|
||||
if (changePercent > 0) {
|
||||
changePercentStr = `+${changePercent}%`; // 正数拼接+号
|
||||
changeType = 'positive';
|
||||
} else if (changePercent < 0) {
|
||||
changePercentStr = `${changePercent}%`; // 负数直接显示
|
||||
changeType = 'negative';
|
||||
} else {
|
||||
changePercentStr = '0%'; // 0值统一显示
|
||||
changeType = 'zero';
|
||||
}
|
||||
|
||||
// 3. 返回数组:涨跌幅位置新增 changeType 用于模板判断颜色
|
||||
return [
|
||||
[obj.stock_name, obj.stock_code],
|
||||
[changePercentStr, '', changeType], // 第三个元素存类型标记
|
||||
[`${marketCap}亿元`],
|
||||
[`${amount}亿元`],
|
||||
[obj.industry || '暂无'] // 处理行业为空的情况
|
||||
];
|
||||
},
|
||||
marketHeatmap() {
|
||||
let param = {
|
||||
limit: 500
|
||||
}
|
||||
if (this.currentDate && this.currentDate !== 'undefined' && this.currentDate.trim() !== '') {
|
||||
param.date = this.currentDate;
|
||||
}
|
||||
marketHeatmap(param).then(res => {
|
||||
// 存储原始数据
|
||||
this.allStockData = res.data || [];
|
||||
// 调用筛选方法
|
||||
this.filterStockByMarketCap();
|
||||
|
||||
}).catch(error => {
|
||||
|
||||
})
|
||||
},
|
||||
// 根据市值区间筛选数据
|
||||
filterStockByMarketCap() {
|
||||
const {
|
||||
list2Index,
|
||||
allStockData
|
||||
} = this;
|
||||
let filtered = [];
|
||||
|
||||
switch (list2Index) {
|
||||
case 0: // 超大盘股(>1000亿)
|
||||
filtered = allStockData.filter(item => item.market_cap > 1000);
|
||||
break;
|
||||
case 1: // 大盘股(500-1000亿)
|
||||
filtered = allStockData.filter(item => item.market_cap >= 500 && item.market_cap <= 1000);
|
||||
break;
|
||||
case 2: // 中盘股(100-500亿)
|
||||
filtered = allStockData.filter(item => item.market_cap >= 100 && item.market_cap <= 500);
|
||||
break;
|
||||
default:
|
||||
filtered = allStockData;
|
||||
}
|
||||
|
||||
this.filteredData = filtered;
|
||||
},
|
||||
itemDetails(item) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesStock/stockCenterDetails/stockCenterDetails?code=' + item.stock_code
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -123,8 +286,29 @@
|
||||
.stockDetailsC {
|
||||
left: 25rpx;
|
||||
width: calc(100vw - 50rpx);
|
||||
bottom: env(safe-area-inset-bottom);
|
||||
background-color: white;
|
||||
bottom: env(safe-area-inset-bottom);
|
||||
background-color: white;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.searchResultList {
|
||||
background-color: #00000080;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 0 25rpx;
|
||||
.list
|
||||
{
|
||||
background-color: white;
|
||||
border-radius: 10rpx;
|
||||
.item
|
||||
{
|
||||
padding: 0 42rpx;
|
||||
line-height: 60rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
z-index: 20;
|
||||
}
|
||||
</style>
|
||||
@@ -30,7 +30,7 @@
|
||||
<view v-if="selectCategory==0" class="targetList">
|
||||
<view class="item" v-for="(item,index) in targetList" :key="index" @click="clickStockItem(item.stock_code)">
|
||||
<view class="nameCodePriceC flex">
|
||||
<view class="flex1">
|
||||
<view class="flex1" @click.stop="clickStockName(item.stock_code)">
|
||||
<view class="name">{{item.stock_name}}</view>
|
||||
<view class="code">{{item.stock_code}}</view>
|
||||
</view>
|
||||
@@ -56,7 +56,7 @@
|
||||
<view class="content">{{item.description}}</view>
|
||||
<view class="hotStockC flex">
|
||||
<view class="title">热门个股</view>
|
||||
<view v-if="memberInfo&&memberInfo.is_member&&memberInfo.subscription_type=='pro'" class="stockList flex">
|
||||
<view v-if="memberInfo&&memberInfo.is_member&&(memberInfo.subscription_type=='pro'||memberInfo.subscription_type=='max')" class="stockList flex">
|
||||
<view class="stockItem" v-for="(sitem,sindex) in item.stocks.slice(0,3)" :key="sindex">{{sitem.name}}</view>
|
||||
<view class="more" @click.stop="clickStockMore(item)">+{{item.stock_count-3}}更多</view>
|
||||
</view>
|
||||
@@ -397,7 +397,9 @@
|
||||
this.getEventCommentListData()
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.getMemberStatusData()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 复制标题
|
||||
@@ -488,6 +490,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击股票名称查看个股详情
|
||||
* @param {Object} code
|
||||
*/
|
||||
clickStockName(code)
|
||||
{
|
||||
if(code.indexOf('.')>-1)
|
||||
{
|
||||
code = code.split('.')[0]
|
||||
}
|
||||
uni.navigateTo({
|
||||
url:'/pagesStock/stockCenterDetails/stockCenterDetails?code='+code
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 点击查看股票详情
|
||||
*/
|
||||
@@ -527,6 +543,9 @@
|
||||
clickUpgradeAtOnce()
|
||||
{
|
||||
this.clickLater()
|
||||
uni.navigateTo({
|
||||
url:'/pagesMine/vipMeal/vipMeal'
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 点击查看更多个股
|
||||
@@ -569,7 +588,6 @@
|
||||
this.scoreTop = e.currentTarget.offsetTop+this.navH+(70+10)/750*this.windowWidth
|
||||
this.$refs['expectScorePopup'].open()
|
||||
},
|
||||
|
||||
/**
|
||||
* 点击发送事件评论
|
||||
*/
|
||||
@@ -757,7 +775,28 @@
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取会员状态
|
||||
*/
|
||||
getMemberStatusData()
|
||||
{
|
||||
let token = uni.getStorageSync('token')
|
||||
if (!token) {
|
||||
return
|
||||
}
|
||||
membershipStatus().then(res=>{
|
||||
if (res.code==200) {
|
||||
this.memberInfo = res.data
|
||||
} else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -106,8 +106,6 @@
|
||||
boundaryGap: false,
|
||||
axisLine: { onZero: false },
|
||||
splitLine: { show: false },
|
||||
min: 'dataMin',
|
||||
max: ''
|
||||
},
|
||||
yAxis: {
|
||||
scale: true,
|
||||
@@ -115,20 +113,6 @@
|
||||
show: true
|
||||
}
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'inside',
|
||||
start: 50,
|
||||
end: 100
|
||||
},
|
||||
{
|
||||
show: true,
|
||||
type: 'slider',
|
||||
top: '90%',
|
||||
start: 50,
|
||||
end: 100
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '日K',
|
||||
@@ -173,7 +157,8 @@
|
||||
type:'category',
|
||||
scale:true,
|
||||
axisLabel: {
|
||||
customValues:['09:30','10:00','10:30','11:00','11:30','13:00','13:30','14:00','14:30','15:00',]
|
||||
customValues:['09:30','10:00','10:30','11:00','11:30','13:00','13:30','14:00','14:30','15:00'],
|
||||
fontSize:9
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
@@ -276,6 +261,11 @@
|
||||
let categoryData = []
|
||||
let valueData = []
|
||||
let open = data[0].open
|
||||
if(data.length>0) {
|
||||
if(data[0].time!='09:30'){
|
||||
data.splice(0,1)
|
||||
}
|
||||
}
|
||||
for (let item of data) {
|
||||
categoryData.push(item.time)
|
||||
let rate = accMul(accDiv(accSub(item.close,open),open).toFixed(4),100)
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
</view>
|
||||
<image class="arrow" src="/static/icon/mine/infoArrow.png" mode="widthFix"></image>
|
||||
</view>
|
||||
|
||||
<view v-if="userInfo" class="numList relative flex">
|
||||
<view class="item flex1 flexColumnCenter" @click="clickNumItem(0)">
|
||||
<view class="num">{{userInfo.statistics.total_comments}}</view>
|
||||
@@ -26,8 +25,10 @@
|
||||
<view class="title">我的点赞</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="memberInfo&&!memberInfo.is_member" class="vipC relative" @click="clickVip()">
|
||||
<view class="vipC relative" @click="clickVip()">
|
||||
<image class="icon" src="/static/image/mine/vipBg.png" mode="widthFix"></image>
|
||||
<view v-if="memberInfo&&memberInfo.is_member" class="absolute tips">{{memberInfo.subscription_type}}会员,{{memberInfo.days_left}}天后到期</view>
|
||||
<view v-else class="absolute tips">成为会员,可以获取更多价值资讯</view>
|
||||
</view>
|
||||
<view class="menuList relative">
|
||||
<view class="list">
|
||||
@@ -96,7 +97,6 @@
|
||||
onShow() {
|
||||
this.getUserInfoData()
|
||||
this.getMemberStatus()
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -292,6 +292,16 @@ page
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.tips
|
||||
{
|
||||
top: 0;
|
||||
left: 80rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
line-height: 90rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
}
|
||||
.menuList
|
||||
{
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
<image v-if="memberInfo.is_member" class="bg" src="/pagesMine/static/image/vip/vipTopBg.png" mode="widthFix"></image>
|
||||
<image v-else class="bg" src="/pagesMine/static/image/vip/noVipTopBg.png" mode="widthFix"></image>
|
||||
<view v-if="memberInfo.is_member" class="infoC vip absolute">
|
||||
<view class="title">尊贵的{{memberInfo.subscription_type}}VIP会员</view>
|
||||
<view class="tips">会员有效期至:{{memberInfo.member_expire_date}}</view>
|
||||
<view class="title">尊贵的{{memberInfo.subscription_type}}会员</view>
|
||||
<view class="tips">{{memberInfo.days_left}}天后到期</view>
|
||||
</view>
|
||||
<view v-else class="infoC absolute">
|
||||
<view class="title">价值前沿</view>
|
||||
@@ -108,7 +108,7 @@
|
||||
<view class="bottomTips"> 解锁全部高级功能,让AI成为您的专属投资顾问。</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lookMealC fixed" @click="clickVipMeal()">查看VIP套餐</view>
|
||||
<view class="lookMealC fixed" @click="clickVipMeal()">查看会员套餐</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -180,21 +180,8 @@
|
||||
},
|
||||
onLoad() {
|
||||
this.getMemberStatus()
|
||||
this.init()
|
||||
},
|
||||
onReady() {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
async init() {
|
||||
// chart 图表实例不能存在data里
|
||||
const chart = await this.$refs.chartRef.init(echarts);
|
||||
// chart.on('click',function (params) {
|
||||
// console.log(params)
|
||||
// })
|
||||
console.log(chart)
|
||||
chart.setOption(this.option1)
|
||||
},
|
||||
/**
|
||||
* 点击查看vip套餐
|
||||
*/
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
<image v-if="memberInfo.is_member" class="bg" src="/pagesMine/static/image/vip/vipTopBg.png" mode="widthFix"></image>
|
||||
<image v-else class="bg" src="/pagesMine/static/image/vip/noVipTopBg.png" mode="widthFix"></image>
|
||||
<view v-if="memberInfo.is_member" class="infoC vip absolute">
|
||||
<view class="title">尊贵的{{memberInfo.subscription_type}}VIP会员</view>
|
||||
<view class="tips">会员有效期至:{{memberInfo.member_expire_date}}</view>
|
||||
<view class="title">尊贵的{{memberInfo.subscription_type}}会员</view>
|
||||
<view class="tips">{{memberInfo.days_left}}天后到期</view>
|
||||
</view>
|
||||
<view v-else class="infoC absolute">
|
||||
<view class="title">价值前沿</view>
|
||||
@@ -52,7 +52,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="memberInfo" class="joinVipC fixed" @click="clickJoinVip()">{{memberInfo.is_member?'您已是年度VIP':'立即加入年度VIP'}}</view>
|
||||
<view v-if="memberInfo" class="joinVipC fixed" @click="clickJoinVip()">{{memberInfo.is_member?('您已是'+memberInfo.subscription_type+'会员'):'立即加入年度会员'}}</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
1153
pagesStock/components/cwfx-view/cwfx-view.vue
Normal file
3124
pagesStock/components/cwsj-view/cwsj-view.vue
Normal file
447
pagesStock/components/cyl-view/cyl-view.vue
Normal file
@@ -0,0 +1,447 @@
|
||||
<template>
|
||||
<view class="cyl_view">
|
||||
<view class="top flex">
|
||||
<view class="child_1">产业链分析</view>
|
||||
<view class="child_2">目标公司供应链图谱</view>
|
||||
<view class="child_3">节点 {{totalNodes}}</view>
|
||||
</view>
|
||||
<view class="center">
|
||||
<view class="child" :class="{action: center_index == 0}" @click="changeCenterIndex(0)">
|
||||
层级视图
|
||||
</view>
|
||||
<view class="child" :class="{action: center_index == 1}" @click="changeCenterIndex(1)">
|
||||
流向关系
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="center_index==0" class="bottom">
|
||||
<view class="type flex">
|
||||
<view v-for="(item,index) in types" :key="index" class="item flex flex1">
|
||||
<view :class="'contentC flexColumnCenter flex1 '+(typeIndex==index?item.type:'')" @click="typeIndex = index">
|
||||
<view class="titleNumC">
|
||||
{{item.title}}
|
||||
<text :class="'num '+(typeIndex==index?item.type:'')">{{item.count}}</text>
|
||||
</view>
|
||||
<view class="des">{{item.desc}}</view>
|
||||
</view>
|
||||
<image v-if="index!=types.length-1" class="arrow" src="/pagesStock/static/icon/rightArrow.png"
|
||||
mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<block v-if="typeIndex==0">
|
||||
<!-- 上游供应链 -->
|
||||
<view class="item" v-for="(item,index) in upstreamList" :key="index" @click="clickAction(item)">
|
||||
<view class="title">{{item.node_name}}</view>
|
||||
<view class="des">{{item.node_description}}</view>
|
||||
<view class="labelC flex">
|
||||
<view class="label upstream type">{{item.node_type}}</view>
|
||||
<view class="label upstream market">份额:{{item.market_share}}%</view>
|
||||
</view>
|
||||
<view class="importanceC flex">
|
||||
<view class="title">重要度</view>
|
||||
<view class="progressBgC flex1">
|
||||
<view class="progress upstream" :style="{width: `${item.importance_score}%`}">
|
||||
</view>
|
||||
</view>
|
||||
<view class="value">{{item.importance_score}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="typeIndex==1">
|
||||
<!-- 核心企业 -->
|
||||
<view class="item" v-for="(item,index) in coreEnterpriseList" :key="index" @click="clickAction(item)">
|
||||
<view class="title">{{item.node_name}}</view>
|
||||
<view class="des">{{item.node_description}}</view>
|
||||
<view class="labelC flex">
|
||||
<view class="label core type">{{item.node_type}}</view>
|
||||
<view class="label core market">份额:{{item.market_share}}%</view>
|
||||
</view>
|
||||
<view class="importanceC flex">
|
||||
<view class="title">重要度</view>
|
||||
<view class="progressBgC flex1">
|
||||
<view class="progress core" :style="{width: `${item.importance_score}%`}"></view>
|
||||
</view>
|
||||
<view class="value">{{item.importance_score}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="typeIndex==2">
|
||||
<!-- 下游客户 -->
|
||||
<view class="item" v-for="(item,index) in downstreamList" :key="index" @click="clickAction(item)">
|
||||
<view class="title">{{item.node_name}}</view>
|
||||
<view class="des">{{item.node_description}}</view>
|
||||
<view class="labelC flex">
|
||||
<view class="label downstream type">{{item.node_type}}</view>
|
||||
<view class="label downstream market">份额:{{item.market_share}}%</view>
|
||||
</view>
|
||||
<view class="importanceC flex">
|
||||
<view class="title">重要度</view>
|
||||
<view class="progressBgC flex1">
|
||||
<view class="progress downstream" :style="{width: `${item.importance_score}%`}"></view>
|
||||
</view>
|
||||
<view class="value">{{item.importance_score}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="center_index==1" style="height: 500rpx;">
|
||||
<l-echart ref="chartRef"></l-echart>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const echarts = require('../../../uni_modules/lime-echart/static/echarts.min.js');
|
||||
|
||||
export default {
|
||||
name: "cyl-view",
|
||||
data() {
|
||||
return {
|
||||
isShow: false,
|
||||
center_index: 0,
|
||||
types: [{
|
||||
title: '上游供应链',
|
||||
count: 0,
|
||||
desc: '原材料与供应商',
|
||||
type:'upstream'
|
||||
},
|
||||
{
|
||||
title: '核心企业',
|
||||
count: 0,
|
||||
desc: '公司主体与产品',
|
||||
type:'core'
|
||||
},
|
||||
{
|
||||
title: '下游客户',
|
||||
count: 0,
|
||||
desc: '客户与终端市场',
|
||||
type:'downstream'
|
||||
}
|
||||
],
|
||||
typeIndex: 0,
|
||||
option:{
|
||||
legend:{
|
||||
show:false,
|
||||
},
|
||||
grid:{
|
||||
left:'2%',
|
||||
right:'2%',
|
||||
top:'5%',
|
||||
bottom:'30%'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: 'sankey',
|
||||
name:'经营现金流',
|
||||
data: [],
|
||||
links:[],
|
||||
}
|
||||
]
|
||||
},
|
||||
};
|
||||
},
|
||||
props:{
|
||||
valueChainAnalysisInfo:Object,
|
||||
upstreamList:Array, //上游供应链
|
||||
coreEnterpriseList:Array, //核心企业
|
||||
downstreamList:Array, //下游客户
|
||||
totalNodes:Number, //总节点数
|
||||
valueChainFlowsList:Array //产业链流向数据
|
||||
},
|
||||
watch:{
|
||||
valueChainAnalysisInfo(newValue)
|
||||
{
|
||||
this.types[0].count = newValue.upstream_nodes
|
||||
this.types[1].count = newValue.company_nodes
|
||||
this.types[2].count = newValue.downstream_nodes
|
||||
},
|
||||
valueChainFlowsList(newValue)
|
||||
{
|
||||
let data = []
|
||||
let links = []
|
||||
let name = []
|
||||
for (let item of newValue) {
|
||||
if(name.indexOf(item.source.node_name)==-1)
|
||||
{
|
||||
name.push(item.source.node_name)
|
||||
data.push({name:item.source.node_name})
|
||||
}
|
||||
links.push({source: item.source.node_name, target: item.target.node_name, value: item.flow_metrics.flow_ratio})
|
||||
}
|
||||
this.option.series[0].data = data
|
||||
this.option.series[0].links = links
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async init() {
|
||||
// chart 图表实例不能存在data里
|
||||
const chart = await this.$refs.chartRef.init(echarts);
|
||||
// chart.on('click',function (params) {
|
||||
// console.log(params)
|
||||
// })
|
||||
console.log(chart)
|
||||
console.log(this.option)
|
||||
chart.setOption(this.option)
|
||||
|
||||
},
|
||||
changeCenterIndex(index) {
|
||||
if(this.center_index!=index) {
|
||||
this.center_index = index
|
||||
if(index==1) {
|
||||
let that = this
|
||||
setTimeout(function() {
|
||||
that.init()
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
},
|
||||
clickAction(item) {
|
||||
this.$emit('detail',item)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.cyl_view {
|
||||
padding: 20rpx;
|
||||
|
||||
.top {
|
||||
font-weight: 500;
|
||||
.child_1 {
|
||||
color: #2B2B2B;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.child_2 {
|
||||
color: #71675D;
|
||||
font-size: 24rpx;
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
|
||||
.child_3 {
|
||||
border: 1rpx solid #F3C368;
|
||||
border-radius: 5rpx;
|
||||
padding: 0 5rpx;
|
||||
color: #F2C369;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.center {
|
||||
margin: 20rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
font-weight: 500;
|
||||
|
||||
.child {
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 10rpx 10rpx 0 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 26rpx;
|
||||
color: #939393;
|
||||
padding: 10rpx 40rpx;
|
||||
|
||||
&.action {
|
||||
background-color: #F2C369;
|
||||
color: #070707;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
.type {
|
||||
.item {
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
padding: 26rpx 0;
|
||||
.contentC
|
||||
{
|
||||
background-color: #FAFAFC;
|
||||
justify-content: center;
|
||||
height: 120rpx;
|
||||
border-radius: 10rpx;
|
||||
.titleNumC
|
||||
{
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #2B2B2B;
|
||||
.num
|
||||
{
|
||||
background-color: #F2C369;
|
||||
margin-left: 6rpx;
|
||||
padding: 0 5rpx;
|
||||
min-width: 24rpx;
|
||||
border-radius: 5rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
.num.upstream
|
||||
{
|
||||
background-color: #FF5501;
|
||||
color: white;
|
||||
}
|
||||
.num.core
|
||||
{
|
||||
background-color: #175CE6;
|
||||
color: white;
|
||||
}
|
||||
.num.downstream
|
||||
{
|
||||
background-color: #1DB26F;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
.des
|
||||
{
|
||||
margin-top: 10rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
.contentC.upstream
|
||||
{
|
||||
background-color: #FFF4EF;
|
||||
border: solid 1rpx #FF5501;
|
||||
}
|
||||
.contentC.core
|
||||
{
|
||||
background-color: #F2F6FD;
|
||||
border: solid 1rpx #175CE6;
|
||||
}
|
||||
.contentC.downstream
|
||||
{
|
||||
background-color: #E7F5F0;
|
||||
border: solid 1rpx #1DB26F;
|
||||
}
|
||||
|
||||
.arrow
|
||||
{
|
||||
margin: 0 6rpx;
|
||||
width: 19rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.list
|
||||
{
|
||||
margin-top: 20rpx;
|
||||
.item
|
||||
{
|
||||
background-color: #FAFAFC;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 25rpx 20rpx;
|
||||
.title
|
||||
{
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #2B2B2B;
|
||||
}
|
||||
.des
|
||||
{
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #999999;
|
||||
}
|
||||
.labelC
|
||||
{
|
||||
margin-top: 10rpx;
|
||||
.label
|
||||
{
|
||||
margin-right: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
line-height: 30rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.label.upstream
|
||||
{
|
||||
color: #FF5501;
|
||||
}
|
||||
.label.upstream.type
|
||||
{
|
||||
background-color: #FFF4EF;
|
||||
}
|
||||
.label.upstream.market
|
||||
{
|
||||
border: solid 1rpx #FF5501;
|
||||
}
|
||||
.label.core
|
||||
{
|
||||
color: #175CE6;
|
||||
}
|
||||
.label.core.type
|
||||
{
|
||||
background-color: #EDF2FD;
|
||||
}
|
||||
.label.core.market
|
||||
{
|
||||
border: solid 1rpx #175CE6;
|
||||
}
|
||||
.label.downstream
|
||||
{
|
||||
color: #1DB26F;
|
||||
}
|
||||
.label.downstream.type
|
||||
{
|
||||
background-color: #E7F5F0;
|
||||
}
|
||||
.label.downstream.market
|
||||
{
|
||||
border: solid 1rpx #1DB26F;
|
||||
}
|
||||
}
|
||||
.importanceC
|
||||
{
|
||||
margin-top: 20rpx;
|
||||
.title
|
||||
{
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #71675D;
|
||||
}
|
||||
.progressBgC
|
||||
{
|
||||
background-color: #EFEFEF;
|
||||
height: 10rpx;
|
||||
border-radius: 5rpx;
|
||||
margin: 0 15rpx;
|
||||
.progress
|
||||
{
|
||||
height: 100%;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
.progress.upstream
|
||||
{
|
||||
background: linear-gradient(90deg, #FF8C53 0%, #FF5501 100%);
|
||||
}
|
||||
.progress.core
|
||||
{
|
||||
background: linear-gradient(90deg, #518BFF 0%, #175CE6 100%);
|
||||
}
|
||||
.progress.downstream
|
||||
{
|
||||
background: linear-gradient(90deg, #48D394 0%, #1DB26F 100%);
|
||||
}
|
||||
}
|
||||
.value
|
||||
{
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #71675D;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
126
pagesStock/components/fzjg-view/fzjg-view.vue
Normal file
@@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<view class="branchList">
|
||||
<view class="item" v-for="(item,index) in branchList" :key="index">
|
||||
<view class="titleStatusC flex">
|
||||
<view class="title flex1">{{item.branch_name}}</view>
|
||||
<view :class="'statusC flex '+(item.business_status=='注销'?'logOff':'exist')">
|
||||
<image v-if="item.business_status=='注销'" class="icon" src="/pagesStock/static/icon/logOffStatus.png" mode="widthFix">
|
||||
</image>
|
||||
<image v-else class="icon" src="/pagesStock/static/icon/existStatus.png" mode="widthFix"></image>
|
||||
<view>{{item.business_status}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="infoC topInfo flex">
|
||||
<view class="infoItem leftInfo flex flex1">
|
||||
<view class="title">注册资本</view>
|
||||
<view class="content flex1">{{item.register_capital}}</view>
|
||||
</view>
|
||||
<view class="infoItem rightInfo flex flex1">
|
||||
<view class="title">法人代表</view>
|
||||
<view class="content flex1">{{item.legal_person}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="infoC flex">
|
||||
<view class="infoItem leftInfo flex flex1">
|
||||
<view class="title">成立日期</view>
|
||||
<view class="content flex1">{{item.register_date}}</view>
|
||||
</view>
|
||||
<view class="infoItem rightInfo flex flex1">
|
||||
<view class="title">关联企业</view>
|
||||
<view class="content flex1">{{item.related_company_count}}家</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:"fzjg-view",
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
props:{
|
||||
branchList:Array
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.branchList {
|
||||
margin-top: 38rpx;
|
||||
padding: 0 20rpx;
|
||||
|
||||
.item {
|
||||
background-color: #FAFAFC;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
|
||||
.titleStatusC {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #2B2B2B;
|
||||
|
||||
.statusC {
|
||||
padding: 0 10rpx;
|
||||
line-height: 28rpx;
|
||||
border-radius: 15rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
.icon {
|
||||
margin-right: 3rpx;
|
||||
width: 16rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.statusC.exist {
|
||||
background-color: #FFF7E9;
|
||||
border: solid 1rpx #F2C369;
|
||||
color: #F2C369;
|
||||
}
|
||||
|
||||
.statusC.logOff {
|
||||
background-color: #FFF1F1;
|
||||
border: solid 1rpx #EF3535;
|
||||
color: #EF3535;
|
||||
}
|
||||
}
|
||||
|
||||
.infoC {
|
||||
height: 50rpx;
|
||||
|
||||
.infoItem {
|
||||
.title {
|
||||
margin-right: 16rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.content {
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #2A2A2A;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.infoItem.leftInfo {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.infoItem.rightInfo {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.infoC.topInfo {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -51,7 +51,7 @@
|
||||
{{timelineInfo.negative_events}}</text>
|
||||
</view>
|
||||
<view class="timelineList">
|
||||
<view class="item" v-for="(item,index) in timelineList" :key="index" @click="clickAction">
|
||||
<view class="item" v-for="(item,index) in timelineList" :key="index" @click="clickAction(item)">
|
||||
<view class="impactC flexColumnCenter">
|
||||
<image v-if="item.impact_metrics.is_positive==1" class="icon" style="margin-top: 20rpx;"
|
||||
src="/pagesStock/static/icon/yuan_shang.png" mode="widthFix"></image>
|
||||
@@ -97,8 +97,8 @@
|
||||
timelineList:Array, //发展时间线数组
|
||||
},
|
||||
methods: {
|
||||
clickAction() {
|
||||
this.$emit('detail')
|
||||
clickAction(item) {
|
||||
this.$emit('detail',item)
|
||||
}
|
||||
}
|
||||
}
|
||||
223
pagesStock/components/gltd-view/gltd-view.vue
Normal file
@@ -0,0 +1,223 @@
|
||||
<template>
|
||||
<view class="managementTeamList">
|
||||
<block v-for="(item,index) in managementList" :key="index">
|
||||
<view v-if="item.list.length>0" class="positionNumC flex">
|
||||
<view class="position">{{item.key}}</view>
|
||||
<view class="num director">{{item.list.length}}人</view>
|
||||
</view>
|
||||
<block v-if="item.list.length>4&&!item.isExpand">
|
||||
<view class="item flex" v-for="(pitem,pindex) in item.list.slice(0,4)" :key="index">
|
||||
<view class="avatarC flexCenter relative director">
|
||||
{{getLastNameStr(pitem.name)}}
|
||||
<view :class="'sexC flexCenter absolute '+(pitem.gender=='女'?'female':'male')">
|
||||
<image v-if="pitem.gender=='女'" class="icon" src="/pagesStock/static/icon/female.png" mode="widthFix">
|
||||
</image>
|
||||
<image v-else class="icon" src="/pagesStock/static/icon/male.png" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex1">
|
||||
<view class="flex">
|
||||
<view class="name">{{pitem.name}}</view>
|
||||
<view class="position">{{pitem.position_name}}</view>
|
||||
<view class="date flex1">任职日期:{{pitem.start_date}}</view>
|
||||
</view>
|
||||
<view class="educationAgeC flex">
|
||||
<view class="education label">{{pitem.education}}</view>
|
||||
<view class="age label">{{getAgeByBirthYear(pitem.birth_year)}}岁</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="item flex" v-for="(pitem,pindex) in item.list" :key="index">
|
||||
<view class="avatarC flexCenter relative director">
|
||||
{{getLastNameStr(pitem.name)}}
|
||||
<view :class="'sexC flexCenter absolute '+(pitem.gender=='女'?'female':'male')">
|
||||
<image v-if="pitem.gender=='女'" class="icon" src="/pagesStock/static/icon/female.png" mode="widthFix">
|
||||
</image>
|
||||
<image v-else class="icon" src="/pagesStock/static/icon/male.png" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex1">
|
||||
<view class="flex">
|
||||
<view class="name">{{pitem.name}}</view>
|
||||
<view class="position">{{pitem.position_name}}</view>
|
||||
<view class="date flex1">任职日期:{{pitem.start_date}}</view>
|
||||
</view>
|
||||
<view class="educationAgeC flex">
|
||||
<view class="education label">{{pitem.education}}</view>
|
||||
<view class="age label">{{getAgeByBirthYear(pitem.birth_year)}}岁</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view v-if="item.list.length>4" class="expandMoreC flexCenter" @click="clickExpandOrRetractManagement(index)">
|
||||
<view >{{item.isExpand?'收起':'展开查看'}}</view>
|
||||
<image class="arrow" src="/pagesStock/static/icon/lookMoreArrow.png" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAgeByBirthYear, getLastNameStr } from '@/utils/util';
|
||||
|
||||
export default {
|
||||
name:"gltd-view",
|
||||
data() {
|
||||
return {
|
||||
getLastNameStr:getLastNameStr, //获取姓
|
||||
getAgeByBirthYear:getAgeByBirthYear //获取年龄
|
||||
};
|
||||
},
|
||||
props:{
|
||||
managementList:Array
|
||||
},
|
||||
methods:{
|
||||
/**
|
||||
* 点击展开或收起管理团队人员
|
||||
*/
|
||||
clickExpandOrRetractManagement(index)
|
||||
{
|
||||
this.managementList[index].isExpand = !this.managementList[index].isExpand
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.managementTeamList {
|
||||
padding: 0 20rpx;
|
||||
.positionNumC {
|
||||
height: 70rpx;
|
||||
.position {
|
||||
margin-right: 11rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.num {
|
||||
padding: 0 14rpx;
|
||||
line-height: 30rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.num.director {
|
||||
background-color: #99AFEC;
|
||||
}
|
||||
|
||||
.num.supervisor {
|
||||
background-color: #B499EC;
|
||||
}
|
||||
|
||||
.num.other {
|
||||
background-color: #B5B5C9;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
background-color: #FAFAFC;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 20rpx 25rpx 20rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
|
||||
.avatarC {
|
||||
margin-right: 18rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
|
||||
.sexC {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
border-radius: 50%;
|
||||
border: solid 2rpx white;
|
||||
|
||||
.icon {
|
||||
width: 16rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.sexC.female {
|
||||
background-color: #FA5A93;
|
||||
}
|
||||
|
||||
.sexC.male {
|
||||
background-color: #3E6CFC;
|
||||
}
|
||||
}
|
||||
|
||||
.avatarC.director {
|
||||
background-color: #99AFEC;
|
||||
}
|
||||
|
||||
.avatarC.supervisor {
|
||||
background-color: #B499EC;
|
||||
}
|
||||
|
||||
.avatarC.other {
|
||||
background-color: #B5B5C9;
|
||||
}
|
||||
|
||||
.name {
|
||||
margin-right: 13rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.position {
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.educationAgeC {
|
||||
margin-top: 8rpx;
|
||||
|
||||
.label {
|
||||
margin-right: 10rpx;
|
||||
background-color: #F1F1F1;
|
||||
line-height: 30rpx;
|
||||
padding: 0 16rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.expandMoreC {
|
||||
height: 80rpx;
|
||||
border-bottom: solid 1rpx #E7E7E7;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #C9C9C9;
|
||||
|
||||
.arrow {
|
||||
margin-left: 18rpx;
|
||||
width: 11rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -8,7 +8,7 @@
|
||||
<view class="left">
|
||||
<view class="l_top">{{actualControlInfo.actual_controller_name}}</view>
|
||||
<view class="l_bottom">
|
||||
<view class="l_b_left">企业法人</view>
|
||||
<view class="l_b_left">{{actualControlInfo.control_type}}</view>
|
||||
<view class="l_b_right">截至 {{actualControlInfo.end_date}}</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -23,44 +23,28 @@
|
||||
<view class="title">股权集中度</view>
|
||||
</view>
|
||||
<view class="guquan">
|
||||
<view class="top">2025-09-30 00:00:00</view>
|
||||
<view v-if="concentrationList.length>0" class="top">{{concentrationList[0].end_date}}</view>
|
||||
<view class="bottom">
|
||||
<view class="b_item">
|
||||
<view v-for="(item, index) in concentrationList" :key="index" class="item_info flexWrap">
|
||||
<view class="left">{{item.stat_item}}</view>
|
||||
<view class="right">
|
||||
<view class="bili">49.56%</view>
|
||||
<view class="shengjiang" :class="{action : index % 2 == 0}">
|
||||
<image
|
||||
:src="index % 2 == 0 ? '/pagesStock/static/icon/upArrow.png' : '/pagesStock/static/icon/downArrow.png'"
|
||||
mode="widthFix"></image>0.35%
|
||||
<view class="b_item flexWrap">
|
||||
<view v-for="(item, index) in concentrationList" :key="index" class="item_info flex">
|
||||
<view class="left flex1">{{item.stat_item}}</view>
|
||||
<view class="right flex">
|
||||
<view class="bili">{{item.holding_ratio.toFixed(2)}}%</view>
|
||||
<view v-if="item.ratio_change!=0" :class="'shengjiang flex '+(getRateUpOrDown(item.ratio_change)?'down':'up')" >
|
||||
<image v-if="getRateUpOrDown(item.ratio_change)" class="icon" src="/pagesStock/static/icon/downArrow.png"
|
||||
mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/pagesStock/static/icon/upArrow.png" mode="widthFix"></image>
|
||||
<view>{{getRateStr(item.ratio_change)}}%</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view style="width: 15rpx;"></view>
|
||||
<view class="b_item">
|
||||
<view v-for="(item, index) in 4" class="item_info">
|
||||
<view class="left">
|
||||
前1大流通股东
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="bili">49.56%</view>
|
||||
<view v-if="0" class="shengjiang" :class="{action : index % 2 == 0}">
|
||||
<image
|
||||
:src="index % 2 == 0 ? '/pagesStock/static/icon/upArrow.png' : '/pagesStock/static/icon/downArrow.png'"
|
||||
mode="widthFix"></image>0.35%
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex">
|
||||
<view class="title">十大股东</view>
|
||||
</view>
|
||||
|
||||
<view class="gudong">
|
||||
<view class="back">
|
||||
<view class="top action">
|
||||
@@ -72,7 +56,7 @@
|
||||
</view>
|
||||
<view v-for="(item, index) in shareholdersList" :key="index" class="top" :class="{action: index % 2 == 1}">
|
||||
<view class="child">{{item.shareholder_name}}</view>
|
||||
<view class="child">{{item.shareholder_type}}</view>
|
||||
<view class="child">{{item.shareholder_type?item.shareholder_type:'-'}}</view>
|
||||
<view class="child" style="text-align: center;">{{getNumStr(item.holding_shares)}}股</view>
|
||||
<view class="child" style="color: #3E87CF; font-weight: bold; text-align: center;">{{item.total_share_ratio}}%</view>
|
||||
<view class="nature">{{item.share_nature}}</view>
|
||||
@@ -83,7 +67,6 @@
|
||||
<view class="flex">
|
||||
<view class="title">十大流通股东 </view>
|
||||
</view>
|
||||
|
||||
<view class="gudong">
|
||||
<view class="back">
|
||||
<view class="top action">
|
||||
@@ -107,19 +90,20 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getNumStr } from '@/utils/util';
|
||||
import { getNumStr, getRateStr, getRateUpOrDown } from '@/utils/util';
|
||||
|
||||
export default {
|
||||
name: "gqjg-view",
|
||||
data() {
|
||||
return {
|
||||
getNumStr:getNumStr
|
||||
|
||||
getNumStr:getNumStr,
|
||||
getRateUpOrDown:getRateUpOrDown,
|
||||
getRateStr:getRateStr
|
||||
};
|
||||
},
|
||||
props:{
|
||||
actualControlInfo:Object, //实际控制人信息
|
||||
concentrationList:[], //股权集中度列表
|
||||
concentrationList:Array, //股权集中度列表
|
||||
shareholdersList:Array, //十大股东列表
|
||||
circulatingShareholdersList:Array, //十大流通股东列表
|
||||
competitivePositionInfo:Object, //竞争地位信息
|
||||
@@ -211,25 +195,17 @@
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
|
||||
.b_item {
|
||||
flex: 1;
|
||||
|
||||
.item_info {
|
||||
margin: 15rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
margin: 15rpx 0;
|
||||
margin-right: 15rpx;
|
||||
width: calc((100% - 15rpx)/2);
|
||||
.left {
|
||||
color: #666666;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
|
||||
.right {
|
||||
height: 35rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 20rpx;
|
||||
|
||||
.bili {
|
||||
@@ -239,25 +215,31 @@
|
||||
|
||||
.shengjiang {
|
||||
margin-left: 10rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 5rpx;
|
||||
padding: 0 5rpx;
|
||||
height: 30rpx;
|
||||
border-radius: 5rpx;
|
||||
background-color: #C6F6D5;
|
||||
color: #345423;
|
||||
font-size: 18rpx;
|
||||
|
||||
image {
|
||||
.icon {
|
||||
width: 11rpx;
|
||||
height: 25rpx;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
&.action {
|
||||
background-color: #FFDFE1;
|
||||
color: #EC3440;
|
||||
}
|
||||
}
|
||||
.shengjiang.up
|
||||
{
|
||||
background-color: #FFDFE1;
|
||||
color: #EC3440;
|
||||
}
|
||||
.shengjiang.down
|
||||
{
|
||||
background-color: #C6F6D5;
|
||||
color: #345423;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item_info:nth-child(2n)
|
||||
{
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
99
pagesStock/components/gsxx-view/gsxx-view.vue
Normal file
@@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<view v-if="stockBasicInfo" class="businessInfoList">
|
||||
<view class="section">工商信息</view>
|
||||
<view class="infoC">
|
||||
<view class="infoItem flex">
|
||||
<view class="title">统一信用代码</view>
|
||||
<view class="content code flex1 rightAlign">{{stockBasicInfo.credit_code}}</view>
|
||||
</view>
|
||||
<view class="infoItem flex">
|
||||
<view class="title">公司规模</view>
|
||||
<view class="content flex1 rightAlign">{{stockBasicInfo.company_size}}</view>
|
||||
</view>
|
||||
<view class="infoItem flex">
|
||||
<view class="title">注册地址</view>
|
||||
<view class="content flex1 rightAlign">{{stockBasicInfo.reg_address}}</view>
|
||||
</view>
|
||||
<view class="infoItem flex">
|
||||
<view class="title">办公地址</view>
|
||||
<view class="content flex1 rightAlign">{{stockBasicInfo.office_address}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="section">服务机构</view>
|
||||
<view class="infoC">
|
||||
<view class="title infoItem">会计师事务所</view>
|
||||
<view class="content infoItem">{{stockBasicInfo.accounting_firm}}</view>
|
||||
<view class="title infoItem">律师事务所</view>
|
||||
<view class="content infoItem">{{stockBasicInfo.law_firm}}</view>
|
||||
</view>
|
||||
<view class="section">主营业务</view>
|
||||
<view class="infoC mainBussiness">
|
||||
<text class="title">{{stockBasicInfo.main_business}}</text>
|
||||
</view>
|
||||
<view class="section">经营范围</view>
|
||||
<view class="infoC">
|
||||
<text class="title">{{stockBasicInfo.business_scope}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:"gsxx-view",
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
props:{
|
||||
stockBasicInfo:Object
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.businessInfoList {
|
||||
padding: 0 20rpx;
|
||||
|
||||
.section {
|
||||
line-height: 72rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #2B2B2B;
|
||||
}
|
||||
|
||||
.infoC {
|
||||
background-color: #FAFAFC;
|
||||
border-radius: 10rpx;
|
||||
padding: 12rpx 20rpx;
|
||||
|
||||
.infoItem {
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.content {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #2A2A2A;
|
||||
}
|
||||
|
||||
.content.code {
|
||||
color: #BB8520;
|
||||
}
|
||||
|
||||
.content.rightAlign {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.infoC.mainBussiness {
|
||||
padding: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -6,15 +6,15 @@
|
||||
<view style="display: flex; align-items: center; justify-content: center; width: 62rpx;">
|
||||
<image style="width: 25rpx; height: 24rpx;" src="/pagesStock/static/icon/news-search.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<input style="flex: 1; height: 100%; font-size: 22rpx; color: #999; margin-right: 20rpx;" type="text" placeholder="搜索相关新闻..." />
|
||||
<input style="flex: 1; height: 100%; font-size: 22rpx; color: #999; margin-right: 20rpx;" type="text" v-model="keywords" placeholder="搜索相关新闻..." confirm-type="search" @confirm="clickSearch()"/>
|
||||
</view>
|
||||
|
||||
<view class="newsList">
|
||||
<view class="item" style="border: 1rpx solid #E7E7E7; border-radius: 10rpx; padding: 0 27rpx; margin: 20rpx 0;" v-for="(item,index) in newsList" :key="index">
|
||||
<view class="item" style="border: 1rpx solid #E7E7E7; border-radius: 10rpx; padding: 0 27rpx; margin: 20rpx 0;" v-for="(item,index) in newsList" :key="index" @click="clickNewsItem(item)">
|
||||
<view style="color: #2B2B2B; font-size: 26rpx; font-weight: bold; margin-top: 20rpx;">{{item.title}}</view>
|
||||
<view style="display: flex; align-items: center; color: #999999; font-size: 22rpx; font-weight: 400;">
|
||||
<image style="width: 20rpx; height: 20rpx; margin-right: 5rpx;" src="/pagesStock/static/icon/newsTime.png" mode="widthFix"></image>
|
||||
<text>2025/12/16</text>
|
||||
<text>{{getLocalDate(item.created_at)}}</text>
|
||||
<text style="margin: 10rpx;">|</text>
|
||||
<image style="width: 18rpx; height: 13rpx; margin-right: 5rpx;" src="/pagesStock/static/icon/newsEyes.png" mode="widthFix"></image>
|
||||
<text>{{item.view_count}}</text>
|
||||
@@ -26,7 +26,7 @@
|
||||
<view class="labelList flexWrap">
|
||||
<view class="label eventType">{{item.event_type}}</view>
|
||||
<view class="label investScore">投资分:{{item.invest_score}}</view>
|
||||
<view v-for="(item, index) in ['C级', '金融监管', '资管行业', '自律管理']" style="background-color: #FFFAF0; border-radius: 3rpx; padding: 2rpx 10rpx; overflow: hidden; font-size: 18rpx; color: #E9AE3E; font-weight: 400; margin-right: 10rpx;">{{item}}</view>
|
||||
<view v-for="(kitem, kindex) in item.keywords" :key="kindex" style="background-color: #FFFAF0; border-radius: 3rpx; padding: 2rpx 10rpx; overflow: hidden; font-size: 18rpx; color: #E9AE3E; font-weight: 400; margin-right: 10rpx;">{{kitem}}</view>
|
||||
</view>
|
||||
|
||||
<view style="margin: 20rpx 0; font-size: 22rpx; color: #71675D; font-weight: 500;">{{item.description}}</view>
|
||||
@@ -50,7 +50,7 @@
|
||||
</template>
|
||||
|
||||
<template v-if="showType == 1">
|
||||
<view style="padding: 20rpx;" v-for="(item,index) in announcementList" :key="index">
|
||||
<view style="padding: 20rpx;" v-for="(item,index) in announcementList" :key="index" @click="clickAnnouncementItem(item)">
|
||||
<view style="border: 1rpx solid #E7E7E7; border-radius: 10rpx; padding: 0 27rpx; margin: 20rpx 0; display: flex; align-items: center;">
|
||||
<view style="flex: 1;">
|
||||
<view style="color: #2B2B2B; font-size: 26rpx; font-weight: bold; margin-top: 20rpx;">{{item.title}}</view>
|
||||
@@ -71,15 +71,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getChgRateStr, getRateUpOrDown } from '@/utils/util';
|
||||
import { getChgRateStr, getLocalDate, getRateUpOrDown } from '@/utils/util';
|
||||
|
||||
export default {
|
||||
name:"news-view",
|
||||
data() {
|
||||
return {
|
||||
showType: 0,
|
||||
keywords:'', //搜索关键字
|
||||
getChgRateStr:getChgRateStr,
|
||||
getRateUpOrDown:getRateUpOrDown
|
||||
getRateUpOrDown:getRateUpOrDown,
|
||||
getLocalDate:getLocalDate
|
||||
};
|
||||
},
|
||||
props: {// 0 新闻动态 1 公司公告
|
||||
@@ -89,14 +91,33 @@
|
||||
},
|
||||
watch:{
|
||||
type:{
|
||||
handler(newVal, oldVal)
|
||||
handler(newVal)
|
||||
{
|
||||
this.showType = newVal
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**
|
||||
* 点击搜索
|
||||
*/
|
||||
clickSearch() {
|
||||
this.$emit('search',this.keywords)
|
||||
},
|
||||
/**
|
||||
* 点击查看新闻动态
|
||||
* @param {Object} item
|
||||
*/
|
||||
clickNewsItem(item) {
|
||||
this.$emit('newsDetails',item)
|
||||
},
|
||||
/**
|
||||
* 点击查看公司公告
|
||||
* @param {Object} item
|
||||
*/
|
||||
clickAnnouncementItem(item) {
|
||||
this.$emit('announcementDetails',item)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,44 +1,42 @@
|
||||
<template>
|
||||
<view class="ywjg_list">
|
||||
<view>
|
||||
<block v-for="(item,index) in businessStructureList" :key="index"></block>
|
||||
<view style="margin: 25rpx 20rpx; color: #2B2B2B; font-size: 28rpx; font-weight: bold;">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view v-for="(child, row) in item.list" :key="row" class="ywjg_item_1">
|
||||
<view style="margin: 25rpx 20rpx; color: #2B2B2B; font-size: 28rpx; font-weight: bold;">业务结构分析</view>
|
||||
<view v-for="(item, index) in businessStructureList" :key="index" class="ywjg_item_1">
|
||||
<view style="display: flex; align-items: center;">
|
||||
<view style="font-size: 28rpx; font-weight: bold; margin-right: 10rpx;">
|
||||
{{child.title}}
|
||||
{{item.business_name}}
|
||||
</view>
|
||||
<view v-if="child.is_hexin"
|
||||
<view v-if="item.is_hexin"
|
||||
style="background-color: #F2C369; border-radius: 5rpx; font-size: 20rpx; padding: 0 5rpx;">
|
||||
核心业务</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center; justify-content: space-between; font-weight: 500;">
|
||||
<view style="display: flex; align-items: center; color: #F2C369; font-size: 20rpx;">
|
||||
<view style="border: 1rpx solid #F2C369; border-radius: 5rpx; padding: 0 5rpx;">
|
||||
营收占比:{{child.yszb}}%</view>
|
||||
<view
|
||||
style="border: 1rpx solid #F2C369; border-radius: 5rpx; padding: 0 5rpx; margin-left: 10rpx;">
|
||||
毛利率:{{child.mlv}}%</view>
|
||||
<view class="flex between" style="font-weight: 500;">
|
||||
<view class="flex" style="color: #F2C369; font-size: 20rpx;">
|
||||
<view style="border: 1rpx solid #F2C369; border-radius: 5rpx; padding: 0 10rpx;">
|
||||
营收占比:{{item.financial_metrics.revenue_ratio}}%</view>
|
||||
<view v-if="item.financial_metrics.gross_margin"
|
||||
style="border: 1rpx solid #F2C369; border-radius: 5rpx; padding: 0 10rpx; margin-left: 10rpx;">
|
||||
毛利率:{{item.financial_metrics.gross_margin}}%</view>
|
||||
<view v-else
|
||||
style="border: 1rpx solid #F2C369; border-radius: 5rpx; padding: 0 10rpx; margin-left: 10rpx;">
|
||||
毛利率:-</view>
|
||||
</view>
|
||||
<view>
|
||||
<view style="color: #999999; font-size: 24rpx;">营业收入</view>
|
||||
<view style="font-weight: bold; font-size: 30rpx; color: #BB8520; margin-top: 10rpx;">
|
||||
{{child.yysr > 10000 ? child.yysr / 10000 + '亿' : child.yysr + '万'}}元
|
||||
</view>
|
||||
<view style="font-weight: bold; font-size: 30rpx; color: #BB8520; margin-top: 10rpx;">{{item.revenue}}{{item.revenue_unit}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;">
|
||||
<view
|
||||
style="color: white; display: flex; align-items: center; justify-content: center; padding: 5rpx 10rpx;font-size: 20rpx; border-radius: 5rpx;"
|
||||
:style="{backgroundColor: child.zz > 0 ? '#EC3440' : '#345423'}">增长:
|
||||
{{child.zz > 0 ? '+' + child.zz : child.zz}}%
|
||||
<view style="display: flex;">
|
||||
<view v-if="item.growth_metrics.revenue_growth" :class="'growthRate '+(getRateUpOrDown(item.growth_metrics.revenue_growth)?'down':'up')">
|
||||
增长:{{item.growth_metrics.revenue_growth}}%
|
||||
</view>
|
||||
<view v-else class="growthRate down">增长:-</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin: 25rpx 20rpx; color: #2B2B2B; font-size: 28rpx; font-weight: bold;">业务板块详情</view>
|
||||
<view style="font-weight: 500;">
|
||||
<view v-for="(item,index) in businessSegmentList" :key="item"
|
||||
<view v-for="(item,index) in businessSegmentList" :key="index"
|
||||
style="background-color: #FAFAFC; color: #2B2B2B; font-size: 22rpx; margin: 20rpx; background-color: #FAFAFC; border-radius: 10rpx; padding: 25rpx 20rpx;">
|
||||
<view style="font-size: 24rpx;">{{item.segment_name}}</view>
|
||||
<view style="color: #BB8520; font-weight: bold; margin: 10rpx 0;">业务描述</view>
|
||||
@@ -53,18 +51,21 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
import { getRateUpOrDown } from '@/utils/util';
|
||||
|
||||
export default {
|
||||
name: "ywjg-view",
|
||||
data() {
|
||||
return {
|
||||
|
||||
getRateUpOrDown:getRateUpOrDown
|
||||
};
|
||||
|
||||
},
|
||||
props:{
|
||||
businessStructureList:Array, //业务结构分析
|
||||
businessSegmentList:Array //业务板块详情
|
||||
businessSegmentList:Array ,//业务板块详情
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -84,7 +85,22 @@
|
||||
background-color: #FAFAFC;
|
||||
border-radius: 10rpx;
|
||||
padding: 25rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
.growthRate
|
||||
{
|
||||
padding: 0 10rpx;
|
||||
line-height: 30rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 20rpx;
|
||||
color: white;
|
||||
}
|
||||
.growthRate.up
|
||||
{
|
||||
background-color: #EC3440;
|
||||
}
|
||||
.growthRate.down
|
||||
{
|
||||
background-color: #345423;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
385
pagesStock/components/zlfx-view/zlfx-view.vue
Normal file
@@ -0,0 +1,385 @@
|
||||
<template>
|
||||
<view class="strategicAnalysisList">
|
||||
<view class="section">核心定位</view>
|
||||
<view v-if="qualitativeAnalysisInfo" class="corePositionC">{{qualitativeAnalysisInfo.core_positioning.one_line_intro}}</view>
|
||||
<view class="section">投资亮点</view>
|
||||
<view v-if="qualitativeAnalysisInfo" class="corePositionC">{{qualitativeAnalysisInfo.core_positioning.investment_highlights}}</view>
|
||||
<!-- <view class="highlightsList">
|
||||
<view class="item flex">
|
||||
<image class="icon" src="" mode="widthFix"></image>
|
||||
<view class="flex1">
|
||||
<view class="title">综合金融优势</view>
|
||||
<view class="content">背靠平安集团,客户资源共享和交叉销售带来持续增长动力</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="section">商业模式</view>
|
||||
<view v-if="qualitativeAnalysisInfo" class="corePositionC">{{qualitativeAnalysisInfo.core_positioning.business_model_desc}}</view>
|
||||
<!-- <view class="infoC">
|
||||
<view class="title">零售银行核心驱动</view>
|
||||
<view class="content">以零售银行业务为核心驱动,依托平安集团综合金融平台,构建智能化、移动化、综合化三位一体发展模式。</view>
|
||||
</view>
|
||||
<view class="infoC">
|
||||
<view class="title">科技赋能转型</view>
|
||||
<view class="content">通过科技赋能实现业务流程数字化,降本增效的同时提升客户体验。</view>
|
||||
<view class="labelList flexWrap">
|
||||
<view class="labelC flex">
|
||||
<image class="icon" src="/pagesStock/static/icon/existStatus.png" mode="widthFix">
|
||||
</image>
|
||||
<view>AI应用深化</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="infoC">
|
||||
<view class="title">对公业务聚焦</view>
|
||||
<view class="content">聚焦供应链金融和产业互联网,服务实体经济高质量发展。</view>
|
||||
</view>
|
||||
<view class="section">战略分析</view>
|
||||
<view v-if="qualitativeAnalysisInfo" class="infoC">
|
||||
<view class="title">战略方向</view>
|
||||
<view class="content">{{qualitativeAnalysisInfo.strategy.strategy_description}}</view>
|
||||
</view>
|
||||
<view v-if="qualitativeAnalysisInfo" class="infoC">
|
||||
<view class="title">战略举措</view>
|
||||
<view class="content">{{qualitativeAnalysisInfo.strategy.strategic_initiatives}}</view>
|
||||
</view> -->
|
||||
|
||||
<view class="section flex">
|
||||
<view>竞争地位分析</view>
|
||||
<view class="industryRankC flex" @click="clickIndustryRank()">
|
||||
<image class="icon" src="/pagesStock/static/icon/industryRank.png" mode="widthFix">
|
||||
</image>
|
||||
<view v-if="industryRankInfo">行业排名 {{industryRankInfo.industry_rank}}/{{industryRankInfo.total_companies}}</view>
|
||||
<!-- <image src="/arrow" mode=""></image> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="subSection">主要竞争对手</view>
|
||||
<view class="mainCompetitorList flexWrap">
|
||||
<view class="item flex" v-for="(item,index) in mainCompetitorsList" :key="index">
|
||||
<image class="icon" src="/pagesStock/static/icon/existStatus.png" mode="widthFix"></image>
|
||||
<view>{{item}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="scoreList">
|
||||
<view :class="'item flex '+item.color" v-for="(item,index) in scoreList" :key="index">
|
||||
<image class="icon" :src="item.icon" mode="widthFix"></image>
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="progressBgC relative flex1">
|
||||
<view :class="'progress absolute '+item.color" :style="'width: '+item.score+'%;'"></view>
|
||||
</view>
|
||||
<view class="score">{{item.score}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width:660rpx; height:500rpx">
|
||||
<l-echart ref="chartRef"></l-echart>
|
||||
</view>
|
||||
<view v-if="competitivePositionInfo" class="infoC">
|
||||
<view class="title">竞争优势</view>
|
||||
<view class="content">{{competitivePositionInfo.analysis.competitive_advantages}}</view>
|
||||
</view>
|
||||
<view v-if="competitivePositionInfo" class="infoC">
|
||||
<view class="title">竞争劣势</view>
|
||||
<view class="content">{{competitivePositionInfo.analysis.competitive_disadvantages}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const echarts = require('../../../uni_modules/lime-echart/static/echarts.min.js');
|
||||
|
||||
export default {
|
||||
name:"zlfx-view",
|
||||
data() {
|
||||
return {
|
||||
option:{
|
||||
title: {
|
||||
show:false
|
||||
},
|
||||
legend: {
|
||||
show:false
|
||||
},
|
||||
tooltip:{
|
||||
show:true,
|
||||
triggerOn:'mousemove',
|
||||
confine:true,
|
||||
},
|
||||
radar: {
|
||||
indicator: [
|
||||
{ name: '市场地位', max: 100 },
|
||||
{ name: '技术实力', max: 100 },
|
||||
{ name: '品牌价值', max: 100 },
|
||||
{ name: '运营效率', max: 100 },
|
||||
{ name: '财务健康', max: 100 },
|
||||
{ name: '创新能力', max: 100 },
|
||||
{ name: '风险控制', max: 100 },
|
||||
{ name: '成长潜力', max: 100 }
|
||||
],
|
||||
shape: 'polygon',
|
||||
splitNumber: 5,
|
||||
axisName: {
|
||||
color: '#54555A'
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: ['#CFD2D7']
|
||||
}
|
||||
},
|
||||
splitArea: {
|
||||
areaStyle:{
|
||||
color:['#F4F6FA','white']
|
||||
}
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#CFD2D7'
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'Beijing',
|
||||
type: 'radar',
|
||||
lineStyle: {
|
||||
width:1
|
||||
},
|
||||
data: [],
|
||||
symbol: 'circle',
|
||||
symbolSize: 4,
|
||||
label:{
|
||||
show:true
|
||||
},
|
||||
itemStyle: {
|
||||
color: '#5070DD'
|
||||
},
|
||||
areaStyle: {
|
||||
opacity: 0.1
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
};
|
||||
},
|
||||
props:{
|
||||
qualitativeAnalysisInfo:Object, //定性分析
|
||||
competitivePositionInfo:Object, //竞争地位信息
|
||||
mainCompetitorsList:Array, //主要竞争对手
|
||||
industryRankInfo:Object, //行业排名数据
|
||||
scoreList:Array, //
|
||||
data:Array,
|
||||
},
|
||||
watch:{
|
||||
data(newValue)
|
||||
{
|
||||
this.option.series[0].data = newValue
|
||||
this.init()
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async init() {
|
||||
// chart 图表实例不能存在data里
|
||||
const chart = await this.$refs.chartRef.init(echarts);
|
||||
// chart.on('click',function (params) {
|
||||
// console.log(params)
|
||||
// })
|
||||
console.log(chart)
|
||||
chart.setOption(this.option)
|
||||
},
|
||||
clickIndustryRank()
|
||||
{
|
||||
this.$emit('rank')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.strategicAnalysisList {
|
||||
padding: 0 20rpx;
|
||||
.section {
|
||||
line-height: 72rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #2B2B2B;
|
||||
|
||||
.industryRankC {
|
||||
margin-left: 10rpx;
|
||||
padding: 0 12rpx;
|
||||
line-height: 38rpx;
|
||||
border: solid 1rpx #F2C369;
|
||||
border-radius: 19rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: #F3C368;
|
||||
|
||||
.icon {
|
||||
margin-right: 5rpx;
|
||||
width: 17rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.corePositionC {
|
||||
background-color: #FAFAFC;
|
||||
padding: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #2A2A2A;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.highlightsList {
|
||||
.item {
|
||||
background-color: #FAFAFC;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
|
||||
.icon {
|
||||
width: 81rpx;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.content {
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: #2A2A2A;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.infoC {
|
||||
background-color: #FAFAFC;
|
||||
border-radius: 10rpx;
|
||||
padding: 12rpx 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.infoItem {
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #2A2A2A;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-top: 10rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.content.code {
|
||||
color: #BB8520;
|
||||
}
|
||||
|
||||
.content.rightAlign {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.labelList {
|
||||
margin-top: 10rpx;
|
||||
|
||||
.labelC {
|
||||
background-color: #FFF7E9;
|
||||
margin: 0 12rpx 12rpx 0;
|
||||
padding: 0 10rpx;
|
||||
line-height: 38rpx;
|
||||
border: solid 1rpx #F2C369;
|
||||
border-radius: 20rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #F3C368;
|
||||
|
||||
.icon {
|
||||
margin-right: 3rpx;
|
||||
width: 16rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.subSection {
|
||||
line-height: 60rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #2A2A2A;
|
||||
}
|
||||
|
||||
.mainCompetitorList {
|
||||
.item {
|
||||
background-color: #FFF7E9;
|
||||
margin: 0 20rpx 20rpx 0;
|
||||
padding: 0 16rpx;
|
||||
line-height: 38rpx;
|
||||
border-radius: 20rpx;
|
||||
border: solid 1rpx #F2C369;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #F3C368;
|
||||
|
||||
.icon {
|
||||
margin-right: 3rpx;
|
||||
width: 16rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
.scoreList
|
||||
{
|
||||
.item
|
||||
{
|
||||
margin-bottom: 40rpx;
|
||||
font-size: 24rpx;
|
||||
.icon
|
||||
{
|
||||
margin-right: 10rpx;
|
||||
width: 24rpx;
|
||||
height: auto;
|
||||
}
|
||||
.title
|
||||
{
|
||||
margin-right: 15rpx;
|
||||
font-weight: 500;
|
||||
color: #232323;
|
||||
}
|
||||
.progressBgC
|
||||
{
|
||||
background-color: #EFEFEF;
|
||||
margin-right: 15rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 5rpx;
|
||||
.progress
|
||||
{
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 10rpx;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
.progress.blue
|
||||
{
|
||||
background: linear-gradient(90deg, #4AAFFF 0%, #1F83FD 100%);
|
||||
}
|
||||
.progress.purple
|
||||
{
|
||||
background: linear-gradient(90deg, #DD96FC 0%, #C061FD 100%);
|
||||
}
|
||||
}
|
||||
.score
|
||||
{
|
||||
font-weight: 800;
|
||||
color: #070707;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
425
pagesStock/components/zysj-view/zysj-view.vue
Normal file
@@ -0,0 +1,425 @@
|
||||
<template>
|
||||
<view>
|
||||
<block v-if="stockInfo">
|
||||
<view class="flex"
|
||||
style="font-size: 22rpx; color: #999999; font-weight: 500; margin: 20rpx; padding: 20rpx; box-sizing: border-box ;border: 1rpx solid #F5F5F5; border-radius: 10rpx;">
|
||||
<view style="width: 195rpx;">
|
||||
<view style="font-weight: bold; color: #1DB26F; font-size: 30rpx;">{{stockInfo.growth_rates.profit_growth?(getChgRateStr(stockInfo.growth_rates.profit_growth)+'%'):'-'}}</view>
|
||||
<view style="margin-top: 10rpx;">利润增长</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="flex">
|
||||
<text
|
||||
style="font-weight: bold; color: #070707; font-size: 26rpx; margin-right: 10rpx;">成长能力</text>
|
||||
<text
|
||||
style="color: #A97F53; font-size: 20rpx; padding: 2rpx 5rpx; background-color: #F8F4ED; border: 1rpx solid #F1E7D8; border-radius: 3rpx;">增长动力</text>
|
||||
</view>
|
||||
<view style="margin-top: 10rpx;">
|
||||
<text>营收增长</text>
|
||||
<text style="color: #1DB26F; margin: 0 10rpx;">{{getChgRateStr(stockInfo.growth_rates.revenue_growth)}}%</text>
|
||||
<text :style="'color:'+getGrowthStatus(stockInfo.growth_rates.profit_growth).color">({{stockInfo.growth_rates.profit_growth?(getGrowthStatus(stockInfo.growth_rates.profit_growth).text):'-'}})</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex" style="font-size: 22rpx; color: #999999; font-weight: 500; margin: 20rpx; padding: 20rpx; border: 1rpx solid #F5F5F5; border-radius: 10rpx;">
|
||||
<view style="width: 195rpx;">
|
||||
<view style="font-weight: bold; color: #F59B38; font-size: 30rpx;">{{getChgRateStr(stockInfo.key_metrics.roe)}}%</view>
|
||||
<view style="margin-top: 10rpx;">ROE</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="flex">
|
||||
<text style="font-weight: bold; color: #070707; font-size: 26rpx; margin-right: 10rpx;">盈利与回报</text>
|
||||
<text style="color: #A97F53; font-size: 20rpx; padding: 2rpx 5rpx; background-color: #F8F4ED; border: 1rpx solid #F1E7D8; border-radius: 3rpx;">赚钱能力</text>
|
||||
</view>
|
||||
<view style="margin-top: 10rpx;">
|
||||
<text :style="'color: '+getROEStatus(stockInfo.key_metrics.roe).color">{{getROEStatus(stockInfo.key_metrics.roe).text}}</text>
|
||||
<text style="margin-left: 10rpx;">净利率 {{stockInfo.key_metrics.net_margin.toFixed(2)}}%|毛利率 {{stockInfo.key_metrics.gross_margin?(getChgRateStr(stockInfo.key_metrics.gross_margin)+'%'):'-'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="financialMetricsInfo" class="flex"
|
||||
style="font-size: 22rpx; color: #999999; font-weight: 500; margin: 20rpx; padding: 20rpx;border: 1rpx solid #F5F5F5; border-radius: 10rpx;">
|
||||
<view style="width: 195rpx;">
|
||||
<view style="font-weight: bold; color: #EC3440; font-size: 30rpx;">{{financialMetricsInfo.solvency.asset_liability_ratio?financialMetricsInfo.solvency.asset_liability_ratio.toFixed(2):'-'}}%</view>
|
||||
<view style="margin-top: 10rpx;">资产负债率</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="flex">
|
||||
<text style="font-weight: bold; color: #070707; font-size: 26rpx; margin-right: 10rpx;">风险与运营</text>
|
||||
<text style="color: #A97F53; font-size: 20rpx; padding: 2rpx 5rpx; background-color: #F8F4ED; border: 1rpx solid #F1E7D8; border-radius: 3rpx;">安全边际</text>
|
||||
</view>
|
||||
<view style="margin-top: 10rpx;">
|
||||
<text :style="'color: '+(getDebtStatusText(financialMetricsInfo.solvency.asset_liability_ratio).color)">{{getDebtStatusText(financialMetricsInfo.solvency.asset_liability_ratio).text}}</text>
|
||||
<text style="margin-left: 10rpx;">流动比率 {{financialMetricsInfo.solvency.current_ratio?financialMetricsInfo.solvency.current_ratio.toFixed(2):'-'}}|研发费用率 {{financialMetricsInfo.expense_ratios.rd_expense_ratio}}%</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view style="text-align: center; font-size: 26rpx; color: #2B2B2B; font-weight: bold; margin: 20rpx;">
|
||||
营收与利润趋势</view>
|
||||
<view style="height: 400rpx;">
|
||||
<l-echart ref="chartRef1"></l-echart>
|
||||
</view>
|
||||
<view style="text-align: left; font-size: 26rpx; color: #2B2B2B; font-weight: bold; margin: 20rpx;">主营业务
|
||||
</view>
|
||||
<view style="height: 400rpx;">
|
||||
<l-echart ref="chartRef2"></l-echart>
|
||||
</view>
|
||||
<view style="text-align: left; font-size: 26rpx; color: #2B2B2B; font-weight: bold; margin: 20rpx;">
|
||||
主营业务明细与历史对比</view>
|
||||
<block v-if="productClassificationList.length>0">
|
||||
<view class="mainBusinessC flex">
|
||||
<view class="businessList">
|
||||
<view class="heading">业务</view>
|
||||
<view class="list">
|
||||
<view class="item flex" v-for="(item, index) in productClassificationList[0].products" :key="index">
|
||||
{{item.content}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-x class="dataC flex1">
|
||||
<view class="headingList">
|
||||
<view class="heading">
|
||||
<view class="flexColumnCenter">
|
||||
<view>毛利率</view>
|
||||
<view>({{productClassificationList[0].report_type}})</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="heading">
|
||||
<view class="flexColumnCenter">
|
||||
<view>利润</view>
|
||||
<view>({{productClassificationList[0].report_type}})</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-for="(item,index) in productClassificationList" :key="index">
|
||||
<view class="heading">
|
||||
<view class="flexColumnCenter">
|
||||
<view>营收</view>
|
||||
<view>({{item.report_type}})</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="dataList" >
|
||||
<view class="dataItem" v-for="(item, index) in productClassificationList[0].products" :key="index">
|
||||
<view class="rowItem">{{item.profit_margin?(item.profit_margin.toFixed(2)+'%'):'-'}}</view>
|
||||
<view class="rowItem">{{item.profit?(getNumStr(item.profit)):'-'}}</view>
|
||||
<view class="rowItem" v-for="(pitem,pindex) in productClassificationList" :key="pindex">{{getTableRevenue(item,pitem)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</block>
|
||||
<view style="height: 80rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getChgRateStr, getNumStr } from '@/utils/util.js';
|
||||
const echarts = require('../../../uni_modules/lime-echart/static/echarts.min.js');
|
||||
|
||||
export default {
|
||||
name: "zysj-view",
|
||||
data() {
|
||||
return {
|
||||
option1:{
|
||||
legend:{
|
||||
show:true,
|
||||
data:['营业收入','净利润']
|
||||
},
|
||||
grid:{
|
||||
left:'2%',
|
||||
right:'2%',
|
||||
top:'5%',
|
||||
bottom:'30%'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: [],
|
||||
axisLabel:{
|
||||
// interval:0
|
||||
}
|
||||
},
|
||||
yAxis: [{
|
||||
type: 'value',
|
||||
name:'营收(亿)',
|
||||
position:'left',
|
||||
alignTicks:true,
|
||||
axisLine:{
|
||||
onZero:false
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name:'利润(亿)',
|
||||
position:'right',
|
||||
alignTicks:true,
|
||||
axisLine:{
|
||||
onZero:false
|
||||
}
|
||||
}
|
||||
],
|
||||
// dataZoom:[{
|
||||
// type:'slider'
|
||||
// }],
|
||||
series: [
|
||||
{
|
||||
type: 'bar',
|
||||
name:'营业收入',
|
||||
data: [],
|
||||
yAxisIndex:0
|
||||
},
|
||||
{
|
||||
type: 'line',
|
||||
name:'净利润',
|
||||
data: [],
|
||||
yAxisIndex:1
|
||||
}
|
||||
]
|
||||
},
|
||||
option2:{
|
||||
title:{
|
||||
text:'',
|
||||
textStyle:{
|
||||
fontSize:12
|
||||
}
|
||||
},
|
||||
legend:{
|
||||
show:true
|
||||
},
|
||||
grid:{
|
||||
left:0,
|
||||
right:0,
|
||||
top:'5%',
|
||||
bottom:'5%'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: [],
|
||||
type: 'pie',
|
||||
center:['50%','50%'],
|
||||
label:{
|
||||
formatter:"{d}%"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
getChgRateStr:getChgRateStr,
|
||||
getNumStr:getNumStr
|
||||
};
|
||||
},
|
||||
props: {
|
||||
stockInfo:Object,
|
||||
financialMetricsInfo:Object,
|
||||
barCategoryList:Array,
|
||||
barList:Array,
|
||||
lineList:Array, //折线图数据
|
||||
productClassificationList:Array
|
||||
},
|
||||
watch:{
|
||||
barCategoryList(newValue){
|
||||
this.option1.xAxis.data = newValue
|
||||
},
|
||||
barList(newValue){
|
||||
this.option1.series[0].data = newValue
|
||||
this.barLineInit()
|
||||
},
|
||||
lineList(newValue){
|
||||
this.option1.series[1].data = newValue
|
||||
this.barLineInit()
|
||||
},
|
||||
productClassificationList(newValue) {
|
||||
let data = newValue[0].products
|
||||
this.option2.title.text = '主营业务构成('+newValue[0].report_type+')'
|
||||
let pieList = []
|
||||
for (let item of data) {
|
||||
pieList.push({
|
||||
name:item.content,
|
||||
value:item.revenue_ratio.toFixed(2)
|
||||
})
|
||||
}
|
||||
this.option2.series[0].data = pieList
|
||||
this.pieInit()
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 柱状图,折线图初始化
|
||||
*/
|
||||
async barLineInit() {
|
||||
// chart 图表实例不能存在data里
|
||||
const chart = await this.$refs.chartRef1.init(echarts);
|
||||
// chart.on('click',function (params) {
|
||||
// console.log(params)
|
||||
// })
|
||||
let that = this
|
||||
setTimeout(function() {
|
||||
chart.setOption(that.option1)
|
||||
}, 2000);
|
||||
},
|
||||
/**
|
||||
* 饼状图初始化
|
||||
*/
|
||||
async pieInit() {
|
||||
// chart 图表实例不能存在data里
|
||||
const chart = await this.$refs.chartRef2.init(echarts);
|
||||
// chart.on('click',function (params) {
|
||||
// console.log(params)
|
||||
// })
|
||||
let that = this
|
||||
setTimeout(function() {
|
||||
chart.setOption(that.option2)
|
||||
}, 2000);
|
||||
},
|
||||
/**
|
||||
* 获取资产负债状态
|
||||
*/
|
||||
getDebtStatusText(value) {
|
||||
if (value < 40)
|
||||
return { text: '安全', color: 'green' };
|
||||
if (value < 60) return { text: '适中', color: 'gold' };
|
||||
if (value < 70) return { text: '偏高', color: 'orange' };
|
||||
return { text: '风险', color: 'red' };
|
||||
},
|
||||
/**
|
||||
* 获取营收增长状态
|
||||
*/
|
||||
getGrowthStatus(value) {
|
||||
if(value>30) return {text:'高速增长',color:'green'};
|
||||
if(value>10) return {text:'稳健增长',color:'gold'};
|
||||
if(value>0) return {text:'低速增长',color:'orange'};
|
||||
if(value>-10)return {text:'小幅下滑',color:'orange'};
|
||||
return {text:'大幅下滑',color:'red'};
|
||||
//<=-10%14.
|
||||
},
|
||||
/**
|
||||
* 获取ROE状态
|
||||
*/
|
||||
getROEStatus(value) {
|
||||
if(value>20) return {text:'优秀',color:'green'};
|
||||
if(value>15) return {text:'良好',color:'gold'};
|
||||
if(value>10) return {text:'一般',color:'orange'};
|
||||
return {text:'较低',color:'red'};
|
||||
},
|
||||
/**
|
||||
* 遍历数组找出对应的营收
|
||||
* @param {Object} pitem
|
||||
*/
|
||||
getTableRevenue(item,pitem)
|
||||
{
|
||||
|
||||
let index = -1
|
||||
for (let item1 of pitem.products) {
|
||||
if(item1.content==item.content)
|
||||
{
|
||||
index = pitem.products.indexOf(item1)
|
||||
}
|
||||
}
|
||||
if(index>-1)
|
||||
{
|
||||
return getNumStr(pitem.products[index].revenue)
|
||||
}else
|
||||
return '-'
|
||||
},
|
||||
itemClick(index) {
|
||||
uni.navigateTo({
|
||||
url: `/pagesStock/stockCenterDetails/cwDetails?index=${index}`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.table
|
||||
{
|
||||
.item
|
||||
{
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: #666666;
|
||||
}
|
||||
.item.center
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.mainBusinessC
|
||||
{
|
||||
padding: 0 20rpx;
|
||||
overflow: hidden;
|
||||
.businessList
|
||||
{
|
||||
.heading
|
||||
{
|
||||
background-color: #FAFAFC;
|
||||
padding: 0 20rpx;
|
||||
width: 160rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
}
|
||||
.list
|
||||
{
|
||||
.item
|
||||
{
|
||||
padding: 0 10rpx;
|
||||
height: 60rpx;
|
||||
font-size: 18rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
.item:nth-child(2n)
|
||||
{
|
||||
background-color: #FAFAFC;
|
||||
}
|
||||
}
|
||||
}
|
||||
.dataC
|
||||
{
|
||||
width: calc(100% - 160rpx);
|
||||
.headingList
|
||||
{
|
||||
white-space: nowrap;
|
||||
.heading
|
||||
{
|
||||
background-color: #FAFAFC;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 160rpx;
|
||||
height: 80rpx;
|
||||
font-size: 20rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
}
|
||||
.dataList
|
||||
{
|
||||
.dataItem
|
||||
{
|
||||
white-space: nowrap;
|
||||
font-size: 20rpx;
|
||||
color: #666;
|
||||
.rowItem
|
||||
{
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
width: 160rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
.dataItem:nth-child(2n)
|
||||
{
|
||||
.rowItem
|
||||
{
|
||||
background-color: #FAFAFC;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
pagesStock/static/icon/all-icon-6.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
pagesStock/static/icon/all-icon-7.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
pagesStock/static/icon/all-icon-8.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
pagesStock/static/icon/all-icon-9.png
Normal file
|
After Width: | Height: | Size: 698 B |
BIN
pagesStock/static/icon/first-icon.png
Normal file
|
After Width: | Height: | Size: 717 B |
BIN
pagesStock/static/icon/first-icon1.png
Normal file
|
After Width: | Height: | Size: 701 B |
BIN
pagesStock/static/icon/first-icon2.png
Normal file
|
After Width: | Height: | Size: 400 B |
BIN
pagesStock/static/icon/noData.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
@@ -2,64 +2,95 @@
|
||||
<view>
|
||||
<navBar leftText="板块异动明细" :hideNavBg="true"></navBar>
|
||||
<image class="topBg absolute" src="/static/image/index/conceptTopBg.png" mode="widthFix"></image>
|
||||
|
||||
<view class="stockDetailsC fixed" style="background-color: white; border-radius: 10rpx; overflow: hidden;" :style="'top:'+contentTop+'px;'">
|
||||
|
||||
<view style="height: 86rpx;">
|
||||
<scroll-view scroll-x style="white-space: nowrap; height: 100%; padding: 0 20rpx; box-sizing: border-box;" scroll-with-animation :scroll-into-view="'tab-' + activeIndex">
|
||||
<view style="display: flex; align-items: center; height: 100%; font-weight: 500;">
|
||||
<view :id="'tab-' + index" @click="activeIndex = index" v-for="(item,index) in bkList" :key="index" style="display: flex; align-items: center; justify-content: center; line-height: 85rpx; margin: 0 20rpx;" :style="{color: (activeIndex == index ? '#2B2B2B' : '#999999'), 'border-bottom': (activeIndex == index ? '1rpx solid #F2C369' : 'none'), 'font-size' : (activeIndex == index ? '28rpx' : '26rpx')}">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view style="height: 1rpx; background-color: #E7E7E7; margin: 0 20rpx;"></view>
|
||||
|
||||
<view style="height: 48rpx; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10rpx; margin: 23rpx 40rpx;">
|
||||
<view @click="filterIndex = index" style="height: 45rpx; display: flex; align-items: center; justify-content: center; color: #939393; font-size: 24rpx; font-weight: 500; border-radius: 5rpx;" :style="{color: (filterIndex == index ? '#070707' : '#939393'), 'border': (filterIndex == index ? '1rpx solid #F2C369' : '1rpx solid #E5E5E5'), 'background-color' : (filterIndex == index ? '#F2C369' : '#fff')}" v-for="(item,index) in bkFilters" :key="index">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view style="margin: 0 20rpx; background-color: #FAFAFC; display: grid; grid-template-columns: 35% 20% 20% 25%;">
|
||||
<view v-for="(item,index) in ['名称', '涨幅', '连板', '板块']" :key="index" style="font-size: 22rpx; color: #666666; padding: 0 15rpx; box-sizing: border-box; font-weight: 500; line-height: 60rpx;" :style="{'text-align' : index == 0 ? 'left' : 'center'}">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-y style="position: absolute; top: 241rpx; left: 0; right: 0; bottom: 0; font-size: 20rpx; font-weight: 500;">
|
||||
<view v-for="(item, index) in 30" style="margin: 0 20rpx; display: grid; grid-template-columns: 35% 20% 20% 25%;" :style="{'background-color': (index % 2 == 0 ? '#fff' : '#FAFAFC')}">
|
||||
<view style="display: flex; align-items: center; color: #666666; height: 60rpx;">
|
||||
<view style="display: flex; align-items: center; background-color: #FFF0E6; border-radius: 5rpx; padding: 0 10rpx; margin-left: 14rpx;">
|
||||
<image style="width: 15rpx; height: 17rpx;" src="/pagesStock/static/icon/all-icon-4.png" mode="widthFix"></image>
|
||||
<view style="color: #F97316; margin-left: 5rpx;">跟风</view>
|
||||
</view>
|
||||
<view style="margin-left: 10rpx;">康强电子</view>
|
||||
</view>
|
||||
|
||||
<view style="display: flex; align-items: center; justify-content: center;">
|
||||
<view style="font-size: 24rpx; color: #EC3440; font-weight: bold;">+10.00%</view>
|
||||
</view>
|
||||
|
||||
<view style="display: flex; align-items: center; justify-content: center;">
|
||||
<view style="color: #F3B800; padding: 0 10rpx; border-radius: 5rpx; background-color: #FFF9E6; border: 1rpx solid #F3B800; display: flex; align-items: center; justify-content: center;">2连板</view>
|
||||
</view>
|
||||
|
||||
<view style="display: flex; align-items: center; justify-content: center;">
|
||||
<view style="background-color: #F4EFFF; border-radius: 5rpx; padding: 0 10rpx; color: #8B5CF6;">芯片(封装材料)</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="stockDetailsC fixed" style="background-color: white; border-radius: 10rpx; overflow: hidden;"
|
||||
:style="'top:'+contentTop+'px;'">
|
||||
|
||||
<view style="height: 86rpx;">
|
||||
<scroll-view scroll-x
|
||||
style="white-space: nowrap; height: 100%; padding: 0 20rpx; box-sizing: border-box;"
|
||||
scroll-with-animation :scroll-into-view="'tab-' + activeIndex">
|
||||
<view style="display: flex; align-items: center; height: 100%; font-weight: 500;">
|
||||
<view :id="'tab-' + index" @click="activeIndex = index" v-for="(item,index) in bkList"
|
||||
:key="index"
|
||||
style="display: flex; align-items: center; justify-content: center; line-height: 85rpx; margin: 0 20rpx;"
|
||||
:style="{color: (activeIndex == index ? '#2B2B2B' : '#999999'), 'border-bottom': (activeIndex == index ? '1rpx solid #F2C369' : 'none'), 'font-size' : (activeIndex == index ? '28rpx' : '26rpx')}">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view style="height: 1rpx; background-color: #E7E7E7; margin: 0 20rpx;"></view>
|
||||
|
||||
|
||||
<view
|
||||
style="height: 48rpx; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10rpx; margin: 23rpx 40rpx;">
|
||||
<view @click="handleFilterChange(index)"
|
||||
style="height: 45rpx; display: flex; align-items: center; justify-content: center; color: #939393; font-size: 24rpx; font-weight: 500; border-radius: 5rpx;"
|
||||
:style="{color: (filterIndex == index ? '#070707' : '#939393'), 'border': (filterIndex == index ? '1rpx solid #F2C369' : '1rpx solid #E5E5E5'), 'background-color' : (filterIndex == index ? '#F2C369' : '#fff')}"
|
||||
v-for="(item,index) in bkFilters" :key="index">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view
|
||||
style="margin: 0 20rpx; background-color: #FAFAFC; display: grid; grid-template-columns: 35% 20% 20% 25%;">
|
||||
<view v-for="(item,index) in ['名称', '涨幅', '连板', '板块']" :key="index"
|
||||
style="font-size: 22rpx; color: #666666; padding: 0 15rpx; box-sizing: border-box; font-weight: 500; line-height: 60rpx;"
|
||||
:style="{'text-align' : index == 0 ? 'left' : 'center'}">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<scroll-view scroll-y
|
||||
style="position: absolute; top: 241rpx; left: 0; right: 0; bottom: 0; font-size: 20rpx; font-weight: 500;">
|
||||
<!-- 真实股票数据渲染 -->
|
||||
<view v-for="(item, index) in filteredStocks" :key="item.scode"
|
||||
style="margin: 0 20rpx; display: grid; grid-template-columns: 35% 20% 20% 25%;"
|
||||
:style="{'background-color': (index % 2 == 0 ? '#fff' : '#FAFAFC')}">
|
||||
<!-- 股票名称 + 角色标签 -->
|
||||
<view style="display: flex; align-items: center; color: #666666; height: 60rpx;">
|
||||
<!-- 角色标签 -->
|
||||
<view v-if="item.stockRole"
|
||||
style="display: flex; align-items: center; border-radius: 5rpx; padding: 0 10rpx; margin-left: 14rpx;"
|
||||
:style="getRoleTagStyle(item.stockRole)">
|
||||
<image v-if="item.stockRole.icon" style="width: 15rpx; height: 17rpx; margin-right: 5rpx;"
|
||||
:src="item.stockRole.icon" mode="widthFix"></image>
|
||||
<!-- <image style="width: 15rpx; height: 17rpx;" src="/pagesStock/static/icon/all-icon-4.png" mode="widthFix"></image> -->
|
||||
<view :style="{'color': item.stockRole.color}">{{item.stockRole.text}}</view>
|
||||
</view>
|
||||
<view style="margin-left: 10rpx;">{{item.sname}}</view>
|
||||
</view>
|
||||
|
||||
<!-- 涨幅(硬编码+10%) -->
|
||||
<view style="display: flex; align-items: center; justify-content: center;">
|
||||
<view style="font-size: 24rpx; color: #EC3440; font-weight: bold;">+10.00%</view>
|
||||
</view>
|
||||
|
||||
<!-- 连板数 -->
|
||||
<view style="display: flex; align-items: center; justify-content: center;">
|
||||
<view
|
||||
style="padding: 0 10rpx; border-radius: 5rpx; display: flex; align-items: center; justify-content: center;"
|
||||
:style="getBoardTagStyleByLevel(item.continuous_days)">
|
||||
{{formatBoardText(item.continuous_days)}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 核心板块(按关键词匹配颜色) -->
|
||||
<view style="display: flex; align-items: center; justify-content: center;">
|
||||
<view style="background-color: #F4EFFF; border-radius: 5rpx; padding: 0 10rpx; white-space: nowrap; max-width: 120rpx; overflow: hidden;text-overflow: ellipsis;" :style="{color: getSectorTextColor(item.core_sectors[0] || '未知板块')}">
|
||||
{{item.core_sectors[0] || '未知板块'}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
@@ -68,92 +99,329 @@
|
||||
import {
|
||||
inject
|
||||
} from 'vue'
|
||||
import {
|
||||
getBaseURL1
|
||||
} from '@/request/http.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
navH: inject('navHeight'),
|
||||
contentTop: '',
|
||||
contentTop: '',
|
||||
activeIndex: 0,
|
||||
bkList: [{
|
||||
title: '存储芯片',
|
||||
count: 8
|
||||
}, {
|
||||
title: '存储芯片',
|
||||
count: 8
|
||||
},
|
||||
{
|
||||
title: '存储芯片',
|
||||
count: 8
|
||||
},
|
||||
{
|
||||
title: '存储芯片',
|
||||
count: 8
|
||||
},
|
||||
{
|
||||
title: '存储芯片',
|
||||
count: 8
|
||||
},
|
||||
{
|
||||
title: '存储芯片',
|
||||
count: 8
|
||||
},
|
||||
{
|
||||
title: '存储芯片',
|
||||
count: 8
|
||||
},
|
||||
{
|
||||
title: '存储芯片',
|
||||
count: 8
|
||||
},
|
||||
{
|
||||
title: '存储芯片',
|
||||
count: 8
|
||||
},
|
||||
{
|
||||
title: '存储芯片',
|
||||
count: 8
|
||||
},
|
||||
{
|
||||
title: '存储芯片',
|
||||
count: 8
|
||||
},
|
||||
{
|
||||
title: '存储芯片',
|
||||
count: 8
|
||||
},
|
||||
{
|
||||
title: '存储芯片',
|
||||
count: 8
|
||||
},
|
||||
{
|
||||
title: '存储芯片',
|
||||
count: 8
|
||||
},
|
||||
{
|
||||
title: '存储芯片',
|
||||
count: 8
|
||||
},
|
||||
{
|
||||
title: '存储芯片',
|
||||
count: 8
|
||||
}
|
||||
],
|
||||
bkList: [],
|
||||
bkFilters: [
|
||||
'按涨幅',
|
||||
|
||||
'按连板数',
|
||||
'只看龙头'
|
||||
],
|
||||
filterIndex: 0
|
||||
],
|
||||
filterIndex: 0,
|
||||
selectedFullDate: '', // 年-月-日
|
||||
originData: null, // 原始接口数据
|
||||
allStocks: [], // 所有股票数据(带角色标签)
|
||||
// 角色配置
|
||||
STOCK_ROLES: {
|
||||
dragon: {
|
||||
text: '龙头',
|
||||
color: '#EC3440',
|
||||
bgColor: '#FFE8E9',
|
||||
icon: '/pagesStock/static/icon/first-icon1.png'
|
||||
},
|
||||
follow: {
|
||||
text: '跟风',
|
||||
color: '#F97316',
|
||||
bgColor: '#FFF0E6',
|
||||
icon: '/pagesStock/static/icon/first-icon2.png'
|
||||
},
|
||||
first: {
|
||||
text: '首板',
|
||||
color: '#01AB5D',
|
||||
bgColor: '#E4F9EF',
|
||||
icon: '/pagesStock/static/icon/first-icon.png'
|
||||
},
|
||||
normal: {
|
||||
text: '',
|
||||
color: '',
|
||||
bgColor: '',
|
||||
icon: ''
|
||||
}
|
||||
},
|
||||
// 连板层级样式配置(新规则)
|
||||
BOARD_LEVEL_STYLES: {
|
||||
dragon: { // 5板及以上 龙头
|
||||
|
||||
color: '#ef4444',
|
||||
bgColor: '#FFE8E9',
|
||||
borderColor: '#ef4444'
|
||||
},
|
||||
high: { // 3-4板 高位
|
||||
|
||||
color: '#f97316',
|
||||
bgColor: '#FFF0E6',
|
||||
borderColor: '#f97316'
|
||||
},
|
||||
mid: { // 2板 中位
|
||||
|
||||
color: '#eab308',
|
||||
bgColor: '#FFF9E6',
|
||||
borderColor: '#eab308'
|
||||
},
|
||||
first: { // 1板 首板
|
||||
|
||||
color: '#22c55e',
|
||||
bgColor: '#E4F9EF',
|
||||
borderColor: '#22c55e'
|
||||
}
|
||||
},
|
||||
// 板块文字颜色配置(新规则)
|
||||
SECTOR_COLOR_RULES: [
|
||||
{ keyword: '公告', color: '#D4AF37' }, // 金色
|
||||
{ keyword: '其他', color: '#9CA3AF' }, // 灰色
|
||||
{ keyword: ['AI', '人工智能', '芯片'], color: '#8B5CF6' }, // 紫色
|
||||
{ keyword: ['锂电', '电池', '新能源'], color: '#10B981' }, // 翠绿
|
||||
{ keyword: ['医药', '医疗'], color: '#EC4899' }, // 粉色
|
||||
{ keyword: ['金融', '银行'], color: '#F59E0B' }, // 橙黄
|
||||
{ keyword: ['军工', '航空'], color: '#EF4444' }, // 红色
|
||||
],
|
||||
DEFAULT_SECTOR_COLOR: '#06B6D4' // 默认 青色
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 筛选后的股票列表:按板块codes匹配 + 连板排序/筛选
|
||||
filteredStocks() {
|
||||
if (!this.originData?.stocks || !this.bkList.length) return [];
|
||||
|
||||
// 1. 获取当前选中板块的股票代码集合
|
||||
const currentBk = this.bkList[this.activeIndex];
|
||||
if (!currentBk?.codes || currentBk.codes.length === 0) return [];
|
||||
const targetCodes = new Set(currentBk.codes); // 转Set提升匹配效率
|
||||
|
||||
// 2. 从stocks中筛选出scode在targetCodes中的股票
|
||||
let stocks = this.originData.stocks.filter(stock => targetCodes.has(stock.scode));
|
||||
|
||||
// 3. 保留原有筛选/排序逻辑
|
||||
switch (this.filterIndex) {
|
||||
case 0: // 按连板数从高到低排序
|
||||
stocks.sort((a, b) => {
|
||||
const aDays = this.parseContinuousDays(a.continuous_days);
|
||||
const bDays = this.parseContinuousDays(b.continuous_days);
|
||||
return bDays - aDays;
|
||||
});
|
||||
break;
|
||||
case 1: // 只看龙头(≥2连板),并按连板数从高到低排序
|
||||
stocks = stocks.filter(stock => this.parseContinuousDays(stock.continuous_days) >= 2);
|
||||
stocks.sort((a, b) => {
|
||||
const aDays = this.parseContinuousDays(a.continuous_days);
|
||||
const bDays = this.parseContinuousDays(b.continuous_days);
|
||||
return bDays - aDays;
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
return stocks;
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(e) {
|
||||
this.activeIndex = e.index
|
||||
this.selectedFullDate = e.data
|
||||
console.log("selectedFullDate", this.selectedFullDate)
|
||||
this.contentTop = this.navH + 20 / 750 * inject('windowWidth')
|
||||
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 解析连板数
|
||||
parseContinuousDays(continuousDaysStr) {
|
||||
if (!continuousDaysStr) return 0;
|
||||
const match = continuousDaysStr.match(/(\d+)天/);
|
||||
return match ? Number(match[1]) : 0;
|
||||
},
|
||||
|
||||
// 格式化连板文本(适配新层级)
|
||||
formatBoardText(continuousDaysStr) {
|
||||
const boardDays = this.parseContinuousDays(continuousDaysStr);
|
||||
|
||||
if (boardDays === 1) return '首板'; // 1板显示首板
|
||||
if (boardDays > 1) return `${boardDays}连板`; // 2板及以上显示 X连板
|
||||
|
||||
return ''; // 无连板数时返回空
|
||||
},
|
||||
|
||||
// 获取连板标签样式(按新层级规则)
|
||||
getBoardTagStyleByLevel(continuousDaysStr) {
|
||||
const boardDays = this.parseContinuousDays(continuousDaysStr);
|
||||
let styleConfig = {};
|
||||
|
||||
if (boardDays >= 5) {
|
||||
styleConfig = this.BOARD_LEVEL_STYLES.dragon;
|
||||
} else if (boardDays >= 3 && boardDays <= 4) {
|
||||
styleConfig = this.BOARD_LEVEL_STYLES.high;
|
||||
} else if (boardDays === 2) {
|
||||
styleConfig = this.BOARD_LEVEL_STYLES.mid;
|
||||
} else if (boardDays === 1) {
|
||||
styleConfig = this.BOARD_LEVEL_STYLES.first;
|
||||
}
|
||||
|
||||
return {
|
||||
'color': styleConfig.color || '#FFFFFF',
|
||||
'background-color': styleConfig.bgColor || '#eab308',
|
||||
'border': `1rpx solid ${styleConfig.borderColor || '#eab308'}`
|
||||
};
|
||||
},
|
||||
|
||||
// 获取板块文字颜色(按关键词匹配)
|
||||
getSectorTextColor(sectorName) {
|
||||
if (!sectorName) return this.DEFAULT_SECTOR_COLOR;
|
||||
|
||||
// 遍历匹配规则
|
||||
for (const rule of this.SECTOR_COLOR_RULES) {
|
||||
if (Array.isArray(rule.keyword)) {
|
||||
// 多关键词匹配
|
||||
const isMatch = rule.keyword.some(key => sectorName.includes(key));
|
||||
if (isMatch) return rule.color;
|
||||
} else {
|
||||
// 单关键词完全匹配
|
||||
if (sectorName === rule.keyword) return rule.color;
|
||||
}
|
||||
}
|
||||
|
||||
// 无匹配返回默认色
|
||||
return this.DEFAULT_SECTOR_COLOR;
|
||||
},
|
||||
|
||||
// 获取股票角色
|
||||
getStockRole(stock, sectorStocks, sectorIndex) {
|
||||
const boardDays = this.parseContinuousDays(stock.continuous_days);
|
||||
|
||||
// 5板以上直接是龙头
|
||||
if (boardDays >= 5) {
|
||||
return this.STOCK_ROLES.dragon;
|
||||
}
|
||||
|
||||
// 首板判断:连板数为1
|
||||
if (boardDays === 1) {
|
||||
return this.STOCK_ROLES.first;
|
||||
}
|
||||
|
||||
// 跟风判断:热门板块(前3) + 2-4连板
|
||||
if (sectorIndex < 3 && boardDays >= 2 && boardDays < 5) {
|
||||
// 特殊情况:板块内涨停最早 + 3板以上 → 龙头
|
||||
const sortedByTime = [...sectorStocks].sort((a, b) =>
|
||||
(a.zt_time || "").localeCompare(b.zt_time || "")
|
||||
);
|
||||
if (sortedByTime[0]?.scode === stock.scode && boardDays >= 3) {
|
||||
return this.STOCK_ROLES.dragon;
|
||||
}
|
||||
return this.STOCK_ROLES.follow;
|
||||
}
|
||||
|
||||
// 其他:普通
|
||||
return this.STOCK_ROLES.normal;
|
||||
},
|
||||
|
||||
// 获取角色标签样式
|
||||
getRoleTagStyle(role) {
|
||||
return {
|
||||
'background-color': role.bgColor
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
// 处理板块切换
|
||||
handleTabChange(index) {
|
||||
this.activeIndex = index;
|
||||
// 切换板块后重新计算股票角色(可选)
|
||||
this.setStockRoles();
|
||||
},
|
||||
|
||||
// 处理筛选切换
|
||||
handleFilterChange(index) {
|
||||
this.filterIndex = index;
|
||||
},
|
||||
|
||||
|
||||
|
||||
// 为所有股票添加角色标签
|
||||
setStockRoles() {
|
||||
if (!this.originData || !this.originData.stocks || !this.bkList.length) return;
|
||||
this.allStocks = this.originData.stocks.map(stock => {
|
||||
// 找到股票所属板块的热度排名
|
||||
let sectorIndex = -1;
|
||||
const stockSectors = Array.isArray(stock.sector_category) ? stock.sector_category : [stock.sector_category];
|
||||
// 匹配板块列表中的位置
|
||||
this.bkList.some((bk, idx) => {
|
||||
const match = stockSectors.some(s => s.includes(bk.title));
|
||||
if (match) {
|
||||
sectorIndex = idx;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
// 获取同板块的所有股票
|
||||
const sectorStocks = this.originData.stocks.filter(s => {
|
||||
const sSectors = Array.isArray(s.sector_category) ? s.sector_category : [s.sector_category];
|
||||
return sSectors.some(ss => stockSectors.includes(ss));
|
||||
});
|
||||
// 获取股票角色
|
||||
const stockRole = this.getStockRole(stock, sectorStocks, sectorIndex);
|
||||
return {
|
||||
...stock,
|
||||
stockRole: stockRole.text ? stockRole : null
|
||||
};
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 请求接口数据(优化:动态日期+自动时间戳)
|
||||
*/
|
||||
// 请求接口数据
|
||||
async fetchData() {
|
||||
try {
|
||||
const timestamp = new Date().getTime();
|
||||
const formattedDate = this.selectedFullDate;
|
||||
const baseURL = getBaseURL1();
|
||||
const requestUrl = `${baseURL}/data/zt/daily/${formattedDate}.json?t=${timestamp}`;
|
||||
|
||||
console.log('请求URL:', requestUrl);
|
||||
const res = await uni.request({
|
||||
url: requestUrl,
|
||||
method: 'GET'
|
||||
});
|
||||
|
||||
if (res.statusCode === 200 && res.data) {
|
||||
this.originData = res.data;
|
||||
const { sector_data } = this.originData;
|
||||
|
||||
// 解析sector_data生成板块列表:剔除「其他」,格式[{title: 板块名, codes: 股票代码数组}]
|
||||
this.bkList = Object.entries(sector_data)
|
||||
.filter(([sectorName]) => sectorName !== '其他') // 去掉其他板块
|
||||
.map(([sectorName, sectorInfo]) => ({
|
||||
title: sectorName,
|
||||
codes: sectorInfo.stock_codes || [] // 取板块对应的股票代码
|
||||
}));
|
||||
|
||||
console.log('生成板块列表:', this.bkList);
|
||||
// 为股票添加角色标签
|
||||
this.setStockRoles();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '数据请求失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('请求异常:', error);
|
||||
uni.showToast({
|
||||
title: '网络异常',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -172,7 +440,7 @@
|
||||
|
||||
.stockDetailsC {
|
||||
left: 25rpx;
|
||||
right: 25rpx;
|
||||
right: 25rpx;
|
||||
width: calc(100vw - 50rpx);
|
||||
bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
@@ -1,252 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<navBar leftText="平安银行(000001)" :hideNavBg="true"></navBar>
|
||||
<image class="topBg absolute" src="/static/image/index/conceptTopBg.png" mode="widthFix"></image>
|
||||
<view class="stockDetailsC fixed" :style="'top:'+contentTop+'px;'">
|
||||
<view style="margin: 0 20rpx; height: 99rpx;">
|
||||
<scroll-view scroll-x style="white-space: nowrap;" scroll-with-animation="true"
|
||||
:scroll-into-view="'tab-' + activeIndex" show-scrollbar="false">
|
||||
<view style="display: inline-block; box-sizing: border-box;">
|
||||
<view @click="activeIndex = index" v-for="(item,index) in tabList" :key="index"
|
||||
:id="'tab-' + index" style="display: inline-block; text-align: center; line-height: 98rpx;"
|
||||
:style="{'margin-right': (index == tabList.length - 1 ? '0' : '40rpx'), color: (activeIndex == index ? '#2B2B2B' : '#999999'), 'font-size': (activeIndex == index ? '28rpx' : '26rpx'), 'border-bottom': (activeIndex == index ? '1rpx solid #F2C369' : 'none'), 'font-weight': (activeIndex == index ? 'bold' : '500')}">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view style="height: 1rpx; background-color: #E7E7E7; margin: 0 20rpx;"></view>
|
||||
|
||||
<view style="height: 84rpx; display: flex; align-items: center; margin: 0 20rpx;">
|
||||
<view style="flex: 1; display: grid; gap: 28rpx; overflow: scroll; white-space: nowrap; margin-right: 20rpx;" :style="{'grid-template-columns': `repeat(${filterList.length}, 110rpx)`}">
|
||||
<view @click="filterIndex = index" v-for="(item,index) in filterList" :key="index" style="height: 45rpx; margin-top: 30rpx; font-size: 24rpx; color: #070707; font-weight: 500; display: flex; align-items: center; justify-content: center; color: #939393; background-color: #F6F6F6; font-size: 22rpx; font-weight: 500; border-radius: 5rpx; padding: 3rpx 10rpx;" :style="{color: (filterIndex == index ? '#070707' : '#939393'), 'background-color': (filterIndex == index ? '#F2C369' : '#F6F6F6')}">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view style="color: #F2C369; font-size: 22rpx; font-weight: 500; border: 1rpx solid #F2C369; border-radius: 5rpx; padding: 0 10rpx; height: 43rpx; display: flex; align-items: center; justify-content: center;">
|
||||
<text>最近8期</text>
|
||||
<image style="width: 11rpx; height: 6rpx; margin-left: 10rpx;" src="/pagesStock/static/icon/all-down-ed.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<scroll-view scroll-y class="stockDetailsC fixed" :style="'top:'+(otherTop)+'px;'">
|
||||
<view style="display: flex; color: #666666; font-size: 20rpx; font-weight: 500; margin: 0 20rpx;">
|
||||
<view>
|
||||
<view style="height: 60rpx; background-color: #FAFAFC;"></view>
|
||||
<view v-for="(item,index) in leftList" :key="index" style="line-height: 60rpx; padding-right: 20rpx;" :style="{'background-color' : (index % 2 == 0 ? '#fff' : '#FAFAFC')}">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="flex: 1; white-space: nowrap; overflow: scroll; display: flex;">
|
||||
<view v-for="(item,index) in 8" :key="index" style="font-size: 18rpx; text-align: center;">
|
||||
<view style="padding: 0 10rpx; line-height: 60rpx; background-color: #FAFAFC;">2025Q3</view>
|
||||
<view v-for="(item,index) in leftList" :key="index" style="line-height: 60rpx;" :style="{'background-color' : (index % 2 == 0 ? '#fff' : '#FAFAFC')}">
|
||||
1.87
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
|
||||
<view class="bottomC fixed flex">
|
||||
<view class="inputC flex1">
|
||||
<input type="text" v-model="eventComment" placeholder="对比股票..." placeholder-style="color:#666"
|
||||
confirm-type="send" @confirm="sendEventComment()" />
|
||||
</view>
|
||||
<view class="contrastShareC flex">
|
||||
<view class="item">
|
||||
<image class="icon" src="/pagesStock/static/icon/contrast.png" mode="heightFix"></image>
|
||||
<view>对比</view>
|
||||
</view>
|
||||
<view class="item" @click="clickComment()">
|
||||
<image class="icon" src="/pagesStock/static/icon/optional.png" mode="heightFix"></image>
|
||||
<view>自选</view>
|
||||
</view>
|
||||
<view class="item" @click="clickFollow()">
|
||||
<image class="icon" src="/pagesStock/static/icon/share.png" mode="heightFix"></image>
|
||||
<view>分享</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
inject
|
||||
} from 'vue'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
navH: inject('navHeight'),
|
||||
contentTop: '',
|
||||
otherTop: '',
|
||||
activeIndex: 0,
|
||||
tabList: ['盈利能力', '每股指标', '成长能力', '资产负债表', '现金流量指标'],
|
||||
filterIndex: 0,
|
||||
filterList: ['全部','年报','中报','一季度','三季度'],
|
||||
|
||||
leftList: ['营收增长率%', '净利润增长率%', '扣非净利润增长率%', '归母净利润增长率%', '经营现金流增长率%', '总资产增长率%', '净资产增长率%', '固定']
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.activeIndex = e.index
|
||||
this.contentTop = this.navH + 20 / 750 * inject('windowWidth')
|
||||
this.otherTop = this.navH + 204 / 750 * inject('windowWidth')
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
page {
|
||||
background-color: #070707;
|
||||
}
|
||||
|
||||
.topBg {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.stockDetailsC {
|
||||
left: 25rpx;
|
||||
width: calc(100vw - 50rpx);
|
||||
background-color: white;
|
||||
border-radius: 10rpx 10rpx 0 0;
|
||||
overflow: hidden;
|
||||
bottom: calc(20rpx + 70rpx + 20rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.bottomC {
|
||||
background-color: black;
|
||||
padding: 20rpx 25rpx calc(20rpx + env(safe-area-inset-bottom));
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
|
||||
.inputC {
|
||||
background-color: #424143;
|
||||
margin-right: 20rpx;
|
||||
padding: 0 33rpx;
|
||||
height: 70rpx;
|
||||
border-radius: 35rpx;
|
||||
|
||||
input {
|
||||
height: 100%;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.contrastShareC {
|
||||
.item {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #FEFAF6;
|
||||
text-align: center;
|
||||
|
||||
.icon {
|
||||
margin: 0 30rpx;
|
||||
width: auto;
|
||||
height: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.industryRankPop {
|
||||
background-color: white;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
|
||||
.popTitle {
|
||||
margin: 0 20rpx;
|
||||
line-height: 100rpx;
|
||||
border-bottom: solid 1rpx #E7E7E7;
|
||||
font-size: 35rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.closeC {
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 40rpx 26rpx;
|
||||
|
||||
.icon {
|
||||
display: block;
|
||||
width: 20rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.sectionDateC {
|
||||
padding: 30rpx 26rpx;
|
||||
|
||||
.section {
|
||||
margin-right: 11rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #2B2B2B;
|
||||
}
|
||||
|
||||
.industryC {
|
||||
background-color: #FFF7E9;
|
||||
padding: 0 15rpx;
|
||||
line-height: 34rpx;
|
||||
border: solid 1rpx #F2C369;
|
||||
border-radius: 18rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: #F2C369;
|
||||
|
||||
.icon {
|
||||
margin-right: 3rpx;
|
||||
width: 16rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #71675D;
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
padding: 0 25rpx;
|
||||
|
||||
.item {
|
||||
margin: 0 20rpx 20rpx 0;
|
||||
width: calc((100% - 40rpx)/2);
|
||||
border: solid 1rpx #FCE2B2;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.item:nth-child(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.detailPopup {
|
||||
height: 70%;
|
||||
background-color: white;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
418
pagesStock/stockCenterDetails/cwDetails/cwDetails.vue
Normal file
@@ -0,0 +1,418 @@
|
||||
<template>
|
||||
<view>
|
||||
<navBar leftText="平安银行(000001)" :hideNavBg="true"></navBar>
|
||||
<image class="topBg absolute" src="/static/image/index/conceptTopBg.png" mode="widthFix"></image>
|
||||
<view class="stockDetailsC fixed" :style="'top:'+contentTop+'px;'">
|
||||
<view style="margin: 0 20rpx; height: 99rpx;">
|
||||
<scroll-view id="topCategory" scroll-x style="white-space: nowrap;" scroll-with-animation
|
||||
:scroll-left="topScrollLeft" show-scrollbar="false">
|
||||
<view style="display: inline-block;">
|
||||
<view v-for="(item,index) in tabList" :key="index"
|
||||
:id="'tab-' + index" style="display: inline-block; text-align: center; line-height: 98rpx;"
|
||||
:style="{'margin-right': (index == tabList.length - 1 ? '0' : '40rpx'), color: (activeIndex == index ? '#2B2B2B' : '#999999'), 'font-size': (activeIndex == index ? '28rpx' : '26rpx'), 'border-bottom': (activeIndex == index ? '1rpx solid #F2C369' : 'none'), 'font-weight': (activeIndex == index ? 'bold' : '500')}" @click="clickTabItem($event,index)">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view style="height: 1rpx; background-color: #E7E7E7; margin: 0 20rpx;"></view>
|
||||
<view class="flex" style="margin: 20rpx 20rpx 0;">
|
||||
<scroll-view id="filterList" class="filterList" scroll-x :scroll-left="secondScrollLeft">
|
||||
<view :class="'item flexCenter '+(filterIndex==index?'select':'')" v-for="(item,index) in filterList" :key="index" @click="clickFilterItem($event,index)">
|
||||
{{item}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="flexCenter" style="color: #F2C369; font-size: 22rpx; font-weight: 500; border: 1rpx solid #F2C369; border-radius: 5rpx; padding: 0 10rpx; height: 43rpx;" @click="clickSelectPeriod($event)">
|
||||
<text>{{periodList[periodIndex].title}}</text>
|
||||
<image style="width: 11rpx; height: 6rpx; margin-left: 10rpx;" src="/pagesStock/static/icon/all-down-ed.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y class="stockDetailsC fixed" :style="'top:'+(otherTop)+'px;'">
|
||||
<view style="display: flex; color: #666666; font-size: 20rpx; font-weight: 500; margin: 0 20rpx;">
|
||||
<view>
|
||||
<view style="height: 60rpx; background-color: #FAFAFC;"></view>
|
||||
<view v-for="(item,index) in leftList[activeIndex]" :key="index" style="line-height: 60rpx; padding-right: 20rpx;" :style="{'background-color' : (index % 2 == 0 ? '#fff' : '#FAFAFC')}">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="flex: 1; white-space: nowrap; overflow: scroll; display: flex;">
|
||||
<view v-for="(item,index) in showDataList" :key="index" style="font-size: 18rpx; text-align: center;">
|
||||
<view style="padding: 0 10rpx; line-height: 60rpx; background-color: #FAFAFC;">{{item.report_type}}</view>
|
||||
<view v-for="(litem,lindex) in leftList[activeIndex]" :key="lindex" style="line-height: 60rpx;" :style="{'background-color' : (lindex % 2 == 0 ? '#fff' : '#FAFAFC')}">
|
||||
<block v-if="activeIndex==0">
|
||||
<!-- 盈利能力 -->
|
||||
<block v-if="lindex==0">
|
||||
{{showDataList[index].profitability.roe?showDataList[index].profitability.roe.toFixed(2):'-'}}
|
||||
</block>
|
||||
<block v-if="lindex==1">
|
||||
{{showDataList[index].profitability.roe_deducted?showDataList[index].profitability.roe_deducted.toFixed(2):'-'}}
|
||||
</block>
|
||||
<block v-if="lindex==2">
|
||||
{{showDataList[index].profitability.roe_weighted?showDataList[index].profitability.roe_weighted.toFixed(2):'-'}}
|
||||
</block>
|
||||
<block v-if="lindex==3">
|
||||
{{showDataList[index].profitability.roa?showDataList[index].profitability.roa.toFixed(2):'-'}}
|
||||
</block>
|
||||
<block v-if="lindex==4">
|
||||
{{showDataList[index].profitability.gross_margin?showDataList[index].profitability.gross_margin.toFixed(2):'-'}}
|
||||
</block>
|
||||
<block v-if="lindex==5">
|
||||
{{showDataList[index].profitability.net_profit_margin?showDataList[index].profitability.net_profit_margin.toFixed(2):'-'}}
|
||||
</block>
|
||||
<block v-if="lindex==6">
|
||||
{{showDataList[index].profitability.operating_profit_margin?showDataList[index].profitability.operating_profit_margin.toFixed(2):'-'}}
|
||||
</block>
|
||||
<block v-if="lindex==7">
|
||||
{{showDataList[index].profitability.cost_profit_ratio?showDataList[index].profitability.cost_profit_ratio.toFixed(2):'-'}}
|
||||
</block>
|
||||
<block v-if="lindex==8">
|
||||
{{showDataList[index].profitability.ebit?showDataList[index].profitability.ebit.toFixed(2):'-'}}
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
|
||||
<!-- <view class="bottomC fixed flex">
|
||||
<view class="inputC flex1">
|
||||
<input type="text" v-model="eventComment" placeholder="对比股票..." placeholder-style="color:#666"
|
||||
confirm-type="send" @confirm="sendEventComment()" />
|
||||
</view>
|
||||
<view class="contrastShareC flex">
|
||||
<view class="item">
|
||||
<image class="icon" src="/pagesStock/static/icon/contrast.png" mode="heightFix"></image>
|
||||
<view>对比</view>
|
||||
</view>
|
||||
<view class="item" @click="clickComment()">
|
||||
<image class="icon" src="/pagesStock/static/icon/optional.png" mode="heightFix"></image>
|
||||
<view>自选</view>
|
||||
</view>
|
||||
<view class="item" @click="clickFollow()">
|
||||
<image class="icon" src="/pagesStock/static/icon/share.png" mode="heightFix"></image>
|
||||
<view>分享</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view v-if="periodShow" class="periodList fixed" :style="'top:'+periodTop+'px'">
|
||||
<view class="item" v-for="(item,index) in periodList" :key="index" @click="clickPeriodItem(index)">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue'
|
||||
import { financialMetrics, financialBalanceSheet, cashflowSheet, incomeStatementSheet } from '@/request/api'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
navH: inject('navHeight'),
|
||||
windowWidth:inject('windowWidth'),
|
||||
contentTop: '',
|
||||
otherTop: '',
|
||||
stockCode:'000001', //股票代码
|
||||
tabList: ['盈利能力', '每股指标', '成长能力', '资产负债表', '现金流量指标','现金流量表'],
|
||||
activeIndex: 0,
|
||||
topScrollWidth:0,
|
||||
topScrollLeft:0,
|
||||
filterList: ['全部','年报','中报','一季度','三季度'],
|
||||
filterIndex: 0,
|
||||
secondScrollWidth:0,
|
||||
secondScrollLeft:0,
|
||||
periodList: [{
|
||||
title:'最近4期',
|
||||
period:4
|
||||
},
|
||||
{
|
||||
title:'最近8期',
|
||||
period:8
|
||||
},
|
||||
{
|
||||
title:'最近12期',
|
||||
period:12
|
||||
},
|
||||
{
|
||||
title:'最近16期',
|
||||
period:16
|
||||
}],
|
||||
periodIndex:1,
|
||||
periodTop:'',
|
||||
periodShow:false, //是否显示弹窗
|
||||
leftList: [
|
||||
['净资产收益率(ROE)%', '净资产收益率(扣非)%', '净资产收益率(加权)%', '总资产报酬率(ROA)%', '毛利率%', '净利率%', '营业利润率%', '成本费用利润率%','EBIT'],
|
||||
['每股收益(EPS)%', '基本每股收益', '稀释每股收益', '扣非每股收益', '每股净资产', '每股经营现金流', '每股资本公积', '每股未分配利润'],
|
||||
['营收增长率%', '净利润增长率%', '扣非净利润增长率%', '归母净利润增长率%', '经营现金流增长率%', '总资产增长率%', '净资产增长率%', '固定资产增长率%'],
|
||||
['营收增长率%', '净利润增长率%', '扣非净利润增长率%', '归母净利润增长率%', '经营现金流增长率%', '总资产增长率%', '净资产增长率%', '固定资产增长率%'],
|
||||
['货币资金', '交易性金融资产', '应收票据', '营收账款', '预付款项', '其他应收款', '存货', '存货','其他流动资产'],
|
||||
['经营现金流净额', '销售收现', '购买支付现金', '投资现金流净额', '筹资现金流净额', '现金净增加额','期末现金余额','自由现金流'],
|
||||
],
|
||||
financialMetricsList:[],
|
||||
showDataList:[],
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
if(e.index) {
|
||||
this.activeIndex = e.index
|
||||
}
|
||||
if(e.code) {
|
||||
this.stockCode = e.code
|
||||
}
|
||||
this.contentTop = this.navH + 20 / 750 * inject('windowWidth')
|
||||
this.otherTop = this.navH + 204 / 750 * inject('windowWidth')
|
||||
this.getFinancialMetricsData()
|
||||
},
|
||||
onReady() {
|
||||
uni.createSelectorQuery().select('#topCategory').boundingClientRect(rect=>{
|
||||
this.topScrollWidth = Math.round(rect.width)
|
||||
}).exec()
|
||||
uni.createSelectorQuery().select('#filterList').boundingClientRect(rect=>{
|
||||
if(rect)
|
||||
{
|
||||
this.secondScrollWidth = Math.round(rect.width)
|
||||
}
|
||||
}).exec()
|
||||
},
|
||||
methods: {
|
||||
clickTabItem(e,index) {
|
||||
if(this.activeIndex!=index) {
|
||||
this.activeIndex = index
|
||||
let offsetLeft = e.currentTarget.offsetLeft
|
||||
this.topScrollLeft = offsetLeft - this.topScrollWidth/2
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击选择筛选项
|
||||
* @param {Object} index
|
||||
*/
|
||||
clickFilterItem(e,index) {
|
||||
if(this.filterIndex!=index) {
|
||||
this.filterIndex = index
|
||||
let offsetLeft = e.currentTarget.offsetLeft
|
||||
this.secondScrollLeft = offsetLeft - this.secondScrollWidth/2
|
||||
if(this.activeIndex==0||this.activeIndex==1||this.activeIndex==2||this.activeIndex==4) {
|
||||
this.getFinancialMetricsData()
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击选择期数
|
||||
* @param {Object} e
|
||||
*/
|
||||
clickSelectPeriod(e)
|
||||
{
|
||||
this.periodTop = e.currentTarget.offsetTop+this.navH+(70+10)/750*this.windowWidth
|
||||
this.periodShow = true
|
||||
},
|
||||
/**
|
||||
* 点击选择期数
|
||||
* @param {Object} index
|
||||
*/
|
||||
clickPeriodItem(index) {
|
||||
if(this.periodIndex!=index) {
|
||||
this.periodIndex = index
|
||||
this.periodShow = false
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取财务指标数据
|
||||
*/
|
||||
getFinancialMetricsData()
|
||||
{
|
||||
let code = this.stockCode
|
||||
let period = this.periodList[this.periodIndex].period
|
||||
let param = {limit:period}
|
||||
financialMetrics(code,param).then(res=>{
|
||||
this.financialMetricsList = res.data
|
||||
this.getFinancialMetricsShowData()
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
},
|
||||
getFinancialMetricsShowData(){
|
||||
let data = []
|
||||
if (this.filterIndex==0) {
|
||||
data = this.financialMetricsList
|
||||
}else if (this.filterIndex==1) {
|
||||
//年报
|
||||
for (let item of this.financialMetricsList) {
|
||||
if (item.report_type.indexOf('年报')>-1)
|
||||
{
|
||||
data.push(item)
|
||||
}
|
||||
}
|
||||
}else if (this.filterIndex==2) {
|
||||
for (let item of this.financialMetricsList) {
|
||||
if (item.report_type.indexOf('中报')>-1)
|
||||
{
|
||||
data.push(item)
|
||||
}
|
||||
}
|
||||
}else if (this.filterIndex==3) {
|
||||
for (let item of this.financialMetricsList) {
|
||||
if (item.report_type.indexOf('一季报')>-1)
|
||||
{
|
||||
data.push(item)
|
||||
}
|
||||
}
|
||||
}else if (this.filterIndex==4) {
|
||||
for (let item of this.financialMetricsList) {
|
||||
if (item.report_type.indexOf('三季报')>-1)
|
||||
{
|
||||
data.push(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
this.showDataList = data
|
||||
console.log(this.showDataList)
|
||||
},
|
||||
/**
|
||||
* 获取资产负债表数据
|
||||
*/
|
||||
getFinancialBalanceSheetData()
|
||||
{
|
||||
let code = this.stockCode
|
||||
let period = this.periodList[this.periodIndex].period
|
||||
let param = {limit:period}
|
||||
financialBalanceSheet(code,param).then(res=>{
|
||||
this.financialBalanceList = res.data
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取现金流量表数据
|
||||
*/
|
||||
getCashFlowSheetData()
|
||||
{
|
||||
let code = this.stockCode
|
||||
let period = this.periodList[this.periodIndex].period
|
||||
let param = {limit:period}
|
||||
cashflowSheet(code,param).then(res=>{
|
||||
this.cashFlowList = res.data
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取利润表数据
|
||||
*/
|
||||
getIncomeStatementSheetData()
|
||||
{
|
||||
let code = this.stockCode
|
||||
let period = this.periodList[this.periodIndex].period
|
||||
let param = {limit:period}
|
||||
incomeStatementSheet(code,param).then(res=>{
|
||||
this.incomeStatementList = res.data
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
page {
|
||||
background-color: #070707;
|
||||
}
|
||||
|
||||
.topBg {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.stockDetailsC {
|
||||
left: 25rpx;
|
||||
width: calc(100vw - 50rpx);
|
||||
background-color: white;
|
||||
border-radius: 10rpx 10rpx 0 0;
|
||||
overflow: hidden;
|
||||
bottom: calc(20rpx + 70rpx + 20rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.bottomC {
|
||||
background-color: black;
|
||||
padding: 20rpx 25rpx calc(20rpx + env(safe-area-inset-bottom));
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
|
||||
.inputC {
|
||||
background-color: #424143;
|
||||
margin-right: 20rpx;
|
||||
padding: 0 33rpx;
|
||||
height: 70rpx;
|
||||
border-radius: 35rpx;
|
||||
|
||||
input {
|
||||
height: 100%;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.contrastShareC {
|
||||
.item {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #FEFAF6;
|
||||
text-align: center;
|
||||
.icon {
|
||||
margin: 0 30rpx;
|
||||
width: auto;
|
||||
height: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filterList {
|
||||
margin-right: 20rpx;
|
||||
white-space: nowrap;
|
||||
width: calc(100% - 150rpx);
|
||||
.item
|
||||
{
|
||||
display: inline-block;
|
||||
margin-right: 28rpx;
|
||||
background-color: #F6F6F6;
|
||||
padding: 0 10rpx;
|
||||
min-width: 110rpx;
|
||||
line-height: 45rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #939393;
|
||||
text-align: center;
|
||||
}
|
||||
.item.select
|
||||
{
|
||||
background-color: #F2C369;
|
||||
font-weight: bold;
|
||||
color: #070707;
|
||||
}
|
||||
}
|
||||
.periodList {
|
||||
right: 25rpx;
|
||||
margin: 0 25rpx;
|
||||
width: 130rpx;
|
||||
.item
|
||||
{
|
||||
line-height: 40rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
.item.select {
|
||||
color: #F2C369;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
28
pagesStock/stockCenterDetails/webView/webView.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<view>
|
||||
<web-view :src="url"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
url:''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
if(e.url)
|
||||
{
|
||||
this.url = e.url
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -143,6 +143,10 @@ export const investEventDetails = (id,param) => get('/api/calendar/detail/'+id,p
|
||||
*/
|
||||
export const calendarEventCount = param => get('/api/calendar-event-counts',param)
|
||||
|
||||
/**
|
||||
* 根据输入内容搜索个股
|
||||
*/
|
||||
export const searchStockInfo = param => get('/api/stocks/search',param,true)
|
||||
/**
|
||||
* 个股基本信息
|
||||
*/
|
||||
@@ -183,10 +187,46 @@ export const comprehensiveAnalysis = code => get('/api/company/comprehensive-ana
|
||||
* 行业排名列表
|
||||
*/
|
||||
export const industryRankList = code => get('/api/financial/industry-rank/'+code,null,true)
|
||||
/**
|
||||
* 价值链分析
|
||||
*/
|
||||
export const valueChainAnalysis = code => get('/api/company/value-chain-analysis/'+code,null,true)
|
||||
/**
|
||||
* 价值链相关公司
|
||||
*/
|
||||
export const valueChainRelatedCompany = param => get('/api/company/value-chain/related-companies',param,true)
|
||||
/**
|
||||
* 关键因素和时间线
|
||||
*/
|
||||
export const keyFactorsTimeline = code => get('/api/company/key-factors-timeline/'+code,null,true)
|
||||
/**
|
||||
* 股票信息
|
||||
*/
|
||||
export const financialStockInfo = code => get('/api/financial/stock-info/'+code,null,true)
|
||||
/**
|
||||
* 财务指标
|
||||
*/
|
||||
export const financialMetrics = (code,param) => get('/api/financial/financial-metrics/'+code,param,true)
|
||||
/**
|
||||
* 财务比较
|
||||
*/
|
||||
export const financialComparison = (code,param) => get('/api/financial/comparison/'+code,param,true)
|
||||
/**
|
||||
* 主营业务
|
||||
*/
|
||||
export const financialMainBusiness = (code,param) => get('/api/financial/main-business/'+code,param,true)
|
||||
/**
|
||||
* 资产负债表
|
||||
*/
|
||||
export const financialBalanceSheet = (code,param) => get('/api/financial/balance-sheet/'+code,param,true)
|
||||
/**
|
||||
* 现金流量表
|
||||
*/
|
||||
export const cashflowSheet = (code,param) => get('/api/financial/cashflow/'+code,param,true)
|
||||
/**
|
||||
* 利润表
|
||||
*/
|
||||
export const incomeStatementSheet = (code,param) => get('/api/financial/income-statement/'+code,param,true)
|
||||
/**
|
||||
* 公司公告
|
||||
*/
|
||||
@@ -221,3 +261,34 @@ export const feedback = param => post('/api/user/feedback',param)
|
||||
* 协议
|
||||
*/
|
||||
export const agreements = () => get('/api/agreements')
|
||||
/**
|
||||
* 热门概念接口
|
||||
*/
|
||||
export const conceptsDailyTop =param => get('/api/concepts/daily-top',param,true)
|
||||
|
||||
/**
|
||||
* 市值热力图
|
||||
*/
|
||||
export const marketHeatmap =param => get('/api/market/heatmap',param,true)
|
||||
/**
|
||||
* 市场统计
|
||||
*/
|
||||
export const marketStatistics =param => get('/api/market/statistics',param,true)
|
||||
/**
|
||||
* 热点概览接口
|
||||
*/
|
||||
export const marketHotspotOverview =param => get('/api/market/hotspot-overview',param,true)
|
||||
|
||||
/**
|
||||
* 热点概览接口详情
|
||||
*/
|
||||
export const conceptStocks = (concept_id,param) => get('/api/concept/'+concept_id+'/stocks',param,true)
|
||||
|
||||
/**
|
||||
*日历数据
|
||||
*/
|
||||
export const calendarCombinedData =param => get('/api/v1/calendar/combined-data',param,true)
|
||||
/**
|
||||
*高位股数据
|
||||
*/
|
||||
export const analyseHighStocks =param => get('/api/limit-analyse/high-position-stocks',param,true)
|
||||
|
||||
@@ -14,6 +14,9 @@ if (process.env.NODE_ENV==='development') {
|
||||
export function getBaseURL() {
|
||||
return baseURL
|
||||
}
|
||||
export function getBaseURL1() {
|
||||
return "https://valuefrontier.cn"
|
||||
}
|
||||
|
||||
/**
|
||||
* get方法,对应get请求
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 326 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 971 B After Width: | Height: | Size: 286 B |
|
Before Width: | Height: | Size: 964 B After Width: | Height: | Size: 273 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 346 B |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 351 B |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 355 B |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 435 B |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 429 B |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 339 B |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 850 B After Width: | Height: | Size: 287 B |
|
Before Width: | Height: | Size: 634 B After Width: | Height: | Size: 299 B |
|
Before Width: | Height: | Size: 740 B After Width: | Height: | Size: 425 B |
|
Before Width: | Height: | Size: 985 B After Width: | Height: | Size: 382 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 380 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 501 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 380 B |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 648 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 411 B |
|
Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 347 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 604 B |
|
Before Width: | Height: | Size: 734 B After Width: | Height: | Size: 292 B |
|
Before Width: | Height: | Size: 384 B After Width: | Height: | Size: 234 B |
|
Before Width: | Height: | Size: 824 B After Width: | Height: | Size: 351 B |
|
Before Width: | Height: | Size: 479 B After Width: | Height: | Size: 279 B |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 791 B |
|
Before Width: | Height: | Size: 693 B After Width: | Height: | Size: 295 B |
|
Before Width: | Height: | Size: 369 B After Width: | Height: | Size: 231 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 408 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 452 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 370 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 370 B |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 870 B |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 739 B After Width: | Height: | Size: 332 B |
|
Before Width: | Height: | Size: 589 B After Width: | Height: | Size: 320 B |
|
Before Width: | Height: | Size: 592 B After Width: | Height: | Size: 319 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 576 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 455 B |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 632 B |
|
Before Width: | Height: | Size: 729 B After Width: | Height: | Size: 385 B |
|
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 0 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 0 B |
|
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 335 B |
|
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 334 B |