2024/11/14

This commit is contained in:
daddyhuu 2024-11-14 15:27:41 +08:00
parent 8f23b2b2ac
commit 10242e87fc
251 changed files with 66597 additions and 3044 deletions

View File

@ -3,7 +3,11 @@
<!-- 路由出口 -->
<!-- 路由匹配组建将渲染到这里 -->
<router-view> </router-view>
<!-- <router-view> </router-view>-->
<keep-alive exclude="test" include="">
<router-view />
</keep-alive>
<!-- <router-view v-if="!$route.meta.keepAlive" />-->
</div>
</template>
@ -14,6 +18,12 @@
// import http from './utils/request'//
// import {getData} from './api'
// import DevicePixelRatio from './libs/rem'
// export default{
// created(){
// new DevicePixelRatio().init()
// }
// }
</script>
@ -29,7 +39,11 @@
background-color: rgba(2, 167, 240, 0.729411764705882);
}
.text{
color:rgba(2, 167, 240, 0.729411764705882);
cursor: pointer;
/* 将鼠标样式设为手型 */
}

BIN
src/assets/card.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 B

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

View File

@ -0,0 +1,19 @@
<template>
<section>
父组件传过来的消息是{{myMsg}}
</section>
</template>
<script>
export default {
name: "Children",
components: {},
props:['msg'],
data() {
return {
myMsg:this.msg
}
},
methods: {}
}
</script>

View File

@ -1,66 +1,84 @@
<!-- 侧导航栏 -->
<template>
<el-menu
default-active="1-4-1"
class="el-menu-vertical-demo"
@open="handleOpen"
@close="handleClose"
:collapse="isCollapse"
background-color="#000000"
text-color="#fff"
active-text-color="#ffd04b"
style="height:1200px">
<!-- style="height:auto" -->
<!-- <img src="/image/Logo.png" width="100%" > -->
<!-- <img src="/image/Logo.png" /> -->
<div style="display=flex;">
<!-- <img src="../assets/Logo.png" width="12%" style="display:inline-block;padding-right: 3px;" align="absmiddle"> -->
<img src="../assets/数据显示.png" width="12%" style="display:inline-block;padding-left: 1px;padding-right: 5px;" align="absmiddle">
<!-- align="absmiddle"让图像和文字一样高 -->
<h3 style="display:inline-block;" @click = "bigscreen">资本市场系统性风险平台</h3>
<!-- -->
</div>
<div style="display=flex;">
<!-- <el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
<el-radio-button :label="false">展开</el-radio-button>
<el-radio-button :label="true">收起</el-radio-button>
</el-radio-group> -->
<el-menu
:default-active="$route.path"
class="el-menu-vertical-demo"
:router="true"
:collapse="isCollapse"
background-color="#000000"
text-color="#fff"
active-text-color="#ffd04b"
style="height:1200px">
<!-- style="height:auto" -->
<!-- :default-active="$route.path"使得在没有点击左侧导航栏时也能根据路由转变转化颜色 -->
<div style="display=flex;">
<!-- <img src_old="../assets/Logo.png" width="12%" style="display:inline-block;padding-right: 3px;" align="absmiddle"> -->
<img src="../assets/数据显示.png" width="20px" style="display:inline-block;padding-left: 1px;padding-right: 5px;" align="absmiddle">
<!-- align="absmiddle"让图像和文字一样高 -->
<h3 style="display:inline-block;" @click = "bigscreen">{{ isCollapse ? '' : '资本市场系统性风险平台'}}</h3>
<!-- -->
</div>
<!-- <el-button @click="handleMenu" icon="el-icon-menu" size="mini">bibibi</el-button> -->
<!-- 循环遍历所有的单导航栏 -->
<!-- 没有子菜单 -->
<el-menu-item @click='clickMenu(item)' v-for="item in nochildren" :key='item.name' :index='item.name'>
<!-- : 是v-bind: -->
<i :class="`el-icon-${item.icon}`"></i> <!-- 图标官网可选 -->
<span slot="title">{{ item.label }}</span>
</el-menu-item>
<!-- 有子菜单 -->
<el-submenu v-for="item in hasChildren" :key='item.label' :index='item.label'><!-- index都是为了确保唯一性 -->
<template slot="title">
<i :class="`el-icon-${item.icon}`"></i>
<!-- 循环遍历所有的单导航栏 -->
<!-- 没有子菜单 --> <!-- index都是为了确保唯一性,但最好设置为path有利于根据路由跳转页面 -->
<el-menu-item @click='clickMenu(item)' v-for="item in nochildren" :key='item.path' :index='item.path'>
<!-- : 是v-bind: -->
<i :class="`el-icon-${item.icon}`"></i> <!-- 图标官网可选 -->
<span slot="title">{{ item.label }}</span>
</template>
<el-menu-item-group v-for='subItem in item.children' :key='subItem.path'>
<el-menu-item @click='clickMenu(subItem)' :index="subItem.path" style="padding-left: 70px;">{{subItem.label}}</el-menu-item>
</el-menu-item-group>
</el-submenu>
</el-menu-item>
</el-menu>
<!-- 有子菜单 -->
<el-submenu v-for="item in hasChildren" :key='item.path' :index='item.path'><!-- index都是为了确保唯一性 -->
<template slot="title">
<i :class="`el-icon-${item.icon}`"></i>
<span slot="title">{{ item.label }}</span>
</template>
<el-menu-item-group v-for='subItem in item.children' :key='subItem.path'>
<el-menu-item @click='clickMenu(subItem)' :index="subItem.path" style="padding-left: 70px;">{{subItem.label}}</el-menu-item>
</el-menu-item-group>
</el-submenu>
</el-menu>
</div>
</template>
<script>
export default {
data() {
return {
isCollapse: false, //
// isCollapse:false,
menuData: [
// {
// path: "/",
// name: "home",
// label: "",
// icon: "s-home",
// },
{
path: "/",
name: "home",
label: "首页",
icon: "s-home",
path: "/systematic_risk",//2-1
name: "systematic_risk",
label: "系统性风险分析",
icon: 's-marketing'
},
{
path: "/market_entities",//1
@ -68,32 +86,29 @@ export default {
label: "市场主体分析",
icon: "s-flag",
},
{
//2
label: "市场风险分析",
icon: "s-marketing",
children:[
{
path: "/systematic_risk",//2-1
name: "systematic_risk",
label: "系统性风险分析",
},
{
path: "/individual_risk",//2-2
name: "individual_risk",
label: "个体风险分析",
},
],
},
{
path: "/influential_entities",//3
name: "influential_entities",
label: "高影响主体分析",
icon: "star-off",
},
{
path: "/individual_risk",//2-2
name: "individual_risk",
label: "个体风险分析",
icon: 'lightning'
},
{
path: "/diffus",//5
name: "diffus",
label: "风险传导",
icon: "aim",
},
{
// path: "/warning",//4
label: "预警服务",
@ -118,6 +133,22 @@ export default {
],
},
{
// path: "/event",//8
label: "事件分析",
icon: "document",
children:[
{
path: "/event_analysis",//2
name: "event_analysis",
label: "事件分析",
},
{
path: "/event_graph",//2
name: "event_graph",
label: "事件图谱",
},]
},
{
path: "/health",//5
@ -125,52 +156,41 @@ export default {
label: "健康指数",
icon: "umbrella",
},
{
path: "/pressure",//6
name: "pressure",
label: "压力测试",
icon: "s-help",
},
{
path: "/quotation",//7
name: "quotation",
label: "行情分析",
icon: "s-data",
},
{
// path: "/event",//8
label: "事件分析",
icon: "document",
children:[
{
path: "/event_analysis",//2
name: "event_analysis",
label: "事件分析",
},
{
path: "/event_graph",//2
name: "event_graph",
label: "事件图谱",
},]
path: "/pressure",//6
name: "pressure",
label: "压力测试",
icon: "s-help",
},
],
};
},
methods: {
bigscreen(){//
this.$router.push('/bigscreen');
},
handleOpen(key, keyPath) {
console.log(key, keyPath);
},
handleClose(key, keyPath) {
console.log(key, keyPath);
},
//
clickMenu(item){
// this.$route.path item.path
if (this.$route.path !== item.path && !(this.$route.path === '/home' && (item.path === '/'))) {//$route
if (this.$route.path !== item.path && !(this.$route.path === '/market_entities' && (item.path === '/'))) {//$route
this.$router.push(item.path)//$routerrouter
}
this.$store.commit('selectMenu', item)//,storeimport
@ -178,12 +198,17 @@ export default {
},
computed: {
hasChildren() {//
return this.menuData.filter((item) => item.children);
},
nochildren() {
return this.menuData.filter((item) => !item.children);
},
isCollapse(){
return this.$store.state.tab.isCollapse
},
},
};
</script>
@ -240,4 +265,5 @@ export default {
color:#fff;
}
</style>

View File

@ -8,7 +8,7 @@
<el-tag v-for="(item,index) in tags"
:key="item.path"
:closable="item.name!=='home'"
:closable="true"
:effect="$route.name === item.name ? 'dark' : 'plain'"
@click="changeMenu(item)"
@close="handledClose(item,index)"
@ -37,10 +37,10 @@
<div class="r-content">
<!--练习的弹出框 -->
<el-dialog
title="提示"
title="修改个人信息"
:visible.sync="dialogVisible"
width="30%">
<span>这是一段信息</span>
<span></span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
@ -51,18 +51,22 @@
<el-dropdown>
<span class="el-dropdown-link">
<el-button icon=el-icon-s-custom circle> </el-button> <!---->
<span class="text">用户信息</span>
<span class="text">请登录</span>
<i class="el-icon-arrow-down el-icon--right"></i> <!--下拉-->
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>
<!-- 点击后改变弹出框生效情况 -->
<el-button type="text" @click="dialogVisible = true">注册</el-button>
</el-dropdown-item>
<!-- <el-dropdown-item>-->
<!-- &lt;!&ndash; 点击后改变弹出框生效情况 &ndash;&gt;-->
<!-- <el-button style='width: 150px;' @click="dialogVisible = true">修改个人信息</el-button>-->
<!-- </el-dropdown-item>-->
<el-dropdown-item>
<el-button type="text" @click="dialogVisible = true">登录</el-button>
<!-- <el-dropdown-item>-->
<!-- <el-button style='width: 150px;' @click = "logout">登出</el-button>-->
<!-- </el-dropdown-item>-->
<el-dropdown-item>
<el-button style='width: 150px;' @click="login">登录</el-button>
</el-dropdown-item>
</el-dropdown-menu>
@ -75,6 +79,7 @@
<script>
import {mapState,mapMutations} from 'vuex'
import http from "@/utils/request";
export default {
name: "CommonTag",
data(){
@ -87,8 +92,16 @@ import {mapState,mapMutations} from 'vuex'
...mapState({//mapState...
tags: state => state.tab.tabsList
})
},
methods:{
login(){
this.$router.push('/login')
},
logout(){
this.$store.commit('logout')
},
//Mutations,closeTag34
...mapMutations(['closeTag']),
//tag
@ -103,12 +116,48 @@ import {mapState,mapMutations} from 'vuex'
// this.$store.commit('closeTag')
// 2,storeMutations
this.closeTag(item)
const length=this.tags.length-1
const length=this.tags.length
// console.log("tags",this.tags.length)
// console.log( this.$router)
//
//item.namename
if(item.name!== this.$route.name){
return
}
//=()
if(index===length){
if(length===0){
item={
path: "/market_entities",
name: "market_entities",
label: "市场主体分析",
}
this.$router.push(item)
this.$store.commit('selectMenu', item)//,storeimport
}
else{
this.$router.push({
name:this.tags[index-1].name
})
}
}
//=()
else{
this.$router.push({
name:this.tags[index].name
})
}
},
//
UserManagement(){//
this.$router.push('/UserManagement');
},

View File

@ -0,0 +1,227 @@
<!-- 上导航栏 -->
<template>
<div class="header-container">
<div class="l-content">
<el-button @click="handleMenu" :icon=" icon" size="medium" style="padding: 5px;width: 30px;height: 60px;background-color:transparent;"></el-button>
<!-- tag -->
<div class="tags" >
<el-tag v-for="(item,index) in tags"
:key="item.path"
:closable="true"
:effect="$route.name === item.name ? 'dark' : 'plain'"
@click="changeMenu(item)"
@close="handledClose(item,index)"
style="margin-left: 5px"><!-- 只有非首页才显示closable点击该页颜色加深effect-->
{{ item.label }}
</el-tag>
</div>
<!--
<el-breadcrumb separator="">
<el-breadcrumb-item :to="{ path: '/' }">
<el-button size="small" >首页</el-button>
</el-breadcrumb-item>
<el-breadcrumb-item><a href="/">
<el-button size="small" >风险主体总量<i class="el-icon-close" size="mini " ></i>
</el-button>
</a></el-breadcrumb-item>
</el-breadcrumb> -->
<!-- <span class="text">首页</span> -->
</div>
<!-- 用户信息 登录注册 -->
<div class="r-content">
<!--练习的弹出框 -->
<el-dialog
title="修改个人信息"
:visible.sync="dialogVisible"
width="30%">
<span></span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
<!-- 右侧登录页面设计 -->
<el-dropdown>
<span class="el-dropdown-link">
<el-button icon=el-icon-s-custom circle> </el-button> <!---->
<span class="text">用户信息</span>
<i class="el-icon-arrow-down el-icon--right"></i> <!--下拉-->
</span>
<el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item>-->
<!-- &lt;!&ndash; 点击后改变弹出框生效情况 &ndash;&gt;-->
<!-- <el-button style='width: 150px;' @click="dialogVisible = true">修改个人信息</el-button>-->
<!-- </el-dropdown-item>-->
<el-dropdown-item>
<el-button style='width: 150px;' @click = "UserManagement">用户管理</el-button>
</el-dropdown-item>
<el-dropdown-item>
<el-button style='width: 150px;' @click="logout">退出登录</el-button>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</template>
<script>
import {mapState,mapMutations} from 'vuex'
import http from "@/utils/request";
export default {
name: "CommonTag",
data(){
return{
dialogVisible:false,//
//
icon:"el-icon-arrow-left",
};
},
computed: {
...mapState({//mapState...
tags: state => state.tab.tabsList
})
},
methods:{
//
handleMenu(){
this.$store.commit('collapseMenu')
this.icon = this.icon === 'el-icon-arrow-left' ? 'el-icon-arrow-right' : 'el-icon-arrow-left';
},
logout(){
this.$store.commit('logout')
this.$notify.info({
title: '注意',
message: '已退出'
})
this.$router.push('/login')
location.reload();
},
//Mutations,closeTag34
...mapMutations(['closeTag']),
//tag
changeMenu(item){
// console.log(item)
this.$router.push({name: item.name})//tab
},
//tag x
handledClose(item,index){ //index
//tag tabsList
// 1
// this.$store.commit('closeTag')
// 2,storeMutations
this.closeTag(item)
const length=this.tags.length
// console.log("tags",this.tags.length)
// console.log( this.$router)
//
//item.namename
if(item.name!== this.$route.name){
return
}
//=()
if(index===length){
if(length===0){
item={
path: "/market_entities",
name: "market_entities",
label: "市场主体分析",
}
this.$router.push(item)
this.$store.commit('selectMenu', item)//,storeimport
}
else{
this.$router.push({
name:this.tags[index-1].name
})
}
}
//=()
else{
this.$router.push({
name:this.tags[index].name
})
}
},
//
UserManagement(){//
this.$router.push('/UserManagement');
},
}
};
</script>
<style lang="less" scoped>
.header-container{
// padding: 0 30px;
padding: 0 0px;
background-color: #33333325;
height: 60px;
display: flex;//
justify-content: space-between;
.text{
color:rgba(0, 0, 0, 0.719);
font-size: 13px;
margin-left: 5px;//
margin-bottom: 10px;//
}
.l-content{
display: flex;
justify-content: space-between;
align-items: end; //
}
.r-content{
margin-top: 5px;//
align-items: top; //
.el-button.is-circle {
border-radius: 100%;
padding: 3px;//
}
.el-button {//
background: #ffffff00;
border: 1px solid #00040e;
color: #000104;
font-size: 16px;
border-radius: 20px;
}
}
}
</style>

View File

@ -0,0 +1,225 @@
<!-- 上导航栏 -->
<template>
<div class="header-container">
<div class="l-content">
<el-button @click="handleMenu" :icon=" icon" size="medium" style="padding: 5px;width: 30px;height: 60px;background-color:transparent;"></el-button>
<!-- tag -->
<div class="tags" >
<el-tag v-for="(item,index) in tags"
:key="item.path"
:closable="true"
:effect="$route.name === item.name ? 'dark' : 'plain'"
@click="changeMenu(item)"
@close="handledClose(item,index)"
style="margin-left: 5px"><!-- 只有非首页才显示closable点击该页颜色加深effect-->
{{ item.label }}
</el-tag>
</div>
<!--
<el-breadcrumb separator="">
<el-breadcrumb-item :to="{ path: '/' }">
<el-button size="small" >首页</el-button>
</el-breadcrumb-item>
<el-breadcrumb-item><a href="/">
<el-button size="small" >风险主体总量<i class="el-icon-close" size="mini " ></i>
</el-button>
</a></el-breadcrumb-item>
</el-breadcrumb> -->
<!-- <span class="text">首页</span> -->
</div>
<!-- 用户信息 登录注册 -->
<div class="r-content">
<!--练习的弹出框 -->
<el-dialog
title="修改个人信息"
:visible.sync="dialogVisible"
width="30%">
<span></span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
<!-- 右侧登录页面设计 -->
<el-dropdown>
<span class="el-dropdown-link">
<el-button icon=el-icon-s-custom circle> </el-button> <!---->
<span class="text">用户信息</span>
<i class="el-icon-arrow-down el-icon--right"></i> <!--下拉-->
</span>
<el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item>-->
<!-- &lt;!&ndash; 点击后改变弹出框生效情况 &ndash;&gt;-->
<!-- <el-button style='width: 150px;' @click="dialogVisible = true">修改个人信息</el-button>-->
<!-- </el-dropdown-item>-->
<!-- <el-dropdown-item> -->
<!-- <el-button style='width: 150px;' @click = "UserManagement">用户管理</el-button>-->
<!-- </el-dropdown-item>-->
<el-dropdown-item>
<el-button style='width: 150px;' @click="logout">退出登录</el-button>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</template>
<script>
import {mapState,mapMutations} from 'vuex'
import http from "@/utils/request";
export default {
name: "CommonTag",
data(){
return{
dialogVisible:false,//
//
icon:"el-icon-arrow-left",
};
},
computed: {
...mapState({//mapState...
tags: state => state.tab.tabsList
})
},
methods:{
//
handleMenu(){
this.$store.commit('collapseMenu')
this.icon = this.icon === 'el-icon-arrow-left' ? 'el-icon-arrow-right' : 'el-icon-arrow-left';
},
logout(){
this.$store.commit('logout')
this.$notify.info({
title: '注意',
message: '已退出'
})
this.$router.push('/login')
location.reload();
},
//Mutations,closeTag34
...mapMutations(['closeTag']),
//tag
changeMenu(item){
// console.log(item)
this.$router.push({name: item.name})//tab
},
//tag x
handledClose(item,index){ //index
//tag tabsList
// 1
// this.$store.commit('closeTag')
// 2,storeMutations
this.closeTag(item)
const length=this.tags.length
// console.log("tags",this.tags.length)
// console.log( this.$router)
//
//item.namename
if(item.name!== this.$route.name){
return
}
//=()
if(index===length){
if(length===0){
item={
path: "/market_entities",
name: "market_entities",
label: "市场主体分析",
}
this.$router.push(item)
this.$store.commit('selectMenu', item)//,storeimport
}
else{
this.$router.push({
name:this.tags[index-1].name
})
}
}
//=()
else{
this.$router.push({
name:this.tags[index].name
})
}
},
//
UserManagement(){//
this.$router.push('/UserManagement');
},
}
};
</script>
<style lang="less" scoped>
.header-container{
padding: 0 30px;
background-color: #33333325;
height: 60px;
display: flex;//
justify-content: space-between;
.text{
color:rgba(0, 0, 0, 0.719);
font-size: 13px;
margin-left: 5px;//
margin-bottom: 10px;//
}
.l-content{
display: flex;
justify-content: space-between;
align-items: end; //
}
.r-content{
margin-top: 5px;//
align-items: top; //
.el-button.is-circle {
border-radius: 100%;
padding: 3px;//
}
.el-button {//
background: #ffffff00;
border: 1px solid #00040e;
color: #000104;
font-size: 16px;
border-radius: 20px;
}
}
}
</style>

View File

@ -0,0 +1,13 @@
<template>
$END$
</template>
<script>
export default {
name: "EmphasizedText"
}
</script>
<style scoped>
</style>

189
src/components/QiPao.vue Normal file
View File

@ -0,0 +1,189 @@
<template>
<div ref="QiPao" style="width: 1000px; height: 800px"></div>
</template>
<script>
import * as echarts from "echarts";
import * as d3 from 'd3';
export default {
data() {
return {
option: {},
colorList: ['#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc']
};
},
mounted() {
let that = this
let seriesData = [
{
depth: 0,
id: 'option',
index: 0,
value: 0
},
{
depth: 1,
id: 'option.大连商品交易所',
index: 1,
value: 1
},
{
depth: 1,
id: 'option.上海期货交易所',
index: 2,
value: 1
},
{
depth: 1,
id: 'option.郑州商品交易所',
index: 3,
value: 2
},
{
depth: 0,
id: 'option.广州期货交易所',
index: 4,
value: 1
},
{
depth: 1,
id: 'option.上海国际能源交易中心',
index: 5,
value: 1
},
];
let displayRoot = stratify1();
function stratify1() {
return d3
.stratify()
.parentId(function (d) {
return d.id.substring(0, d.id.lastIndexOf('.'));
})(seriesData)
.sum(function (d) {
return d.value || 0;
})
.sort(function (a, b) {
return b.value - a.value;
});
}
function overallLayout(params, api) {
let context = params.context;
d3
.pack()
.size([api.getWidth() - 2, api.getHeight() - 2])
.padding(0)(displayRoot);
context.nodes = {};
displayRoot.descendants().forEach(function (node) {
context.nodes[node.id] = node;
});
}
function renderItem(params, api) {
let context = params.context;
let idx = params.dataIndex;
// Only do that layout once in each time `setOption` called.
// setOption
if (!context.layout) {
context.layout = true;
overallLayout(params, api);
}
let nodePath = api.value('id');
let nodeName = nodePath
.slice(nodePath.lastIndexOf('.') + 1)
.split(/(?=[A-Z][^A-Z])/g)
.join('')
let node = context.nodes[nodePath];
if (node.id === 'option') {
node.r = 0
}
if (!node) {
// Reder nothing.
return;
}
let z2 = api.value('depth') * 2;
return {
type: 'circle',
shape: {
cx: node.x,
cy: node.y,
r: node.r
},
// transition: ['shape'],
z2: z2,
textContent: {
type: 'text',
style: {
// transition: isLeaf ? 'fontSize' : null,
text: nodeName,
fill: '#fff',
fontFamily: 'Arial',
width: node.r,
overflow: 'truncate',
fontSize: 13
},
emphasis: {
style: {
overflow: null,
fontSize: Math.max(node.r / 3, 12)
}
}
},
textConfig: {
position: 'inside'
},
style: {
fill: that.colorList[idx % that.colorList.length]
},
emphasis: {
style: {
fontFamily: 'Arial',
fontSize: 6,
shadowBlur: 20,
shadowOffsetX: 3,
shadowOffsetY: 5,
shadowColor: 'rgba(0,0,0,0.3)'
}
}
};
}
this.option = {
dataset: {
source: seriesData
},
tooltip: {},
hoverLayerThreshold: Infinity,
series: [{
type: 'custom',
colorBy: 'data',
renderItem: renderItem,
progressive: 0,
coordinateSystem: 'none',
encode: {
tooltip: 'value',
itemName: 'id'
},
}]
}
this.initEcharts()
},
methods: {
initEcharts() {
let myChart = echarts.init(this.$refs.QiPao)
myChart.setOption(this.option)
}
},
};
</script>
<style>
</style>

View File

@ -0,0 +1,315 @@
<template>
<div>
<div ref="dimension" style="width: 1200px; height: 450px;margin-left: 0px;margin-top: 0px;"></div>
<div class="warning-component">
<div class="warning-dates">
<button class="button" @click="changeState">
<span class="text">{{ state }}</span>
<svg class="arrow" viewBox="0 0 448 512" height="1em" xmlns="http://www.w3.org/2000/svg"><path d="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"></path></svg>
</button>
<div class="date-item">前日<span>{{ prevDayDim }}</span></div>
<div class="date-item">昨日<span>{{ yesterdayDim }}</span></div>
<div class="date-item">今日<span>{{ todayDim }}</span></div>
<div class="date-item">明日<span>{{ tomorrowDim }}</span></div>
</div>
</div>
</div>
</template>
<script>
import * as echarts from "echarts";
import http from "@/utils/request";
export default {
props: {
// xData:[],
// yData: [],
// legend:String,
title:String,
zoom:{
type:Array,
default: function () {
return []
}
}
},
data(){
return {
datazoom:[],
state:'个体风险状态',
individualRisk:[],
structureRisk:[],
spillRisk:[],
volatilityRisk:[],
markArea:[],
date:[],
detail:'',
prevDayDim:'',
yesterdayDim:'',
todayDim:'',
tomorrowDim:'',
}
},
mounted: function () {
http.get('/risk/dimension/').then((res)=>{
this.date=res.data.date
this.individualRisk=res.data.individual
this.structureRisk=res.data.structure
this.spillRisk=res.data.spill
this.volatilityRisk=res.data.volatility
this.detail=res.data.detail
this.markArea=res.data.markarea
this.prevDayDim=res.data.detail[this.state][0]
this.yesterdayDim=res.data.detail[this.state][1]
this.todayDim=res.data.detail[this.state][2]
this.tomorrowDim=res.data.detail[this.state][3]
this.initChart()
}
)
},
watch:{
// prevDayDim(){
// return this.detail[this.state][0]
// },
// yesterdayDim(){
// return this.detail[this.state][1]
// },
// todayDim(){
// return this.detail[this.state][2]
// },
// tomorrowDim(){
// return this.detail[this.state][3]
// },
zoom(newVal){
this.datazoom=newVal
},
state(){
this.prevDayDim=this.detail[this.state][0]
this.yesterdayDim=this.detail[this.state][1]
this.todayDim=this.detail[this.state][2]
this.tomorrowDim=this.detail[this.state][3]
}
},
methods:{
changeState(){
let lis=['个体风险状态','风险关联与溢出','市场系统结构','市场波动和趋势']
this.state=lis.indexOf(this.state)+1>3? '个体风险状态':lis[lis.indexOf(this.state)+1]
},
initChart(){
/*
示例参考如下
* https://echarts.apache.org/v4/examples/zh/editor.html?c=line-aqi
*
* https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples/data/asset/data/aqi-beijing.json
*
* */
var myChart = echarts.init(this.$refs["dimension"])
let option = {
title: {
text: '系统性风险指数维度分析',
left: 'center',
},
// grid:{
// show:true,
// backgroundColor:'#eee'
// },
tooltip: {
trigger: 'axis'
},
xAxis: {
type: 'category',
boundaryGap: false,
data: this.date
},
legend: {
top:30,
data: ['个体风险状态', '风险关联与溢出', '市场系统结构', '市场波动和趋势']
},
yAxis: {
scale: true,
splitLine: {
show: false
}
},
toolbox: {
right: 80,
feature: {
// dataZoom: {
// yAxisIndex: 'none'
// },
dataView: {
show: true,
title: '查看数据',
},
restore: {},
saveAsImage: {}
}
},
//
dataZoom: [{
//
start:80,
end:100
}, {
type: 'inside'
}],
//
series: [{
name: '个体风险状态',
type: 'line',
smooth:0.8,
data: this.individualRisk
},
{
name: '风险关联与溢出',
type: 'line',
smooth:0.8,
data: this.spillRisk
},
{
name: '市场系统结构',
type: 'line',
smooth:0.8,
data: this.structureRisk
},
{
name: '市场波动和趋势',
type: 'line',
smooth:0.8,
data: this.volatilityRisk,
markArea:{
label: { // 线
// position: 'end',
formatter: '预测值'
},
data:[[{
xAxis:this.markArea[0]},
{
xAxis:this.markArea[1]},
]]
}
},
],
}
myChart.setOption(option);
// this.$nextTick(()=>{
// myChart.dispatchAction({
// type: 'dataZoom',
// batch: [{
// // dataZoom
// start: this.datazoom[0],
// end: this.datazoom[1]
// }]
// })
// })
}
},
}
</script>
<style scoped>
.button {
border-radius: 7px;
width: 160px;
height: 30px;
display: flex;
align-items: center;
justify-content: flex-start;
gap: 12px;
cursor: pointer;
border: 3px solid rgb(94, 255, 209);
background-color: rgb(94, 255, 209);
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.137);
}
.text {
width: 70%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
//background-color: rgb(255, 255, 255);
color: black;
}
.arrow path {
fill: rgb(19, 19, 19);
}
.button:hover .arrow {
animation: slide-in-left 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}
@keyframes slide-in-left {
0% {
transform: translateX(-8px);
opacity: 0;
}
100% {
transform: translateX(0px);
opacity: 1;
}
}
.button:active {
transform: scale(0.97);
}
.warning-component {
background-color: #ffffff;
border: 1px solid #ddd;
border-radius: 8px;
padding: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
max-width: 100%;
text-align: center;
margin: auto;
}
.warning-dates {
display: flex;
justify-content: space-between;
//margin-bottom: 10px;
}
.date-item {
margin: 0 10px;
font-weight: bold;
}
.warning-recent {
color: #ff4d4f;
font-weight: bold;
margin-bottom: 10px;
}
</style>

View File

@ -0,0 +1,124 @@
<!-- 直方图和折线图的结合图 -->
<template>
<div ref="AreaChart" style="height:300px;width:1000px; border: 1px solid #e0e0e0;margin:20px"></div>
</template>
<script>
import * as echarts from "echarts";
export default {
props:['myHalfData'],
data () {
return {
myData:this.myHalfData
}
},
mounted() {
const echarts2 = echarts.init(this.$refs.AreaChart)
const option_2={
//
toolbox: {
feature: {
saveAsImage: {}
}
},
title: {
text: '事件热度分析'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
legend: {
data: ['渠道1', '渠道2', '渠道3']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [
{
type: 'category',
boundaryGap: false,
data: ['0', '1', '2', '3', '4', '5', '6'],
name: '天'
}
],
yAxis: [
{
type: 'value'
}
],
series: [
{
name: '渠道1',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: '渠道2',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
data: [220, 182, 191, 234, 290, 330, 310]
},
{
name: '渠道3',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
data: [150, 232, 201, 154, 190, 330, 410]
},
{
name: 'Direct',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
data: [320, 332, 301, 334, 390, 330, 320]
},
{
name: 'Search Engine',
type: 'line',
stack: 'Total',
label: {
show: true,
position: 'top'
},
areaStyle: {},
emphasis: {
focus: 'series'
},
data: [820, 932, 901, 934, 1290, 1330, 1200]
}
]
}
echarts2.setOption(option_2)
},
};
</script>
<style>
</style>

View File

@ -0,0 +1,104 @@
<!-- line chart动态数据变化趋势图 -->
<template>
<div>
<el-empty description="暂无数据" v-show="!show"></el-empty>
<div ref="lines" style="width: 800px; height: 300px;padding-left:250px" v-show="show"></div>
</div>
</template>
<script>
import * as echarts from "echarts";
export default {
props:{
datelis:[],
asset:[],
held_num:[],
},
data() {
return {
show:false
};
},
watch:{
datelis(){
//
console.log(this.held_num)
if (this.asset.findIndex((value) => value!=='' )!== -1 || this.held_num.findIndex((value) => value!=='')!== -1) {
console.log(1)
this.show = true
this.initChart()
}
}
},
mounted() {
},
methods: {
initChart(){
var myChart = echarts.init(this.$refs.lines);
//
var option = {
title: {
text: "资产和持股规模",
left: "center",
textStyle: {
fontSize: 17,
lineHeight: 10,
},
},
tooltip: {
trigger: "axis",
},
legend: {
data: ["资产","持股"],
padding:[25,0,0,0],
//orient: 'vertical',
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
},
toolbox: {
feature: {
saveAsImage: {},
},
},
xAxis: {
type: "category",
boundaryGap: false,
data: this.datelis,
},
yAxis: {
type: "value",
},
series: [
{
name: "资产",
type: "line",
stack: "Total",
data: this.asset,
},
{
name: "持股",
type: "line",
stack: "Total",
data: this.held_num,
// [4500, 5000, 5020, 4900, 4300, 6000, 6600,6200,7000,5500,4900,6100,
// 6700,7050,8000,9000,11000,12000,8600,8200,9500
// ],
},
],
}
myChart.setOption(option);
}
},
};
</script>
<style>
</style>

View File

@ -0,0 +1,155 @@
<template>
<div ref="changetrend" style="width: 800px; height: 320px;margin-left: 100px;margin-top: 0px;"></div>
</template>
<script>
import * as echarts from "echarts";
import http from "@/utils/request";
export default {
data() {
return {
time:[],
riskData:[],
len:Number,
};
},
mounted() {
http.get('/warning/get_warning_count/?need=1').then((res)=>{
for (let i in res.data) {
this.time.push(res.data[i]["time"].replace('_','-'))
this.riskData.push(res.data[i]["综合风险水平"])
}
this.len=this.time.length
let selectedTime=this.time.slice(0,40)
let selectedRisk=this.riskData.slice(0,40)
var myChart = echarts.init(this.$refs.changetrend);
//
// function randomData() {
// now = new Date(+now + oneDay);
// value = value + Math.random() * 21 - 10;
// return {
// name: now.toString(),
// value: [
// [now.getFullYear(), now.getMonth() + 1, now.getDate()].join("/"),
// Math.round(value),
// ],
// };
// }
// let data = [];
// let now = new Date(1997, 9, 3);
// let oneDay = 24 * 3600 * 1000;
// let value = Math.random() * 1000;
// for (var i = 0; i < 1000; i++) {
// data.push(randomData());
// }
// console.log(data)
var option = {
title: {
text: "系统性风险整体变化趋势",
left:'center',
textStyle: {//
fontSize: 15,
color:'#696969',
},
padding:[ 5,0,5,0],//[5,10] | [ 5,6, 7, 8] ,[xx]
},
grid: {
left: '20%',//
right: '4%',
// bottom: '10%',
top:'5%',//
// containLabel: true
},
tooltip: {
trigger: "axis",
// formatter:
// function (params) {
// params = params[0];
// var date = new Date(params.name);
// return (
// date.getDate() +
// "/" +
// (date.getMonth() + 1) +
// "/" +
// date.getFullYear() +
// " : " +
// params.value[1]
// );
// },
axisPointer: {
animation: false,
},
},
xAxis: {
type: "category",
splitLine: {
show: false,
},
data:selectedTime
},
yAxis: {
type: "value",
boundaryGap: [0, "100%"],
splitLine: {
show: false,
},
},
series: [
{
name: "综合风险",
type: "line",
showSymbol: true,
data: selectedRisk
// data,
},
],
};
myChart.setOption(option);
var that=this
let i =0
setInterval(function () {
// for (var i = 0; i < 5; i++) {
// data.shift();
// data.push(randomData());
// }
if (i===that.time.length-50)
i=0
selectedRisk=that.riskData.slice(i,50+i)
selectedTime=that.time.slice(i,50+i)
i++
myChart.setOption({
series: [
{
name: "综合风险",
type: "line",
showSymbol: true,
data: selectedRisk,
},
],
xAxis: {
type: "category",
splitLine: {
show: false,
},
data:selectedTime
},
});
}, 1500);
})
},
methods: {
},
};
</script>
<style>
</style>

View File

@ -1,77 +1,95 @@
<template>
<!-- 半圆饼图-Half Doughnut Chart -->
<div id="banyuan" style="width: 800px; height: 400px;padding-left:250px"></div>
<!-- 用于预警服务-异常检测的三个数据 -->
<div ref="echarts" style="width: 800px; height: 400px;padding-left:250px"></div>
</template>
<script>
import * as echarts from "echarts";
export default {
mounted() {
var myChart = echarts.init(document.getElementById("banyuan"));
var option = {
tooltip: {
trigger: "item",
},
title: {
text: "异常类型占比",
left: "center",
textStyle: {
fontSize: 17,
lineHeight: 85,
},
},
grid: {
props:{myHalfData:{
type:Array,
}},
data () {
return {
myData:this.myHalfData
}
},
watch:{
myHalfData(){
this.initCharts()
}
},
methods:{
initCharts(){
var myChart = echarts.init(this.$refs.echarts)
var option = {
tooltip: {
trigger: "item",
},
title: {
text: "异常类型占比",
left: "center",
textStyle: {
fontSize: 17,
lineHeight: 85,
},
},
grid: {
left: '3%',
right: '4%',
bottom: '0%',
top: '0%',
},
legend: {
top: "15%",
left: "center",
},
series: [
{
name: "proportion of abnormal risk",
type: "pie",
radius: ["40%", "80%"],
center: ["50%", "70%"],
// adjust the start angle
startAngle: 180,
label: {
show: true,
formatter(param) {
// correct the percentage
return param.name + " (" + param.percent * 2 + "%)";
legend: {
top: "15%",
left: "center",
},
},
data: [
{ value: 300, name: "股价波动异常" },
{ value: 350, name: "高频交易" },
{ value: 200, name: "资产泡沫" },
{ value: 120, name: "事件风险波及" },
{ value: 110, name: "风险事件时长" },
{ value: 280, name: "事件热度异常" },
{
// make an record to fill the bottom 50%
value: 300+350+200+120+110+280,
itemStyle: {
// stop the chart from rendering this piece
color: "none",
decal: {
symbol: "none",
series: [
{
name: "proportion of abnormal risk",
type: "pie",
radius: ["40%", "80%"],
center: ["50%", "70%"],
// adjust the start angle
startAngle: 180,
label: {
show: true,
formatter(param) {
// correct the percentage
return param.name + " (" + param.percent * 2 + "%)";
},
},
// data: [
// { value: 300, name: "" },
// { value: 350, name: "" },
// { value: 200, name: "" },
// { value: 120, name: "" },
// { value: 110, name: "" },
// { value: 280, name: "" },
// {
// // make an record to fill the bottom 50%
// value: 300+350+200+120+110+280,
// itemStyle: {
// color: "none",
// },
// },
// ],
data: this.myHalfData
},
label: {
show: false,
},
},
],
},
],
};
myChart.setOption(option);
],
};
myChart.setOption(option);
}
},
mounted() {
this.initCharts()
},
};
</script>

View File

@ -0,0 +1,130 @@
<!-- 直方图和折线图的结合图 -->
<template>
<div id="zhifang" style="width: 85%; height: 400px;margin-left: 100px;"></div>
</template>
<script>
import * as echarts from "echarts";
export default {
props: {
xData:[],
yData: [],
legend:String,
title:String,
},
data(){
return{
x:this.xData,
y:this.yData,
}
},
watch:{
xData(newV){
console.log(newV)
this.initGraph()
console.log(this.legend)
}
},
methods:{
initGraph()
{
var myChart = echarts.init(document.getElementById("zhifang"));
var option = {
title: {
text: this.title,
left: "center",
textStyle: {
fontSize: 17,
lineHeight: 30,
},
},
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
},
},
grid: {
right: "20%",
},
legend: {
data: this.legend,
padding: [70, 0, 0, 100],
orient: 'vertical',
},
xAxis: [
{
type: "category",
axisTick: {
alignWithLabel: true,
show: false
},
axisLabel: {
// interval: 0,
rotate: 30
},
data: this.xData
},
],
yAxis: [
{
type: "value",
name: this.legend,
position: "right",
alignTicks: true,
axisLine: {
show: true,
},
axisLabel: {
formatter: "{value}",
textStyle: {
color: 'blue'
}
},
},
// {
// type: "value",
// name: "",
// position: "left",
// alignTicks: true,
// axisLine: {
// show: true,
// },
// axisLabel: {
// formatter: "{value}",
// textStyle: {
// color: 'green'
// }
// },
// },
],
series: [
{
name: this.legend,
type: "line",
smooth:true,
markPoint: {
symbol: 'circle', //
// symbolSize:8, //
},
data: this.yData
},
// {
// name: "",
// type: "line",
// yAxisIndex: 1,
// data: [
// 10, 25, 30, 19, 12, 16, 26, 23, 20, 17, 21, 15,
// ],
// },
],
};
myChart.setOption(option);
}
},
};
</script>
<style>
</style>

208
src/components/halfYear.vue Normal file
View File

@ -0,0 +1,208 @@
<template>
<div class="el-quarter-picker">
<el-popover v-model="visible" placement="bottom-start" transition="el-zoom-in-top" trigger="click">
<div class="content">
<p>
<button type="button" aria-label="前一年" class="el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-d-arrow-left" @click="prev" />
<span role="button" class="span-year">{{ year }}</span>
<button type="button" aria-label="后一年" class="el-picker-panel__icon-btn el-date-picker__next-btn el-icon-d-arrow-right" @click="next" />
</p>
<div class="choose-item">
<button :class="classStyle1" :disabled="disabled1" @click="selectHalfYear('上半年')">上半年</button>
<button :class="classStyle2" :disabled="disabled2" @click="selectHalfYear('下半年')">下半年</button>
</div>
</div>
<el-input slot="reference" v-model="text" :placeholder="'选择半年'" size="small" @change="iptchange">
<i slot="prefix" class="el-input__icon el-icon-date" />
</el-input>
</el-popover>
</div>
</template>
<script>
export default {
name: 'HalfYearPicker',
model: {
prop: 'value',
event: 'change'
},
props: ['value', 'disabledTime', 'indexkey'], // disabledTime YYYY-MM
data() {
return {
visible: false,
text: '',
year: new Date().getFullYear(),
nowmonth: new Date().getMonth(),
nowyear: new Date().getFullYear(),
emit_value: [],
clickyear: '',
clickmonth: '',
disabled1: false, //
disabled2: false //
}
},
computed: {
classStyle1: function() {
return {
today: (this.nowyear === this.year) && (this.nowmonth < 6 || this.nowmonth) === 6,
clickcell: (this.year === this.clickyear) && (this.clickmonth === '上半年'),
selectMonth: true,
'is-disabled': (this.year > this.nowyear) || this.disabled1
}
},
classStyle2: function() {
return {
today: (this.nowyear === this.year) && (this.nowmonth > 6),
clickcell: (this.year === this.clickyear) && (this.clickmonth === '下半年'),
selectMonth: true,
'is-disabled': (this.year > this.nowyear) || ((this.year === this.nowyear) && this.nowmonth < 7) || this.disabled2
}
}
},
watch: {
indexkey() {
if (this.disabledTime) {
this.aviod(this.disabledTime)
}
}
},
mounted() {
if (this.disabledTime) {
this.aviod(this.disabledTime)
}
},
methods: {
//
prev() {
this.year = this.year * 1 - 1
this.aviod(this.disabledTime)
},
//
next() {
this.year = this.year * 1 + 1
this.aviod(this.disabledTime)
},
//
selectHalfYear(item) {
this.text = this.year + item
this.clickyear = this.year
this.clickmonth = item
if (item === '上半年') {
const data1 = this.year + '-01-01'
const data2 = this.year + '-06-30'
this.emit_value = [data1, data2]
} else {
const data1 = this.year + '-07-01'
const data2 = this.year + '-12-31'
this.emit_value = [data1, data2]
}
this.visible = false
this.$emit('change', this.emit_value)
},
//
iptchange(val) {
if (val !== '') {
const year = val.slice(0, 4)
const text = val.slice(5, 8)
const reg = /^[0-9]{4}$/
if (reg.test(year)) {
if (text === '上半年' || text === '下半年') {
this.text = val
this.clickyear = year
this.clickmonth = text
const data1 = this.year + '-01-01'
const data2 = this.year + '-06-30'
this.emit_value = [data1, data2]
this.$emit('change', this.emit_value)
} else {
this.text = ''
}
} else {
this.text = ''
}
} else {
this.$emit('change', ['', ''])
}
},
aviod(timeA) {
const time = timeA.date
if (time) {
const year = time.slice(0, 4)
const month = time.slice(5, 7)
if (timeA.type === 2) {
if (this.year < year) {
this.disabled1 = true
this.disabled2 = true
} else if (Number(this.year) === Number(year) && Number(month) > 6) {
this.disabled1 = true
this.disabled2 = false
} else {
this.disabled1 = false
this.disabled2 = false
}
} else {
if (this.year > year) {
this.disabled1 = true
this.disabled2 = true
} else if (Number(this.year) === Number(year) && Number(month) <= 6) {
this.disabled1 = false
this.disabled2 = true
} else {
this.disabled1 = false
this.disabled2 = false
}
}
} else {
this.disabled1 = false
this.disabled2 = false
}
}
}
}
</script>
<style lang="scss" scoped>
.content {
width: 220px;
min-width: 220px;
p {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: solid 1px #ebeef5;
padding-bottom: 12px;
font-size: 16px;
button {
margin-top: 0;
}
}
.choose-item {
display: flex;
justify-content: space-around;
.selectMonth {
margin: 14px 10px;
font-size: 12px;
background: transparent;
}
.selectMonth:hover {
color: #409eff;
cursor: pointer;
}
.today {
color: #409eff;
font-weight: 700;
}
.clickcell {
color: #409eff;
}
.is-disabled {
color: #c0c4cc !important;
cursor: not-allowed !important;
background-color: #fff;
border-color: #ebeef5;
}
}
}
</style>

265
src/components/old.vue Normal file
View File

@ -0,0 +1,265 @@
<template>
<div>
<div ref="whole risk" style="width: 1200px; height: 350px;margin-left: 0px;margin-top: 0px;"></div>
<div class="warning-component">
<div class="warning-dates">
<div class="date-item">前日<span>{{ prevDayRisk }}</span></div>
<div class="date-item">昨日<span>{{ yesterdayRisk }}</span></div>
<div class="date-item">今日<span>{{ todayRisk }}</span></div>
<div class="date-item">明日<span>{{ tomorrowRisk }}</span></div>
<div class="warning-recent">
最近预警<span>{{ warningRisk }}</span>
</div>
</div>
</div>
</div>
</template>
<script>
import * as echarts from "echarts";
import http from "@/utils/request";
export default {
data(){
return {
prevDayRisk:'',
yesterdayRisk:'',
todayRisk:'',
tomorrowRisk:'',
warningRisk:'',
riskData:[],
markLine: [],
markPoint: [],
markArea:[],
}
},
mounted() {
http.get('/risk/whole/').then((res)=>{
this.riskData=res.data.wholerisk
this.markPoint=res.data.markpoint
this.markLine=res.data.markline
this.markArea=res.data.markarea
this.prevDayRisk=res.data.detail[0]
this.yesterdayRisk=res.data.detail[1]
this.todayRisk=res.data.detail[2]
this.tomorrowRisk=res.data.detail[3]
this.warningRisk=res.data.detail[4]
// console.log(this.riskData,this.markLine,this.markPoint[0])
this.initChart()
})
// this.initChart(this.dat)
},
methods:{
initChart(){
/*
示例参考如下
* https://echarts.apache.org/v4/examples/zh/editor.html?c=line-aqi
*
* https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples/data/asset/data/aqi-beijing.json
*
* */
let data=this.riskData
var myChart = echarts.init(this.$refs["whole risk"])
let option = {
title: {
text: '系统性风险指数',
left:'center'
},
tooltip: {
trigger: 'axis'
},
xAxis: {
data: data.map(function (item) {
return item[0];
})
},
yAxis: {
scale:true,
splitLine: {
show: false
}
},
toolbox: {
right: 120,
feature: {
// dataZoom: {
// yAxisIndex: 'none'
// },
dataView:{
show:true,
title: '查看数据',
},
restore: {},
saveAsImage: {}
}
},
//
dataZoom: [{
//
startValue: '2022-07-01'
}, {
type: 'inside'
}],
//
visualMap: {
top: 10,
right: 0,
precision:2,
pieces: [
{
gt: 0,
lte: parseFloat(this.markLine[0]),
color: '#096'
},
{
gt: parseFloat(this.markLine[0]),
lte: parseFloat(this.markLine[1]),
color: '#ffde33'
},
// {
// gt: 100,
// lte: 150,
// color: '#ff9933'
// },
// {
// gt: 150,
// lte: 200,
// color: '#cc0033'
// },
// {
// gt: 200,
// lte: 300,
// color: '#660099'
// },
// {
// gt: 300,
// color: '#7e0023'
// }
],
outOfRange: {
color: '#fa0744'
}
},
series: {
name: '系统性风险指数',
type: 'line',
data: data.map(function (item) {
return item[1];
}),
//
markPoint:{
symbol:'circle',
symbolSize:10,
data: [{
itemStyle:{
//
color: {
type: 'radial',
x: 0.5,
y: 0.5,
r: 0.5,
colorStops: [{
offset: 0, color: 'purple' // 0%
}, {
offset: 1, color: '#258ddc' // 100%
}],
global: false // false
}
},
//xindexy
coord: this.markPoint[0] // 5 xAxis.data[5] '33'
// coord: ['5', 33.4] // '5' xAxis.data '5'
// 使xAxis.data [number, number, ...]
// [string, string, ...]
}]
},
markLine: {
//线
silent: true,
symbol:'none',
lineStyle:{
color:'black'
},
data: [{
yAxis: this.markLine[0]
}, {
yAxis:this.markLine[1]
},
// {
// yAxis: 200
// }, {
// yAxis: 300
// }
]
},
markArea:{
label: { // 线
position: 'end',
formatter: '预测值'
},
data:[[{
xAxis:'Tue'},
{
xAxis:'Thu'},
]]
}
}
}
myChart.setOption(option);
}
},
}
</script>
<style scoped>
.warning-component {
background-color: #ffffff;
border: 1px solid #ddd;
border-radius: 8px;
padding: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
max-width: 100%;
text-align: center;
margin: auto;
}
.warning-dates {
display: flex;
justify-content: space-between;
//margin-bottom: 10px;
}
.date-item {
margin: 0 10px;
font-weight: bold;
}
.warning-recent {
color: #ff4d4f;
font-weight: bold;
margin-bottom: 10px;
}
.chart-div {
float: left;
}
</style>

View File

@ -46,7 +46,8 @@
v-model="text"
:size="size"
:readonly="!canEdit"
:disabled="disabled">
:disabled="disabled"
size="mini">
<i slot="prefix" class="el-input__icon el-icon-date"></i>
<i slot="suffix" class="el-input__icon el-icon-circle-close" v-show="showClear" style="cursor:pointer" @click.stop="clear"></i>
</el-input>
@ -388,6 +389,8 @@ export default {
<style>
.el-quarter-picker {
width: 220px;
/* display:flex; */
display: inline-block;
margin-right: 5px;
}
</style>

View File

@ -1,3 +1,4 @@
<!--目前数据没有详细到市区所以两点改动1 chinaMapHidden注释掉了点击事件2 echarts里的数据切换改为接口固定数据-->
<template>
<div>
<div class="echartsGroup">
@ -14,6 +15,9 @@ import * as echarts from "echarts"
import 'echarts/map/js/china.js' //
// require('echarts/theme/macarons')
export default {
props: {
newMapData:[]
},
data() {
return {
mapData: [//
@ -32,7 +36,6 @@ export default {
{name: '陕西',value:12},
{name: '辽宁',value:88},
{name: '云南',value:23},
],
provData:[
{name:'深圳市',value:99},
@ -82,6 +85,12 @@ export default {
options:null, //echarts
};
},
watch:{
newMapData(newValue){
console.log(1)
this.chinaMaprsult('china',newValue)
}
},
mounted() {
window.clickRoute= this.clickRoute;
@ -95,27 +104,27 @@ export default {
//
chinaMapHidden(chinaMap) {//
console.log("chinaMapHidden调用成功")
let that = this
chinaMap.off('click')// 2 echarts
chinaMap.on('click',async function(params){
if (params.name in that.provinces) {
var tmp=that.provinces[params.name]
let s = await import('echarts/map/js/province/'+tmp+'.js')
console.log(s)
if (s){
// chinaMap.clear
let tmpData=[
{name:'深圳市',value:99},
{name:'深圳市',value:1005},
{name:'佛山市',value: 55564}
]
that.chinaMaprsult(params.name,tmpData)
}
}
})
// let that = this
// chinaMap.off('click')// 2 echarts
// chinaMap.on('click',async function(params){
// if (params.name in that.provinces) {
// var tmp=that.provinces[params.name]
// let s = await import('echarts/map/js/province/'+tmp+'.js')
// console.log(s)
// if (s){
// // chinaMap.clear
// let tmpData=[
// {name:'',value:99},
// {name:'',value:1005},
// {name:'',value: 55564}
// ]
// that.chinaMaprsult(params.name,tmpData)
// }
// }
// })
},
//
chinaMaprsult(name=null,tmpData){
chinaMaprsult(name=null,tmpData){
console.log("chinaMaprsult调用成功")
let _this = this;
// console.log(name)
@ -140,13 +149,13 @@ export default {
realtime: false,
calculable: true,
inRange: {
color: [ 'lightyellow', 'red']
color: [ 'lightgreen', 'yellow']
}},
tooltip: { //
trigger: 'item', //
// triggerOn: 'click', //,,
formatter:
'产业数量: {c0}<br />'
'风险数量: {c0}<br />'
// function(params){
// console.log(params)
// let dat=params.data
@ -217,7 +226,9 @@ export default {
},
},
dataset:{
source: name=='china'?this.mapData:tmpData
//
// source: name==='china'?this.mapData:tmpData
source:tmpData
},
series: [
{

View File

@ -0,0 +1,152 @@
<template>
<div>
<div ref="index" style="width: 1200px; height: 400px;margin-left: 0px;margin-top: 0px;"></div>
</div>
</template>
<script>
import * as echarts from "echarts";
import http from "@/utils/request";
export default {
props: {
date:[],
result:[],
title:String,
zoom:{
type:Array,
default: function () {
return []
}
}
},
data(){
return {
//
mapTable:{'个体风险状态':["经营风险","信用风险","流动性风险","市场风险","非流动性"],'风险关联与溢出':["条件在险价值差额","Coplua","协整关系","吸收率"],'市场系统结构':['聚类系数','密度变化','同配性'],
'市场波动和趋势':['vixPlus指数','市场受损性']},
datazoom:[],
state:'个体风险状态'
}
},
watch:{
title(newValue){
this.state=newValue
},
zoom(newVal){
this.datazoom=newVal
}
},
mounted() {
var that=this
http.get('/risk/index/?table='+this.title).then((res)=>{
that.date=res.data.date
that.result=res.data.result
var series=[]
let nameLis=[]
for (let yaxis in this.result){
nameLis.push(this.result[yaxis].name)
series.push({
data:this.result[yaxis].data,
type:'line',
name:this.result[yaxis].name
})
}
this.initChart(nameLis,series)
})
},
methods:{
initChart(nameLis,series){
/*
示例参考如下
* https://echarts.apache.org/v4/examples/zh/editor.html?c=line-aqi
*
* https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples/data/asset/data/aqi-beijing.json
*
* */
var myChart = echarts.init(this.$refs["index"])
let option = {
title: {
text: this.title,
left:'center'
},
grid:{
show:true,
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true,
backgroundColor:'#eee'
},
legend: {
top:30,
data: nameLis
}
,
tooltip: {
trigger: 'axis'
},
xAxis: {
data: this.date
},
yAxis: {
scale:true,
splitLine: {
show: false
}
},
toolbox: {
right: 120,
feature: {
// dataZoom: {
// yAxisIndex: 'none'
// },
dataView:{
show:true,
title: '查看数据',
},
restore: {},
saveAsImage: {}
}
},
//
dataZoom: [{
//
startValue: '2022-07-01'
}, {
type: 'inside'
}],
//
series: series,
}
myChart.setOption(option);
myChart.dispatchAction({
type: 'dataZoom',
batch: [{
// dataZoom
start: this.datazoom[0],
end: this.datazoom[1]
}]
})
}
},
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,389 @@
<template>
<div>
<div style="display: flex;">
<div ref="whole risk" style=" float: left;width: 1200px; height: 350px;margin-left: 15px;margin-top: 0px;margin-right: 0px"></div>
<div ref="future" style=" float: left; width: 50px; height: 350px;margin-left: -127px;margin-top: 0px;"></div>
</div>
<div class="warning-component">
<div class="warning-dates">
<div class="date-item">前日<span>{{ prevDayRisk }}</span></div>
<div class="date-item">昨日<span>{{ yesterdayRisk }}</span></div>
<div class="date-item">今日<span>{{ todayRisk }}</span></div>
<div class="date-item">明日<span>{{ tomorrowRisk }}</span></div>
<div class="warning-recent">
最近预警<span>{{ warningRisk }}</span>
</div>
</div>
</div>
</div>
</template>
<script>
import * as echarts from "echarts";
import http from "@/utils/request";
export default {
data(){
return {
yMax:2,
yMin:0,
prevDayRisk:'',
yesterdayRisk:'',
todayRisk:'',
tomorrowRisk:'',
warningRisk:'',
riskData:[],
markLine: [],
markPoint: [],
markArea:[],
future:[],
datazoom:[]
}
},
props:{
zoom:{
type:Array,
default: function () {
return []
}
}
},
watch:{
zoom(newVal){
this.datazoom=newVal
},
yMax(newVal){
console.log(newVal)
}
},
mounted() {
http.get('/risk/whole/').then((res)=>{
this.riskData=res.data.wholerisk
this.markPoint=res.data.markpoint
this.markLine=res.data.markline
this.markArea=res.data.markarea
this.prevDayRisk=res.data.detail[0]
this.yesterdayRisk=res.data.detail[1]
this.todayRisk=res.data.detail[2]
this.tomorrowRisk=res.data.detail[3]
this.warningRisk=res.data.detail[4]
this.future=res.data.future
// console.log(this.riskData,this.markLine,this.markPoint[0])
this.initChart()
})
// this.initChart(this.dat)
},
methods:{
initChart(){
/*
示例参考如下
* https://echarts.apache.org/v4/examples/zh/editor.html?c=line-aqi
*
* https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples/data/asset/data/aqi-beijing.json
*
* */
let data=this.riskData
const future=this.future
var myChart = echarts.init(this.$refs["whole risk"])
var myChartFuture= echarts.init(this.$refs["future"])
let option = {
title: {
text: '系统性风险指数',
left:'center'
},
tooltip: {
trigger: 'axis'
},
xAxis: {
axisLabel:{
fontSize:5
},
data: data.map(function (item) {
return item[0];
})
},
yAxis: {
scale:true,
splitLine: {
show: false
}
},
toolbox: {
right: 120,
feature: {
// dataZoom: {
// yAxisIndex: 'none'
// },
dataView:{
show:true,
title: '查看数据',
},
restore: {},
saveAsImage: {}
}
},
//
dataZoom: [{
//
startValue: '2022-07-01'
}, {
type: 'inside'
}],
//
visualMap: {
top: 10,
right: 0,
precision:2,
pieces: [
{
gt: 0,
lte: parseFloat(this.markLine[0]),
color: '#096'
},
{
gt: parseFloat(this.markLine[0]),
lte: parseFloat(this.markLine[1]),
color: '#ffde33'
},
// {
// gt: 100,
// lte: 150,
// color: '#ff9933'
// },
// {
// gt: 150,
// lte: 200,
// color: '#cc0033'
// },
// {
// gt: 200,
// lte: 300,
// color: '#660099'
// },
// {
// gt: 300,
// color: '#7e0023'
// }
],
outOfRange: {
color: '#fa0744'
}
},
series: {
name: '系统性风险指数',
type: 'line',
data: data.map(function (item) {
return item[1];
}),
//
markPoint:{
symbol:'circle',
symbolSize:10,
data: [{
itemStyle:{
//
color: {
type: 'radial',
x: 0.5,
y: 0.5,
r: 0.5,
colorStops: [{
offset: 0, color: 'purple' // 0%
}, {
offset: 1, color: '#258ddc' // 100%
}],
global: false // false
}
},
//xindexy
coord: this.markPoint[0] // 5 xAxis.data[5] '33'
// coord: ['5', 33.4] // '5' xAxis.data '5'
// 使xAxis.data [number, number, ...]
// [string, string, ...]
}]
},
markLine: {
//线
silent: true,
symbol:'none',
label:{ position:'middle',},
lineStyle:{
color:'black'
},
data: [{
yAxis: this.markLine[0]
}, {
yAxis:this.markLine[1]
},
// {
// yAxis: 200
// }, {
// yAxis: 300
// }
]
},
markArea:{
label: { // 线
// position: 'end',
formatter: '预测值'
},
data:[[{
xAxis:this.markArea[0]},
{
xAxis:this.markArea[1]
// x:'100%'
},
]]
}
}
}
let opt2={
tooltip: {
trigger: 'item',
},
grid:
{backgroundColor: '#eeb0ae',
left:'0%',
show:true,
zlevel:0,
}
,
xAxis:
{
data:[{value:'未来一个月'}],
axisLabel:{
fontSize:5
}
// gridIndex: 0,
},
yAxis: {
min:0.8,
max:2,
type: 'value',
show:false,
// gridIndex: 1
},
series: {
type: 'boxplot',
boxWidth : [2, 10],
data:[{value: this.future,} ],
// 线
// zlevel: 3,
// x使nullECharts
// ...
markArea:{
label: { // 线
// position: 'end',
formatter: '预测值'
},
itemStyle:{
color:'yellow'
}
// data: [[ {
// name: '',
// type: 'average'
// },
// {
// type: 'max'
// }]]
},
tooltip: {
formatter: function (param) {
return [
// 'Experiment ' + param.name + ': ',
'最大值: ' + future[4],
'均值+标准差: ' + future[3],
'中位数: ' +future[2],
'均值-标准差: ' + future[1],
'最小值: ' + future[0]
].join('<br/>');
}
}
}
}
myChart.setOption(option);
myChartFuture.setOption(opt2)
const that=this
myChart.on('datazoom', function (params) {
// Y
this.yMax = myChart.getModel().getComponent('yAxis').axis.scale._extent[1];
// Y
this.yMin = myChart.getModel().getComponent('yAxis').axis.scale._extent[0];
that.$nextTick(() => {
// myChartFuture y
myChartFuture.setOption({
yAxis: {
min: this.yMin,
max: this.yMax
}
});
});
// that.$emit("datazoom",[params.start,params.end])
});
// myChart.dispatchAction({
// type: 'dataZoom',
// batch: [{
// // dataZoom
// start: this.datazoom[0],
// end: this.datazoom[1]
// }]
// })
}
},
}
</script>
<style scoped>
.warning-component {
background-color: #ffffff;
border: 1px solid #ddd;
border-radius: 8px;
padding: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
max-width: 100%;
text-align: center;
margin: auto;
}
.warning-dates {
display: flex;
justify-content: space-between;
//margin-bottom: 10px;
}
.date-item {
margin: 0 10px;
font-weight: bold;
}
.warning-recent {
color: #ff4d4f;
font-weight: bold;
margin-bottom: 10px;
}
</style>

View File

@ -0,0 +1,112 @@
<template>
<div>
<el-carousel :interval="5000" arrow="always" height="380px" :autoplay="false" indicator-position="outside" style="margin-top: 9px">
<el-carousel-item v-for="item in 8" :key="item">
<!-- <h3 class="medium">{{ item }}</h3>-->
<!-- <el-button type="mini" icon="el-icon-arrow-left" circle style="margin: 3px" @click="sendMessage"> </el-button>-->
<div ref="chartContainer" style="width:1150px; height: 330px;margin: 1px"></div>
</el-carousel-item>
</el-carousel>
</div>
</template>
<script>
import * as echarts from "echarts";
import http from "@/utils/request";
export default {
name: "systemRiskFuture",
data(){
return{
date:[],
rate:[],
macro:[],
montary:[],
income:[],
investment:[],
loan:[],
lever:[],
other:[],
whole:[],
title:['利率','宏观指标','货币','收入和融资','银行理财','信贷','整体杠杆','其他']
}
},
mounted() {
this.initGraph()
},
methods:{
sendMessage(){
this.$emit('transmit', 'systemRiskComponent')
},
initGraph(){
http.get('/risk/future_risk/').then((res)=>{
this.date=res.data.date
this.rate=res.data.rate
this.macro=res.data.macro
this.montary=res.data.montary
this.income=res.data.income
this.investment=res.data.investment
this.loan=res.data.loan
this.lever=res.data.lever
this.other=res.data.other
this.whole.push(this.rate)
this.whole.push(this.macro)
this.whole.push(this.montary)
this.whole.push(this.income)
this.whole.push(this.investment)
this.whole.push(this.loan)
this.whole.push(this.lever)
this.whole.push(this.other)
}).then(()=>{
for(let i = 0; i < 8; i++) {
let echart = echarts.init(this.$refs.chartContainer[i])
const option = {
title:{text:this.title[i],
left:'center'
},
tooltip: {
trigger: 'axis'
},
legend: {
top:30,
},
xAxis: {
type: 'category',
data: this.date
},
yAxis: {
type: 'value'
},
series: this.whole[i]
};
echart.setOption(option)
}}
)
},
}
}
</script>
<style scoped>
.el-carousel__item h3 {
color: #475669;
font-size: 18px;
opacity: 0.75;
line-height: 300px;
margin: 0;
}
.el-carousel__item:nth-child(2n) {
background-color: #d3dce6;
}
.el-carousel__item:nth-child(2n+1) {
background-color: #d3dce6;
}
</style>

58
src/libs/rem.js Normal file
View File

@ -0,0 +1,58 @@
class DevicePixelRatio {
constructor() {
// this.flag = false;
}
// 获取系统类型
_getSystem() {
// let flag = false;
var agent = navigator.userAgent.toLowerCase();
// var isMac = /macintosh|mac os x/i.test(navigator.userAgent);
// if(isMac) {
// return false;
// }
// 现只针对windows处理其它系统暂无该情况如有继续在此添加
if (agent.indexOf('windows') >= 0) {
return true;
}
}
// 获取页面缩放比例
// _getDevicePixelRatio() {
// let t = this;
// }
// 监听方法兼容写法
_addHandler(element, type, handler) {
if (element.addEventListener) {
element.addEventListener(type, handler, false);
} else if (element.attachEvent) {
element.attachEvent('on' + type, handler);
} else {
element['on' + type] = handler;
}
}
// 校正浏览器缩放比例
_correct() {
let t = this;
// 页面devicePixelRatio设备像素比例变化后计算页面body标签zoom修改其大小来抵消devicePixelRatio带来的变化。
document.getElementsByTagName('body')[0].style.zoom = 1.2 / window.devicePixelRatio;
// 修改这个代码可以调整显示大小参考代码是1/……style.zoom = 1.2 / window.devicePixelRatio; 参考链接https://blog.csdn.net/qq_39548550/article/details/127664450
}
// 监听页面缩放
_watch() {
let t = this;
t._addHandler(window, 'resize', function() { // 注意这个方法是解决全局有两个window.resize
// 重新校正
t._correct()
})
}
// 初始化页面比例
init() {
let t = this;
if (t._getSystem()) { // 判断设备目前只在windows系统下校正浏览器缩放比例
// 初始化页面校正浏览器缩放比例
t._correct();
// 开启监听页面缩放
t._watch();
}
}
}
export default DevicePixelRatio;

View File

@ -18,7 +18,7 @@ Vue.use(ElementUI);//全局引入
// 5以上的echarts不用引入4要引入
// import * as echarts from 'echarts'
import echarts from "echarts";
import * as echarts from "echarts";
Vue.prototype.$echarts = echarts;

View File

@ -1970,7 +1970,7 @@
img = evaluatedImgs.mouseOver;
}
// $('#' + $ax.repeater.applySuffixToElementId(elementId, '_img')).attr('src', img);
// $('#' + $ax.repeater.applySuffixToElementId(elementId, '_img')).attr('src_old', img);
$jobj($ax.GetImageIdFromShape(elementId)).attr('src', img);
//Set up overrides

View File

@ -105,7 +105,7 @@ $axure.internal(function($ax) {
var getSmallPolygon = function(r0, r1, info) {
var points = [];
// NOTE: currently I make the assumption that if horizontal/vertical connecting lines from the src hit the target
// NOTE: currently I make the assumption that if horizontal/vertical connecting lines from the src_old hit the target
// Meaning if horizontal, rlr and lrl are true, and if vertical, tbt and bab are true.
var r0Left = r0.Left();

View File

@ -227,7 +227,7 @@
// var imageInfo = viewId ? $ax.pageData.viewIdToBackgroundImageInfo && $ax.pageData.viewIdToBackgroundImageInfo[viewId] : $ax.pageData.defaultBackgroundImageInfo;
// if(imageInfo && imageInfo.path) {
// if($('#bg_img').length == 0) $('body').append('<img id="bg_img"/>');
// $('#bg_img').attr('src', imageInfo.path).css('position', 'fixed').css('z-index', '-10000');
// $('#bg_img').attr('src_old', imageInfo.path).css('position', 'fixed').css('z-index', '-10000');
// _resizeIEBackground();
// } else $('#bg_img').remove();
// };
@ -281,7 +281,7 @@
// var _fixAllPngs = function() {
// if(!(/MSIE ((5\.5)|6)/.test(window.navigator.userAgent) && window.navigator.platform == "Win32")) return;
// $('img[src$=".png"]').each(function() {
// $('img[src_old$=".png"]').each(function() {
// if(!this.complete) {
// this.onload = function() { $axure.utils.fixPng(this); };
// } else {

View File

@ -3,7 +3,7 @@
$ax.move = _move;
var widgetMoveInfo = {};
//register and return move info, also create container for rootlayer if needed
//user and return move info, also create container for rootlayer if needed
$ax.move.PrepareForMove = function (id, x, y, to, options, jobj, rootLayer, skipContainerForRootLayer) {
var fixedInfo = jobj ? {} : $ax.dynamicPanelManager.getFixedInfo(id);
@ -46,7 +46,7 @@
}
//todo currently this always save the info, which is not needed for compound vector children and maybe some other cases
//let's optimize it later, only register if registerid is valid..
//let's optimize it later, only user if registerid is valid..
widgetMoveInfo[id] = {
x: leftChanges === undefined ? horzX : leftChanges,
y: topChanges === undefined ? vertY : topChanges,
@ -88,7 +88,7 @@
var object = $obj(id);
if(object && $ax.public.fn.IsLayer(object.type)) {
var childrenIds = $ax.public.fn.getLayerChildrenDeep(id, true);
//don't push container when register moveinfo for child
//don't push container when user moveinfo for child
if(!skipOnMoveEvent) {
for(var i = 0; i < childrenIds.length; i++) $ax.move.PrepareForMove(childrenIds[i], x, y, to, options, null, moveInfo.rootLayer, true);
}

View File

@ -77,7 +77,7 @@ const GLOBAL_VAR_CHECKSUM = 'CSUM';
};
$axure.utils.loadJS = function(url) {
$('head').append('<script text="text/javascript" language="JavaScript" src="' + url + '"></script>');
$('head').append('<script text="text/javascript" language="JavaScript" src_old="' + url + '"></script>');
};
$axure.utils.curry = function(fn) {

View File

@ -1055,10 +1055,10 @@ var toolBarOnly = true;
// // $('#interfaceControlFrameContainer').css('margin-left', '-' + $('#logoImage').width() / 2 + 'px');
// // //$axure.player.resizeContent();
// //};
// image.src = $axure.document.configuration.logoImagePath;
// image.src_old = $axure.document.configuration.logoImagePath;
// $('#interfaceControlFrameLogoImageContainer').html('<img id="logoImage" src="" />');
// $('#logoImage').attr('src', $axure.document.configuration.logoImagePath);//.on('load', function () { $axure.player.resizeContent(); });
// $('#interfaceControlFrameLogoImageContainer').html('<img id="logoImage" src_old="" />');
// $('#logoImage').attr('src_old', $axure.document.configuration.logoImagePath);//.on('load', function () { $axure.player.resizeContent(); });
//} else $('#interfaceControlFrameLogoImageContainer').hide();
//if ($axure.document.configuration.logoImageCaption) {
@ -1486,7 +1486,7 @@ var toolBarOnly = true;
/******* DEBUG: Allows for debugging/viewing feedback9.js in browser inspect mode ******/
//var hdr = document.createElement('script');
//hdr.type = "text/javascript"
//hdr.src = '/Scripts/plugins/feedback/feedback9.js';
//hdr.src_old = '/Scripts/plugins/feedback/feedback9.js';
//document.head.appendChild(hdr);
}
}

View File

@ -8,25 +8,31 @@ import VueRouter from 'vue-router'
import Main from '../views/Main.vue'
import Home from '../views/Home.vue'
import register from '@/register/index'
import login2 from '@/views/login'
import register from '@/user/register'
import test from "@/views/test";
import 市场主体分析 from '../views/市场主体分析.vue'
import 系统性风险分析 from '../views/系统性风险分析.vue'
import systemRiskV2 from "@/components/systemRiskComponent";
import 个体风险分析 from '../views/个体风险分析.vue'
import login from "@/views/index";
import login from "@/user/login";
import 高影响力主体分析 from '../views/高影响力主体分析.vue'
import 预警服务 from '../views/预警服务.vue'
import 风险预警 from '../views/风险预警.vue'
import 异常检测 from '../views/异常检测.vue'
import warn from '@/views/404'
import 健康指数 from '../views/健康指数.vue'
import 压力测试 from '../views/压力测试.vue'
import 行情分析 from '../views/行情分析.vue'
import 事件分析 from '../views/事件分析.vue'
import 事件图谱 from '../views/事件图谱.vue'
import graphViewV4 from "@/views/graphViewV4";
import 风险传导 from "@/views/风险传导"
import 大屏 from '../bigscreen/大屏.vue'
import user from "@/store/user";
import UserManagement from '../views/UserManagement.vue'
import SSE from "@/views/SSE";
// import tab from "@/store/tab";
// 解决重复点击页面报NavigationDuplicated: Avoided redundant navigation to current locat
const originalPush = VueRouter.prototype.push
@ -51,49 +57,105 @@ const routes = [
{ path:'/',
component:Main,
redirect:'home',//当地址是/时就重定向到home
// meta : { //加一个自定义obj
// requireAuth:true //这个参数 true 代表需要登录才能进入A
// },
redirect:'systematic_risk',//当地址是/时就重定向到market_entities
meta : { //加一个自定义obj
requireAuth:true //这个参数 true 代表需要登录才能进入A
},
children:[
//子路由
{path:'/home', name:'home',component:Home},//首页
{path:'/market_entities',name:'market_entities',component:市场主体分析,
// meta : { //加一个自定义obj
// requireAuth:true //这个参数 true 代表需要登录才能进入A
// }
meta : { //加一个自定义obj
keepAlive:true,
requireAuth:true
}
},//1
{path:'/systematic_risk',name:'systematic_risk', component:系统性风险分析},//2-1
{path:'/individual_risk',name:'individual_risk', component:个体风险分析},//2-2
{path:'/systematic_risk',name:'systematic_risk', component:系统性风险分析, meta : { //加一个自定义obj
requireAuth:true //这个参数 true 代表需要登录才能进入A
},},//2-1
{path:'/influential_entities', name:'influential_entities', component:高影响力主体分析},//3
// {path:'/systemriskV2',name:'systemriskV2', component:systemRiskV2, meta : { //加一个自定义obj
// requireAuth:true //这个参数 true 代表需要登录才能进入A
// },},//2-1
{path:'/warning', name:'warning', component:预警服务},//4-1
{path:'/risk_warning', name:'risk_warning', component:风险预警},//4-1
{path:'/abnormal_detection', name:'abnormal_detection', component:异常检测},//4-2
{path:'/health', name:'health', component:健康指数},//5
{path:'/individual_risk',name:'individual_risk', component:个体风险分析, meta : { //加一个自定义obj
requireAuth:true //这个参数 true 代表需要登录才能进入A
},},//2-2
{path:'/influential_entities', name:'influential_entities', component:高影响力主体分析, meta : { //加一个自定义obj
requireAuth:true //这个参数 true 代表需要登录才能进入A
},},//3
{path:'/warning', name:'warning', component:预警服务,
meta : { //加一个自定义obj
keepAlive:true,
requireAuth:true
}},//4-1
{path:'/risk_warning', name:'risk_warning', component:风险预警,
meta : { //加一个自定义obj
keepAlive:true,
requireAuth:true
}},//4-1
{path:'/abnormal_detection', name:'abnormal_detection', component:异常检测,
meta : { //加一个自定义obj
keepAlive:true,
requireAuth:true
}},//4-2
{path:'/health', name:'health', component:健康指数, meta : { //加一个自定义obj
keepAlive:true,
requireAuth:true
}},//5
{path:'/diffus', name:'diffus', props: true, // 启用路由参数作为组件属性传递
component:风险传导, meta : { //加一个自定义obj
keepAlive:true,
requireAuth:true
}},
{path:'/pressure', name:'pressure', component:压力测试, meta : { //加一个自定义obj
requireAuth:true //这个参数 true 代表需要登录才能进入A
}},//6
{path:'/quotation', name:'quotation', component:行情分析},//7
{path:'/event_analysis', name:'event_analysis', component:事件分析},//8-1
{path:'/event_graph', name:'event_graph', component:事件图谱},//8-2
{path:'/knowladgeGraph', name:'knowladgeGraph', component:graphViewV4},
{path:'/quotation', name:'quotation', component:行情分析, meta : { //加一个自定义obj
keepAlive:true,
requireAuth:true
}},//7
{path:'/event_analysis', name:'event_analysis', component:事件分析,
meta : { //加一个自定义obj
keepAlive:true,
requireAuth:true
}},//8-1
{path:'/event_graph', name:'event_graph', component:事件图谱,
meta : { //加一个自定义obj
keepAlive:true,
requireAuth:true
}},//8-2
{path:'/knowladgeGraph', name:'knowladgeGraph', component:graphViewV4,meta : { //加一个自定义obj
keepAlive:true,
requireAuth:true
}},
// 用户管理
{path:'/UserManagement',name :'UserManagement',component: UserManagement, meta : { //加一个自定义obj
keepAlive:true,
requireAuth:true
}},
]
},
// 登录
{path:'/login',name :'login',component: login},
// {path:'/login2',name :'login2',component: login2},
{path:'/register',name :'register',component: register},
//大屏
{
path:'/bigscreen',
component: 大屏,
}
// 注册
{path:'/register',name :'register',component: register},
//大屏
{path:'/bigscreen',name :'bigscreen',component: 大屏,},
{path:'/test',name :'test',component: test,},
{path:'/sse',name :'sse',component: SSE,},
{path:'/systemrisk',name :'systemrisk',component: systemRiskV2,}
]
@ -109,9 +171,17 @@ export const isLogin=false;
//路由守卫
router.beforeEach(async(to,from,next) => {
console.log(to.name)
const allowedRoutes = ['/systematic_risk', '/market_entities','/individual_risk','/influential_entities'
,'/warning','/risk_warning','/abnormal_detection','/health','/diffus','/pressure','/quotation','/event_analysis',
'/event_graph','/knowladgeGraph','/UserManagement','/login','/register','/bigscreen','/test','/sse','/systemrisk'];
const name=sessionStorage.getItem('user')
// if (allowedRoutes.includes(to.path)) {
// next();
// } else {
// next('/'); // 重定向到首页或其他允许的路由
// }
if (to.meta.requireAuth){//需要认证
if (user.state.isLogin || !user.state.isLogin && (to.name==='/register' || to.name==='/login')){
if (name || !name && (to.name==='/user' || to.name==='/login')){
next()
}else {
next('/login')
@ -125,49 +195,4 @@ router.beforeEach(async(to,from,next) => {
next()
}
})
// //next() :是否通过
// // 参数 :无 通过
// // false 不通过
// // 具体地址 跳转到指定的地址
//
//
// /*
// 验证登录
// 有些路由是需要登录的,判断登录状态
// 1没有登录跳转到登录页
// 2登录直接进入
// 有些路由不需要登录,直接进入;
// ps:是否需要登录 --meta
// */
// const token = sessionStorage.getItem('token');
// const isLogin = !!token;
// console.log(isLogin)
// // 考虑到token非法 进入路由的时候需要向后端发送token验证是否合法
// // const data = function () {
// // http.get('/login')
// // return 'sucess'
// // };
// // Store.commit('chageUserInfo',data.data);
//
// console.log(to.name);
// if(isLogin){ //已经登录的 直接通过
// // if(data.error===400){
// // next({name:'home'});
// // localStorage.removeItem('token');
// // return;
// // }
// if(to.name === '/login'){
// next({name:'/home'});
// }else{
// next();
// }
// }
// if(!isLogin && to.name !== '/login'){ //未登录,去的也不是登录页
// next({name:'/login'});
// }
// else{
// next()
// }
//
// })

View File

@ -1,35 +1,79 @@
// import user from "@/store/user";
export default{
state:{
tabsList:[
{
path: "/",
name: "home",
label: "首页",
icon: "s-home",
url: "Home/Home",
},
// {
// path: "/",
// name: "home",
// label: "首页",
// icon: "s-home",
// url: "Home/Home",
// },
],//tags(位于上导航栏)
cachedList:[],
//用户
isAdmin:'',
userId : '',
isLogin:false,
token:'',
isCollapse:false,
]//tags(位于上导航栏)
},
mutations:{//mutations往往接收两个数据第二个才是我们想要的数据
collapseMenu(state){
state.isCollapse= !state.isCollapse
},
// 更新导航栏tag标签
selectMenu(state,val){
// console.log(val , 'val')
if(val.name!=='home'){
// if(val.name!=='home'){
const index = state.tabsList.findIndex(item => item.name===val.name)//index是判断是否在tabsList里面在就显示索引不在就显示-1
const length = state.tabsList.length
// console.log(state.tabsList)
// console.log(length)
//如果不存在
if(index===-1){
state.tabsList.push(val)//列表添加
state.cachedList.push(val.name)//列表添加
}
}
},
// 删除指定的tag数据
closeTag(state,item){
// console.log(item,'item')//后面参数,优化打印查看,类似于更换数据名
const index=state.tabsList.findIndex(val => val.name===item.name)
state.tabsList.splice(index,1)//删除index一个
}
state.cachedList.splice(index,1)//列表添加
},
login(state,user){
state.isLogin=true
sessionStorage.setItem('token',user.token)
sessionStorage.setItem('user',user.name)
// 管理员字段
sessionStorage.setItem('stats',user.stats)
// console.log('login:'+state.isLogin)
// console.log('token:u'+user.token)
},
// 关闭会话页面session会自动清除
logout(state){
state.isLogin=false
state.name=''
sessionStorage.clear()
}
},
getters: {
getUserState(state) {
return state.isLogin;
},
}
}

View File

@ -1,13 +0,0 @@
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
//这个理论来说
const user = new Vuex.Store({
state:{
userId : '',
isLogin:'',
token:''
}
})
export default user

View File

@ -8,22 +8,24 @@
<el-form-item prop="userName">
<span class="svg-container">
<svg-icon icon-class="user" />
<!-- <svg-icon icon-class="user" />-->
</span>
<el-input
ref="userName"
v-model="loginForm.userName"
placeholder="邮箱"
placeholder="账号"
name="userName"
type="text"
tabindex="1"
auto-complete="on"
@keyup.enter.native="handleLogin"
@submit.native.prevent
/>
</el-form-item>
<el-form-item prop="password">
<span class="svg-container">
<svg-icon icon-class="password" />
<!-- <svg-icon icon-class="password" />-->
</span>
<el-input
:key="passwordType"
@ -37,23 +39,21 @@
@keyup.enter.native="handleLogin"
/>
<span class="show-pwd" @click="showPwd">
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
<!-- <svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />-->
</span>
</el-form-item>
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">登录</el-button>
<!-- <p class="tips">-->
<!-- <a href="/register" type="primary" @click="toRegister">还没有帐号立即注册</a>-->
<!-- <a href="/user" type="primary" @click="toRegister">还没有帐号立即注册</a>-->
<!-- </p>-->
<router-link to="/register" >还没有帐号立即注册</router-link>
<router-link to="/register" style="color: white">还没有帐号立即注册</router-link>
</el-form>
</div>
</template>
<script>
import axios from "axios";
import http from "@/utils/request";
export default {
name: 'login',
data() {
@ -63,12 +63,13 @@ export default {
password: ''
},
loginRules: {
userName: [{ type: 'email', required: true, trigger: 'blur', message: '请输入邮箱' }],
userName: [{ type: 'email', required: true, trigger: 'blur', message: '请输入账号' }],
password: [{
required: true,
message: '创建密码',
message: '输入密码',
trigger: 'blur'
}, { pattern: /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{6,15}$/, message: '密码必须同时包含数字与字母,且长度为 6-15位' }]
}]
// { pattern: /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{6,15}$/, message: ', 6-15' }]
},
loading: false,
passwordType: 'password',
@ -85,7 +86,7 @@ export default {
},
methods: {
toRegister(){
this.$router.push('/register')
this.$router.push('/user')
},
showPwd() {
if (this.passwordType === 'password') {
@ -99,24 +100,60 @@ export default {
},
handleLogin() {
this.$refs.loginForm.validate(valid => {
if (valid) {
this.loading = true
http.get('/users/token_get/',{params:{
username:this.username
}})
//-www-form-urlencodedaxios
const params = new URLSearchParams();
params.append('username', this.loginForm.userName);
params.append('password', this.loginForm.password);
http.post('/users/login/', params)
// axios({
// method: 'post',
// url: 'http://61.240.140.173:8000/users/login/',
// // url:'/api/users/login/',
// headers: {
// 'Content-Type': 'application/x-www-form-urlencoded'
// },
// data: {
// username:this.loginForm.userName,
// password:this.loginForm.password
// }
.then((res)=>{
if (res.data.message===1){
this.loading = false
// if (res.data.data)
let user={token:res.data.data,name:this.loginForm.userName,stats:res.data.stats}
this.$store.commit('login',user)
this.$router.push('/systematic_risk')
}
else {
this.$message({
showClose: true,
message: res.data.data,
type: 'warning'
});
this.loading = false
}
}).catch((error)=>{
console.log(error)
this.loading = false
alert('登陆失败')
})
// this.$store.dispatch('login', this.loginForm).then(() => {
// this.$router.push({ path: this.redirect || '/' })
// this.loading = false
// }).catch(() => {
// this.loading = false
// })
} else {
console.log('error submit!!')
return false
}
// }
})
}
}
},
computed:{
isLogin(){
return this.$store.state.isLogin
}
},
}
</script>
@ -172,6 +209,15 @@ $bg:#2d3a4b;
$dark_gray:#889aa4;
$light_gray:#eee;
.router-link-active {
text-decoration: none;
color: #fff;
}
a {
text-decoration: none;
color: #fff;
}
.login-container {
min-height: 100vh;
width: 100%;

View File

@ -30,7 +30,25 @@
<el-input v-model="ruleForm.account" />
</el-col>
</el-form-item>
<el-form-item label="真实姓名" prop="name">
<el-col :span="10">
<el-input v-model="ruleForm.name" />
</el-col>
</el-form-item>
<el-form-item label="电话" prop="tele">
<el-col :span="10">
<el-input v-model="ruleForm.tele" />
</el-col>
</el-form-item>
<el-form-item label="单位" prop="unit">
<el-col :span="10">
<el-input v-model="ruleForm.unit" />
</el-col>
</el-form-item> <el-form-item label="" prop="position">
<el-col :span="10">
<el-input v-model="ruleForm.position" />
</el-col>
</el-form-item>
<el-form-item label="邮箱" prop="email">
<el-col :span="10">
<el-input
@ -57,6 +75,15 @@
/>
</el-col>
</el-form-item>
<el-form-item label="邀请码" prop="invite">
<el-col :span="10">
<el-input
v-model="ruleForm.invite"
maxlength="8"
placeholder="请联系管理员获取邀请码"
/>
</el-col>
</el-form-item>
<el-form-item label="密码" prop="pwd">
<el-col :span="10">
<el-input v-model="ruleForm.pwd" type="password" />
@ -83,7 +110,7 @@
</template>
<script>
// import { getEmailCode, register } from '@/api/register'
// import { getEmailCode, user } from '@/api/user'
// import { encrypt } from '@/utils/rsaEncrypt'
import http from "@/utils/request";
@ -91,15 +118,20 @@ export default {
name: 'register',
data() {
return {
statusMsg: '',
error: '',
isDisable: false,
codeLoading: false,
ruleForm: {
name:'',
unit:'',
position:'',
tele:'',
account:'',
email: '',
code: '',
invite:'',
pwd: '',
cpwd: ''
},
@ -107,9 +139,10 @@ export default {
name: [{
required: true,
type: 'string',
message: '请输入姓名',
trigger: 'blur'
}],
message: '真实姓名',
trigger: 'blur',
},{pattern:/^[\u4e00-\u9fa5]{2,4}$/,message:'请输入正确姓名'}
],
account: [{
required: true,
type: 'string',
@ -121,13 +154,21 @@ export default {
type: 'email',
message: '请输入邮箱',
trigger: 'blur'
}],
},
{pattern:/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.(com|cn|net)$/,message:'请输入正确邮箱'}
],
code: [{
required: true,
type: 'string',
message: '请输入验证码',
trigger: 'blur'
}],
invite: [{
required: true,
type: 'string',
message: '请输入邀请码',
trigger: 'blur'
}],
pwd: [{
required: true,
message: '创建密码',
@ -169,7 +210,7 @@ export default {
if (!emailPass) {
self.codeLoading = true
self.statusMsg = '验证码已发送...'
http.get('/users/send',{params:{
http.get('/users/send/',{params:{
email:self.ruleForm.email
}}).then((res)=>{
let count = 60
@ -190,7 +231,7 @@ export default {
this.isDisable = false
this.statusMsg = ''
this.codeLoading = false
console.log(err.response.data.message)
console.log(err)
})
// getEmailCode(self.ruleForm.email).then(res => {
@ -215,19 +256,46 @@ export default {
// //
// password: this.ruleForm.pwd
// }
http.get('/users/register',{
params:{
username:this.ruleForm.account,
email:this.ruleForm.email,
password:this.ruleForm.pwd,
security_code:this.ruleForm.code
const params = new URLSearchParams();
params.append('username', this.ruleForm.account);
params.append('password', this.ruleForm.pwd);
params.append('email', this.ruleForm.email);
params.append('security_code', this.ruleForm.code);
params.append('invite_code', this.ruleForm.invite);
params.append('realname', this.ruleForm.name);
params.append('telephone', this.ruleForm.tele);
params.append('unit', this.ruleForm.unit);
params.append('position', this.ruleForm.position);
// http.post('/users/register/',{
// params:{
// username:this.ruleForm.account,
// email:this.ruleForm.email,
// password:this.ruleForm.pwd,
// security_code:this.ruleForm.code,
// invite_code:this.ruleForm.invite,
// realname:this.ruleForm.name,
// telephone:this.ruleForm.tele,
// unit:this.ruleForm.unit,
// position:this.ruleForm.position
// }
http.post('/users/register/',params).then((res)=>{
if (res.data.message===1){
this.$message({
showClose: true,
message: res.data.data,
type: 'warning'
});
//
this.$router.push('/login')
}
else {
alert(res.data.data)
}
}).then((res)=>{
alert(res.data)
}).catch((error)=>{
alert(error)
})
// register(user).then(res => {
// user(user).then(res => {
// console.log(res)
// this.$message({
// showClose: true,
@ -241,6 +309,13 @@ export default {
// console.log(err.response.data.message)
// })
}
else {
this.$message({
showClose: true,
message:'请检查信息是否正确',
type: 'warning'
});
}
})
}
}

2
src/utils/EventBus.js Normal file
View File

@ -0,0 +1,2 @@
import Vue from 'vue'
export default new Vue()

8
src/utils/javaRequest.js Normal file
View File

@ -0,0 +1,8 @@
import axios from "axios";
const javaReq=axios.create({
// baseURL:'http://61.240.140.173:8088/',//java的地址前缀
baseURL:'/api/',//后端的地址前缀
})
export default javaReq

View File

@ -5,12 +5,30 @@ import axios from 'axios'
const http = axios.create({
//通用请求
baseURL:'http://61.240.140.173:8000/',//后端的地址前缀
// baseURL:'/proxy_url',//后端的地址前缀
// baseURL:'/api/',//mock前缀
// baseURL:'/api/',//后端的地址前缀
// withCredentials:truenpm run serve
// async:true,
// timeout:'10000',//10s 超时时间
// headers:{token:sessionStorage.getItem('token')?sessionStorage.getItem('token'):'null'}
})
http.interceptors.request.use(
function(config) {
// 在请求发送之前,为 headers 添加 token
const token =sessionStorage.getItem('token')?sessionStorage.getItem('token'):'null';
const name =sessionStorage.getItem('user')?sessionStorage.getItem('user'):'null';
config.headers['token'] = token
// config.headers['user_name']=name
return config;
},
function(error) {
return Promise.reject(error);
}
);
// // 添加请求拦截器
// http.interceptors.request.use(function (config) {
@ -32,3 +50,4 @@ const http = axios.create({
export default http//将实例对外暴露

18
src/views/404.vue Normal file
View File

@ -0,0 +1,18 @@
<template>
<div>
<h1>404 - Page Not Found</h1>
<p>The page you are looking for does not exist.</p>
</div>
</template>
<script>
export default {
name: 'NotFound'
};
</script>
<style scoped>
h1 {
color: #ffce2a;
}
</style>

View File

@ -7,7 +7,8 @@
<el-container>
<el-header>
<common-header />
<common-header-user v-if="!state"/>
<common-header-admin v-if="state"/>
</el-header>
<el-main>
@ -15,9 +16,11 @@
<!-- 路由匹配组建将渲染到这里 -->
<!-- 将每个页面提供边距(封套) -->
<div class='wrapper'>
<router-view> </router-view>
<keep-alive :include="cachedList" >
<router-view :key="$route.fullPath"/>
</keep-alive>
</div>
</el-main>
</el-container>
</el-container>
@ -26,14 +29,16 @@
<script>
import CommonAside from "../components/CommonAside.vue";
import CommonHeader from "../components/CommonHeader.vue";
import user from "@/store/user";
let isLogin=false
import CommonHeaderAdmin from "@/components/CommonHeaderAdmin";
import CommonHeaderUser from "@/components/CommonHeaderUser";
import {mapState} from "vuex";
export default {
//
// beforeRouteEnter(to ,from,next){
// console.log(to.name)
// if (to.meta.requireAuth){//
// if (user.state.isLogin || !user.state.isLogin && (to.name==='/register' ||to.name==='/login')){
// if (user.state.isLogin || !user.state.isLogin && (to.name==='/user' ||to.name==='/login')){
// next()
// }else {
// next('/login')
@ -52,7 +57,7 @@ export default {
// beforeRouteEnter(to ,from,next){
// console.log(to.name)
// if (to.name==='/register' || to.name==='/login'){
// if (to.name==='/user' || to.name==='/login'){
// next()
// }
// else if (isLogin){
@ -64,12 +69,51 @@ export default {
//
// },
data() {
return {};
return {
user:''
};
},
computed:{
// state(){
// return this.$store.state.isLogin
//
// },
...mapState(['isLogin']),
// state(){
// return this.$store.getters.getUserState || sessionStorage.getItem('stats')!==null
// }
//cached
...mapState({//mapState...
cached: state => state.tab.cachedList
}),
cachedList(){
// console.log('maincachedList' ,this.cached)
return this.cached
},
state(){
return sessionStorage.getItem('stats') === '1'
},
},
watch:{
// state(newValue){
// console.log(1)
// console.log(newValue)
// }
},
mounted() {
console.log(this.state)
},
//
components: {
CommonAside,
CommonHeaderUser,
CommonHeaderAdmin,
CommonHeader,
},
};

View File

@ -4,7 +4,7 @@
<el-card style='height: 750px;margin-bottom: 10px;' :body-style={padding:0}>
<!-- height:400px -->
<!-- 1上标 -->
<span class="superscript" style="width: 20px; height: 40px;">系统风险分析</span>
<span class="superscript" style="width: 20px; height: 40px;">系统性影响指标分析</span>
<!-- 2产品搜索栏 -->
<div class="form">
@ -29,11 +29,20 @@
<!-- <el-checkbox v-model="other">其他</el-checkbox>-->
</el-select>
</el-form-item>
<el-form-item label="地区" prop="地区">
<el-select size="mini" v-model="formInline1.region" multiple clearable>
<el-option v-for='(val,key) in region' :prop="key" :label="val" :value="val" :key="key"/>
</el-select>
</el-form-item>
<el-form-item label="开始时间" prop="开始时间">
<el-date-picker
v-model="formInline1.start_date"
type="date"
placeholder="年/月/日"
placeholder="年/月/日"
size="mini">
</el-date-picker>
</el-form-item>
@ -42,7 +51,7 @@
<el-date-picker
v-model="formInline1.end_date"
type="date"
placeholder="年/月/日"
placeholder="年/月/日"
size="mini">
</el-date-picker>
</el-form-item>
@ -71,6 +80,7 @@
:cell-style="{padding:'0px'}"
header-row-class-name="active_header"
header-cell-class-name="active_header"
height="370"
cell-class-name="content_center">
<!-- header-row-class-name 表头行 加classname -->
<!-- cell-class-name 单元格加名字 -->
@ -84,7 +94,11 @@
</el-table-column><!--西 -->
<!-- show-overflow-tooltip可以省略展示较多的文字内容 -->
</el-table>
</div>
<el-card style='height: 170px; margin: 5px 5px 2px 5px;background-color: rgba(200, 200, 200, 0.812);'>
<span v-html="info" ></span>
</el-card>
</div>
</el-tab-pane>
<!-- 风险价值动态变化 -->
<el-tab-pane label="风险价值动态变化">
@ -125,6 +139,7 @@
:cell-style="{padding:'0px'}"
header-row-class-name="active_header"
header-cell-class-name="active_header"
height="370"
cell-class-name="content_center">
<!-- header-row-class-name 表头行 加classname -->
<!-- cell-class-name 单元格加名字 -->
@ -153,6 +168,8 @@
</template>
<script>
import qs from 'qs'
import * as echarts from "echarts"
import http from '../utils/request'
import addline from "../components/addline.vue";
@ -163,7 +180,45 @@
// },
data() {
return {
cp:{},
region:
[
'全部',
'北京市',
'天津市',
'河北省',
'山西省',
'内蒙古自治区',
'辽宁省',
'吉林省',
'黑龙江省',
'上海市',
'江苏省',
'浙江省',
'安徽省',
'福建省',
'江西省',
'山东省',
'河南省',
'湖北省',
'湖南省',
'广东省',
'广西壮族自治区',
'海南省',
'重庆市',
'四川省',
'贵州省',
'云南省',
'西藏自治区',
'陕西省',
'甘肃省',
'青海省',
'宁夏回族自治区',
'新疆维吾尔自治区',
'台湾省',
'香港特别行政区',
'澳门特别行政区'
],
cp:{},
dat:{},
ra:[],
// bank:false,
@ -178,6 +233,7 @@
industry:[],
start_date:'',
end_date:'',
region:[]
},
// 2-
formInline2: {
@ -249,7 +305,8 @@ formInline2: {
name:'华夏商行',
},
],
//线
//
info:"·第一个指标β系数表示公司i(或金融机构)与整体回报损失之间的相关性同时它也是影响公司i(或金融机构)陷入危机时对整体的风险溢出大小的要素之一。按照该指标进行排名时,排名靠前的公司(或金融机构),如浙商银行、紫金银行、民生银行等,说明其与整体之间的联动性比较强,对系统风险的贡献排名比较靠前。<br/>·第二个指标条件风险价值表示当i公司(或金融机构)处于极端困境情况时,系统整体的最大可能损失。<br/>·第三个指标,风险价值(机构处于极端困境情况时),表示由于某种市场因素如股票价格、汇率或者利率等突然发生变化时,某项金融产品头寸或者资产组合在特定置信水平及持有期条件下所可能遭受的最大损失。按照该指标进行排名时,排名靠前的公司(或金融机构)说明其风险较高风险防控能力还需要加强。该指标对于公司i(或金融机构)自身的风险监控尤为重要,风险较高时很容易成为系统性危机的诱因。<br/>·第四个指标,风险价值(机构处于常态时),表示该机构处于常态时,某项金融产品头寸或者资产组合在特定置信水平及持有期条件下所可能遭受的最大损失。<br/>·第五个指标溢出风险价值可以直观的反映公司i(或金融机构)的风险事件对整体的风险溢出值衡量了公司i(或金融机构)对系统风险的贡献程度。按照该指标进行排名时,排名靠前的公司(或金融机构),说明其对系统造成的影响(系统溢出效应)将更加明显,监管部门需要尤为关注。"
}
@ -257,12 +314,12 @@ formInline2: {
mounted(){},
methods: {
//
resetForm(formInline) {
this.$refs[formInline].resetFields();
console.log(this.formInline)
this.formInline1= {}
console.log(this.formInline1)
console.log('正在清空')
},
@ -270,388 +327,400 @@ formInline2: {
onSubmit1_query() {//
console.log("系统风险分析查询")
console.log(this.formInline1.market)
console.log(this.formInline1.industry)
http.get(
"/risk/risk_set",
{params:{
name1: this.formInline1.industry,//
name2: this.formInline1.market,//
start_date:this.formInline1.start_date,
end_date:this.formInline1.end_date,
}}).then(response => {
if(this.formInline1.region.includes('全部') && this.formInline1.region.length!==1 ){
this.$message.warning('请重新选择')
}
else {
http.get(
"/risk/risk_set/",
{params:{
industry: this.formInline1.industry,//
market: this.formInline1.market,//
start_date:this.formInline1.start_date,
end_date:this.formInline1.end_date,
region:this.formInline1.region
},
//
paramsSerializer:params => {
return qs.stringify(params,{indices:false})
}
}).then(response => {
this.tableData_1_1= response.data.data['covar_table']
this.tableData_1_2= response.data.data['ra']
this.tableData_1_2= response.data.data['ra']
this.dat=response.data.data['data']
this.ra=response.data.data['ra']
this.cp=response.data.data['cp']
//
//
const echarts1 = echarts.init(this.$refs.echarts_1)
{ let keys,x,bank,insurance,security,other,legend
//
//
const echarts1 = echarts.init(this.$refs.echarts_1)
{ let keys,x,bank,insurance,security,other,legend
for (keys in this.cp['Var']){
if (keys=== 'x'){
x=this.cp['Var']['x']
}
if (keys=== 'bank'){
bank=this.cp['Var']['bank']
}
if (keys=== 'insurance'){
insurance=this.cp['Var']['insurance']
}
if (keys=== 'zhengquan'){
security=this.cp['Var']['zhengquan']
}
if (keys=== 'other'){
other=this.cp['Var']['other']
}
if (keys=== 'data1'){
legend=this.cp['Var']['data1']
}
}
const option_1 = {
//
toolbox: {
feature: {
saveAsImage: {}
}
},
legend: {
data: legend},
title: [
{
x :'center',
y:'bottom',
text: '各行业风险价值(机构处于极端困难情况时)的时序变化'
},
],
tooltip: {
trigger: 'axis'
},
xAxis: {
data:x
},
yAxis: [
{},
],
series: [
{
type: 'line',
showSymbol: true,
// color
name:'银行',
data:bank
},
{
type: 'line',
showSymbol: true,
// color
name:'保险',
data:insurance
},
{
type: 'line',
showSymbol: true,
// color
name:'证券',
data:security
},
{
type: 'line',
showSymbol: true,
// color
name:'其他',
data:other
},
]
};
echarts1.setOption(option_1)}
//
const echarts2 = echarts.init(this.$refs.echarts_2)
{let keys,x,bank,insurance,security,other,legend
for (keys in this.cp['Delta_Covar']){
if (keys=== 'x'){
x=this.cp['Delta_Covar']['x']
}
if (keys=== 'bank'){
bank=this.cp['Delta_Covar']['bank']
}
if (keys=== 'insurance'){
insurance=this.cp['Delta_Covar']['insurance']
}
if (keys=== 'zhengquan'){
security=this.cp['Delta_Covar']['zhengquan']
}
if (keys=== 'other'){
other=this.cp['Delta_Covar']['other']
}
if (keys=== 'data1'){
legend=this.cp['Delta_Covar']['data1']
}
}
const option_2 = {
//
toolbox: {
feature: {
saveAsImage: {}
for (keys in this.cp['Var']){
if (keys=== 'x'){
x=this.cp['Var']['x']
}
if (keys=== 'bank'){
bank=this.cp['Var']['bank']
}
if (keys=== 'insurance'){
insurance=this.cp['Var']['insurance']
}
if (keys=== 'zhengquan'){
security=this.cp['Var']['zhengquan']
}
if (keys=== 'other'){
other=this.cp['Var']['other']
}
if (keys=== 'data1'){
legend=this.cp['Var']['data1']
}
}
},
legend: {
data: legend},
title: [
{
x :'center',
y:'bottom',
const option_1 = {
//
toolbox: {
feature: {
saveAsImage: {}
}
},
legend: {
data: legend},
title: [
{
x :'center',
y:'bottom',
text: '各行业风险价值(机构处于极端困难情况时)的时序变化'
},
],
tooltip: {
trigger: 'axis'
},
xAxis: {
data:x
},
text: '各行业风险价值(机构处于极端困难情况时)的时序变化'
},
],
tooltip: {
trigger: 'axis'
},
xAxis: {
data:x
},
yAxis: [
{},
],
yAxis: [
{},
],
series: [
{
type: 'line',
showSymbol: true,
// color
name:'银行',
data:bank
},
{
type: 'line',
showSymbol: true,
// color
name:'保险',
data:insurance
},
{
type: 'line',
showSymbol: true,
// color
name:'证券',
data:security
},
{
type: 'line',
showSymbol: true,
// color
name:'其他',
data:other
},
series: [
{
type: 'line',
showSymbol: true,
// color
name:'银行',
data:bank
},
{
type: 'line',
showSymbol: true,
// color
name:'保险',
data:insurance
},
{
type: 'line',
showSymbol: true,
// color
name:'证券',
data:security
},
{
type: 'line',
showSymbol: true,
// color
name:'其他',
data:other
},
]
};
echarts2.setOption(option_2)}
]
};
echarts1.setOption(option_1)}
//
const echarts2 = echarts.init(this.$refs.echarts_2)
{let keys,x,bank,insurance,security,other,legend
for (keys in this.cp['Delta_Covar']){
if (keys=== 'x'){
x=this.cp['Delta_Covar']['x']
}
if (keys=== 'bank'){
bank=this.cp['Delta_Covar']['bank']
}
if (keys=== 'insurance'){
insurance=this.cp['Delta_Covar']['insurance']
}
if (keys=== 'zhengquan'){
security=this.cp['Delta_Covar']['zhengquan']
}
if (keys=== 'other'){
other=this.cp['Delta_Covar']['other']
}
if (keys=== 'data1'){
legend=this.cp['Delta_Covar']['data1']
}
}
const option_2 = {
//
toolbox: {
feature: {
saveAsImage: {}
}
},
legend: {
data: legend},
title: [
{
x :'center',
y:'bottom',
text: '各行业风险价值(机构处于极端困难情况时)的时序变化'
},
],
tooltip: {
trigger: 'axis'
},
xAxis: {
data:x
},
yAxis: [
{},
],
series: [
{
type: 'line',
showSymbol: true,
// color
name:'银行',
data:bank
},
{
type: 'line',
showSymbol: true,
// color
name:'保险',
data:insurance
},
{
type: 'line',
showSymbol: true,
// color
name:'证券',
data:security
},
{
type: 'line',
showSymbol: true,
// color
name:'其他',
data:other
},
]
};
echarts2.setOption(option_2)}
//
const echarts3 = echarts.init(this.$refs.echarts_3)
{let keys,GRACH_Volatility,Real_Volatility,x
{let keys,GRACH_Volatility,Real_Volatility,x
for (keys in this.dat['GARCH']){
if (keys=== 'GARCH_Volatility'){
GRACH_Volatility=this.dat['GARCH']['GARCH_Volatility']
}
if (keys=== 'Real_Volatility'){
Real_Volatility=this.dat['GARCH']['Real_Volatility']
}
if (keys=== 'x'){
x=this.dat['GARCH']['x']
}}
const option_3 = {
//
toolbox: {
feature: {
saveAsImage: {}
for (keys in this.dat['GARCH']){
if (keys=== 'GARCH_Volatility'){
GRACH_Volatility=this.dat['GARCH']['GARCH_Volatility']
}
},
// Make gradient line here
if (keys=== 'Real_Volatility'){
Real_Volatility=this.dat['GARCH']['Real_Volatility']
}
if (keys=== 'x'){
x=this.dat['GARCH']['x']
}}
// visualMap: [//
// {
// show: false,
// type: 'continuous',
// seriesIndex: 0,
// min: 0,
// max: 400
// },
// ],
// title: [
// {
// x : 'center',
// y:'bottom',
// text: ''
// },
// ],
legend: {
data: ['GARCH(1,1) Volatility', 'Real Volatility']
},
tooltip: {
trigger: 'axis'
},
xAxis: {
data:x
},
yAxis: [
{},
],
series: [
{
name: 'GARCH(1,1) Volatility',
type: 'line',
showSymbol: true,
color:'#654e3e',//
data: GRACH_Volatility
},
{
name: 'Real Volatility',
type: 'line',
showSymbol: true,
color:'#b0896d',//
data: Real_Volatility,//
const option_3 = {
//
toolbox: {
feature: {
saveAsImage: {}
}
},
// Make gradient line here
]
};
echarts3.setOption(option_3)}
// visualMap: [//
// {
// show: false,
// type: 'continuous',
// seriesIndex: 0,
// min: 0,
// max: 400
// },
// ],
// title: [
// {
// x : 'center',
// y:'bottom',
// text: ''
// },
// ],
legend: {
data: ['GARCH(1,1) Volatility', 'Real Volatility']
},
tooltip: {
trigger: 'axis'
},
xAxis: {
data:x
},
yAxis: [
{},
],
series: [
{
name: 'GARCH(1,1) Volatility',
type: 'line',
showSymbol: true,
color:'#654e3e',//
data: GRACH_Volatility
},
{
name: 'Real Volatility',
type: 'line',
showSymbol: true,
color:'#b0896d',//
data: Real_Volatility,//
},
]
};
echarts3.setOption(option_3)}
//
const echarts4 = echarts.init(this.$refs.echarts_4)
{let keys,PCA1,PCA10,PCA5,PCA25,x
{let keys,PCA1,PCA10,PCA5,PCA25,x
for (keys in this.dat['PCA']){
if (keys=== 'PCA1'){
PCA1=this.dat['PCA']['PCA1']
}
if (keys=== 'PCA10'){
PCA10=this.dat['PCA']['PCA10']
}
if (keys=== 'x'){
x=this.dat['PCA']['x']
}
if (keys=== 'PCA25'){
PCA25=this.dat['PCA']['PCA25']
}
if (keys=== 'PCA5'){
PCA5=this.dat['PCA']['PCA5']
}}
const option_4 = {
//
toolbox: {
feature: {
saveAsImage: {}
for (keys in this.dat['PCA']){
if (keys=== 'PCA1'){
PCA1=this.dat['PCA']['PCA1']
}
},
title: {
text: '主成分解释股票收益率变动的比例'
if (keys=== 'PCA10'){
PCA10=this.dat['PCA']['PCA10']
}
if (keys=== 'x'){
x=this.dat['PCA']['x']
}
if (keys=== 'PCA25'){
PCA25=this.dat['PCA']['PCA25']
}
if (keys=== 'PCA5'){
PCA5=this.dat['PCA']['PCA5']
}}
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
const option_4 = {
//
toolbox: {
feature: {
saveAsImage: {}
}
}
},
legend: {
data: ['PC1', 'PC5', 'PC10', 'PC25']
},
},
title: {
text: '主成分解释股票收益率变动的比例'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
legend: {
data: ['PC1', 'PC5', 'PC10', 'PC25']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [
{
type: 'category',
boundaryGap: false,
data: x,
}
],
yAxis: [
{
type: 'value'
}
],
series: [
{
name: 'PC1',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
data: PCA1
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
{
name: 'PC5',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
xAxis: [
{
type: 'category',
boundaryGap: false,
data: x,
}
],
yAxis: [
{
type: 'value'
}
],
series: [
{
name: 'PC1',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
data: PCA1
},
data: PCA5
},
{
name: 'PC10',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
{
name: 'PC5',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
data: PCA5
},
data:PCA10
},
{
name: 'PC25',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
{
name: 'PC10',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
data:PCA10
},
{
name: 'PC25',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
data: PCA25
},
data: PCA25
},
]
]
}
echarts4.setOption(option_4)
}
echarts4.setOption(option_4)
}
})
}
},
//
onSubmit_grayish(){
console.log("查看格兰杰因果关系网络")
http.get(
"/risk/risk_net",).then(response => {
"/risk/risk_net/",).then(response => {
let links= response.data.data['links']
let nodes=response.data.data['nodes']
const graph=echarts.init(this.$refs.echarts_5)
@ -703,7 +772,7 @@ formInline2: {
onSubmit2_query() {
console.log("个体风险分析")
http.get(
"/risk/risk_individual",
"/risk/risk_individual/",
{params:{
name1: this.formInline.industry,//
name2: this.formInline.market,//or
@ -765,25 +834,42 @@ formInline2: {
}
//
/deep/ .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf {
border-bottom: 1px solid rgba(224, 223, 223, 0.771) !important;
padding: 8px 0 !important;//
min-width: 0 !important;
}
.el-table .el-table__cell {
padding: 12px 0;
min-width: 0;
}
/deep/ .active_header{//
color: #110101;
font-size: 9px;
text-align: center !important;
// height: 1px;
}
/deep/ .content_center{//
text-align: center !important;
font-size: 10px;
}
.table{
//
// margin:10px;
font-size: 12px;
padding: 0px 5px 2px 5px;//
//
/deep/ .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf {
// border-bottom: 1px solid #333333 !important;
padding: 1px 1px 1px 1px;
min-width: 0;
}
// cell
.el-table .el-table__cell {
padding: 0px 0;
min-width: 0;
// border-color:#333333;
}
/deep/ .active_header{//
color: #110101;
font-size: 13px;
text-align: center !important;
// border-color:#333333;
// height: 1px;
}
/deep/ .content_center{//
text-align: center !important;
font-size: 13px;
// border-color:#333333;
}
}
.kala_text {
white-space: pre-wrap;
word-break: break-word;

40
src/views/SSE.vue Normal file
View File

@ -0,0 +1,40 @@
<template>
<div>
<h1>SSE数据</h1>
<ul>
<li v-for="message in messages" :key="message.id">{{ message.data }}</li>
</ul>
</div>
</template>
<script>
export default {
name: "SSE.vue",
data(){
return{
message:''
}
},
methods:{
longConnect(){
const eventSource=new EventSource('http://61.240.140.173:9999/sse?message="fine"')
eventSource.onmessage=function (event){
const result= event.data;
console.log('receive:',result)
}
eventSource.addEventListener('message', (event) => {
this.messages.push({ id: Date.now(), data: event.data });
console.log( event.data)
});
}
},
mounted() {
this.longConnect()
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,594 @@
<!-- 用户管理 -->
<template>
<div>
<el-row>
<el-tabs type="border-card">
<el-tab-pane label="邀请码">
<div class="form">
<!-- inline="true"表单域在一行 -->
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<!-- <el-form-item label="搜索用户名">-->
<!-- <el-input v-model="formInline.name" size="mini" placeholder="" ></el-input>-->
<!-- </el-form-item>-->
<el-form-item style="margin-left: 10px;">
<el-button @click="onSubmit" >查看所有用户</el-button>
</el-form-item>
</el-form>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<!-- <el-form-item>-->
<!-- <el-button v-if="permissions=='管理员'" type="warning" plain @click="onSubmit" icon="el-icon-postcard" size="mini" >点击生成邀请码</el-button>-->
<!-- </el-form-item>-->
<el-form-item >
<el-button type="primary" plain style="margin-right: 10px;margin-left: 10px;" size="mini" icon="el-icon-plus" @click="addInviteCode">点击添加邀请码</el-button>
</el-form-item>
</el-form>
</div>
<el-table v-if="permissions=='管理员'" class='table' :data="tableData" :header-cell-style="{background: 'rgba(242, 242, 242, 0.654901960784314)'}"
border
height="100%"
:row-style="{height:'36px'}"
:cell-style="{padding:'0px'}"
header-row-class-name="active_header"
header-cell-class-name="active_header"
cell-class-name="content_center">
<el-table-column v-for='(val,key) in tableLabel' :prop="key" :label="val" /><!--插槽里面没有东西就可以用单标签 -->
<el-table-column
prop="scale"
label="操作">
<template slot-scope="scope">
<!-- <el-button v-if="scope.row.权限=='管理员'" v-on:click="detail(scope.row)" size="mini" type="primary">生成邀请码</el-button> -->
<el-button v-on:click="modify(scope.row)" size="mini" >修改</el-button>
<el-button v-on:click="delete(scope.row)" size="mini" >删除</el-button>
</template>
</el-table-column>
</el-table>
<el-button style='width: 150px;' @click="queryInviteCode">邀请码管理</el-button>
<el-dialog title="邀请码使用情况" :visible.sync="dialogVisible" width="100%">
<el-table
:data="inviteCodeData"
stripe
style="width: 100%">
<el-table-column
prop="code"
label="邀请码"
width="200">
</el-table-column>
<el-table-column
prop="ctime"
label="生成时间"
width="300">
</el-table-column>
<el-table-column
prop="tuser"
label="使用者"
width="100">
</el-table-column>
<el-table-column
prop="status"
label="是否使用"
width="100">
</el-table-column>
<el-table-column
prop="utime"
label="使用时间"
width="300">
</el-table-column>
</el-table>
</el-dialog>
<el-dialog title="用户列表" :visible.sync="usertDataVisible" width="100%">
<el-table
:data="usertData"
stripe
style="width: 100%">
<el-table-column
prop="realname"
label="姓名"
width="200">
</el-table-column>
<el-table-column
prop="username"
label="用户名"
width="200">
</el-table-column>
<el-table-column
prop="telephone"
label="电话"
width="300">
</el-table-column>
<el-table-column
prop="email"
label="邮箱"
width="200">
</el-table-column>
<el-table-column
prop="unit"
label="单位"
width="200">
</el-table-column>
<el-table-column
prop="position"
label="职位"
width="200">
</el-table-column>
<el-table-column
prop="status"
label="是否为管理员1为管理员"
width="80">
</el-table-column>
</el-table>
</el-dialog>
<el-dialog title="当前生成的邀请码" :visible.sync="inviteCodeVisible" width="100%">
{{inviteCode}}
</el-dialog>
</el-tab-pane>
<el-tab-pane label="用户活动" height="500px">
<el-form :inline="true">
<el-form-item >
<el-input v-model="name" placeholder="请输入用户名" size="mini" @keyup.enter.native="activity(name,start,end)" @submit.native.prevent></el-input>
</el-form-item>
<el-form-item label="开始时间" prop="开始时间">
<el-date-picker
v-model="start"
type="date"
placeholder="年/月/日"
size="mini"
value-format="yyyy-MM-dd[T]hh:mm:ss[.000Z]"
>
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="结束时间">
<el-date-picker
v-model="end"
type="date"
placeholder="年/月/日"
size="mini"
value-format="yyyy-MM-dd[T]hh:mm:ss[.000Z]"
>
</el-date-picker>
</el-form-item>
<el-form-item >
<el-button type="primary" plain style="margin-right: 10px;margin-left: 10px;" @click="activity(name,start,end)">查看</el-button>
</el-form-item>
</el-form>
<!--用户表-->
<el-table class='table' :data="activityData.slice((currentPage-1)*pageSize,currentPage*pageSize)" :header-cell-style="{background: 'rgba(242, 242, 242, 0.654901960784314)'}"
border
height="100%"
:row-style="{height:'36px'}"
:cell-style="{padding:'0px'}"
header-row-class-name="active_header"
header-cell-class-name="active_header"
cell-class-name="content_center">
<el-table-column v-for='(val,key) in activityLabel' :prop="key" :label="val" /><!--插槽里面没有东西就可以用单标签 -->
<!-- <el-table-column-->
<!-- prop="scale"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- &lt;!&ndash; <el-button v-if="scope.row.权限=='管理员'" v-on:click="detail(scope.row)" size="mini" type="primary">生成邀请码</el-button> &ndash;&gt;-->
<!-- <el-button v-on:click="modify(scope.row)" size="mini" >修改</el-button>-->
<!-- <el-button v-on:click="delete(scope.row)" size="mini" >删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<!-- 分页-->
<div class="block" style="margin-top:15px;">
<el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page="currentPage"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="activityData.length">
</el-pagination>
</div>
</el-tab-pane>
<el-tab-pane label="访问模块" height="500px">
<el-form :inline="true">
<el-form-item label="开始时间" prop="开始时间">
<el-date-picker
v-model="moduleStart"
type="date"
placeholder="年/月/日"
size="mini"
value-format="yyyy-MM-dd[T]hh:mm:ss[.000Z]"
>
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="结束时间">
<el-date-picker
v-model="moduleEnd"
type="date"
placeholder="年/月/日"
size="mini"
value-format="yyyy-MM-dd[T]hh:mm:ss[.000Z]"
>
</el-date-picker>
</el-form-item>
<el-form-item >
<el-button type="primary" plain style="margin-right: 10px;margin-left: 10px;" @click="moduleAct(moduleStart,moduleEnd)">查看</el-button>
</el-form-item>
</el-form>
<div id="module" ref="module" style="width:100%;height:300px;"></div>
<div id="time" ref="time" style="width:100%;height:300px;"></div>
</el-tab-pane>
</el-tabs>
</el-row>
</div>
</template>
<script>
import http from "@/utils/request";
import * as echarts from "echarts"
import {Loading} from "element-ui";
export default {
components:{
},
data () {
return {
moduleStart:'',
moduleEnd:'',
start:'',
end:'',
currentPage: 1, //
total: 20, //
pageSize: 10, //
name:'',
activityData:[],
usertData:'',
usertDataVisible:false,
inviteCode:'',
inviteCodeData:[],
dialogVisible:false,
inviteCodeVisible:false,
formInline:{
name:''
},
//
// permissions:'',
permissions:'普通用户',
activityLabel:{
用户名:'用户名',
IP:'IP',
访问模块:'访问模块',
关键词:'关键词',
时间:'时间',
},
tableLabel: {
用户名: '用户名',
姓名: '姓名',
电话: '电话',
邮箱: '邮箱',
单位:'单位',
职位:'职位',
权限:'权限',
},
tableData:[
{
用户名: 'user1',
权限:'管理员',
},
{
用户名: 'test1',
权限:'普通用户',
},
{
用户名: 'test2',
权限:'普通用户',
},
{
用户名: 'test3',
权限:'普通用户',
},
{
用户名: 'user2',
权限:'管理员',
},
{
用户名: 'test4',
权限:'普通用户',
},
{
用户名: 'test5',
权限:'普通用户',
},
]
}
},
mounted(){
},
watch:{
activityData(){
console.log(this.activityData.length)
this.total= this.activityData.length
}
},
methods:{
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.currentPage = 1;
this.pageSize = val;
},
//
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.currentPage = val;
},
activity(name,start,end){
const params = new URLSearchParams();
params.append('username', name);
params.append('stime',start);
params.append('etime',end);
// if (start!=='' && end!==''){
// ''
// }
let options={
text:'请稍等'
}
let loadingInstance = Loading.service(options);
http.post('/users/user_act/',params).then((res)=>{
this.activityData=res.data
loadingInstance.close()
}).finally(()=>
loadingInstance.close()
)
},
moduleAct(moduleStart,moduleEnd){
const params = new URLSearchParams();
params.append('stime',moduleStart)
params.append('etime',moduleEnd)
let options={
text:'请稍等'
}
let loadingInstance = Loading.service(options);
http.post('/users/model_act/',params).then((res)=>{
let data=[]
for (let i in res.data){
let tmp={}
tmp['name']=res.data[i]['访问模块']
tmp['value']=res.data[i]['次数']
data.push(tmp)
}
// let chartDom = document.getElementById('module');
let myChart = echarts.init(this.$refs.module)
let option = {
tooltip: {
trigger: 'item'
},
legend: {
top: '5%',
left: 'center'
},
series: [
// {
// name: '访',
// type: 'pie',
// radius: ['50%', '70%'],
// avoidLabelOverlap: false,
// label: {
// show: false,
// position: 'center'
// },
// emphasis: {
// label: {
// show: true,
// fontSize: '30',
// fontWeight: 'bold'
// }
// },
// labelLine: {
// show: false
// },
// data: data
// }
{
name: 'Access From',
type: 'pie',
radius: ['40%', '70%'],
avoidLabelOverlap: false,
padAngle: 5,
itemStyle: {
borderRadius: 10
},
label: {
show: false,
position: 'center'
},
emphasis: {
label: {
show: true,
fontSize: 40,
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: data
}
]
};
// console.log(option)
myChart.setOption(option)
console.log(myChart.getOption())
})
http.post('/users/time_act/',params).then((res)=>{
let data=[]
let time=[]
for (let i in res.data){
time.push(res.data[i]['访问模块'])
data.push(res.data[i]['访问量'])
}
// let chartDom = document.getElementById('time');
let myChart = echarts.init(this.$refs.time);
let option = {
xAxis: {
type: 'category',
data: data
},
yAxis: {
type: 'value'
},
series: [
{
data: time,
type: 'line',
smooth: true
}
]
};
// console.log(option)
myChart.setOption(option);
console.log(myChart.getOption())
})
loadingInstance.close()
},
queryInviteCode(){
http.get('/users/invite_all/').then((res)=>{
this.inviteCodeData=res.data
this.dialogVisible=true
})
},
addInviteCode(){
http.get('/users/invite/').then((res)=>{
this.inviteCode=res.data
this.inviteCodeVisible=true
})
},
onSubmit(){
http.post('/users/all_users/').then((res)=>{
this.usertData=res.data
this.usertDataVisible=true
})
},
modify(){},
delete(){},
},
}
</script>
<style lang='less' scoped>
.form1{//2
display:flex;
justify-content:space-between;//
margin:0px;
// height: 40px;
padding-left: 5px;
.el-form-item {
margin-bottom: 5px;
}
}
.form{//
display:flex;
justify-content:space-between;//
// margin-top:5px;
// height: 40px;
padding-left: 5px;
}
.table{
margin-top: 0px;
margin-right: 0px;
margin-left: 5px;
padding: 0px;
}
// /deep/ .el-table {
// width: 98.5% !important;
// }
// /deep/ .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf {
// border-bottom: 1px solid rgba(224, 223, 223, 0.771) !important;
// padding: 0px 0 !important;
// min-width: 0 !important;
// }
// .el-table .el-table__cell {
// padding: 20px 0;
// min-width: 0;
// }
/deep/ .active_header{//
color: #333333;
font-size: 13px;
text-align: center !important;
// height: 1px;
}
/deep/ .content_center{//
text-align: center !important;
font-size: 13px;
}
.grayish_btn{//
color: #fff;//
background-color: #aaaaaa;//
}
.el-tabs--card {
height: calc(100vh - 110px);
/* overflow-y: auto; */
}
.el-tab-pane {
height: calc(100vh - 110px);
overflow-y: auto;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,146 +0,0 @@
<template>
<div id="backcont">
<div class="meituan-contentr">
<div class="login-cont ">
<div class="meituan-title">登录</div>
<div class="meituan-user">
<p>账号</p>
<el-input v-model='account' class="inptflex" placeholder="请输入账号" clearable />
</div>
<div class="meituan-user">
<p>密码</p>
<el-input v-model='password' class="inptflex" placeholder="请输入密码" clearable />
</div>
<!-- 登录和注册的按钮切换 -->
<div class="reg-view" @click="regi= regi=='登录'? '注册':'登录'"><p>{{regi}}</p></div>
<!-- 登录或注册按钮提交 -->
<el-button v-if="regi=='注册'" @click="signin" type="primary" class="meituan-btn">登录</el-button>
<el-button v-else @click="register" type="primary" class="meituan-btn">注册</el-button>
</div>
</div>
</div>
</template>
<script>
import { reactive,toRefs } from 'vue';
import http from "axios"
export default{
setup(){
const user =reactive({
account:'',
password:'',
regi:'注册'
})
//
const signin=()=>{
console.log(user.account,user.password)
http({
url:'/sign',
method:'post'
}).then((res)=>{
alert('请求成功!');
let username=user.account;
let password=user.password;
});
}
//
const register=()=>{
console.log(user.account,user.password)}
return{...toRefs(user),signin,register}
}
}
</script>
<style lang="less" scoped>
#backcont {
background-image: url(../assets/background.jpg);
background-attachment : fixed;
background-repeat: no-repeat;
background-size: cover;
-webkit-background-size: cover;
moz-background-size: cover;
min-height: 100vh;
}
.meituan-contentr {
position : absolute;
top: 50%;
left: 50%;
transform: translate( -50%,-50%);
}
.login-cont {
width: 500px;
height: 300px;
background: rgba(255, 255, 255, 0.795);
border-radius: 5px;
}
.meituan-title {
text-align: center;
color:#0000009b;
font-size: 30px;
padding-top: 15px;
font-family : Arial,Helvetica,sans-serif;
}
.meituan-user {
width: 400px;
margin: 0 auto;
padding-top: 30px;
height: 40px;
display: flex;
align-items : center;
}
.meituan-user p {
width: 50px;
color: #000000;
font-size: 16px;
}
.inptflex {
flex: 1;
}
.reg-view {
width: 400px;
display: flex;
justify-content: flex-end;
margin: 0 auto;
padding-top: 10px;
}
.reg-view p {
cursor: ·pointer;
display: contents;
}
.meituan-btn {
width: 200px;
display: flex;
align-items : center;
justify-content: center;
margin: 10px auto 0 auto;
font-size: 16px;
}
</style>

198
src/views/test.vue Normal file
View File

@ -0,0 +1,198 @@
<template>
<div>
<!-- <script type="module" src_old="https://unpkg.com/@splinetool/viewer@1.1.9/build/spline-viewer.js"></script>-->
<!-- <spline-viewer url="https://prod.spline.design/EV4wkoOZwj4KpemL/scene.splinecode"></spline-viewer>-->
<div ref="graph" style="width:1150px; height: 330px"></div>
<!-- <el-card style=" height:600px;width: 31%;" :body-style={padding:0} overflow:hidden >-->
<!-- <div style="display:flex;">-->
<!-- <el-divider direction="vertical" class="sublabel"></el-divider>-->
<!-- <span class='title'>预警提示</span>-->
<!-- </div>-->
<!-- <vue-seamless-scroll :data="listData" class="warp">-->
<!-- <ul class="item">-->
<!-- <li v-for="(item, index) in listData" :key="index">-->
<!-- <span class="title" v-text="item.title"></span>-->
<!-- <span class="date" v-text="item.date">检测大</span>-->
<!-- <span class="t" v-text="item.t"></span>-->
<!-- </li>-->
<!-- </ul>-->
<!-- </vue-seamless-scroll>-->
<!-- </el-card>-->
</div>
</template>
<script>
import http from "@/utils/request";
import * as echarts from "echarts";
export default {
name: 'Example01Basic',
components: {
},
data () {
return {
listData: [{
'title': '无缝滚动第一行无缝滚动第一行',
'date': '2017-12-16',
't':'ss'
}, {
'title': '无缝滚动第二行无缝滚动第二行',
'date': '2017-12-16',
't':'qq'
}, {
'title': '无缝滚动第三行无缝滚动第三行',
'date': '2017-12-16'
}, {
'title': '无缝滚动第四行无缝滚动第四行',
'date': '2017-12-16'
}, {
'title': '无缝滚动第五行无缝滚动第五行',
'date': '2017-12-16'
}, {
'title': '无缝滚动第六行无缝滚动第六行',
'date': '2017-12-16'
}, {
'title': '无缝滚动第七行无缝滚动第七行',
'date': '2017-12-16'
}, {
'title': '无缝滚动第八行无缝滚动第八行',
'date': '2017-12-16'
}, {
'title': '无缝滚动第九行无缝滚动第九行',
'date': '2017-12-16'
}],
}
},
mounted() {
this.init()
// console.log('start')
// http.get('http://61.240.140.173:8000/graph/get_similarity_history/?company_id=91510100201958223R').then((res)=>{
// console.log(res.data.data)
// })
// this.loadFunc().then((v)=>{
// console.log(v)
// })
// console.log('end')
},
methods:{
init(){
const boxplotData =[100,200,560,222,456]
let echart = echarts.init(this.$refs.graph)
let option = {
title: {
text: '折线图堆叠'
},
tooltip: {
trigger: 'axis'
},
grid: [
// grid线
{
left: '0%', //
right: '95%', //
height: '80%', //
},
// gridgrid
{
left: '5%', // grid
right: '0%', //
height: '80%', // grid
},
],
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: [{
type: 'category',
position: 'bottom',
gridIndex: 0,
boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
},{
type: 'category',
data: ['1','2','3'], // x
gridIndex: 1,
// show: false, // x线
position: 'bottom',
},],
yAxis: [{
type: 'value',
gridIndex: 0
},
{
type: 'value',
show:false,
gridIndex: 1
}],
series: [
{
name: '直接访问',
type: 'line',
stack: '总量',
xAxisIndex: 0,
data: [320, 332, 301, 334, 390, 330, 320]
},
{
name: '搜索引擎',
type: 'line',
stack: '总量',
xAxisIndex: 0,
yAxisIndex: 0,
data: [820, 932, 901, 934, 1290, 1330, 1320]
},
{
type: 'boxplot',
data:[{value: boxplotData,} ],
// 线
// zlevel: 3,
// x使nullECharts
xAxisIndex: 1, // 使x
yAxisIndex: 1, // 使x
// ...
},
]
};
echart.setOption(option)
},
loadFunc(){
return new Promise((resolve,reject)=>{
setTimeout( resolve,3000,'success')
})
}
}
}
</script>
<style lang="scss" scoped>
.warp {
height: 270px;
width: 360px;
margin: 0 auto;
overflow: hidden;
ul {
list-style: none;
padding: 0;
margin: 0 auto;
li,
span {
display: block;
height: 30px;
line-height: 30px;
display: flex;
justify-content: space-between;
font-size: 15px;
}
}
}
</style>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +1,932 @@
<!-- 事件分析-事件图谱 -->
<!-- 11.6合并版 -->
<template>
<div>
事件分析-事件图谱
<!-- 关系图/知识图谱笛卡尔坐标系上的 Graph -->
<div class="two">
<div class="form">
<!-- inline="true"表单域在一行 -->
<el-form :inline="true" :model="formInline1" class="demo-form-inline">
<el-form-item label="公司名称">
<el-input v-model="formInline1.company" placeholder="公司名称:" size="mini"></el-input>
<!-- 搜索联想-->
<!-- <el-autocomplete-->
<!-- class="inline-input"-->
<!-- v-model="formInline1.company"-->
<!-- :fetch-suggestions="querySearch"-->
<!-- placeholder="公司名称"-->
<!-- size="mini"-->
<!-- ></el-autocomplete>-->
</el-form-item>
<el-form-item label="事件类型">
<el-select v-model="formInline1.event_type" placeholder="事件类型:" size="mini">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="开始时间">
<el-date-picker v-model="formInline1.start_date" type="date" placeholder="年-月-日" size="mini"></el-date-picker>
</el-form-item>
<el-form-item label="结束时间">
<el-date-picker v-model="formInline1.end_date" type="date" placeholder="年-月-日" size="mini"></el-date-picker>
</el-form-item>
<el-form-item>
<el-button class="grayish_btn" @click="onSubmit1" icon="el-icon-search" size="mini">查询</el-button>
</el-form-item>
<!-- <el-form-item>-->
<!-- <el-button class="grayish_btn" @click="onSubmit1" icon="el-icon-search" size="mini">查询</el-button>-->
<!-- </el-form-item>-->
</el-form>
</div>
<el-card :body-style={padding:0} style='height: 510px;'>
<!-- 1上标 -->
<span class="superscript" style="width: 20px; height: 40px;">事件图谱</span>
<div>
<div ref="echarts_1" style="height: 500px"></div>
</div>
<!-- 2产品搜索栏 -->
</el-card>
</div>
<el-dialog :visible.sync="dialogVisible" width="100%" >
<!-- 详细信息 -->
<el-card style=" height:100%;margin-bottom:10px ; " :body-style={padding:0} >
<div style="display:flex;">
<el-divider direction="vertical" class="sublabel"></el-divider>
<span class='title'>事件详情</span>
</div>
<el-table :data="detailData"
style="width: 100%"
:header-cell-style="{background: 'rgba(242, 242, 242, 0.654901960784314)'}"
border
:row-style="{height:'28px'}"
:cell-style="{padding:'0px'}"
header-row-class-name="active_header"
header-cell-class-name="active_header"
cell-class-name="content_center"
>
<el-table-column
width="500"
prop="事件名称"
label="事件名称">
</el-table-column>
<el-table-column
width="300"
prop="法人代表"
label="法人代表">
</el-table-column>
<el-table-column
width="200"
prop="事件日期"
label="事件日期">
</el-table-column>
<el-table-column
width="50"
prop="分歧度"
label="分歧度">
</el-table-column>
<el-table-column
width="80"
prop="等级"
label="风险等级">
</el-table-column>
</el-table>
</el-card>
</el-dialog>
</div>
</template>
<script>
<script >
import qs from 'qs'
// import { getData } from "../api";
import * as echarts from "echarts"
import http from '../utils/request'
import {Loading} from "element-ui";
export default {
name:'event_graph',
components:{
},
data () {
data() {
return {
}
},
mounted(){
},
dialogVisible:false,
detailData:[],
tableData:[],
//
sentiment:[],
clout:[],
targetId:'',
formInline1: {
company: '',
event_type: '',
start_date:'',
end_date:'',
},
//
options:[
{
value: '',
label: '全部'
},
{
value: '股权增持',
label: '股权增持'
}, {
value: '股东减持',
label: '股东减持'
}, {
value: '股权质押',
label: '股权质押'
}, {
value: '其他',
label: '其他'
},
{
value: '重大财产损失',
label: '重大财产损失'
},
{
value: '重大安全事故',
label: '重大安全事故'
},
{
value: '股权冻结',
label: '股权冻结'
},
{
value: '高层死亡',
label: '高层死亡'
},
{
value: '破产清算',
label: '破产清算'
},
{
value: '重大对外赔付',
label: '重大对外赔付'
},
]
,
option_detail_company: [{
value: '公司1',
label: '公司1'
}, {
value: '公司2',
label: '公司2'
}],
option_detail_time: [{
value: '一天内',
label: '一天内'
}, {
value: '近三天',
label: '近三天'
}
, {
value: '一周内',
label: '一周内'
}
, {
value: '一个月内',
label: '一个月内'
}
, {
value: '一年内',
label: '一年内'
}
],
option_prediction: [
{
value: '一小时内',
label: '一小时内'
}, {
value: '三小时内',
label: '三小时内'
}
, {
value: '六小时内',
label: '六小时内'
}
,
{
value: '一天内',
label: '一天内'
}, {
value: '近三天',
label: '近三天'
}
, {
value: '一周内',
label: '一周内'
}
, {
value: '一个月内',
label: '一个月内'
}
, {
value: '一年内',
label: '一年内'
}
],
//
old_data:[
{事件标题:"XX股东XX时间增持XX股票事件",
情感倾向:"中性",
事件热度:"45",
时间:"2022/1/4",},
{ 事件标题: "XX股东XX时间增持XX股票事件",
情感倾向:"积极",
事件热度:"30",
时间:"2022/1/4",},
{ 事件标题: "XX股东XX时间增持XX股票事件",
情感倾向:"消极",
事件热度:"45",
时间:"2022/1/4",},
{ 事件标题: "XX股东XX时间增持XX股票事件",
情感倾向:"消极",
事件热度:"30",
时间:"2022/1/4",},
{ 事件标题: "XX股东XX时间增持XX股票事件",
情感倾向:"中性",
事件热度:"30",
时间:"2022/1/4",},
{ 事件标题: "XX股东XX时间增持XX股票事件",
情感倾向:"积极",
事件热度:"30",
时间:"2022/3/8",},
{ 事件标题: "XX股东XX时间增持XX股票事件",
情感倾向:"中性",
事件热度:"45",
时间:"2022/3/10",},
{ 事件标题: "XX股东XX时间增持XX股票事件",
情感倾向:"消极",
事件热度:"45",
时间:"2022/3/10",},
{ 事件标题: 8,
情感倾向:"中性",
事件热度:"30",
时间:"2022/3/10",},
{ 事件标题: 9,
情感倾向:"消极",
事件热度:"30",
时间:"2022/3/14",},
{ 事件标题: 10,
情感倾向:"中性",
事件热度:"45",
时间:"2022/3/14",},
{ 事件标题:11,
情感倾向:"积极",
事件热度:"45",
时间:"2022/3/18",},
{ 事件标题: 12,
情感倾向:"中性",
事件热度:"45",
时间:"2022/3/18",},
{ 事件标题: 13,
情感倾向:"积极",
事件热度:"45",
时间:"2022/3/18",},
{ 事件标题: 14,
情感倾向:"中性",
事件热度:"45",
时间:"2022/3/18",},
{ 事件标题: 15,
情感倾向:"消极",
事件热度:"45",
时间:"2022/3/30",},
{ 事件标题: 16,
情感倾向:"中性",
事件热度:"45",
时间:"2022/3/26",},
{ 事件标题: 17,
情感倾向:"消极",
事件热度:"30",
时间:"2022/3/26",},
{ 事件标题: 18,
情感倾向:"中性",
事件热度:"45",
时间:"2022/3/26",},],
//
// -card2-
circularData1: [
{ value: 735, name: '积极' },
{ value: 735, name: '消极' }
// { value: 580, name: 'Email' },
// { value: 484, name: 'Union Ads' },
// { value: 300, name: 'Video Ads' }
],
circularData2: [
{ value: 4445, name: '积极' },
{ value: 735, name: '消极' }
// { value: 580, name: 'Email' },
// { value: 484, name: 'Union Ads' },
// { value: 300, name: 'Video Ads' }
],
}
},
mounted(){
//
//domecharts
// var ROOT_PATH = 'https://echarts.apache.org/examples';
// console.log(this.old_data.)
const echarts1 = echarts.init(this.$refs.echarts_1)
var legends = ['消极', '中性', '积极'];
var colors=[ "#D9001B","#009DD9","#90F204"]
const markLineList=[] //线
const timeList=[]//
const nor_time=[]//
const nodeid=[]
const new_data=[]
var count=0
for(let {时间: time} of this.old_data){
nor_time.push(time)
// -1 timeListtime,
if(timeList.indexOf(time)==-1 ){
timeList.push(time)
nodeid.push(count)
markLineList.push({xAxis: count})
count=count+1
}
}
timeList.sort(function (a, b) {
return a - b; //a - b < 0:
})
const x_y=[]
// console.log(timeList.length)
for (var i = 0; i < timeList.length; i++) {
var x=i
var y=1//1
for (var item of nor_time){
if(item===timeList[i] ){
y+=1
x_y.push([x,y])
}
}
// console.log(x_y)
}
for (var i = 0; i < this.old_data.length; i++) {
var index=legends.indexOf(this.old_data[i].情感倾向)
new_data.push({
id:i,
name:this.old_data[i].事件标题,
// labeltooltip
// label: {
//
// show: true,
// position: "bottom",
// fontSize: 13,
// width:2,
// overflow:'break',
// formatter:'{b}:',
// // data:legends[index],
// // color: "rgb(0, 0, 0)",
// },
// color: colors[index],
symbolSize:this.old_data[i].事件热度,
// symbolSize:20,
value: x_y[i],
itemStyle: {
borderColor: '#fff',
borderWidth: 2,
shadowBlur: 2,
shadowColor: '#999999',
color: colors[index],
},
tooltip:{show:true,
trigger:'axis',
triggeron:'mousemove',
formatter:'event'
},
})}
// console.log(new_data)
const option = {
//
toolbox: {
feature: {
saveAsImage: {}
}
},
// title: {
// text: ' Graph'
// },
xAxis:[ {
// type : 'category',
// boundaryGap : false,
data : timeList
}
],
yAxis: {
show:false, // 线线
// type : 'category',//0
// boundaryGap : false,//
// data: ['a','b','c','d']
},
legend: {
data: ['消极', '中性', '积极'], //
top: "15%", //
icon:"circle", //
x: 'right', //
orient: 'vertical', // horizontal
textStyle: { //
color: "#ffffff"
}},
series: [
{
type: 'graph',
// layout: 'none',
coordinateSystem: 'cartesian2d',
// 线
markLine: {
symbol: ['none', 'none'],
label: { show: false },
data: markLineList,
lineStyle: {//线
type: 'dashed',//线
color: '#999999',//线
},
},
// label: {
//
// show: true,
// position: "bottom",
// fontSize: 13,
// width:5,
// overflow:'truncate',
// formatter:'{b}:',
// // data:legends[index],
// // color: "rgb(0, 0, 0)",
// },
//
edgeSymbol: ['circle', 'circle'],
edgeSymbolSize: [4,4],
//
data:new_data,
//
// itemStyle : {
// normal: {label : {show: true}},
// textStyle: {
// color: '#000'
// }
// },
//
links: [
{source: 0, target: 5},
{source: 5, target: 6},
{source: 1, target: 7},
{source: 2, target: 8},
{source: 3, target: 13},
{source: 8, target: 9},
],
lineStyle: {//线
type: 'solid',//线
color: "rgb(0, 0, 0,80%)",//线
width: "2",
},
}]
}
echarts1.setOption(option)
console.log(echarts1.getOption())
echarts1.on('click',function (params){
// console.log(params.name)
})
// this.tableData=JSON.parse(sessionStorage.getItem('eventData'))
if (this.tableData.length!==0)
this.changeChart()
// let target=JSON.parse(sessionStorage.getItem('target'))
// this.formInline1.company=target[0]
// this.formInline1.event_type=target[1]
// this.formInline1.start_date=target[2]
// this.formInline1.end_date=target[3]
},
methods:{
},
test(){
console.log('test')
},
//
calculateColumnWidth(prop) {
const text = String(this.tableData[0][prop]); // 使
const calculatedWidth = text.length;
console.log('console.log(calculatedWidth):',calculatedWidth)
if(calculatedWidth>10 && calculatedWidth<=50){
const baseWidth= 20 + calculatedWidth * 0.3
return `${baseWidth}px`;
}
if(calculatedWidth>50){
const baseWidth= 20 + calculatedWidth * 0.5
return `${baseWidth}px`;
}
else{
return "20px";
}
},
//
querySearch(queryString, cb) {
// console.log(queryString)
// console.log(cb)
http.get(
"/search/search_news/?name=?"+queryString,
// paramsSerializer: params => {
// return qs.stringify(params, { indices: false })
).then(response => {
// console.log(response.data)
// console.log(cb)
let result=response.data
let re=[]
for (let i of result){
re.push({"value":i})
}
cb(re)
})},
// 1
onSubmit1(){//
this.tableData.length=0
let options={
text:'请稍等'
}
let loadingInstance = Loading.service(options);
http.get(
"/event2/event_analyse/",
{params:{
name: this.formInline1.company,
event_type:this.formInline1.event_type,
start:this.formInline1.start_date,
end:this.formInline1.end_date,
need:1
}}).then(response => {
this.tableData = response.data.data.data
let links= response.data.data.edges
let intLink=[]
// for (let i in links){
// intLink.push({source:parseInt(links[i]['source']),target:parseInt(links[i]['target'])})
// }
for (let i in links){
intLink.push({source:this.tableData.find(function(obj) {
return obj.order === parseInt(links[i]['source'])}).title,
target:this.tableData.find(function(obj) {
return obj.order === parseInt(links[i]['target'])}).title
})
}
console.log(intLink)
this.changeChart(intLink)
})
loadingInstance.close()
},
changeChart(links){
// console.log(this.tableData)
//
//domecharts
// var ROOT_PATH = 'https://echarts.apache.org/examples';
const echarts1 = echarts.init(this.$refs.echarts_1)
const markLineList=[] //线
const timeList=[]//
const nor_time=[]//
const nodeid=[]
const new_data=[]
var count=0
for(let {publish_time: time} of this.tableData){
// console.log(time)
nor_time.push(time)
// -1 timeListtime,
if(timeList.indexOf(time)===-1 ){
timeList.push(time)
nodeid.push(count)
markLineList.push({xAxis: count})
count=count+1
}
}
// console.log(timeList)
timeList.sort(function (a, b) {
if( a.split(' ')[0]<b.split(' ')[0] || a.split(' ')[0]===b.split(' ')[0] && a.split(' ')[1]<b.split(' ')[1])
return -1; //a - b < 0:
else if ( a.split(' ')[0]>b.split(' ')[0] || a.split(' ')[0]===b.split(' ')[0] && a.split(' ')[1]>b.split(' ')[1])
return 1
else return 0
})
// console.log(timeList)
let tmp=[]
//
if (this.tableData.length>20) {
var p = 20 / this.tableData.length
this.$notify.info({
title: '提示',
message: '事件图谱仅显示部分数据'
});
for (let i = 0; i < this.tableData.length; i++) {
// let index=legends.indexOf(this.old_data[i].)
let y = Math.floor(Math.random() * 10 ) + 1 //
if (Math.random() < p) {
let x = timeList.indexOf(this.tableData[i].publish_time)
while (tmp.find(value => value === [x, y]))
y=Math.floor(Math.random() * 10 ) + 1 //
tmp.push([x, y])
// console.log(x, y)
new_data.push({
id: parseInt(this.tableData[i].order),
name: this.tableData[i].title, //name
// name: this.tableData[i].title,
// label: {
// normal: {
// show: true,
// position: "bottom",
// textStyle: {
// fontSize: 8
// },},
//
// // data:legends[index],
// color: "rgb(0, 0, 0)",
// },
// color: colors[index],
symbolSize: this.tableData[i].clout * 30,
// symbolSize:20,
value: [x, y],
itemStyle: {
borderColor: '#fff',
borderWidth: 2,
shadowBlur: 2,
shadowColor: '#999999',
color: 'green',
},
tooltip: {
show: true,
trigger: 'axis',
triggeron: 'mousemove',
formatter: 'event'
},
})
}
}
}
else {
for (let i = 0; i < this.tableData.length; i++) {
// let index=legends.indexOf(this.old_data[i].)
let y = Math.floor(Math.random() * 10) + 1
let x = timeList.indexOf(this.tableData[i].publish_time)
while (tmp.find(value => value === [x, y]))
y=Math.floor(Math.random() * 10) + 1
tmp.push([x, y])
console.log(x, y)
new_data.push({
id: parseInt(this.tableData[i].order),
name: this.tableData[i].title, //name
// label: {
// normal: {
// show: true,
// position: "bottom",
// textStyle: {
// fontSize: 8
// },},
//
// // data:legends[index],
// color: "rgb(0, 0, 0)",
// },
// color: colors[index],
symbolSize: this.tableData[i].clout * 30,
// symbolSize:20,
value: [x, y],
itemStyle: {
borderColor: '#fff',
borderWidth: 2,
shadowBlur: 2,
shadowColor: '#999999',
color: 'green',
},
tooltip: {
show: true,
trigger: 'axis',
triggeron: 'mousemove',
formatter: 'event'
},
})
}
}
const option = {
//
toolbox: {
feature: {
saveAsImage: {}
}
},
// title: {
// text: ' Graph'
// },
xAxis:[ {
// type : 'category',
// boundaryGap : false,
data : timeList
}
],
yAxis: {
show:false, // 线线
// type : 'category',//0
// boundaryGap : false,//
// data: ['a','b','c','d']
},
legend: {
data: ['消极', '中性', '积极'], //
top: "15%", //
icon:"circle", //
x: 'right', //
orient: 'vertical', // horizontal
textStyle: { //
color: "#ffffff"
}},
// legend: {
// normal: {
// data: ['', '', ''],
// show: true,}
// },
series: [
{
type: 'graph',
// layout: 'none',
coordinateSystem: 'cartesian2d',
// 线
markLine: {
symbol: ['none', 'none'],
label: { show: false },
data: markLineList,
lineStyle: {//线
type: 'dashed',//线
color: '#999999',//线
},
},
//
edgeSymbol: ['circle', 'circle'],
edgeSymbolSize: [4,4],
//
data:new_data,
//
// itemStyle : {
// normal: {label : {show: true}},
// textStyle: {
// color: '#000'
// }
// },
//
links: links,
// [
// {source: 0, target: 5},
// {source: 5, target: 6},
// {source: 1, target: 7},
// {source: 2, target: 8},
// {source: 3, target: 13},
// {source: 8, target: 9},
// ],
lineStyle: {//线
type: 'solid',//线
color: "rgb(0, 0, 0,80%)",//线
width: "2",
}
}]
}
echarts1.setOption(option)
console.log(echarts1.getOption())
//
echarts1.on('click',(parms)=>{
console.log(parms)
http.get('/event2/event_graph/',
{params:{
id:parms.data.id
}}
).then((res)=>{
console.log(res.data)
this.detailData.length=0
this.detailData.push(res.data)
this.dialogVisible=true
})
})
},
open(){
this.$nextTick(() => {
// echarts
// this.initEcharts1()
this.initEcharts2()
})
},
}
}
</script>
<style lang='less' scoped>
<style lang="less" scoped>
//
/deep/ .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf {
border-bottom: 1px solid rgba(224, 223, 223, 0.771) !important;
padding: 0px 0 !important;
min-width: 0 !important;
}
.el-table .el-table__cell {
padding: 12px 0;
min-width: 0;
}
/deep/ .active_header{//
color: #333333;
font-size: 13px;
text-align: center !important;
// height: 1px;
}
/deep/ .content_center{//
text-align: center !important;
font-size: 13px;
}
.one{
.form{//
display:flex;
justify-content:space-between;//
margin-top:5px;
// height: 40px;
padding-left: 20px;
}
.content{
padding: 0px 20px 2px 20px;//
font-size: 12px;
}
.text{
color:rgba(2, 167, 240, 0.729411764705882);
}
}
.two{
margin-top:10px;
}
//
.flex-charts{//
// margin-top:20px;
display:flex;
justify-content:space-between;
// padding:20px;
}
.grayish_btn{//
color: #fff;//
background-color: #aaaaaa;//
}
</style>

View File

@ -36,7 +36,7 @@
<!-- 第一栏"健康指数"的表格 -->
<div class="table">
<el-table :data="tableData_1"
<el-table :data="tableData_1" :header-cell-style="{background: 'rgba(242, 242, 242)'}"
border
height="250"
:row-style="{height:'28px'}"
@ -159,7 +159,7 @@
<!-- 2对比 -->
<el-tab-pane label="对比">
<!-- 2-1-雷达图对比 -->
<el-card style=" height:770px; border: 1px solid #7f7f7f;" :body-style={padding:0} > <!--:body-style={padding:0}取消卡片边距btn就能在左上角 -->
<el-card style=" height:850px; border: 1px solid #7f7f7f;" :body-style={padding:0} > <!--:body-style={padding:0}取消卡片边距btn就能在左上角 -->
<div class="card_label" style=" height: 24px;width: 100%;text-align: left; padding-left:10px">雷达图对比</div>
<!-- 搜索框 -->
@ -180,7 +180,7 @@
:fetch-suggestions="querySearch"
placeholder="公司名称"
></el-autocomplete>
<el-form-item label="时间 " style=" margin-right: 40px;">
<el-form-item label="时间 " style=" margin-right: 40px;margin-left: 40px;">
<quter-component label="开始时间" v-model="formInline2.quarter_year" placeholder="选择季度" />
</el-form-item>
</el-form-item>
@ -193,17 +193,17 @@
<!-- 雷达图 -->
<div class='radar' >
<div class="quarter_change">
<i class="el-icon-arrow-left" border style="font-size: 50px;color:#7f7f7f"></i>
<div>上一季度</div>
</div>
<!-- <div class="quarter_change">-->
<!-- <i class="el-icon-arrow-left" border style="font-size: 50px;color:#7f7f7f"></i>-->
<!-- <div>上一季度</div>-->
<!-- </div>-->
<div ref="echarts_1" style="height:500px;width:500px"></div>
</div>
<!-- "对比"表格 -->
<div class="table" style="padding:20px">
<el-table :data="tableData_2_1"
<el-table :data="tableData_2_1" :header-cell-style="{background: 'rgba(242, 242, 242)'}"
border
:row-style="{height:'28px'}"
:cell-style="{padding:'3px'}"
@ -289,7 +289,7 @@
</el-card>
<!-- "对比-交叉对比-行业"表格 -->
<div class="table" style=" padding: 20px 10px 2px 0px;"><!--返回表格添加间隙 -->
<el-table :data="tableData_2_2"
<el-table :data="tableData_2_2" :header-cell-style="{background: 'rgba(242, 242, 242)'}"
border
:row-style="{height:'28px'}"
:cell-style="{padding:'3px'}"
@ -335,7 +335,7 @@
<!-- "对比-交叉对比-地域"表格 -->
<div class="table" style=" padding: 20px 10px 2px 0px;"><!--返回表格添加间隙 -->
<el-table :data="tableData_2_3"
<el-table :data="tableData_2_3" :header-cell-style="{background: 'rgba(242, 242, 242)'}"
border
:row-style="{height:'28px'}"
:cell-style="{padding:'3px'}"
@ -359,7 +359,7 @@
<el-tab-pane label="我的管理">
<!-- 第三栏"我的管理"的表格 -->
<div class="table">
<el-table :data="tableData_3"
<el-table :data="tableData_3" :header-cell-style="{background: 'rgba(242, 242, 242)'}"
border
@ -398,6 +398,7 @@ import quterComponent from "@/components/quterComponent";
import * as echarts from "echarts"
import http from '../utils/request'
export default {
name:'health',
components:{
quterComponent
},
@ -513,9 +514,9 @@ tableLabel_long: {
// [table-data]
// 1""
tableData_1: [
{ name: '中国银行',
index: 1,
level: "中等",},
// { name: '',
// index: 1,
// level: "",},
],
// 2""
tableData_2_1: [
@ -621,7 +622,7 @@ tableLabel_long: {
},
onSubmit6(){
if (this.tableData_2_1){
if (this.tableData_2_1 || this.formInline2.radarData1 ||this.formInline2.radarData2){
this.formInline2.radarData1.length=0
this.formInline2.radarData2.length=0
this.tableData_2_1.length=0
@ -661,6 +662,8 @@ tableLabel_long: {
this.formInline2.tableData2.name=this.formInline2.company2
for (let i in response.data.data)
if (i !=='健康指数' && i !=='等级' && typeof response.data.data[i]==='number') this.formInline2.radarData2.push(response.data.data[i])
console.log(this.formInline2.radarData2)
console.log(this.formInline2.radarData1)
const echarts1 = echarts.init(this.$refs.echarts_1)
this.tableData_2_1.push( this.formInline2.tableData2)
@ -897,7 +900,7 @@ tableLabel_long: {
}
},
title: {
text: '2011年第一季度',
text: this.formInline1.quarter_year.slice(0,4)+'年第'+this.formInline1.quarter_year.slice(6,)+'季度',
x:'center',//'left''center' | 'left' | 'right' | {number}xpx
y:"bottom",
padding:[ 0,10,10,10],
@ -986,7 +989,7 @@ tableLabel_long: {
}
/deep/ .active_header{//
color: #333333;
font-size: 9px;
font-size: 13px;
text-align: center !important;
border-color:#333333;
@ -994,7 +997,7 @@ tableLabel_long: {
}
/deep/ .content_center{//
text-align: center !important;
font-size: 10px;
font-size: 13px;
border-color:#333333;
}
}
@ -1019,5 +1022,9 @@ tableLabel_long: {
display:flex;
justify-content:center;
}
.grayish_btn{//
color: #fff;//
background-color: #aaaaaa;//
}
</style>

View File

@ -35,6 +35,7 @@
<script>
import * as echarts from "echarts"
export default {
name:'pressure',
data() {
return {
@ -77,7 +78,12 @@
// end_date:'',
},
}
},
},
computed:{
isLogin(){
return this.$store.state.isLogin
}
},
mounted(){
},

View File

@ -1,5 +1,6 @@
<template>
<div>
<graph-view-v4></graph-view-v4>
<!-- <div class="form">-->
<!-- &lt;!&ndash; inline="true"表单域在一行 &ndash;&gt;-->
@ -56,6 +57,7 @@
import graphViewV4 from "@/views/graphViewV4";
import http from '../utils/request'
export default {
name:'market_entities',
//
components: {
graphViewV4

File diff suppressed because it is too large Load Diff

View File

@ -1,229 +1,203 @@
<!-- 系统风险分析原市场分析拆分新增11.6合并-->
<template>
<div>
<!-- 图谱之前的在risk -->
<div class="one">
<el-card style='height: 550px;margin-bottom: 10px;' :body-style={padding:0}>
<!-- height:400px -->
<!-- 1上标 -->
<span class="superscript" style="width: 20px; height: 40px;">系统风险分析</span>
<!-- 2产品搜索栏 -->
<div class="form">
<!-- inline="true"表单域在一行 -->
<el-form :inline="true" class="demo-form-inline" :model="formInline1" ref="formInline1">
<el-form-item label="市场" prop="市场">
<el-select size="mini" v-model="formInline1.market">
<el-option label="股票" value="股票"></el-option>
<el-option label="基金" value="基金"></el-option>
</el-select>
</el-form-item>
<el-form-item label="行业" prop="行业">
<el-select size="mini" v-model="formInline1.industry">
<el-option label="行业1" value="行业1"></el-option>
<el-option label="行业2" value="行业2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="开始时间" prop="开始时间">
<el-date-picker
v-model="formInline1.start_date"
type="date"
placeholder="年/月/日"
size="mini">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="结束时间">
<el-date-picker
v-model="formInline1.end_date"
type="date"
placeholder="年/月/日"
size="mini">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button class="grayish_btn" @click="onSubmit2" size="mini">查询</el-button>
</el-form-item>
</el-form>
</div>
<el-row :gutter="20">
<el-col :span="18">
图谱待定
</el-col>
<el-col :span="6">
<div style="margin-right: 10px;">
<!-- -->
<el-table class='table' :data="tableData1"
:header-cell-style="{background: 'rgba(242, 242, 242, 0.654901960784314)',marginright:'20px'}"
header-row-class-name="active_header"
header-cell-class-name="active_header"
cell-class-name="content_center"
:row-style="{height:'28px',marginright:'20px'}"
:cell-style="{padding:'0px',marginright:'20px'}"
style="margin-right:20px;">
<!-- border -->
<el-table-column
prop="value_label"
label="行情风险评估"
width='200px'>
</el-table-column>
<el-table-column
prop="value"
label="评估值"
width='100px'
>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!-- 卡片化的标签页 -->
<el-card style='height: 440px;margin-bottom:10px;' :body-style={padding:0}>
<!-- height:400px -->
<!-- 1上标 -->
<span class="superscript" style="width: 20px; height: 40px;">资本市场系统性风险指数监测
</span>
<!-- 添加折线图 -->
<component :is="compName" :zoom="datazoom" @datazoom="changeComp" ></component>
<!-- <system-risk-component/>-->
</el-card>
<el-card style="height: 550px;margin-top: 10px" :body-style={padding:0}>
<span class="superscript" style="width: 20px; height: 20px;">维度时序</span>
<dimension-component :zoom="datazoom"/>
</el-card>
<el-card style='height: 600px;margin-top: 10px;' :body-style={padding:0}>
<!-- height:400px -->
<!-- 1上标 -->
<span class="superscript" style="width: 20px; height: 40px;">系统性影响指标分析</span>
<!-- 3tab -->
<el-tabs type="border-card" style='margin: 20px 20px 0 20px;' @tab-click="handleClick">
<!-- 收益率传染 -->
<el-tab-pane label="个体风险状态" :lazy='true'>
<market-risk-component :zoom="datazoom" :title="'个体风险状态'"/>
</el-tab-pane>
<!-- 延迟渲染 lazy true-->
<!-- 波动传染 -->
<el-tab-pane label="风险关联与溢出" :lazy='true'>
<market-risk-component :zoom="datazoom" :title="'风险关联与溢出'"/>
</el-tab-pane>
<el-tab-pane label="市场系统结构" :lazy='true'>
<market-risk-component :zoom="datazoom" :title="'市场系统结构'"/>
</el-tab-pane>
<el-tab-pane label="市场波动和趋势" :lazy='true'>
<market-risk-component :zoom="datazoom" :title="'市场波动和趋势'"/>
</el-tab-pane>
</el-tabs>
<!-- <div class="warning-component">-->
<!-- <div class="warning-dates">-->
<!-- <div class="date-item">前日<span>{{ prevDayIndex }}</span></div>-->
<!-- <div class="date-item">昨日<span>{{ yesterdayIndex }}</span></div>-->
<!-- <div class="date-item">今日<span>{{ todayIndex }}</span></div>-->
<!-- <div class="date-item">明日<span>{{ tomorrowIndex }}</span></div>-->
<!-- </div>-->
<!-- </div>-->
</el-card>
<el-card style="height: 450px;margin-top: 10px" :body-style={padding:0}>
<span class="superscript" style="width: 20px; height: 20px;">宏观经济指标</span>
<system-risk-future/>
</el-card>
<!-- <market-risk-component/>-->
<!-- <MarketRisk/>-->
</div>
<MarketRisk/>
</div>
</template>
<script>
import MarketRisk from "/src/views/MarketRisk.vue";
export default {
import systemRiskComponent from '@/components/systemRiskComponent';
import marketRiskComponent from "@/components/riskIndexComponent";
import dimensionComponent from "@/components/dimensionComponent";
import systemRiskFuture from "@/components/systemRiskFuture";
export default {
name:'systematic_risk',
components:{
MarketRisk,
},
systemRiskFuture,
dimensionComponent,
systemRiskComponent,
marketRiskComponent
},
data () {
return {
//
formInline1: {
market:'',
industry:'',
start_date:'',
end_date:'',
},
formInline2: {
market:'',
industry:'',
start_date:'',
end_date:'',
},
//
tableData1: [
{
value_label:'采矿业',
value:0.25
},
{
value_label:'文化、体育和娱乐业',
value:0.18
},
{
value_label:'制造业',
value:0.17
},
{
value_label:'租赁和商务服务业',
value:0.17
},
{
value_label:'交通运输、仓储和邮政业',
value:0.14
},
{
value_label:'软件和信息技术服务业',
value:0.14
},
{
value_label:'环境和公共设施管理业',
value:0.14
},
{
value_label:'综合评估',
value:"良好"
},
],
tableData2: [
{
异常关联类型: '股价波动异常',
涉及股票: '股票1',
},
{
异常关联类型: '高频交易',
涉及股票: '股票1',
},
{
异常关联类型: '资产泡沫',
涉及股票: '股票1',
},
],
tableLabel: {
编号: '编号',
异常关联类型: '异常关联类型',
涉及股票: '涉及股票',
监测时间: '监测时间',
股票价格: '股票价格',
交易数量: '交易数量',
风险等级: '风险等级',
},
datazoom:[],
compName:'systemRiskComponent',
prevDayIndex:'',
yesterdayIndex:'',
todayIndex:'',
tomorrowIndex:'',
state:'个体风险状态'
}
},
mounted(){
},
methods:{
onSubmit1(){},
onSubmit2(){},
detail(row){}
changeComp(mesg){
this.datazoom=mesg
console.log(mesg)
},
// handleClick(tab, event) {
// this.state=tab.label
// }
changeState(){
let lis=['个体风险状态','风险关联与溢出','市场系统结构','市场波动和趋势']
this.state=lis.indexOf(this.state)+1>3? '个体风险状态':lis[lis.indexOf(this.state)+1]
}
},
}
</script>
<style lang="less" scoped>
.form{//
display:flex;
justify-content:space-between;//
margin-top:10px;
// height: 40px;
padding-left: 20px;
}
.grayish_btn{//
color: #fff;//
background-color: #aaaaaa;//
.button {
border-radius: 7px;
width: 160px;
height: 30px;
display: flex;
align-items: center;
justify-content: flex-start;
gap: 12px;
cursor: pointer;
border: 3px solid rgb(94, 255, 209);
background-color: rgb(94, 255, 209);
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.137);
}
//
/deep/ .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf {
border-bottom: 1px solid rgba(224, 223, 223, 0.771) !important;
padding: 8px 0 !important;//
min-width: 0 !important;
}
.el-table .el-table__cell {
padding: 12px 0;
min-width: 0;
}
/deep/ .active_header{//
color: #110101;
text-align: center !important;
// height: 1px;
}
/deep/ .content_center{//
text-align: center !important;
}
.text {
width: 70%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
//background-color: rgb(255, 255, 255);
color: black;
}
.arrow path {
fill: rgb(19, 19, 19);
}
.button:hover .arrow {
animation: slide-in-left 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}
@keyframes slide-in-left {
0% {
transform: translateX(-8px);
opacity: 0;
}
100% {
transform: translateX(0px);
opacity: 1;
}
}
.button:active {
transform: scale(0.97);
}
.warning-component {
background-color: #ffffff;
border: 1px solid #ddd;
border-radius: 8px;
padding: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
max-width: 100%;
text-align: center;
margin: auto;
}
.warning-dates {
display: flex;
justify-content: space-between;
//margin-bottom: 10px;
}
.date-item {
margin: 0 10px;
font-weight: bold;
}
.warning-recent {
color: #ff4d4f;
font-weight: bold;
margin-bottom: 10px;
}
</style>

View File

@ -0,0 +1,303 @@
<!-- 系统风险分析原市场分析拆分新增11.6合并-->
<template>
<div>
<!-- 图谱之前的在risk -->
<div class="one">
<!-- 卡片化的标签页 -->
<el-tabs type="border-card">
<!-- 1股市 -->
<el-tab-pane label="股市">
<el-card style='height: 420px;margin-bottom:10px;' :body-style={padding:0}>
<!-- height:400px -->
<!-- 1上标 -->
<span class="superscript" style="width: 20px; height: 40px;">股票市场系统性风险分析</span>
<!-- 2产品搜索栏 -->
<div class="form">
<!-- inline="true"表单域在一行 -->
<el-form :inline="true" class="demo-form-inline" :model="formInline1" ref="formInline1">
<el-form-item label="开始时间" prop="开始时间">
<el-date-picker
v-model="formInline1.start_date"
type="date"
placeholder="年/月/日"
size="mini"
>
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="结束时间">
<el-date-picker
v-model="formInline1.end_date"
type="date"
placeholder="年/月/日"
size="mini"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button class="grayish_btn" @click="onSubmit1" size="mini" >查询</el-button>
</el-form-item>
</el-form>
</div>
<!-- 添加折线图 -->
<DynamicLine/>
<!-- <half-doughnut :key='1' :myHalfData="myHalfData1"></half-doughnut> -->
</el-card>
<MarketRisk/>
</el-tab-pane>
<!-- 2债市 -->
<el-tab-pane label="债市">
<el-card style='height: 420px;margin-bottom: 10px;' :body-style={padding:0}>
<!-- height:400px -->
<!-- 1上标 -->
<span class="superscript" style="width: 20px; height: 40px;">债市异常检测</span>
<!-- 2产品搜索栏 -->
<div class="form">
<!-- inline="true"表单域在一行 -->
<el-form :inline="true" class="demo-form-inline" :model="formInline2" ref="formInline2">
<el-form-item label="开始时间" prop="开始时间">
<el-date-picker
v-model="formInline2.start_date"
type="date"
placeholder="年/月/日"
size="mini">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="结束时间">
<el-date-picker
v-model="formInline2.end_date"
type="date"
placeholder="年/月/日"
size="mini">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button class="grayish_btn" @click="onSubmit2" size="mini">查询</el-button>
</el-form-item>
</el-form>
</div>
<!-- 添加折线图 -->
<DynamicLine/>
<!-- <half-doughnut :key='1' :myHalfData="myHalfData1"></half-doughnut> -->
</el-card>
<MarketRisk/>
</el-tab-pane>
<!-- 3期货 -->
<el-tab-pane label="期货">
<el-card style='height: 800px;margin-bottom: 10px;' :body-style={padding:0}>
<!-- height:400px -->
<!-- 1上标 -->
<span class="superscript" style="width: 20px; height: 40px;">期货市场分析</span>
<!-- 添加关系图谱 -->
<el-row :gutter="20">
<el-col :span="18">
<div style="margin:20px">
<!-- 图谱待定 -->
<QiPao></QiPao>
</div>
</el-col>
<el-col :span="6">
<div style="margin-right: 10px;">
<!-- -->
<el-table class='table' :data="tableData1"
:header-cell-style="{background: 'rgba(242, 242, 242, 0.654901960784314)',marginright:'20px'}"
header-row-class-name="active_header"
header-cell-class-name="active_header"
cell-class-name="content_center"
:row-style="{height:'28px',marginright:'20px'}"
:cell-style="{padding:'0px',marginright:'20px'}"
style="margin-right:20px;">
<!-- border -->
<el-table-column
prop="value_label"
label="行情风险评估"
width='200px'>
</el-table-column>
<el-table-column
prop="value"
label="评估值"
width='100px'
>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
<MarketRisk/>
</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<script>
import MarketRisk from "/Desktop/研究生/项目/金融项目/code/finacial11.7/finacial/src_old/views/MarketRisk.vue";
import DynamicLine from "@/components/echarts/DynamicLine.vue";
import QiPao from "@/components/QiPao";
export default {
name:'systemRisk',
components:{
MarketRisk,
DynamicLine,
QiPao,
},
data () {
return {
//
formInline1: {
market:'',
industry:'',
start_date:'',
end_date:'',
},
formInline2: {
market:'',
industry:'',
start_date:'',
end_date:'',
},
//
tableData1: [
{
value_label:'沪银主连',
value:0.25
},
{
value_label:'沪铝主连',
value:0.18
},
{
value_label:'氧化铝主连',
value:0.17
},
{
value_label:'苹果主连',
value:0.17
},
{
value_label:'沪金主连',
value:0.14
},
{
value_label:'国际铜主连',
value:0.14
},
{
value_label:'合成橡胶主连',
value:0.14
},
{
value_label:'综合评估',
value:"良好"
},
],
tableData2: [
{
异常关联类型: '股价波动异常',
涉及股票: '股票1',
},
{
异常关联类型: '高频交易',
涉及股票: '股票1',
},
{
异常关联类型: '资产泡沫',
涉及股票: '股票1',
},
],
tableLabel: {
编号: '编号',
异常关联类型: '异常关联类型',
涉及股票: '涉及股票',
监测时间: '监测时间',
股票价格: '股票价格',
交易数量: '交易数量',
风险等级: '风险等级',
},
}
},
mounted(){
},
methods:{
onSubmit1(){},
onSubmit2(){},
detail(row){}
},
}
</script>
<style lang="less" scoped>
/deep/ .form{//
display:flex;
justify-content:space-between;//
margin-top:10px;
// height: 40px;
margin-left: 20px;
margin-bottom: 0px !important;
padding-bottom: 0px !important;
}
.grayish_btn{//
color: #fff;//
background-color: #aaaaaa;//
}
//
.table{
//
// margin:10px;
// font-size: 12px;
padding: 0px 5px 2px 5px;//
//
/deep/ .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf {
// border-bottom: 1px solid #333333 !important;
padding: 1px 1px 1px 1px;
min-width: 0;
}
// cell
.el-table .el-table__cell {
padding: 0px 0;
min-width: 0;
// border-color:#333333;
}
/deep/ .active_header{//
color: #333333;
font-size: 13px;
text-align: center !important;
// border-color:#333333;
// height: 1px;
}
/deep/ .content_center{//
text-align: center !important;
font-size: 13px;
// border-color:#333333;
}
}
</style>

View File

@ -67,7 +67,7 @@
</div>
</el-card>
<div class="table" style=" padding: 20px 10px 2px 0px;"><!--板块表格 -->
<el-table :data="tableData_sector"
<el-table :data="tableData_sector" :header-cell-style="{background: 'rgba(242, 242, 242, 0.654901960784314)'}"
border
:row-style="{height:'28px'}"
:cell-style="{padding:'3px'}"
@ -117,7 +117,7 @@
</div>
</el-card>
<div class="table" style=" padding: 20px 10px 2px 0px;"> <!-- 股票表格 -->
<el-table :data="tableData_stock"
<el-table :data="tableData_stock" :header-cell-style="{background: 'rgba(242, 242, 242, 0.654901960784314)'}"
border
:row-style="{height:'28px'}"
:cell-style="{padding:'3px'}"
@ -170,7 +170,7 @@
</div>
</el-card>
<div class="table" style=" padding: 20px 10px 2px 0px;"><!--基金表格 -->
<el-table :data="tableData_fund"
<el-table :data="tableData_fund" :header-cell-style="{background: 'rgba(242, 242, 242, 0.654901960784314)'}"
border
:row-style="{height:'28px'}"
:cell-style="{padding:'3px'}"
@ -208,7 +208,7 @@
</el-tabs>
<div class="table" style=" padding: 20px 10px 2px 0px;"><!-- 我的管理的表格 -->
<el-table :data="tableData_management"
<el-table :data="tableData_management" :header-cell-style="{background: 'rgba(242, 242, 242, 0.654901960784314)'}"
border
:row-style="{height:'28px'}"
:cell-style="{padding:'3px'}"
@ -267,12 +267,13 @@
import * as echarts from "echarts"
import http from '../utils/request'
export default {
name:'quotation',
//
components: {
},
data() {
return {
data() {
return {
//
//
@ -482,7 +483,7 @@ export default {
onSubmit2(){//
console.log("板块查询")
http.get(
"/price/bkall",
"/price/bkall/",
{params:{
com_name: this.formInline2.sector,
// start_date:this.formInline.start_date,
@ -499,7 +500,7 @@ export default {
console.log("股票查询")
console.log(this.formInline3_1)
http.get(
"/price/stock",
"/price/stock/",
{params:{
com_name: this.formInline3_1.stock,
start_date:this.formInline3_1.start_date,
@ -517,7 +518,7 @@ export default {
console.log("基金查询")
console.log(this.formInline3_2)
http.get(
"/price/fund",
"/price/fund/",
{params:{
com_name: this.formInline3_2.fund,
start_date:this.formInline3_2.start_date,
@ -984,4 +985,8 @@ export default {
justify-content:space-between;
// padding:20px;
}
.grayish_btn{//
color: #fff;//
background-color: #aaaaaa;//
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1260
src/views/风险传导.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@ -7,11 +7,11 @@
<!-- inline="true"表单域在一行 -->
<el-form :inline="true" :model="formInline1" class="demo-form-inline">
<el-form-item label="预警市场">
<el-select v-model="formInline1.market" placeholder="预警市场:" size="mini">
<el-option v-for="item in options_market" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="预警市场">-->
<!-- <el-select v-model="formInline1.market" placeholder="预警市场:" size="mini">-->
<!-- <el-option v-for="item in options_market" :key="item.value" :label="item.label" :value="item.value"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="开始时间">
<el-date-picker v-model="formInline1.start_date" type="date" placeholder="年-月-日" size="mini"></el-date-picker>
</el-form-item>
@ -20,7 +20,7 @@
<el-date-picker v-model="formInline1.end_date" type="date" placeholder="年-月-日" size="mini"></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit1" icon="el-icon-search" size="mini">查询</el-button>
<el-button class="grayish_btn" @click="onSubmit1" icon="el-icon-search" size="mini">查询</el-button>
</el-form-item>
</el-form>
</div>
@ -28,35 +28,29 @@
<!-- 3内容 -->
<el-row :gutter="20">
<el-col :span="15">
<el-card style=" height:700px;">
<el-card style=" height:800px;">
<!-- 标题&按钮 -->
<div style="display: flex;justify-content: space-between;">
<span style="font-size: 18px;font-weight: bold;">各省份风险情况</span>
<div>
<el-button type="primary" style="margin-right: 10px;" size="mini">高风险地区</el-button>
<el-button type="primary" size="mini">风险率攀升</el-button>
</div>
<span style="font-size: 18px;font-weight: bold;">各省份风险情况默认近半年数据</span>
<!-- <div>-->
<!-- <el-button class="grayish_btn" style="margin-right: 10px;" size="mini">高风险地区</el-button>-->
<!-- <el-button class="grayish_btn" size="mini">风险率攀升</el-button>-->
<!-- </div>-->
</div>
<!-- 地图 -->
<!-- <el-card style=" height:500px;"> -->
<region />
<region :new-map-data="mapData"/>
<!-- </el-card> -->
<!-- -->
<el-table class='table' :data="tableData1" :header-cell-style="{background: 'rgba(242, 242, 242, 0.654901960784314)'}"
border
height="300"
:row-style="{height:'28px'}"
:cell-style="{padding:'0px'}"
header-row-class-name="active_header"
header-cell-class-name="active_header"
cell-class-name="content_center">
<!-- header-row-class-name 表头行 加classname -->
<!-- cell-class-name 单元格加名字 -->
<!-- border有边框 -->
<!-- stripe
height="90%"
:data="tableData"
style="width: 80%; margin-top:10px; margin-bottom:10px;" -->
<el-table-column v-for='(val,key) in tableLabel1' :prop="key" :label="val" show-overflow-tooltip /><!--插槽里面没有东西就可以用单标签 -->
<!-- show-overflow-tooltip可以省略展示较多的文字内容 -->
@ -77,18 +71,18 @@
<!-- inline="true"表单域在一行 -->
<el-form :inline="true" :model="formInline2" class="demo-form-inline">
<el-form-item label="行业">
<el-select v-model="formInline2.industry" placeholder="选择行业" size="mini">
<el-form-item label="交易所">
<el-select v-model="formInline2.industry" placeholder="选择交易所" size="mini">
<el-option v-for="item in options_industry" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit1" icon="el-icon-search" size="mini">查询</el-button>
<el-button class="grayish_btn" @click="indusRisk" icon="el-icon-search" size="mini">查询</el-button>
</el-form-item>
</el-form>
</div>
<!-- <el-card style=" height:200px;"> -->
<div ref="echarts_2" style="height:320px;width:660px">
<div ref="echarts_2" style="height:320px;width:1000px">
</div>
<!-- </el-card> -->
</el-card>
@ -96,49 +90,51 @@
</el-col>
<el-col :span="9">
<el-card style=" height:1100px;">
<el-card style=" height:1200px;">
<span style="font-size: 18px;font-weight: bold;">个体风险预警</span>
<div class="form_small">
<!-- inline="true"表单域在一行 -->
<el-form :inline="true" :model="formInline3" class="demo-form-inline">
<el-form-item label="行业">
<el-select v-model="formInline3.industry" placeholder="选择行业" size="mini">
<el-form-item label="交易所">
<el-select v-model="formInline3.industry" placeholder="选择交易所" size="mini">
<el-option v-for="item in options_industry" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit1" icon="el-icon-search" size="mini">查询</el-button>
<el-button class="grayish_btn" @click="individualRisk" icon="el-icon-search" size="mini">查询</el-button>
</el-form-item>
</el-form>
</div>
<div >
<span></span>
<span></span>
<span></span>
</div>
<!-- <div >-->
<!-- <span></span>-->
<!-- <span></span>-->
<!-- <span></span>-->
<!-- </div>-->
<div>
本月风险率 12% 相较上月 上升 2%
预警次数
</div>
<el-row :gutter="12">
<el-col :span="8">
<el-card style="background-color: #ec808d;">
<div> 严重</div>
108
<el-card style="background-color: #c43434cc;">
<!-- <div class="button" @click="alert('here')"> 严重</div>-->
<el-button type="text" class="button" @click="choseType('严重')">严重</el-button>
{{ critical }}
</el-card>
</el-col>
<el-col :span="8" >
<el-card style="background-color: #facd91;">
<div> 中等</div>
218
<el-card style="background-color: #f1c049;">
<!-- <div> 中等</div>-->
<el-button type="text" class="button" @click="choseType('中等')">中等</el-button>
{{ mid }}
</el-card>
</el-col>
<el-col :span="8" >
<el-card style="background-color: #caf982;">
<div>健康指数</div>
99
<el-card style="background-color: #4dca8e;">
<!-- <div>轻微</div>-->
<el-button type="text" class="button" @click="choseType('轻微')">轻微</el-button>
{{ good }}
</el-card>
</el-col>
</el-row>
@ -157,6 +153,7 @@
:cell-style="{padding:'0px'}"
header-row-class-name="active_header"
header-cell-class-name="active_header"
height="400"
cell-class-name="content_center">
<!-- header-row-class-name 表头行 加classname -->
<!-- cell-class-name 单元格加名字 -->
@ -211,9 +208,9 @@
width="80%">
<el-table class='table' :data="tableData_detail_2" :header-cell-style="{background: 'rgba(242, 242, 242, 0.654901960784314)'}"
border
fit="true"
:row-style="{height:'28px'}"
:cell-style="{padding:'0px'}"
:cell-style="{padding:'0px'}" style="width: 100%"
header-row-class-name="active_header"
header-cell-class-name="active_header"
cell-class-name="content_center">
@ -227,6 +224,14 @@
<el-table-column v-for='(val,key) in tableLabel_detail_2' :prop="key" :label="val" show-overflow-tooltip /><!--插槽里面没有东西就可以用单标签 -->
<!-- show-overflow-tooltip可以省略展示较多的文字内容 -->
<el-table-column
prop="scale"
label="点击查看新闻源">
<template slot-scope="scope">
<!-- <span class="text" v-on:click="detail2(scope.row)">查看详情</span>-->
<el-button icon="el-icon-s-promotion" @click="copy(scope.row.url)"></el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
@ -237,14 +242,23 @@ import * as echarts from "echarts"
import region from "../components/region.vue";
import http from '../utils/request'
export default {
name:'risk_warning',
//
components: {
region
},
data() {
return {
type:'',
change:true,
mapData:'',
pieData:[],
critical:'',
mid:'',
good:'',
// 3
// 1-""
formInline1: {
market: '',
start_date:'',
@ -277,7 +291,7 @@ components: {
}
],
options_industry:[{
value: '全部',
value: '',
label: '全部'
}, {
value: '深圳证券交易所',
@ -285,14 +299,15 @@ components: {
}, {
value: '上海证券交易所',
label: '上海证券交易所'
}, {
value: '北京证券交易所',
label: '北京证券交易所'
},
// {
// value: '',
// label: ''
// },
],
options_exchange:[{
value: '全部',
value: '',
label: '全部'
}, {
value: '深圳证券交易所',
@ -307,18 +322,19 @@ components: {
// ,
tableLabel1: {
num: '事件序号',
// num: '',
province: '省份',
total_risks: '严重风险总量',
warning_time: '预警时刻',
warning_average:'预警平均值',
YOY:'严重风险总量同比',
counts: '严重风险总量',
early_warning_time: '最新预警时刻',
warning_score:'预警平均值',
increase:'风险同比增加',
},
origiData:[],//
tableLabel2:{
order: '排名',
// order: '',
code: '股票代码',
name: '企业名称',
warning: '预警值',
warning_type: '风险水平',
},
@ -364,34 +380,35 @@ YOY:'+10',
},
],
tableData2: [{
order: '1',
code: '688001.SH',
name: '华兴源创',
warning: 80,
},
{
order: '2',
code: '688001.SH',
name: '华兴源创',
warning: 75,
},
{
order: '3',
code: '688001.SH',
name: '华兴源创',
warning: 75,
},
{
order: '4',
code: '688001.SH',
name: '华兴源创',
warning: 75,
},
tableData2: [
// {
// order: '1',
// code: '688001.SH',
// name: '',
// warning: 80,
//
// },
// {
// order: '2',
// code: '688001.SH',
// name: '',
// warning: 75,
//
// },
// {
// order: '3',
// code: '688001.SH',
// name: '',
// warning: 75,
//
// },
// {
// order: '4',
// code: '688001.SH',
// name: '',
// warning: 75,
//
// },
],
//
//
@ -403,187 +420,344 @@ warning: 75,
//
tableLabel_detail_1:{
主体代码:'主体代码',
主体类型:'主体类型',
省份:'省份',
行业:'行业',
当前预警时刻:'当前预警时刻',
历史预警时刻:'历史预警时刻',
预警值:'预警值',
预警值同比:'预警值同比',
预警类型:'预警类型',
风险等级:'风险等级',
影响力等级:'影响力等级',
健康等级:'健康等级',
code:'主体代码',
name:'名称',
province:'省份',
// :'',
early_warning_time:'当前预警时刻',
// exchange:'',
risk_type:'风险类型',
warning_type:'风险等级',
warning_score:'风险值',
last_time:'上次预警时刻',
increase:'同比',
},
//
tableLabel_detail_2:{
主体代码:'主体代码',
主体类型:'主体类型',
省份:'省份',
行业:'行业',
当前预警时刻:'当前预警时刻',
历史预警时刻:'历史预警时刻',
预警值:'预警值',
预警值同比:'预警值同比',
预警类型:'预警类型',
风险类型:'风险类型',
风险等级:'风险等级',
影响力等级:'影响力等级',
健康等级:'健康等级',
code:'主体代码',
name:'名称',
province:'省份',
// :'',
early_warning_time:'当前预警时刻',
exchange:'交易所',
risk_type:'风险类型',
warning_type:'风险水平',
warning_score:'风险概率',
url:'相关链接'
},
}
},
mounted(){
const echarts1 = echarts.init(this.$refs.echarts_1)
const echarts2 = echarts.init(this.$refs.echarts_2)
const option_1={
//
toolbox: {
feature: {
saveAsImage: {}
}
},
tooltip: {
trigger: 'item'
},
legend: {
top: '5%',
left: 'center'
},
series: [
{
name: 'Access From',
type: 'pie',
radius: ['30%', '65%'],//
center:['50%','65%'],//
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 5,
borderColor: '#fff',
borderWidth: 2
},
label: {
show: true
},
emphasis: {
label: {
show: true,
fontSize: 40,
fontWeight: 'bold'
}
},
labelLine: {
show: true
},
data: [
{ value: 40, name: '重大声誉风险' },
{ value: 38, name: '流动风险' },
{ value: 32, name: '获现风险' },
{ value: 30, name: '市场风险' },
{ value: 28, name: '经营风险' },
{ value: 26, name: '信用风险' },
{ value: 22, name: '资产负债风险' }
]
}
]
}
// const option_2= {
// yAxis: {
// data: ['', '', '', '', '','','','','','','','','','宿','','','','']
// },
// xAxis: {},
// series: [
// {
// type: 'bar',
// data: [
// 10,
// 22,
// 28,
// {
// value: 43,
// // //
// // itemStyle: {
// // color: '#91cc75',
// // shadowColor: '#91cc75',
// // borderType: 'dashed',
// // opacity: 0.5
// // }
// },
// 49,
// 45,
// 66,84,
// 46,45,88,45,64,11,21,45,87,88
// ],
// // itemStyle: {
// // barBorderRadius: 5,
// // borderWidth: 1,
// // borderType: 'solid',
// // borderColor: '#73c0de',
// // shadowColor: '#5470c6',
// // shadowBlur: 3
this.initMapData()
this.individualRisk()
this.indusRisk()
// const echarts2 = echarts.init(this.$refs.echarts_2)
//
//
// const option_2 = {
// //
// toolbox: {
// feature: {
// saveAsImage: {}
// }
// },
//
// grid: {
// left: '20%',//
// right: '4%',
// // bottom: '10%',
// top:'8%',//
// // containLabel: true
// },
// xAxis: {
// type: 'value',
// // boundaryGap: [0, 0.01]
// },
// yAxis: {
// type: 'category',
// data: ['', '', '', '', '','','','','','','','','','宿','','','','']
//
// // },
// },
// series: [
// {
// // color:'#6d7d87',
// type: 'bar',
// data: [18203, 23489, 29034, 104970, 131744, 630230,18203, 23489, 29034, 104970, 131744, 630230,19325, 23438, 31000, 121594, 134141, 681807,]
// },
// // {
// // name: '2012',
// // type: 'bar',
// // data: [19325, 23438, 31000, 121594,19325, 23438, 31000, 121594, 134141, 681807, 134141, 681807,18203, 23489, 29034, 104970, 131744, 630230,]
// // }
// }
// ]
// }
const option_2 = {
//
toolbox: {
feature: {
saveAsImage: {}
}
},
grid: {
left: '20%',//
right: '4%',
// bottom: '10%',
top:'8%',//
// containLabel: true
},
xAxis: {
type: 'value',
// boundaryGap: [0, 0.01]
},
yAxis: {
type: 'category',
data: ['房地产业', '信息传输、软件和信息技术服务业', '水利、环境和公共设施管理业', '制造业', '建筑业','综合','批发和零售业','电力、热力、燃气及水生产和供应业','租赁和商务服务业','交通运输、仓储和邮政业','卫生和社会工作','文化、体育和娱乐业','采矿业','住宿和餐饮业','科学研究和技术服务业','教育','农、林、牧、渔业','居民服务、修理和其他服务业']
// },
},
series: [
{
// color:'#6d7d87',
type: 'bar',
data: [18203, 23489, 29034, 104970, 131744, 630230,18203, 23489, 29034, 104970, 131744, 630230,19325, 23438, 31000, 121594, 134141, 681807,]
},
// {
// name: '2012',
// type: 'bar',
// data: [19325, 23438, 31000, 121594,19325, 23438, 31000, 121594, 134141, 681807, 134141, 681807,18203, 23489, 29034, 104970, 131744, 630230,]
// }
]
}
echarts1.setOption(option_1),
echarts2.setOption(option_2)
// ]
// }
//
//
//
//
// echarts2.setOption(option_2)
},
methods: {
copy(url){
let oInput = document.createElement('input');
oInput.value = url;
document.body.appendChild(oInput);
oInput.select(); // ;
console.log(oInput.value)
document.execCommand("Copy"); //
this.$message({
message: '复制成功',
type: 'success'
});
oInput.remove()
window.open(url, "_blank");
},
choseType(type){
if( this.change ||this.type!==type)//
{
this.tableData2=this.origiData
this.tableData2=this.tableData2.filter(item=>item.warning_type===type)
this.type=type
this.change=!this.change
}
else if(!this.change)
{
this.tableData2=this.origiData
this.change=!this.change
}
// for(let i in this.tableData2){
// if (i.warning_type!==type)
// this.tableData2.
},
initMapData(){
http.get('/warning/region_all_risk/',{params:{
//
}}).then((res)=>{
this.mapData=res.data
})
},
onSubmit1() {
console.log('submit!');
http.get('/warning/warning_rank/',{params:{
// exchange:this.exchange
market:this.formInline1.market,
start:this.formInline1.start_date,
end:this.formInline1.end_date,
}}).then((res)=>{
this.tableData2=res.data
this.origiData=res.data
})
http.get('/warning/region_rank/',{params:{
// exchange:this.exchange
market:this.formInline1.market,
start:this.formInline1.start_date,
end:this.formInline1.end_date,
}}).then((res)=>{
this.tableData1 = eval(unescape(res.data.replace(/\\u/g, '%u')))
// this.tableData1=res.data
})
http.get('/warning/region_all_risk/',{params:{
//
start:this.formInline1.start_date,
end:this.formInline1.end_date,
}}).then((res)=>{
this.mapData=res.data
})
},
individualRisk() {
const echarts1 = echarts.init(this.$refs.echarts_1)
http.get('/warning/individual_rank/', {
params: {
// exchange:this.exchange
exchange: this.formInline3.industry,
start:this.formInline1.start_date,
end:this.formInline1.end_date,
}
}).then((res) => {
this.pieData.length=0
this.critical = res.data['指数']['严重']
this.mid = res.data['指数']['中等']
this.good = res.data['指数']['轻微']
let tmp=res.data['环形图']
for(let key in tmp)
{
let arr={}
arr['name']=key
arr['value']=tmp[key]
this.pieData.push(arr)
}
echarts1.clear()
const option_1={
//
toolbox: {
feature: {
saveAsImage: {}
}
},
tooltip: {
trigger: 'item'
},
legend: {
top: '5%',
left: 'center'
},
series: [
{
name: 'Access From',
type: 'pie',
radius: ['30%', '65%'],//
center:['50%','65%'],//
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 5,
borderColor: '#fff',
borderWidth: 2
},
label: {
show: true
},
emphasis: {
label: {
show: true,
fontSize: 40,
fontWeight: 'bold'
}
},
labelLine: {
show: true
},
data: this.pieData
// [
// { value: 40, name: '' },
// { value: 38, name: '' },
// { value: 32, name: '' },
// { value: 30, name: '' },
// { value: 28, name: '' },
// { value: 26, name: '' },
// { value: 22, name: '' }
// ]
}
]
}
echarts1.setOption(option_1,true)
})
http.get('/warning/warning_rank/',{params:{
// exchange:this.exchange
exchange: this.formInline3.industry,
start:this.formInline1.start_date,
end:this.formInline1.end_date,
}}).then((res)=>{
this.tableData2=res.data
this.origiData=res.data
})
},
indusRisk() {
const echarts2 = echarts.init(this.$refs.echarts_2)
http.get('/warning/indus_rank/', {
params: {
// exchange:this.exchange
exchange: this.formInline2.industry,
start:this.formInline1.start_date,
end:this.formInline1.end_date,
}
}).then((res) => {
let xData=[],yData=[]
let tmp=res.data
for(let key in tmp)
{
xData.push(tmp[key])
yData.push(key)
}
const option_2 = {
//
toolbox: {
feature: {
saveAsImage: {}
}
},
grid: {
left: '20%',//
right: '4%',
// bottom: '10%',
top:'8%',//
// containLabel: true
},
xAxis: {
type: 'value',
// boundaryGap: [0, 0.01]
},
yAxis: {
type: 'category',
data: yData
// },
},
series: [
{
// color:'#6d7d87',
type: 'bar',
data: xData
},
// {
// name: '2012',
// type: 'bar',
// data: [19325, 23438, 31000, 121594,19325, 23438, 31000, 121594, 134141, 681807, 134141, 681807,18203, 23489, 29034, 104970, 131744, 630230,]
// }
]
}
echarts2.setOption(option_2)
})
},
regionRisk() {
http.get('/warning/region_rank/', {
params: {
// exchange:this.exchange
exchange: this.formInline3.industry,
start:this.formInline1.start_date,
end:this.formInline1.end_date,
}
}).then((res) => {
this.pieData.length = 0
let data = eval(unescape(res.data.replace(/\\u/g, '%u')))
this.critical = data['指数']['严重']
this.mid = data['指数']['中等']
this.good = data['指数']['轻微']
})
},
// 1
detail1(row){
console.log("查看详情-各省份风险情况")
// console.log("-")
http.get('/warning/region_rank_detail/', {
params: {
// exchange:this.exchange
region: row.province,
// start:this.formInline1.start_date,
// end:this.formInline1.end_date,
}
}).then((res) => {
// this.tableData_detail_1 = eval(unescape(res.data.replace(/\\u/g, '%u')))
this.tableData_detail_1=res.data
})
console.log(row)//
this.detailsdialog_1 = true//
// http.get(
// "/",
// {params:{
@ -604,8 +778,15 @@ warning: 75,
detail2(row){
console.log("查看详情-个体风险预警")
console.log(row)//
this.detailsdialog_2 = true//
// console.log(this.tableData2)
this.tableData_detail_2=Array(row)
// for(let i in this.tableData2)
// {
//
// if (this.tableData2[i]['name']===row['name'] && this.tableData2[i]['early_warning_time']===row['early_warning_time'])
// this.tableData_detail_2=this.tableData2[i]
// }
this.detailsdialog_2 = true//
// http.get(
// "/",
// {params:{
@ -626,6 +807,22 @@ warning: 75,
</script>
<style lang="less" scoped>
//div
.button{
.hover {
background-color: #0056b3;
}
.active {
background-color: #003e80;
}
display: block;
//background-color: #007bff;
color: #000000;
//padding: 10px 20px;
border: none;
}
//
/deep/ .echartsGroup[data-v-02ef51f8] {
// width: 500px;
@ -671,7 +868,7 @@ warning: 75,
}
/deep/ .active_header{//
color: #333333;
font-size: 9px;
font-size: 13px;
text-align: center !important;
// border-color:#333333;
@ -679,12 +876,16 @@ warning: 75,
}
/deep/ .content_center{//
text-align: center !important;
font-size: 10px;
font-size: 13px;
// border-color:#333333;
}
}
.text{
color:rgba(2, 167, 240, 0.729411764705882);
}
.grayish_btn{//
color: #fff;//
background-color: #aaaaaa;//
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

51
src_old/App.vue Normal file
View File

@ -0,0 +1,51 @@
<template>
<div>
<!-- 路由出口 -->
<!-- 路由匹配组建将渲染到这里 -->
<!-- <router-view> </router-view>-->
<keep-alive exclude="test" include="">
<router-view />
</keep-alive>
<!-- <router-view v-if="!$route.meta.keepAlive" />-->
</div>
</template>
<script>
// import http from './utils/request'//
// import {getData} from './api'
// import DevicePixelRatio from './libs/rem'
// export default{
// created(){
// new DevicePixelRatio().init()
// }
// }
</script>
<style lang="less">//
html,body,h3{
margin: 0;
padding: 0;
}
.superscript{ // 1
font-size: 13px;
padding:10px;
color:#fff;
background-color: rgba(2, 167, 240, 0.729411764705882);
}
.text{
color:rgba(2, 167, 240, 0.729411764705882);
cursor: pointer;
/* 将鼠标样式设为手型 */
}
</style>

BIN
src_old/assets/Logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
src_old/assets/card.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
src_old/assets/r-c.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="259px" height="170px" xmlns="http://www.w3.org/2000/svg">
<defs>
<mask fill="white" id="clip336">
<path d="M 251 0 L 31.3118811881188 0 L 2 31.9661016949153 L 2 163.305084745763 L 251 163.305084745763 L 251 0 Z " fill-rule="evenodd" />
</mask>
<filter x="201px" y="107px" width="259px" height="170px" filterUnits="userSpaceOnUse" id="filter337">
<feOffset dx="3" dy="3" in="SourceAlpha" result="shadowOffsetInner" />
<feGaussianBlur stdDeviation="1.5" in="shadowOffsetInner" result="shadowGaussian" />
<feComposite in2="shadowGaussian" operator="atop" in="SourceAlpha" result="shadowComposite" />
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.349019607843137 0 " in="shadowComposite" />
</filter>
<g id="widget338">
<path d="M 251 0 L 31.3118811881188 0 L 2 31.9661016949153 L 2 163.305084745763 L 251 163.305084745763 L 251 0 Z " fill-rule="nonzero" fill="#ffffff" stroke="none" transform="matrix(1 0 0 1 201 107 )" />
<path d="M 251 0 L 31.3118811881188 0 L 2 31.9661016949153 L 2 163.305084745763 L 251 163.305084745763 L 251 0 Z " stroke-width="2" stroke="#555555" fill="none" transform="matrix(1 0 0 1 201 107 )" mask="url(#clip336)" />
</g>
</defs>
<g transform="matrix(1 0 0 1 -201 -107 )">
<use xlink:href="#widget338" filter="url(#filter337)" />
<use xlink:href="#widget338" />
</g>
</svg>

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

View File

@ -0,0 +1,85 @@
<template>
<div id="home">
<dv-full-screen-container>
<!--一行两等份-->
<div class="head">大规模泛金融知识图谱系统</div>
<div class="module-box">
<div style="flex: 0 1 25%">
<dv-border-box-12 style="width: 100%; height: 180px">
<div style="color:white;padding:10px 10px;">类型统计</div>
</dv-border-box-12>
<dv-border-box-12 style="width: 100%; height: 180px">
<div style="color:white;padding:10px 10px;">健康指数</div>
</dv-border-box-12>
</div>
<div style="flex: 0 1 50%">
<dv-border-box-8 style="width: 100%; height: 360px"></dv-border-box-8>
</div>
<div style="flex: 0 1 25%">
<dv-border-box-12 style="width: 100%; height: 180px">
<div style="color:white;padding:10px 10px;">图谱统计</div>
</dv-border-box-12>
<dv-border-box-12 style="width: 100%; height: 180px">
<div style="color:white;padding:10px 10px;">区域分析</div>
</dv-border-box-12>
</div>
</div>
<div class="module-box">
<div style="flex: 0 1 25%">
<dv-border-box-12 style="width: 100%; height: 180px;">
<div style="color:white;padding:10px 10px;">当前事件统计</div>
</dv-border-box-12>
</div>
<div style="flex: 0 1 50%">
<dv-border-box-8 style="width: 100%; height: 180px;">
<div style="color:white;padding:10px 10px;">行业风险价值曲线图</div>
</dv-border-box-8>
</div>
<div style="flex: 0 1 25%">
<dv-border-box-12 style="width: 100%; height: 180px;">
<div style="color:white;padding:10px 10px;">行业价值评估</div>
</dv-border-box-12>
</div>
</div>
</dv-full-screen-container>
</div>
</template>
<script>
export default {
components: {},
data() {
return {};
},
mounted() {},
methods: {},
};
</script>
<style lang="less" scoped>
.head{
color: aliceblue;
text-align:center;
padding-top:12px;
font-size: 18px;
}
#home {
width: 100%;
height: 100%;
background: url("../assets/background.jpg") center center no-repeat;
background-size: 100% 100%;
position: absolute; /*/绝对定位 */
}
.module-box {
display: flex;
justify-self: space-between;
margin: 1px;
padding-left:15px;
}
</style>

View File

@ -0,0 +1,62 @@
<!-- -->
<template>
<div id="home">
<!-- 全屏容器dv-full-screen-container -->
<dv-full-screen-container>
<!-- 边框dv-border-box -->
<div style="flex:0 1 50%;padding-bottom: 10px;"> <!-- flex-grow | flex-shrink | flex-basis */ -->
<dv-border-box-7 style="width: 100%;height:60px;">
<div style="color: aliceblue;text-align: center;padding: 10px;">大规模泛金融知识图谱系统"</div>
<dv-decoration-10 style="width:100%;height:5px;" />
</dv-border-box-7>
</div>
<div style="flex:0 1 50%"> <!-- flex-grow | flex-shrink | flex-basis */ -->
<dv-border-box-7 style="width: 100%;height: 200px;">
<region/>
</dv-border-box-7>
</div>
</dv-full-screen-container>
</div>
</template>
<script>
import region from "../components/region.vue";
export default {
components: {
region
},
data () {
return {
}
},
mounted(){
},
methods:{
},
}
</script>
<style lang="less" scoped>
#home {
width: 100%;
height: 100vh;
background: url("../assets/background.jpg") center center no-repeat;
background-size: 100% 100%;
position:absolute;/*/绝对定位 */
}
</style>

View File

@ -0,0 +1,269 @@
<!-- 侧导航栏 -->
<template>
<div style="display=flex;">
<!-- <el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
<el-radio-button :label="false">展开</el-radio-button>
<el-radio-button :label="true">收起</el-radio-button>
</el-radio-group> -->
<el-menu
:default-active="$route.path"
class="el-menu-vertical-demo"
:router="true"
:collapse="isCollapse"
background-color="#000000"
text-color="#fff"
active-text-color="#ffd04b"
style="height:1200px">
<!-- style="height:auto" -->
<!-- :default-active="$route.path"使得在没有点击左侧导航栏时也能根据路由转变转化颜色 -->
<div style="display=flex;">
<!-- <img src="../assets/Logo.png" width="12%" style="display:inline-block;padding-right: 3px;" align="absmiddle"> -->
<img src="../assets/数据显示.png" width="20px" style="display:inline-block;padding-left: 1px;padding-right: 5px;" align="absmiddle">
<!-- align="absmiddle"让图像和文字一样高 -->
<h3 style="display:inline-block;" @click = "bigscreen">{{ isCollapse ? '' : '资本市场系统性风险平台'}}</h3>
<!-- -->
</div>
<!-- <el-button @click="handleMenu" icon="el-icon-menu" size="mini">bibibi</el-button> -->
<!-- 循环遍历所有的单导航栏 -->
<!-- 没有子菜单 --> <!-- index都是为了确保唯一性,但最好设置为path有利于根据路由跳转页面 -->
<el-menu-item @click='clickMenu(item)' v-for="item in nochildren" :key='item.path' :index='item.path'>
<!-- : 是v-bind: -->
<i :class="`el-icon-${item.icon}`"></i> <!-- 图标官网可选 -->
<span slot="title">{{ item.label }}</span>
</el-menu-item>
<!-- 有子菜单 -->
<el-submenu v-for="item in hasChildren" :key='item.path' :index='item.path'><!-- index都是为了确保唯一性 -->
<template slot="title">
<i :class="`el-icon-${item.icon}`"></i>
<span slot="title">{{ item.label }}</span>
</template>
<el-menu-item-group v-for='subItem in item.children' :key='subItem.path'>
<el-menu-item @click='clickMenu(subItem)' :index="subItem.path" style="padding-left: 70px;">{{subItem.label}}</el-menu-item>
</el-menu-item-group>
</el-submenu>
</el-menu>
</div>
</template>
<script>
export default {
data() {
return {
// isCollapse:false,
menuData: [
// {
// path: "/",
// name: "home",
// label: "",
// icon: "s-home",
// },
{
path: "/systematic_risk",//2-1
name: "systematic_risk",
label: "系统性风险分析",
icon: 's-marketing'
},
{
path: "/market_entities",//1
name: "market_entities",
label: "市场主体分析",
icon: "s-flag",
},
//2
{
path: "/influential_entities",//3
name: "influential_entities",
label: "高影响主体分析",
icon: "star-off",
},
{
path: "/individual_risk",//2-2
name: "individual_risk",
label: "个体风险分析",
icon: 'lightning'
},
{
path: "/diffus",//5
name: "diffus",
label: "风险传导",
icon: "aim",
},
{
// path: "/warning",//4
label: "预警服务",
icon: "bell",
children:[
{
path: "/warning",//4-1
name: "warning",
label: "预警服务",
},
{
path: "/risk_warning",//4-1
name: "risk_warning",
label: "风险预警",
},
{
path: "/abnormal_detection",//4-2
name: "abnormal_detection",
label: "异常检测",
},
],
},
{
// path: "/event",//8
label: "事件分析",
icon: "document",
children:[
{
path: "/event_analysis",//2
name: "event_analysis",
label: "事件分析",
},
{
path: "/event_graph",//2
name: "event_graph",
label: "事件图谱",
},]
},
{
path: "/health",//5
name: "health",
label: "健康指数",
icon: "umbrella",
},
{
path: "/quotation",//7
name: "quotation",
label: "行情分析",
icon: "s-data",
},
{
path: "/pressure",//6
name: "pressure",
label: "压力测试",
icon: "s-help",
},
],
};
},
methods: {
bigscreen(){//
this.$router.push('/bigscreen');
},
//
clickMenu(item){
// this.$route.path item.path
if (this.$route.path !== item.path && !(this.$route.path === '/market_entities' && (item.path === '/'))) {//$route
this.$router.push(item.path)//$routerrouter
}
this.$store.commit('selectMenu', item)//,storeimport
},
},
computed: {
hasChildren() {//
return this.menuData.filter((item) => item.children);
},
nochildren() {
return this.menuData.filter((item) => !item.children);
},
isCollapse(){
return this.$store.state.tab.isCollapse
},
},
};
</script>
<style lang="less" scoped>
.el-menu-vertical-demo:not(.el-menu--collapse) {//
width: 220px;
min-height: 300px;
}
.el-menu-item, .el-submenu__title {//
height: 40px;//
line-height: 45px;//
}
.el-dropdown-menu__item, .el-menu-item {//
font-size: 13px;
}
.el-menu{
height:100vh;//
h3{
// color: #fff;
// text-align: center;
// line-height: normal;
// font-size: 13px;
font-family: 'Arial Normal', 'Arial', sans-serif;
font-weight: bold;//
font-size: 16px;
color: #fff;
text-align: center;
line-height: 4;
}
}
/deep/ .el-menu-item-group__title { //
padding: 0px 0 0px 0px;//
line-height: normal;
font-size: 12px;
color: #909399;
}
/deep/ .el-submenu__title {
font-size: 13px;
height: 40px!important;
line-height: 50px!important;
}
/deep/ .el-submenu__icon-arrow {
position: absolute;
top: 70%;//
color:#fff;
}
</style>

View File

@ -0,0 +1,210 @@
<!-- 上导航栏 -->
<template>
<div class="header-container">
<div class="l-content">
<!-- tag -->
<div class="tags" >
<el-tag v-for="(item,index) in tags"
:key="item.path"
:closable="true"
:effect="$route.name === item.name ? 'dark' : 'plain'"
@click="changeMenu(item)"
@close="handledClose(item,index)"
style="margin-left: 5px"><!-- 只有非首页才显示closable点击该页颜色加深effect-->
{{ item.label }}
</el-tag>
</div>
<!--
<el-breadcrumb separator="">
<el-breadcrumb-item :to="{ path: '/' }">
<el-button size="small" >首页</el-button>
</el-breadcrumb-item>
<el-breadcrumb-item><a href="/">
<el-button size="small" >风险主体总量<i class="el-icon-close" size="mini " ></i>
</el-button>
</a></el-breadcrumb-item>
</el-breadcrumb> -->
<!-- <span class="text">首页</span> -->
</div>
<!-- 用户信息 登录注册 -->
<div class="r-content">
<!--练习的弹出框 -->
<el-dialog
title="修改个人信息"
:visible.sync="dialogVisible"
width="30%">
<span></span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
<!-- 右侧登录页面设计 -->
<el-dropdown>
<span class="el-dropdown-link">
<el-button icon=el-icon-s-custom circle> </el-button> <!---->
<span class="text">请登录</span>
<i class="el-icon-arrow-down el-icon--right"></i> <!--下拉-->
</span>
<el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item>-->
<!-- &lt;!&ndash; 点击后改变弹出框生效情况 &ndash;&gt;-->
<!-- <el-button style='width: 150px;' @click="dialogVisible = true">修改个人信息</el-button>-->
<!-- </el-dropdown-item>-->
<!-- <el-dropdown-item>-->
<!-- <el-button style='width: 150px;' @click = "logout">登出</el-button>-->
<!-- </el-dropdown-item>-->
<el-dropdown-item>
<el-button style='width: 150px;' @click="login">登录</el-button>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</template>
<script>
import {mapState,mapMutations} from 'vuex'
import http from "@/utils/request";
export default {
name: "CommonTag",
data(){
return{
dialogVisible:false,//
};
},
computed: {
...mapState({//mapState...
tags: state => state.tab.tabsList
})
},
methods:{
login(){
this.$router.push('/login')
},
logout(){
this.$store.commit('logout')
},
//Mutations,closeTag34
...mapMutations(['closeTag']),
//tag
changeMenu(item){
// console.log(item)
this.$router.push({name: item.name})//tab
},
//tag x
handledClose(item,index){ //index
//tag tabsList
// 1
// this.$store.commit('closeTag')
// 2,storeMutations
this.closeTag(item)
const length=this.tags.length
// console.log("tags",this.tags.length)
// console.log( this.$router)
//
//item.namename
if(item.name!== this.$route.name){
return
}
//=()
if(index===length){
if(length===0){
item={
path: "/market_entities",
name: "market_entities",
label: "市场主体分析",
}
this.$router.push(item)
this.$store.commit('selectMenu', item)//,storeimport
}
else{
this.$router.push({
name:this.tags[index-1].name
})
}
}
//=()
else{
this.$router.push({
name:this.tags[index].name
})
}
},
//
UserManagement(){//
this.$router.push('/UserManagement');
},
}
};
</script>
<style lang="less" scoped>
.header-container{
padding: 0 30px;
background-color: #33333325;
height: 60px;
display: flex;//
justify-content: space-between;
.text{
color:rgba(0, 0, 0, 0.719);
font-size: 13px;
margin-left: 5px;//
margin-bottom: 10px;//
}
.l-content{
display: flex;
justify-content: space-between;
align-items: end; //
}
.r-content{
margin-top: 5px;//
align-items: top; //
.el-button.is-circle {
border-radius: 100%;
padding: 3px;//
}
.el-button {//
background: #ffffff00;
border: 1px solid #00040e;
color: #000104;
font-size: 16px;
border-radius: 20px;
}
}
}
</style>

View File

@ -0,0 +1,227 @@
<!-- 上导航栏 -->
<template>
<div class="header-container">
<div class="l-content">
<el-button @click="handleMenu" :icon=" icon" size="medium" style="padding: 5px;width: 30px;height: 60px;background-color:transparent;"></el-button>
<!-- tag -->
<div class="tags" >
<el-tag v-for="(item,index) in tags"
:key="item.path"
:closable="true"
:effect="$route.name === item.name ? 'dark' : 'plain'"
@click="changeMenu(item)"
@close="handledClose(item,index)"
style="margin-left: 5px"><!-- 只有非首页才显示closable点击该页颜色加深effect-->
{{ item.label }}
</el-tag>
</div>
<!--
<el-breadcrumb separator="">
<el-breadcrumb-item :to="{ path: '/' }">
<el-button size="small" >首页</el-button>
</el-breadcrumb-item>
<el-breadcrumb-item><a href="/">
<el-button size="small" >风险主体总量<i class="el-icon-close" size="mini " ></i>
</el-button>
</a></el-breadcrumb-item>
</el-breadcrumb> -->
<!-- <span class="text">首页</span> -->
</div>
<!-- 用户信息 登录注册 -->
<div class="r-content">
<!--练习的弹出框 -->
<el-dialog
title="修改个人信息"
:visible.sync="dialogVisible"
width="30%">
<span></span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
<!-- 右侧登录页面设计 -->
<el-dropdown>
<span class="el-dropdown-link">
<el-button icon=el-icon-s-custom circle> </el-button> <!---->
<span class="text">用户信息</span>
<i class="el-icon-arrow-down el-icon--right"></i> <!--下拉-->
</span>
<el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item>-->
<!-- &lt;!&ndash; 点击后改变弹出框生效情况 &ndash;&gt;-->
<!-- <el-button style='width: 150px;' @click="dialogVisible = true">修改个人信息</el-button>-->
<!-- </el-dropdown-item>-->
<el-dropdown-item>
<el-button style='width: 150px;' @click = "UserManagement">用户管理</el-button>
</el-dropdown-item>
<el-dropdown-item>
<el-button style='width: 150px;' @click="logout">退出登录</el-button>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</template>
<script>
import {mapState,mapMutations} from 'vuex'
import http from "@/utils/request";
export default {
name: "CommonTag",
data(){
return{
dialogVisible:false,//
//
icon:"el-icon-arrow-left",
};
},
computed: {
...mapState({//mapState...
tags: state => state.tab.tabsList
})
},
methods:{
//
handleMenu(){
this.$store.commit('collapseMenu')
this.icon = this.icon === 'el-icon-arrow-left' ? 'el-icon-arrow-right' : 'el-icon-arrow-left';
},
logout(){
this.$store.commit('logout')
this.$notify.info({
title: '注意',
message: '已退出'
})
this.$router.push('/login')
location.reload();
},
//Mutations,closeTag34
...mapMutations(['closeTag']),
//tag
changeMenu(item){
// console.log(item)
this.$router.push({name: item.name})//tab
},
//tag x
handledClose(item,index){ //index
//tag tabsList
// 1
// this.$store.commit('closeTag')
// 2,storeMutations
this.closeTag(item)
const length=this.tags.length
// console.log("tags",this.tags.length)
// console.log( this.$router)
//
//item.namename
if(item.name!== this.$route.name){
return
}
//=()
if(index===length){
if(length===0){
item={
path: "/market_entities",
name: "market_entities",
label: "市场主体分析",
}
this.$router.push(item)
this.$store.commit('selectMenu', item)//,storeimport
}
else{
this.$router.push({
name:this.tags[index-1].name
})
}
}
//=()
else{
this.$router.push({
name:this.tags[index].name
})
}
},
//
UserManagement(){//
this.$router.push('/UserManagement');
},
}
};
</script>
<style lang="less" scoped>
.header-container{
// padding: 0 30px;
padding: 0 0px;
background-color: #33333325;
height: 60px;
display: flex;//
justify-content: space-between;
.text{
color:rgba(0, 0, 0, 0.719);
font-size: 13px;
margin-left: 5px;//
margin-bottom: 10px;//
}
.l-content{
display: flex;
justify-content: space-between;
align-items: end; //
}
.r-content{
margin-top: 5px;//
align-items: top; //
.el-button.is-circle {
border-radius: 100%;
padding: 3px;//
}
.el-button {//
background: #ffffff00;
border: 1px solid #00040e;
color: #000104;
font-size: 16px;
border-radius: 20px;
}
}
}
</style>

View File

@ -0,0 +1,225 @@
<!-- 上导航栏 -->
<template>
<div class="header-container">
<div class="l-content">
<el-button @click="handleMenu" :icon=" icon" size="medium" style="padding: 5px;width: 30px;height: 60px;background-color:transparent;"></el-button>
<!-- tag -->
<div class="tags" >
<el-tag v-for="(item,index) in tags"
:key="item.path"
:closable="true"
:effect="$route.name === item.name ? 'dark' : 'plain'"
@click="changeMenu(item)"
@close="handledClose(item,index)"
style="margin-left: 5px"><!-- 只有非首页才显示closable点击该页颜色加深effect-->
{{ item.label }}
</el-tag>
</div>
<!--
<el-breadcrumb separator="">
<el-breadcrumb-item :to="{ path: '/' }">
<el-button size="small" >首页</el-button>
</el-breadcrumb-item>
<el-breadcrumb-item><a href="/">
<el-button size="small" >风险主体总量<i class="el-icon-close" size="mini " ></i>
</el-button>
</a></el-breadcrumb-item>
</el-breadcrumb> -->
<!-- <span class="text">首页</span> -->
</div>
<!-- 用户信息 登录注册 -->
<div class="r-content">
<!--练习的弹出框 -->
<el-dialog
title="修改个人信息"
:visible.sync="dialogVisible"
width="30%">
<span></span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
<!-- 右侧登录页面设计 -->
<el-dropdown>
<span class="el-dropdown-link">
<el-button icon=el-icon-s-custom circle> </el-button> <!---->
<span class="text">用户信息</span>
<i class="el-icon-arrow-down el-icon--right"></i> <!--下拉-->
</span>
<el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item>-->
<!-- &lt;!&ndash; 点击后改变弹出框生效情况 &ndash;&gt;-->
<!-- <el-button style='width: 150px;' @click="dialogVisible = true">修改个人信息</el-button>-->
<!-- </el-dropdown-item>-->
<!-- <el-dropdown-item> -->
<!-- <el-button style='width: 150px;' @click = "UserManagement">用户管理</el-button>-->
<!-- </el-dropdown-item>-->
<el-dropdown-item>
<el-button style='width: 150px;' @click="logout">退出登录</el-button>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</template>
<script>
import {mapState,mapMutations} from 'vuex'
import http from "@/utils/request";
export default {
name: "CommonTag",
data(){
return{
dialogVisible:false,//
//
icon:"el-icon-arrow-left",
};
},
computed: {
...mapState({//mapState...
tags: state => state.tab.tabsList
})
},
methods:{
//
handleMenu(){
this.$store.commit('collapseMenu')
this.icon = this.icon === 'el-icon-arrow-left' ? 'el-icon-arrow-right' : 'el-icon-arrow-left';
},
logout(){
this.$store.commit('logout')
this.$notify.info({
title: '注意',
message: '已退出'
})
this.$router.push('/login')
location.reload();
},
//Mutations,closeTag34
...mapMutations(['closeTag']),
//tag
changeMenu(item){
// console.log(item)
this.$router.push({name: item.name})//tab
},
//tag x
handledClose(item,index){ //index
//tag tabsList
// 1
// this.$store.commit('closeTag')
// 2,storeMutations
this.closeTag(item)
const length=this.tags.length
// console.log("tags",this.tags.length)
// console.log( this.$router)
//
//item.namename
if(item.name!== this.$route.name){
return
}
//=()
if(index===length){
if(length===0){
item={
path: "/market_entities",
name: "market_entities",
label: "市场主体分析",
}
this.$router.push(item)
this.$store.commit('selectMenu', item)//,storeimport
}
else{
this.$router.push({
name:this.tags[index-1].name
})
}
}
//=()
else{
this.$router.push({
name:this.tags[index].name
})
}
},
//
UserManagement(){//
this.$router.push('/UserManagement');
},
}
};
</script>
<style lang="less" scoped>
.header-container{
padding: 0 30px;
background-color: #33333325;
height: 60px;
display: flex;//
justify-content: space-between;
.text{
color:rgba(0, 0, 0, 0.719);
font-size: 13px;
margin-left: 5px;//
margin-bottom: 10px;//
}
.l-content{
display: flex;
justify-content: space-between;
align-items: end; //
}
.r-content{
margin-top: 5px;//
align-items: top; //
.el-button.is-circle {
border-radius: 100%;
padding: 3px;//
}
.el-button {//
background: #ffffff00;
border: 1px solid #00040e;
color: #000104;
font-size: 16px;
border-radius: 20px;
}
}
}
</style>

View File

@ -0,0 +1,189 @@
<template>
<div ref="QiPao" style="width: 1000px; height: 800px"></div>
</template>
<script>
import * as echarts from "echarts";
import * as d3 from 'd3';
export default {
data() {
return {
option: {},
colorList: ['#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc']
};
},
mounted() {
let that = this
let seriesData = [
{
depth: 0,
id: 'option',
index: 0,
value: 0
},
{
depth: 1,
id: 'option.大连商品交易所',
index: 1,
value: 1
},
{
depth: 1,
id: 'option.上海期货交易所',
index: 2,
value: 1
},
{
depth: 1,
id: 'option.郑州商品交易所',
index: 3,
value: 2
},
{
depth: 0,
id: 'option.广州期货交易所',
index: 4,
value: 1
},
{
depth: 1,
id: 'option.上海国际能源交易中心',
index: 5,
value: 1
},
];
let displayRoot = stratify1();
function stratify1() {
return d3
.stratify()
.parentId(function (d) {
return d.id.substring(0, d.id.lastIndexOf('.'));
})(seriesData)
.sum(function (d) {
return d.value || 0;
})
.sort(function (a, b) {
return b.value - a.value;
});
}
function overallLayout(params, api) {
let context = params.context;
d3
.pack()
.size([api.getWidth() - 2, api.getHeight() - 2])
.padding(0)(displayRoot);
context.nodes = {};
displayRoot.descendants().forEach(function (node) {
context.nodes[node.id] = node;
});
}
function renderItem(params, api) {
let context = params.context;
let idx = params.dataIndex;
// Only do that layout once in each time `setOption` called.
// setOption
if (!context.layout) {
context.layout = true;
overallLayout(params, api);
}
let nodePath = api.value('id');
let nodeName = nodePath
.slice(nodePath.lastIndexOf('.') + 1)
.split(/(?=[A-Z][^A-Z])/g)
.join('')
let node = context.nodes[nodePath];
if (node.id === 'option') {
node.r = 0
}
if (!node) {
// Reder nothing.
return;
}
let z2 = api.value('depth') * 2;
return {
type: 'circle',
shape: {
cx: node.x,
cy: node.y,
r: node.r
},
// transition: ['shape'],
z2: z2,
textContent: {
type: 'text',
style: {
// transition: isLeaf ? 'fontSize' : null,
text: nodeName,
fill: '#fff',
fontFamily: 'Arial',
width: node.r,
overflow: 'truncate',
fontSize: 13
},
emphasis: {
style: {
overflow: null,
fontSize: Math.max(node.r / 3, 12)
}
}
},
textConfig: {
position: 'inside'
},
style: {
fill: that.colorList[idx % that.colorList.length]
},
emphasis: {
style: {
fontFamily: 'Arial',
fontSize: 6,
shadowBlur: 20,
shadowOffsetX: 3,
shadowOffsetY: 5,
shadowColor: 'rgba(0,0,0,0.3)'
}
}
};
}
this.option = {
dataset: {
source: seriesData
},
tooltip: {},
hoverLayerThreshold: Infinity,
series: [{
type: 'custom',
colorBy: 'data',
renderItem: renderItem,
progressive: 0,
coordinateSystem: 'none',
encode: {
tooltip: 'value',
itemName: 'id'
},
}]
}
this.initEcharts()
},
methods: {
initEcharts() {
let myChart = echarts.init(this.$refs.QiPao)
myChart.setOption(this.option)
}
},
};
</script>
<style>
</style>

View File

@ -0,0 +1,154 @@
<template>
<div>
<div class="form">
<!-- inline="true"表单域在一行 -->
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="公司名称">
<el-input v-model="formInline.company_str" placeholder="公司名称:" size="mini"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit" icon="el-icon-search" size="mini">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id='echarts' ref="echarts_1" style="height:300px;width:600px;margin-left: 200px;"></div>
</div>
</template>
<script>
import * as echarts from "echarts"
export default {
data() {
return {
//
x:['2000/6/5','2000/6/6','2000/6/7','2000/6/8','2000/6/9','2000/6/10','2000/6/11','2000/6/12','2000/6/13','2000/6/14','2000/6/15','2000/6/16','2000/6/17','2000/6/18','2000/6/19','2000/6/20','2000/6/21','2000/6/22','2000/6/23','2000/6/24','2000/6/25','2000/6/26','2000/6/27','2000/6/28','2000/6/29','2000/6/30','2000/7/1','2000/7/2','2000/7/3','2000/7/4','2000/7/5','2000/7/6','2000/7/7','2000/7/8','2000/7/9','2000/7/10','2000/7/11','2000/7/12','2000/7/13','2000/7/14','2000/7/15','2000/7/16','2000/7/17','2000/7/18','2000/7/19','2000/7/20','2000/7/21','2000/7/22','2000/7/23','2000/7/24'],
y1:[200,269,286,153,297,243,184,178,292,298,283,282,228,251,320,316,131,173,138,329,197,246,257,232,271,161,212,147,200,348,251,119,190,132,147,211,255,323,190,157,123,269,106,183,237,296,156,61,101,301],
y2:[319,162,213,69,167,337,171,283,285,203,322,81,185,259,212,305,206,236,70,224,309,254,86,107,334,153,243,141,251,306,306,317,271,290,254,220,154,156,54,70,133,223,265,51,339,270,184,332,163,197],
y3:[329,113,251,118,324,328,140,284,231,189,192,275,73,311,313,299,199,300,249,160,263,272,159,245,222,104,203,283,332,147,278,339,207,159,66,106,338,63,258,191,246,141,243,90,290,330,93,76,134,86],
y4:[284,265,335,75,234,121,66,258,104,291,197,248,56,340,120,327,328,81,179,282,211,90,147,320,150,200,236,210,205,192,318,184,98,228,55,66,231,151,63,149,329,127,111,57,64,55,119,137,247,270],
formInline: {
company_str: '',
},
legend_1:['银行'],
series_1:[{
name: '银行',
type: 'line',
data: [200,269,286,153,297,243,184,178,292,298,283,282,228,251,320,316,131,173,138,329,197,246,257,232,271,161,212,147,200,348,251,119,190,132,147,211,255,323,190,157,123,269,106,183,237,296,156,61,101,301],
}],
option_1 : {
title: [{
x :'center',
y:'bottom',
text: '各行业风险价值(机构处于极端困难情况时)的时序变化'
},
],
tooltip: {
trigger: 'axis'
},
legend: {data:
this.series_1
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: this.x,//
},
yAxis: {
type: 'value'
},
series: [{
name: '银行',
type: 'line',
// stack: 'Total',
data: [200,269,286,153,297,243,184,178,292,298,283,282,228,251,320,316,131,173,138,329,197,246,257,232,271,161,212,147,200,348,251,119,190,132,147,211,255,323,190,157,123,269,106,183,237,296,156,61,101,301],
}],
},
linedata_1:[
{
name: '银行',
type: 'line',
data: [200,269,286,153,297,243,184,178,292,298,283,282,228,251,320,316,131,173,138,329,197,246,257,232,271,161,212,147,200,348,251,119,190,132,147,211,255,323,190,157,123,269,106,183,237,296,156,61,101,301],
},
{
name: '北京银行',
type: 'line',
data: [319,162,213,69,167,337,171,283,285,203,322,81,185,259,212,305,206,236,70,224,309,254,86,107,334,153,243,141,251,306,306,317,271,290,254,220,154,156,54,70,133,223,265,51,339,270,184,332,163,197],
},
{
name: '中国银行',
type: 'line',
data: [329,113,251,118,324,328,140,284,231,189,192,275,73,311,313,299,199,300,249,160,263,272,159,245,222,104,203,283,332,147,278,339,207,159,66,106,338,63,258,191,246,141,243,90,290,330,93,76,134,86],
},
{
name: 'Direct',
type: 'line',
data: [284,265,335,75,234,121,66,258,104,291,197,248,56,340,120,327,328,81,179,282,211,90,147,320,150,200,236,210,205,192,318,184,98,228,55,66,231,151,63,149,329,127,111,57,64,55,119,137,247,270],
},
{
name: 'Search Engine',
type: 'line',
data: [820, 932, 901, 934, 1290, 1330, 1320]
}
],
}
},
mounted(){
//
this.onSubmit()
},
methods: {
onSubmit() {
if (this.formInline.company_str!==''){
console.log(this.formInline.company_str)
let tmp=this.linedata_1.find(item => item.name === this.formInline.company_str) //es6
this.option_1.series.push(tmp)
console.log(this.option_1.series)
}
let echarts1 = echarts.init(this.$refs.echarts_1)
echarts1.setOption(this.option_1)
},
}
};
</script>
<style lang="less" scoped>
//
</style>

View File

@ -0,0 +1,315 @@
<template>
<div>
<div ref="dimension" style="width: 1200px; height: 450px;margin-left: 0px;margin-top: 0px;"></div>
<div class="warning-component">
<div class="warning-dates">
<button class="button" @click="changeState">
<span class="text">{{ state }}</span>
<svg class="arrow" viewBox="0 0 448 512" height="1em" xmlns="http://www.w3.org/2000/svg"><path d="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"></path></svg>
</button>
<div class="date-item">前日<span>{{ prevDayDim }}</span></div>
<div class="date-item">昨日<span>{{ yesterdayDim }}</span></div>
<div class="date-item">今日<span>{{ todayDim }}</span></div>
<div class="date-item">明日<span>{{ tomorrowDim }}</span></div>
</div>
</div>
</div>
</template>
<script>
import * as echarts from "echarts";
import http from "@/utils/request";
export default {
props: {
// xData:[],
// yData: [],
// legend:String,
title:String,
zoom:{
type:Array,
default: function () {
return []
}
}
},
data(){
return {
datazoom:[],
state:'个体风险状态',
individualRisk:[],
structureRisk:[],
spillRisk:[],
volatilityRisk:[],
markArea:[],
date:[],
detail:'',
prevDayDim:'',
yesterdayDim:'',
todayDim:'',
tomorrowDim:'',
}
},
mounted: function () {
http.get('/risk/dimension/').then((res)=>{
this.date=res.data.date
this.individualRisk=res.data.individual
this.structureRisk=res.data.structure
this.spillRisk=res.data.spill
this.volatilityRisk=res.data.volatility
this.detail=res.data.detail
this.markArea=res.data.markarea
this.prevDayDim=res.data.detail[this.state][0]
this.yesterdayDim=res.data.detail[this.state][1]
this.todayDim=res.data.detail[this.state][2]
this.tomorrowDim=res.data.detail[this.state][3]
this.initChart()
}
)
},
watch:{
// prevDayDim(){
// return this.detail[this.state][0]
// },
// yesterdayDim(){
// return this.detail[this.state][1]
// },
// todayDim(){
// return this.detail[this.state][2]
// },
// tomorrowDim(){
// return this.detail[this.state][3]
// },
zoom(newVal){
this.datazoom=newVal
},
state(){
this.prevDayDim=this.detail[this.state][0]
this.yesterdayDim=this.detail[this.state][1]
this.todayDim=this.detail[this.state][2]
this.tomorrowDim=this.detail[this.state][3]
}
},
methods:{
changeState(){
let lis=['个体风险状态','风险关联与溢出','市场系统结构','市场波动和趋势']
this.state=lis.indexOf(this.state)+1>3? '个体风险状态':lis[lis.indexOf(this.state)+1]
},
initChart(){
/*
示例参考如下
* https://echarts.apache.org/v4/examples/zh/editor.html?c=line-aqi
*
* https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples/data/asset/data/aqi-beijing.json
*
* */
var myChart = echarts.init(this.$refs["dimension"])
let option = {
title: {
text: '系统性风险指数维度分析',
left: 'center',
},
// grid:{
// show:true,
// backgroundColor:'#eee'
// },
tooltip: {
trigger: 'axis'
},
xAxis: {
type: 'category',
boundaryGap: false,
data: this.date
},
legend: {
top:30,
data: ['个体风险状态', '风险关联与溢出', '市场系统结构', '市场波动和趋势']
},
yAxis: {
scale: true,
splitLine: {
show: false
}
},
toolbox: {
right: 80,
feature: {
// dataZoom: {
// yAxisIndex: 'none'
// },
dataView: {
show: true,
title: '查看数据',
},
restore: {},
saveAsImage: {}
}
},
//
dataZoom: [{
//
start:80,
end:100
}, {
type: 'inside'
}],
//
series: [{
name: '个体风险状态',
type: 'line',
smooth:0.8,
data: this.individualRisk
},
{
name: '风险关联与溢出',
type: 'line',
smooth:0.8,
data: this.spillRisk
},
{
name: '市场系统结构',
type: 'line',
smooth:0.8,
data: this.structureRisk
},
{
name: '市场波动和趋势',
type: 'line',
smooth:0.8,
data: this.volatilityRisk,
markArea:{
label: { // 线
// position: 'end',
formatter: '预测值'
},
data:[[{
xAxis:this.markArea[0]},
{
xAxis:this.markArea[1]},
]]
}
},
],
}
myChart.setOption(option);
// this.$nextTick(()=>{
// myChart.dispatchAction({
// type: 'dataZoom',
// batch: [{
// // dataZoom
// start: this.datazoom[0],
// end: this.datazoom[1]
// }]
// })
// })
}
},
}
</script>
<style scoped>
.button {
border-radius: 7px;
width: 160px;
height: 30px;
display: flex;
align-items: center;
justify-content: flex-start;
gap: 12px;
cursor: pointer;
border: 3px solid rgb(94, 255, 209);
background-color: rgb(94, 255, 209);
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.137);
}
.text {
width: 70%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
//background-color: rgb(255, 255, 255);
color: black;
}
.arrow path {
fill: rgb(19, 19, 19);
}
.button:hover .arrow {
animation: slide-in-left 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}
@keyframes slide-in-left {
0% {
transform: translateX(-8px);
opacity: 0;
}
100% {
transform: translateX(0px);
opacity: 1;
}
}
.button:active {
transform: scale(0.97);
}
.warning-component {
background-color: #ffffff;
border: 1px solid #ddd;
border-radius: 8px;
padding: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
max-width: 100%;
text-align: center;
margin: auto;
}
.warning-dates {
display: flex;
justify-content: space-between;
//margin-bottom: 10px;
}
.date-item {
margin: 0 10px;
font-weight: bold;
}
.warning-recent {
color: #ff4d4f;
font-weight: bold;
margin-bottom: 10px;
}
</style>

View File

@ -0,0 +1,124 @@
<!-- 直方图和折线图的结合图 -->
<template>
<div ref="AreaChart" style="height:300px;width:1000px; border: 1px solid #e0e0e0;margin:20px"></div>
</template>
<script>
import * as echarts from "echarts";
export default {
props:['myHalfData'],
data () {
return {
myData:this.myHalfData
}
},
mounted() {
const echarts2 = echarts.init(this.$refs.AreaChart)
const option_2={
//
toolbox: {
feature: {
saveAsImage: {}
}
},
title: {
text: '事件热度分析'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
legend: {
data: ['渠道1', '渠道2', '渠道3']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [
{
type: 'category',
boundaryGap: false,
data: ['0', '1', '2', '3', '4', '5', '6'],
name: '天'
}
],
yAxis: [
{
type: 'value'
}
],
series: [
{
name: '渠道1',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: '渠道2',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
data: [220, 182, 191, 234, 290, 330, 310]
},
{
name: '渠道3',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
data: [150, 232, 201, 154, 190, 330, 410]
},
{
name: 'Direct',
type: 'line',
stack: 'Total',
areaStyle: {},
emphasis: {
focus: 'series'
},
data: [320, 332, 301, 334, 390, 330, 320]
},
{
name: 'Search Engine',
type: 'line',
stack: 'Total',
label: {
show: true,
position: 'top'
},
areaStyle: {},
emphasis: {
focus: 'series'
},
data: [820, 932, 901, 934, 1290, 1330, 1200]
}
]
}
echarts2.setOption(option_2)
},
};
</script>
<style>
</style>

View File

@ -0,0 +1,104 @@
<!-- line chart动态数据变化趋势图 -->
<template>
<div>
<el-empty description="暂无数据" v-show="!show"></el-empty>
<div ref="lines" style="width: 800px; height: 300px;padding-left:250px" v-show="show"></div>
</div>
</template>
<script>
import * as echarts from "echarts";
export default {
props:{
datelis:[],
asset:[],
held_num:[],
},
data() {
return {
show:false
};
},
watch:{
datelis(){
//
console.log(this.held_num)
if (this.asset.findIndex((value) => value!=='' )!== -1 || this.held_num.findIndex((value) => value!=='')!== -1) {
console.log(1)
this.show = true
this.initChart()
}
}
},
mounted() {
},
methods: {
initChart(){
var myChart = echarts.init(this.$refs.lines);
//
var option = {
title: {
text: "资产和持股规模",
left: "center",
textStyle: {
fontSize: 17,
lineHeight: 10,
},
},
tooltip: {
trigger: "axis",
},
legend: {
data: ["资产","持股"],
padding:[25,0,0,0],
//orient: 'vertical',
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
},
toolbox: {
feature: {
saveAsImage: {},
},
},
xAxis: {
type: "category",
boundaryGap: false,
data: this.datelis,
},
yAxis: {
type: "value",
},
series: [
{
name: "资产",
type: "line",
stack: "Total",
data: this.asset,
},
{
name: "持股",
type: "line",
stack: "Total",
data: this.held_num,
// [4500, 5000, 5020, 4900, 4300, 6000, 6600,6200,7000,5500,4900,6100,
// 6700,7050,8000,9000,11000,12000,8600,8200,9500
// ],
},
],
}
myChart.setOption(option);
}
},
};
</script>
<style>
</style>

View File

@ -0,0 +1,155 @@
<template>
<div ref="changetrend" style="width: 800px; height: 320px;margin-left: 100px;margin-top: 0px;"></div>
</template>
<script>
import * as echarts from "echarts";
import http from "@/utils/request";
export default {
data() {
return {
time:[],
riskData:[],
len:Number,
};
},
mounted() {
http.get('/warning/get_warning_count/?need=1').then((res)=>{
for (let i in res.data) {
this.time.push(res.data[i]["time"].replace('_','-'))
this.riskData.push(res.data[i]["综合风险水平"])
}
this.len=this.time.length
let selectedTime=this.time.slice(0,40)
let selectedRisk=this.riskData.slice(0,40)
var myChart = echarts.init(this.$refs.changetrend);
//
// function randomData() {
// now = new Date(+now + oneDay);
// value = value + Math.random() * 21 - 10;
// return {
// name: now.toString(),
// value: [
// [now.getFullYear(), now.getMonth() + 1, now.getDate()].join("/"),
// Math.round(value),
// ],
// };
// }
// let data = [];
// let now = new Date(1997, 9, 3);
// let oneDay = 24 * 3600 * 1000;
// let value = Math.random() * 1000;
// for (var i = 0; i < 1000; i++) {
// data.push(randomData());
// }
// console.log(data)
var option = {
title: {
text: "系统性风险整体变化趋势",
left:'center',
textStyle: {//
fontSize: 15,
color:'#696969',
},
padding:[ 5,0,5,0],//[5,10] | [ 5,6, 7, 8] ,[xx]
},
grid: {
left: '20%',//
right: '4%',
// bottom: '10%',
top:'5%',//
// containLabel: true
},
tooltip: {
trigger: "axis",
// formatter:
// function (params) {
// params = params[0];
// var date = new Date(params.name);
// return (
// date.getDate() +
// "/" +
// (date.getMonth() + 1) +
// "/" +
// date.getFullYear() +
// " : " +
// params.value[1]
// );
// },
axisPointer: {
animation: false,
},
},
xAxis: {
type: "category",
splitLine: {
show: false,
},
data:selectedTime
},
yAxis: {
type: "value",
boundaryGap: [0, "100%"],
splitLine: {
show: false,
},
},
series: [
{
name: "综合风险",
type: "line",
showSymbol: true,
data: selectedRisk
// data,
},
],
};
myChart.setOption(option);
var that=this
let i =0
setInterval(function () {
// for (var i = 0; i < 5; i++) {
// data.shift();
// data.push(randomData());
// }
if (i===that.time.length-50)
i=0
selectedRisk=that.riskData.slice(i,50+i)
selectedTime=that.time.slice(i,50+i)
i++
myChart.setOption({
series: [
{
name: "综合风险",
type: "line",
showSymbol: true,
data: selectedRisk,
},
],
xAxis: {
type: "category",
splitLine: {
show: false,
},
data:selectedTime
},
});
}, 1500);
})
},
methods: {
},
};
</script>
<style>
</style>

View File

@ -0,0 +1,98 @@
<template>
<!-- 半圆饼图-Half Doughnut Chart -->
<!-- 用于预警服务-异常检测的三个数据 -->
<div ref="echarts" style="width: 800px; height: 400px;padding-left:250px"></div>
</template>
<script>
import * as echarts from "echarts";
export default {
props:{myHalfData:{
type:Array,
}},
data () {
return {
myData:this.myHalfData
}
},
watch:{
myHalfData(){
this.initCharts()
}
},
methods:{
initCharts(){
var myChart = echarts.init(this.$refs.echarts)
var option = {
tooltip: {
trigger: "item",
},
title: {
text: "异常类型占比",
left: "center",
textStyle: {
fontSize: 17,
lineHeight: 85,
},
},
grid: {
left: '3%',
right: '4%',
bottom: '0%',
top: '0%',
},
legend: {
top: "15%",
left: "center",
},
series: [
{
name: "proportion of abnormal risk",
type: "pie",
radius: ["40%", "80%"],
center: ["50%", "70%"],
// adjust the start angle
startAngle: 180,
label: {
show: true,
formatter(param) {
// correct the percentage
return param.name + " (" + param.percent * 2 + "%)";
},
},
// data: [
// { value: 300, name: "" },
// { value: 350, name: "" },
// { value: 200, name: "" },
// { value: 120, name: "" },
// { value: 110, name: "" },
// { value: 280, name: "" },
// {
// // make an record to fill the bottom 50%
// value: 300+350+200+120+110+280,
// itemStyle: {
// color: "none",
// },
// },
// ],
data: this.myHalfData
},
],
};
myChart.setOption(option);
}
},
mounted() {
this.initCharts()
},
};
</script>
<style>
</style>

View File

@ -0,0 +1,130 @@
<!-- 直方图和折线图的结合图 -->
<template>
<div id="zhifang" style="width: 85%; height: 400px;margin-left: 100px;"></div>
</template>
<script>
import * as echarts from "echarts";
export default {
props: {
xData:[],
yData: [],
legend:String,
title:String,
},
data(){
return{
x:this.xData,
y:this.yData,
}
},
watch:{
xData(newV){
console.log(newV)
this.initGraph()
console.log(this.legend)
}
},
methods:{
initGraph()
{
var myChart = echarts.init(document.getElementById("zhifang"));
var option = {
title: {
text: this.title,
left: "center",
textStyle: {
fontSize: 17,
lineHeight: 30,
},
},
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
},
},
grid: {
right: "20%",
},
legend: {
data: this.legend,
padding: [70, 0, 0, 100],
orient: 'vertical',
},
xAxis: [
{
type: "category",
axisTick: {
alignWithLabel: true,
show: false
},
axisLabel: {
// interval: 0,
rotate: 30
},
data: this.xData
},
],
yAxis: [
{
type: "value",
name: this.legend,
position: "right",
alignTicks: true,
axisLine: {
show: true,
},
axisLabel: {
formatter: "{value}",
textStyle: {
color: 'blue'
}
},
},
// {
// type: "value",
// name: "",
// position: "left",
// alignTicks: true,
// axisLine: {
// show: true,
// },
// axisLabel: {
// formatter: "{value}",
// textStyle: {
// color: 'green'
// }
// },
// },
],
series: [
{
name: this.legend,
type: "line",
smooth:true,
markPoint: {
symbol: 'circle', //
// symbolSize:8, //
},
data: this.yData
},
// {
// name: "",
// type: "line",
// yAxisIndex: 1,
// data: [
// 10, 25, 30, 19, 12, 16, 26, 23, 20, 17, 21, 15,
// ],
// },
],
};
myChart.setOption(option);
}
},
};
</script>
<style>
</style>

View File

@ -0,0 +1,103 @@
<template>
<div id="zhifang" style="width: 85%; height: 400px"></div>
</template>
<script>
import * as echarts from "echarts";
export default {
mounted() {
var myChart = echarts.init(document.getElementById("zhifang"));
var option = {
title:{
text: "交易量/频次及股票变换趋势",
left: "center",
textStyle: {
fontSize: 17,
lineHeight: 30,
},
},
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
},
},
grid: {
right: "20%",
},
legend: {
data: ["交易量","收盘价"],
padding:[70,0,0,100],
orient: 'vertical',
},
xAxis: [
{
type: "category",
axisTick: {
alignWithLabel: true,
show:false
},
axisLabel:{
interval:0,
rotate:30
},
data: ['2021-1-1', '2021-1-2', '2021-1-3', '2021-1-4', '2021-1-5', '2021-1-6', '2021-1-7', '2021-1-8', '2021-1-9', '2021-1-10', '2021-1-11', '2021-1-12'],
},
],
yAxis: [
{
type: "value",
name: "交易量",
position: "right",
alignTicks: true,
axisLine: {
show: true,
},
axisLabel: {
formatter: "{value}支",
textStyle:{
color:'blue'
}
},
},
{
type: "value",
name: "收盘价",
position: "left",
alignTicks: true,
axisLine: {
show: true,
},
axisLabel: {
formatter: "{value}元",
textStyle:{
color:'green'
}
},
},
],
series: [
{
name: "交易量",
type: "bar",
data: [
100, 120, 80, 230, 150,90, 170, 162, 250, 110, 60, 200,
],
},
{
name: "收盘价",
type: "line",
yAxisIndex: 1,
data: [
10, 25, 30, 19, 12, 16, 26, 23, 20, 17, 21, 15,
],
},
],
};
myChart.setOption(option);
},
};
</script>
<style>
</style>

View File

@ -0,0 +1,208 @@
<template>
<div class="el-quarter-picker">
<el-popover v-model="visible" placement="bottom-start" transition="el-zoom-in-top" trigger="click">
<div class="content">
<p>
<button type="button" aria-label="前一年" class="el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-d-arrow-left" @click="prev" />
<span role="button" class="span-year">{{ year }}</span>
<button type="button" aria-label="后一年" class="el-picker-panel__icon-btn el-date-picker__next-btn el-icon-d-arrow-right" @click="next" />
</p>
<div class="choose-item">
<button :class="classStyle1" :disabled="disabled1" @click="selectHalfYear('上半年')">上半年</button>
<button :class="classStyle2" :disabled="disabled2" @click="selectHalfYear('下半年')">下半年</button>
</div>
</div>
<el-input slot="reference" v-model="text" :placeholder="'选择半年'" size="small" @change="iptchange">
<i slot="prefix" class="el-input__icon el-icon-date" />
</el-input>
</el-popover>
</div>
</template>
<script>
export default {
name: 'HalfYearPicker',
model: {
prop: 'value',
event: 'change'
},
props: ['value', 'disabledTime', 'indexkey'], // disabledTime YYYY-MM
data() {
return {
visible: false,
text: '',
year: new Date().getFullYear(),
nowmonth: new Date().getMonth(),
nowyear: new Date().getFullYear(),
emit_value: [],
clickyear: '',
clickmonth: '',
disabled1: false, //
disabled2: false //
}
},
computed: {
classStyle1: function() {
return {
today: (this.nowyear === this.year) && (this.nowmonth < 6 || this.nowmonth) === 6,
clickcell: (this.year === this.clickyear) && (this.clickmonth === '上半年'),
selectMonth: true,
'is-disabled': (this.year > this.nowyear) || this.disabled1
}
},
classStyle2: function() {
return {
today: (this.nowyear === this.year) && (this.nowmonth > 6),
clickcell: (this.year === this.clickyear) && (this.clickmonth === '下半年'),
selectMonth: true,
'is-disabled': (this.year > this.nowyear) || ((this.year === this.nowyear) && this.nowmonth < 7) || this.disabled2
}
}
},
watch: {
indexkey() {
if (this.disabledTime) {
this.aviod(this.disabledTime)
}
}
},
mounted() {
if (this.disabledTime) {
this.aviod(this.disabledTime)
}
},
methods: {
//
prev() {
this.year = this.year * 1 - 1
this.aviod(this.disabledTime)
},
//
next() {
this.year = this.year * 1 + 1
this.aviod(this.disabledTime)
},
//
selectHalfYear(item) {
this.text = this.year + item
this.clickyear = this.year
this.clickmonth = item
if (item === '上半年') {
const data1 = this.year + '-01-01'
const data2 = this.year + '-06-30'
this.emit_value = [data1, data2]
} else {
const data1 = this.year + '-07-01'
const data2 = this.year + '-12-31'
this.emit_value = [data1, data2]
}
this.visible = false
this.$emit('change', this.emit_value)
},
//
iptchange(val) {
if (val !== '') {
const year = val.slice(0, 4)
const text = val.slice(5, 8)
const reg = /^[0-9]{4}$/
if (reg.test(year)) {
if (text === '上半年' || text === '下半年') {
this.text = val
this.clickyear = year
this.clickmonth = text
const data1 = this.year + '-01-01'
const data2 = this.year + '-06-30'
this.emit_value = [data1, data2]
this.$emit('change', this.emit_value)
} else {
this.text = ''
}
} else {
this.text = ''
}
} else {
this.$emit('change', ['', ''])
}
},
aviod(timeA) {
const time = timeA.date
if (time) {
const year = time.slice(0, 4)
const month = time.slice(5, 7)
if (timeA.type === 2) {
if (this.year < year) {
this.disabled1 = true
this.disabled2 = true
} else if (Number(this.year) === Number(year) && Number(month) > 6) {
this.disabled1 = true
this.disabled2 = false
} else {
this.disabled1 = false
this.disabled2 = false
}
} else {
if (this.year > year) {
this.disabled1 = true
this.disabled2 = true
} else if (Number(this.year) === Number(year) && Number(month) <= 6) {
this.disabled1 = false
this.disabled2 = true
} else {
this.disabled1 = false
this.disabled2 = false
}
}
} else {
this.disabled1 = false
this.disabled2 = false
}
}
}
}
</script>
<style lang="scss" scoped>
.content {
width: 220px;
min-width: 220px;
p {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: solid 1px #ebeef5;
padding-bottom: 12px;
font-size: 16px;
button {
margin-top: 0;
}
}
.choose-item {
display: flex;
justify-content: space-around;
.selectMonth {
margin: 14px 10px;
font-size: 12px;
background: transparent;
}
.selectMonth:hover {
color: #409eff;
cursor: pointer;
}
.today {
color: #409eff;
font-weight: 700;
}
.clickcell {
color: #409eff;
}
.is-disabled {
color: #c0c4cc !important;
cursor: not-allowed !important;
background-color: #fff;
border-color: #ebeef5;
}
}
}
</style>

View File

@ -0,0 +1,213 @@
<template>
<el-select v-model="industry" placeholder="选择行业" size="mini">
<el-option v-for="item in options_industry" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</template>
<script>
export default {
name: "industryComponent",
data(){
return{
industry:'',
options_industry: [{
value: "新闻和出版业",
label: "新闻和出版业"}, {
value: "保险业",
label: "保险业"}, {
value: "铁路运输业",
label: "铁路运输业"}, {
value: "电力、热力生产和供应业",
label: "电力、热力生产和供应业"}, {
value: "专业技术服务业",
label: "专业技术服务业"}, {
value: "汽车制造业",
label: "汽车制造业"}, {
value: "零售业",
label: "零售业"}, {
value: "医药制造业",
label: "医药制造业"}, {
value: "电气机械和器材制造业",
label: "电气机械和器材制造业"}, {
value: "科技推广和应用服务业",
label: "科技推广和应用服务业"}, {
value: "金属制品业",
label: "金属制品业"}, {
value: "非金属矿物制品业",
label: "非金属矿物制品业"}, {
value: "软件和信息技术服务业",
label: "软件和信息技术服务业"}, {
value: "计算机、通信和其他电子设备制造业",
label: "计算机、通信和其他电子设备制造业"}, {
value: "化学原料和化学制品制造业",
label: "化学原料和化学制品制造业"}, {
value: "航空运输业",
label: "航空运输业"}, {
value: "石油、煤炭及其他燃料加工业",
label: "石油、煤炭及其他燃料加工业"}, {
value: "石油和天然气开采业",
label: "石油和天然气开采业"}, {
value: "电信、广播电视和卫星传输服务",
label: "电信、广播电视和卫星传输服务"}, {
value: "土木工程建筑业",
label: "土木工程建筑业"}, {
value: "互联网和相关服务",
label: "互联网和相关服务"}, {
value: "有色金属冶炼和压延加工业",
label: "有色金属冶炼和压延加工业"}, {
value: "商务服务业",
label: "商务服务业"}, {
value: "资本市场服务",
label: "资本市场服务"}, {
value: "铁路、船舶、航空航天和其他运输设备制造业",
label: "铁路、船舶、航空航天和其他运输设备制造业"}, {
value: "多式联运和运输代理业",
label: "多式联运和运输代理业"}, {
value: "装卸搬运和仓储业",
label: "装卸搬运和仓储业"}, {
value: "水的生产和供应业",
label: "水的生产和供应业"}, {
value: "批发业",
label: "批发业"}, {
value: "文教、工美、体育和娱乐用品制造业",
label: "文教、工美、体育和娱乐用品制造业"}, {
value: "房地产业",
label: "房地产业"}, {
value: "开采专业及辅助性活动",
label: "开采专业及辅助性活动"}, {
value: "通用设备制造业",
label: "通用设备制造业"}, {
value: "煤炭开采和洗选业",
label: "煤炭开采和洗选业"}, {
value: "食品制造业",
label: "食品制造业"}, {
value: "农副食品加工业",
label: "农副食品加工业"}, {
value: "有色金属矿采选业",
label: "有色金属矿采选业"}, {
value: "研究和试验发展",
label: "研究和试验发展"}, {
value: "酒、饮料和精制茶制造业",
label: "酒、饮料和精制茶制造业"}, {
value: "教育",
label: "教育"}, {
value: "专用设备制造业",
label: "专用设备制造业"}, {
value: "房屋建筑业",
label: "房屋建筑业"}, {
value: "纺织服装、服饰业",
label: "纺织服装、服饰业"}, {
value: "橡胶和塑料制品业",
label: "橡胶和塑料制品业"}, {
value: "水上运输业",
label: "水上运输业"}, {
value: "货币金融服务",
label: "货币金融服务"}, {
value: "黑色金属冶炼和压延加工业",
label: "黑色金属冶炼和压延加工业"}, {
value: "住宿业",
label: "住宿业"}, {
value: "燃气生产和供应业",
label: "燃气生产和供应业"}, {
value: "道路运输业",
label: "道路运输业"}, {
value: "生态保护和环境治理业",
label: "生态保护和环境治理业"}, {
value: "纺织业",
label: "纺织业"}, {
value: "化学纤维制造业",
label: "化学纤维制造业"}, {
value: "其他制造业",
label: "其他制造业"}, {
value: "广播、电视、电影和录音制作业",
label: "广播、电视、电影和录音制作业"}, {
value: "仪器仪表制造业",
label: "仪器仪表制造业"}, {
value: "皮革、毛皮、羽毛及其制品和制鞋业",
label: "皮革、毛皮、羽毛及其制品和制鞋业"}, {
value: "造纸和纸制品业",
label: "造纸和纸制品业"}, {
value: "印刷和记录媒介复制业",
label: "印刷和记录媒介复制业"}, {
value: "餐饮业",
label: "餐饮业"}, {
value: "公共设施管理业",
label: "公共设施管理业"}, {
value: "其他金融业",
label: "其他金融业"}, {
value: "土地管理业",
label: "土地管理业"}, {
value: "林业",
label: "林业"}, {
value: "农业",
label: "农业"}, {
value: "废弃资源综合利用业",
label: "废弃资源综合利用业"}, {
value: "畜牧业",
label: "畜牧业"}, {
value: "文化艺术业",
label: "文化艺术业"}, {
value: "建筑装饰、装修和其他建筑业",
label: "建筑装饰、装修和其他建筑业"}, {
value: "黑色金属矿采选业",
label: "黑色金属矿采选业"}, {
value: "其他采矿业",
label: "其他采矿业"}, {
value: "机动车、电子产品和日用产品修理业",
label: "机动车、电子产品和日用产品修理业"}, {
value: "家具制造业",
label: "家具制造业"}, {
value: "建筑安装业",
label: "建筑安装业"}, {
value: "其他服务业",
label: "其他服务业"}, {
value: "社会工作",
label: "社会工作"}, {
value: "渔业",
label: "渔业"}, {
value: "体育",
label: "体育"}, {
value: "居民服务业",
label: "居民服务业"}, {
value: "邮政业",
label: "邮政业"}, {
value: "金属制品、机械和设备修理业",
label: "金属制品、机械和设备修理业"}, {
value: "卫生",
label: "卫生"}, {
value: "木材加工和木、竹、藤、棕、草制品业",
label: "木材加工和木、竹、藤、棕、草制品业"}, {
value: "农、林、牧、渔专业及辅助性活动",
label: "农、林、牧、渔专业及辅助性活动"}, {
value: "非金属矿采选业",
label: "非金属矿采选业"}, {
value: "租赁业",
label: "租赁业"}, {
value: "水利管理业",
label: "水利管理业"},
],
}
},
props: {
value: {
type: String,
default: ''
},
},
model: {
prop: 'value',
event: 'change'
},
watch:{
value(newValue){
this.industry=newValue
}
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,74 @@
<!-- 分页 -->
<template>
<div class="pagination">
<el-button type="button" @click="jumpFirstPage" size="mini">首页</el-button>
<!-- layout="total, prev, pager, next, jumper" -->
<!-- layout="prev, next"就只显示上一页下一页 -->
<el-pagination
background prev-text="上一页" next-text="下一页"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-size=page_size
layout="prev, next"
:total="total"
style="display: inline-block;padding-left: 0px;">
</el-pagination>
<el-button type="button" @click="jumpLastPage" size="mini">尾页</el-button>
</div>
</template>
<script>
export default {
//
props:{
total:{
type:Number,
default:100
},
page_size:{
type:Number,
default:10
},
},
methods: {
handleSizeChange(val) {
console.log(`每页 ${val}`);
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
//
this.$emit('CurrentChange',val)
},
//
jumpFirstPage () {
this.$refs.pagination.handleCurrentChange(1);
this.$emit('handleCurrentChange', 1);
},
jumpLastPage () {
let font = this.$refs.pagination
let cpage = Math.ceil(font.total / font.pageSize);
font.handleCurrentChange(cpage);
},
},
data() {
return {
currentPage: 5,
};
}
}
</script>
<style lang="less" scoped>
.pagination{
display:flex;
justify-content:center;//
padding: 40px;
}
</style>

View File

@ -0,0 +1,396 @@
<template>
<div class="el-quarter-picker">
<el-popover
v-model="visible"
:disabled="!canPopover"
:tabindex="null"
placement="bottom-start"
transition="el-zoom-in-top"
trigger="click">
<div class="el-date-picker">
<div class="el-picker-panel__body">
<div class="el-date-picker__header el-date-picker__header--bordered" style="margin:0px; line-height:30px">
<button
type="button"
@click="clickLast"
aria-label="前一年"
class="el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-d-arrow-left"></button>
<span role="button" class="el-date-picker__header-label" @click="clickYear">{{ title }}</span>
<button
type="button"
@click="clickNext"
aria-label="后一年"
class="el-picker-panel__icon-btn el-date-picker__next-btn el-icon-d-arrow-right"></button>
</div>
<div class="el-picker-panel__content" style="margin:0px; width:100%">
<table class="el-month-table" style="">
<tbody>
<tr v-for="line in lineCount" :key="line">
<td v-for="index in (line * 4 <= viewList.length ? 4 : viewList.length - (line - 1) * 4)" :key="index" :class="{ today: viewList[(line - 1) * 4 + index - 1].current, current: viewList[(line - 1) * 4 + index - 1].active }">
<div><a class="cell" @click="clickItem(viewList[(line - 1) * 4 + index - 1])">{{ viewList[(line - 1) * 4 + index - 1].label }}</a></div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<el-input
slot="reference"
@change="changeText"
@mouseenter.native="mouseEnter"
@mouseleave.native="mouseLeave"
:placeholder="placeholder"
v-model="text"
:size="size"
:readonly="!canEdit"
:disabled="disabled"
size="mini">
<i slot="prefix" class="el-input__icon el-icon-date"></i>
<i slot="suffix" class="el-input__icon el-icon-circle-close" v-show="showClear" style="cursor:pointer" @click.stop="clear"></i>
</el-input>
</el-popover>
</div>
</template>
<script>
export default {
name: 'ElQuarterPicker',
props: {
placeholder: {
type: String,
default: ''
},
size: {
type: String,
default: ''
},
readonly: {
type: Boolean,
default: false
},
clearable: {
type: Boolean,
default: true
},
editable: {
type: Boolean,
default: true
},
disabled: {
type: Boolean,
default: false
},
format: {
type: String,
default: 'yyyy年第Q季度'
},
valueFormat: {
type: String,
default: 'yyyy-qq'
},
value: {
type: String,
default: ''
}
},
model: {
prop: 'value',
event: 'change'
},
watch: {
value(val) {
// console.log('change-------', val)
this.changeValue(val)
},
readonly(val) {
this.canEdit = !val && this.editable
this.canPopover = !this.disabled && !val
},
editable(val) {
this.canEdit = !this.readonly && val
},
disabled(val) {
this.canPopover = !val && !this.readonly
}
},
data() {
return {
visible: false,
showClear: false, //
canEdit: true, //
canPopover: true, //
text: '', //
viewType: 1, // 12
viewYear: 0, //
viewList: [], //
lineCount: 0, //
title: '', //
data: [0, 0] // -
}
},
mounted() {
// console.log('mounted--------', this.value)
this.changeValue(this.value)
//
this.canEdit = !this.readonly && this.editable
this.canPopover = !this.disabled && !this.readonly
// ()
document.onkeydown = (event) => {
if (this.visible) {
const data = [this.data[0], this.data[1]]
if (data[0] < 1 || data[1] < 1) {
//
const curDate = new Date()
data[0] = curDate.getFullYear()
data[1] = parseInt(curDate.getMonth() / 3) + 1
}
if (event.code === 'ArrowLeft') {
//
if (data[1] === 1) {
data[0] = data[0] - 1
data[1] = 4
} else {
data[1] = data[1] - 1
}
} else if (event.code === 'ArrowRight') {
//
if (data[1] === 4) {
data[0] = data[0] + 1
data[1] = 1
} else {
data[1] = data[1] + 1
}
} else if (event.code === 'ArrowUp') {
//
data[0] = data[0] - 1
} else if (event.code === 'ArrowDown') {
//
data[0] = data[0] + 1
} else {
return
}
//
if (data[0] < 1000 || data[0] > 9999) {
return
}
this.data = data
this.viewType = 1
this.viewYear = data[0]
this.$emit('change', this.formatTo(data, this.valueFormat))
}
}
},
destroyed() {
document.onkeydown = null
},
methods: {
//
changeText() {
if (this.checkFormat(this.format, this.text)) {
//
this.formatFrom(this.text, this.format)
this.$emit('change', this.formatTo(this.data, this.valueFormat))
} else {
//
if (this.data[0] < 1 || this.data[1] < 1) {
this.text = ''
} else {
this.text = this.formatTo(this.data, this.format)
}
}
this.visible = false
},
//
mouseEnter() {
if (!this.disabled && !this.readonly && this.clearable && this.text !== '') {
this.showClear = true
}
},
//
mouseLeave() {
if (!this.disabled && this.clearable) {
this.showClear = false
}
},
//
clear() {
this.showClear = false
this.visible = false
this.$emit('change', '')
},
//
changeValue(val) {
this.viewType = 1
if (val) {
//
this.formatFrom(val, this.valueFormat)
this.text = this.formatTo(this.data, this.format)
this.viewYear = this.data[0]
} else {
this.text = ''
this.data = [0, 0]
this.viewYear = new Date().getFullYear()
}
this.initView()
},
//
initView() {
const list = []
const curDate = new Date()
const curYear = curDate.getFullYear()
const curQuarter = parseInt(curDate.getMonth() / 3) + 1
if (this.viewType === 1) {
let index = 0
for (const i of '一二三四') {
index++
const item = { label: '第' + i + '季度', year: this.viewYear, quarter: index, current: false, active: false }
if (this.viewYear === curYear && index === curQuarter) {
item.current = true
} else if (this.viewYear === this.data[0] && index === this.data[1]) {
item.active = true
}
list.push(item)
}
this.title = this.viewYear + ' 年'
} else {
const start = parseInt(this.viewYear / 10) * 10
this.viewYear = start
for (let i = 0; i < 10; i++) {
const year = start + i
const item = { label: year + '', year: year, current: false, active: false }
if (year === curYear) {
item.current = true
} else if (year === this.data[0]) {
item.active = true
}
list.push(item)
}
this.title = start + ' 年 - ' + (start + 9) + ' 年'
}
this.viewList = list
this.lineCount = parseInt(list.length / 4)
if (list.length % 4 > 0) {
this.lineCount++
}
},
//
checkFormat(pattern, val) {
//
let text = ''
for (const char of pattern) {
const dict = '\\^$.+?*[]{}!'
if (dict.indexOf(char) === -1) {
text += char
} else {
text += '\\' + char
}
}
text = text.replace('yyyy', '[1-9]\\d{3}')
text = text.replace('qq', '0[1-4]')
text = text.replace('q', '[1-4]')
text = text.replace('Q', '[一二三四]')
text = '^' + text + '$'
const patt = new RegExp(text)
return patt.test(val)
},
//
formatTo(data, pattern) {
let text = pattern.replace('yyyy', '' + data[0])
text = text.replace('qq', '0' + data[1])
text = text.replace('q', '' + data[1])
text = text.replace('Q', '一二三四'.substr(data[1] - 1, 1))
return text
},
//
formatFrom(str, pattern) {
const year = this.findText(str, pattern, 'yyyy')
const quarter = this.findText(str, pattern, ['qq', 'q', 'Q'])
this.data = [year, quarter]
},
//
findText(str, pattern, find) {
if (find instanceof Array) {
for (const f of find) {
const val = this.findText(str, pattern, f)
if (val !== -1) {
return val
}
}
return -1
}
const index = pattern.indexOf(find)
if (index === -1) {
return index
}
const val = str.substr(index, find.length)
if (find === 'Q') {
return '一二三四'.indexOf(val) + 1
} else {
return parseInt(val)
}
},
//
clickYear() {
if (this.viewType !== 1) {
return
}
//
this.viewType = 2
this.initView()
},
//
clickItem(item) {
// console.log('select--------', item)
if (this.viewType === 1) {
//
this.$emit('change', this.formatTo([item.year, item.quarter], this.valueFormat))
this.visible = false
} else {
//
this.viewType = 1
this.viewYear = item.year
this.initView()
}
},
//
clickLast() {
if (this.viewYear > 1000) {
if (this.viewType === 1) {
this.viewYear--
this.initView()
} else {
this.viewYear = this.viewYear - 10
this.initView()
}
}
},
//
clickNext() {
if (this.viewYear < 9999) {
if (this.viewType === 1) {
this.viewYear++
this.initView()
} else {
this.viewYear = this.viewYear + 10
this.initView()
}
}
}
}
}
</script>
<style>
.el-quarter-picker {
width: 220px;
/* display:flex; */
display: inline-block;
margin-right: 5px;
}
</style>

View File

@ -0,0 +1,348 @@
<!--目前数据没有详细到市区所以两点改动1 chinaMapHidden注释掉了点击事件2 echarts里的数据切换改为接口固定数据-->
<template>
<div>
<div class="echartsGroup">
<!-- 返回中国地图 -->
<div class="button" v-show="isReturnChina" @click="returnChinaFn()">返回中国地图</div>
<!-- echarts 图表 -->
<div ref="china_map" style="height: 450px;width:800px"></div>
</div>
</div>
</template>
<script>
import tmpJson from 'echarts/map/json/china.json'
import * as echarts from "echarts"
import 'echarts/map/js/china.js' //
// require('echarts/theme/macarons')
export default {
props: {
newMapData:[]
},
data() {
return {
mapData: [//
{name: '湖北',value:88},
{name: '广东',value:11024},
{name: '上海',value:5},
{name: '山东',value:15},
{name: '湖南',value:14},
{name: '重庆',value:0},
{name: '四川',value:65},
{name: '新疆',value:36},
{name: '黑龙江',value:12},
{name: '西藏',value:68},
{name: '青海',value:31},
{name: '内蒙古',value:28},
{name: '陕西',value:12},
{name: '辽宁',value:88},
{name: '云南',value:23},
],
provData:[
{name:'深圳市',value:99},
{name:'深圳市',value:1005},
{name:'佛山市',value: 55564}
],
guangdong:[ //
{name: '深圳市',value:23,children:['福田','南山','龙华']},
],
provinces:{ //
台湾: 'taiwan',
河北: 'hebei',
山西: 'shanxi',
辽宁: 'liaoning',
吉林: 'jilin',
黑龙江: 'heilongjiang',
江苏: 'jiangsu',
浙江: 'zhejiang',
安徽: 'anhui',
福建: 'fujian',
江西: 'jiangxi',
山东: 'shandong',
河南: 'henan',
湖北: 'hubei',
湖南: 'hunan',
广东: 'guangdong',
海南: 'hainan',
四川: 'sichuan',
贵州: 'guizhou',
云南: 'yunnan',
陕西: 'shanxi1',
甘肃: 'gansu',
青海: 'qinghai',
新疆: 'xinjiang',
广西: 'guangxi',
内蒙古: 'neimenggu',
宁夏: 'ningxia',
西藏: 'xizang',
北京: 'beijing',
天津: 'tianjin',
上海: 'shanghai',
重庆: 'chongqing',
香港: 'xianggang',
澳门: 'aomen'
},
isReturnChina:true, //
options:null, //echarts
};
},
watch:{
newMapData(newValue){
console.log(1)
this.chinaMaprsult('china',newValue)
}
},
mounted() {
window.clickRoute= this.clickRoute;
// this.$nextTick(_=>{
// this.chinaMaprsult('china')
// console.log("mounted")
// })
this.chinaMaprsult('china',null)
},
methods: {
//
chinaMapHidden(chinaMap) {//
console.log("chinaMapHidden调用成功")
// let that = this
// chinaMap.off('click')// 2 echarts
// chinaMap.on('click',async function(params){
// if (params.name in that.provinces) {
// var tmp=that.provinces[params.name]
// let s = await import('echarts/map/js/province/'+tmp+'.js')
// console.log(s)
// if (s){
// // chinaMap.clear
// let tmpData=[
// {name:'',value:99},
// {name:'',value:1005},
// {name:'',value: 55564}
// ]
// that.chinaMaprsult(params.name,tmpData)
// }
// }
// })
},
//
chinaMaprsult(name=null,tmpData){
console.log("chinaMaprsult调用成功")
let _this = this;
// console.log(name)
name=='china'?this.isReturnChina=false:this.isReturnChina=true; //
let chinaMap = echarts.init(this.$refs.china_map) //dom
// let tmpJson=import('echarts/map/json/china.json')
console.log(tmpJson)
echarts.registerMap('china',tmpJson)
var data=this.data
this.options = {
// tooltip: { //
// formatter:function (params) {
// return params.name
// }
// },
visualMap: //
{
min: 800,
max: 3000,
text: ['High', 'Low'],
realtime: false,
calculable: true,
inRange: {
color: [ 'lightgreen', 'yellow']
}},
tooltip: { //
trigger: 'item', //
// triggerOn: 'click', //,,
formatter:
'风险数量: {c0}<br />'
// function(params){
// console.log(params)
// let dat=params.data
// return params.data
//
// }
// function(params) {
// var name = params.name
// var toolipData = []
// _this.provinceData.forEach(item=>{
// if(name == item.name){
// toolipData = item.children
// }
// })
// var htmlStr = ''
// toolipData.forEach(item=>{
// htmlStr += `<li class="list-li" name="${item}"><div οnclick="clickRoute()" >${item}</div></li>`
// })
// console.log(toolipData)
// console.log(params.name)
// return `<div class="list-wrap"><div class="list-title">${name}</div><ul class="list-ul">${htmlStr}</ul></div>`
// },
},
geo: {
map: name , //
roam: false,
nameProperty:'NAME',
label: { //
normal: {
show: true,
textStyle: {
color: "#ccc", //
fontSize:10// // 页面初始化的地图文字大小
},
},
// formatter:'{b}: {@score}{c}'
},
itemStyle: { //
// normal:
// {
// borderWidth: .5, //
// borderColor: 'rgba(119, 156, 255, 1)',
// areaColor: {
// x: 0,
// y: 0,
// x2: 0,
// y2: 1,
// colorStops: [{
// offset: 0,
// color: '#073684' // 0%
// }, {
// offset: 1,
// color: '#061E3D' // 100%
// }],
// },
// },
// emphasis: { //
// // areaColor: '#ff00ff',
// areaColor: '#F9D92E',
// show: true,
// textStyle: {
// color: '#000',
// fontSize: "12px"
// }
// },
},
},
dataset:{
//
// source: name==='china'?this.mapData:tmpData
source:tmpData
},
series: [
{
type: "map",
geoIndex: 0,
itemStyle: {//
normal: {//
label: {
show: true,//
textStyle: {
color: "black"
}
}
},
zoom: 5, //,1
emphasis: {//,
label: { show: true }
}
},
label: {
normal: {
show: true, //
textStyle:{color:"#696969"},//
},
emphasis: {
show: true,
textStyle: {
}
}
},
},
{
type: 'effectScatter',
coordinateSystem: 'geo',
rippleEffect: {
brushType: 'fill',
scale:0
},
showEffectOn: 'render',
label: {
lineHeight: 30,
normal: {
show: true,
color: '#081727',
position: 'inside',
padding:[5,0,0,0],
verticalAlign: 'middle',
formatter: function(para) {
return '{cnNum|' + para.data.value[2] + '}'
// return para.data.value[2]
},
rich: {
cnNum: {
fontSize: 16,
color: '#081727',
lineHeight:28,
}
}
},
},
symbol: 'roundRect',
// symbolRotate: 20,
symbolSize: [40,28],
data: [],
zlevel: 1,
}
],
}
chinaMap.setOption(this.options)
console.log(chinaMap.getOption())
console.log(echarts.getMap('china'))
this.chinaMapHidden(chinaMap)
},
//
returnChinaFn(){
console.log("returnChinaFn调用成功")
this.chinaMaprsult('china');
},
//
clickRoute(){
console.log("clickRoute调用成功")
alert("点击了,做其他操作!")
// this.$router.push('/')
},
}
}
</script>
<style scoped>
.echartsGroup{
width: 500px;
height: 500px;
position:relative;
}
.echartsGroup .button{
width:100px;
height:40px;
line-height:40px;
text-align:center;
border:1px solid #ccc;
border-radius: 10px;
cursor: pointer;
position:absolute;
top:10px;
left:10px;
z-index:99;
}
.list-ul{
list-style: none;
}
.list-li{
pointer-events: all;
cursor: pointer;
}
</style>

View File

@ -0,0 +1,152 @@
<template>
<div>
<div ref="index" style="width: 1200px; height: 400px;margin-left: 0px;margin-top: 0px;"></div>
</div>
</template>
<script>
import * as echarts from "echarts";
import http from "@/utils/request";
export default {
props: {
date:[],
result:[],
title:String,
zoom:{
type:Array,
default: function () {
return []
}
}
},
data(){
return {
//
mapTable:{'个体风险状态':["经营风险","信用风险","流动性风险","市场风险","非流动性"],'风险关联与溢出':["条件在险价值差额","Coplua","协整关系","吸收率"],'市场系统结构':['聚类系数','密度变化','同配性'],
'市场波动和趋势':['vixPlus指数','市场受损性']},
datazoom:[],
state:'个体风险状态'
}
},
watch:{
title(newValue){
this.state=newValue
},
zoom(newVal){
this.datazoom=newVal
}
},
mounted() {
var that=this
http.get('/risk/index/?table='+this.title).then((res)=>{
that.date=res.data.date
that.result=res.data.result
var series=[]
let nameLis=[]
for (let yaxis in this.result){
nameLis.push(this.result[yaxis].name)
series.push({
data:this.result[yaxis].data,
type:'line',
name:this.result[yaxis].name
})
}
this.initChart(nameLis,series)
})
},
methods:{
initChart(nameLis,series){
/*
示例参考如下
* https://echarts.apache.org/v4/examples/zh/editor.html?c=line-aqi
*
* https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples/data/asset/data/aqi-beijing.json
*
* */
var myChart = echarts.init(this.$refs["index"])
let option = {
title: {
text: this.title,
left:'center'
},
grid:{
show:true,
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true,
backgroundColor:'#eee'
},
legend: {
top:30,
data: nameLis
}
,
tooltip: {
trigger: 'axis'
},
xAxis: {
data: this.date
},
yAxis: {
scale:true,
splitLine: {
show: false
}
},
toolbox: {
right: 120,
feature: {
// dataZoom: {
// yAxisIndex: 'none'
// },
dataView:{
show:true,
title: '查看数据',
},
restore: {},
saveAsImage: {}
}
},
//
dataZoom: [{
//
startValue: '2022-07-01'
}, {
type: 'inside'
}],
//
series: series,
}
myChart.setOption(option);
myChart.dispatchAction({
type: 'dataZoom',
batch: [{
// dataZoom
start: this.datazoom[0],
end: this.datazoom[1]
}]
})
}
},
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,389 @@
<template>
<div>
<div style="display: flex;">
<div ref="whole risk" style=" float: left;width: 1200px; height: 350px;margin-left: 15px;margin-top: 0px;margin-right: 0px"></div>
<div ref="future" style=" float: left; width: 50px; height: 350px;margin-left: -127px;margin-top: 0px;"></div>
</div>
<div class="warning-component">
<div class="warning-dates">
<div class="date-item">前日<span>{{ prevDayRisk }}</span></div>
<div class="date-item">昨日<span>{{ yesterdayRisk }}</span></div>
<div class="date-item">今日<span>{{ todayRisk }}</span></div>
<div class="date-item">明日<span>{{ tomorrowRisk }}</span></div>
<div class="warning-recent">
最近预警<span>{{ warningRisk }}</span>
</div>
</div>
</div>
</div>
</template>
<script>
import * as echarts from "echarts";
import http from "@/utils/request";
export default {
data(){
return {
yMax:2,
yMin:0,
prevDayRisk:'',
yesterdayRisk:'',
todayRisk:'',
tomorrowRisk:'',
warningRisk:'',
riskData:[],
markLine: [],
markPoint: [],
markArea:[],
future:[],
datazoom:[]
}
},
props:{
zoom:{
type:Array,
default: function () {
return []
}
}
},
watch:{
zoom(newVal){
this.datazoom=newVal
},
yMax(newVal){
console.log(newVal)
}
},
mounted() {
http.get('/risk/whole/').then((res)=>{
this.riskData=res.data.wholerisk
this.markPoint=res.data.markpoint
this.markLine=res.data.markline
this.markArea=res.data.markarea
this.prevDayRisk=res.data.detail[0]
this.yesterdayRisk=res.data.detail[1]
this.todayRisk=res.data.detail[2]
this.tomorrowRisk=res.data.detail[3]
this.warningRisk=res.data.detail[4]
this.future=res.data.future
// console.log(this.riskData,this.markLine,this.markPoint[0])
this.initChart()
})
// this.initChart(this.dat)
},
methods:{
initChart(){
/*
示例参考如下
* https://echarts.apache.org/v4/examples/zh/editor.html?c=line-aqi
*
* https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples/data/asset/data/aqi-beijing.json
*
* */
let data=this.riskData
const future=this.future
var myChart = echarts.init(this.$refs["whole risk"])
var myChartFuture= echarts.init(this.$refs["future"])
let option = {
title: {
text: '系统性风险指数',
left:'center'
},
tooltip: {
trigger: 'axis'
},
xAxis: {
axisLabel:{
fontSize:5
},
data: data.map(function (item) {
return item[0];
})
},
yAxis: {
scale:true,
splitLine: {
show: false
}
},
toolbox: {
right: 120,
feature: {
// dataZoom: {
// yAxisIndex: 'none'
// },
dataView:{
show:true,
title: '查看数据',
},
restore: {},
saveAsImage: {}
}
},
//
dataZoom: [{
//
startValue: '2022-07-01'
}, {
type: 'inside'
}],
//
visualMap: {
top: 10,
right: 0,
precision:2,
pieces: [
{
gt: 0,
lte: parseFloat(this.markLine[0]),
color: '#096'
},
{
gt: parseFloat(this.markLine[0]),
lte: parseFloat(this.markLine[1]),
color: '#ffde33'
},
// {
// gt: 100,
// lte: 150,
// color: '#ff9933'
// },
// {
// gt: 150,
// lte: 200,
// color: '#cc0033'
// },
// {
// gt: 200,
// lte: 300,
// color: '#660099'
// },
// {
// gt: 300,
// color: '#7e0023'
// }
],
outOfRange: {
color: '#fa0744'
}
},
series: {
name: '系统性风险指数',
type: 'line',
data: data.map(function (item) {
return item[1];
}),
//
markPoint:{
symbol:'circle',
symbolSize:10,
data: [{
itemStyle:{
//
color: {
type: 'radial',
x: 0.5,
y: 0.5,
r: 0.5,
colorStops: [{
offset: 0, color: 'purple' // 0%
}, {
offset: 1, color: '#258ddc' // 100%
}],
global: false // false
}
},
//xindexy
coord: this.markPoint[0] // 5 xAxis.data[5] '33'
// coord: ['5', 33.4] // '5' xAxis.data '5'
// 使xAxis.data [number, number, ...]
// [string, string, ...]
}]
},
markLine: {
//线
silent: true,
symbol:'none',
label:{ position:'middle',},
lineStyle:{
color:'black'
},
data: [{
yAxis: this.markLine[0]
}, {
yAxis:this.markLine[1]
},
// {
// yAxis: 200
// }, {
// yAxis: 300
// }
]
},
markArea:{
label: { // 线
// position: 'end',
formatter: '预测值'
},
data:[[{
xAxis:this.markArea[0]},
{
xAxis:this.markArea[1]
// x:'100%'
},
]]
}
}
}
let opt2={
tooltip: {
trigger: 'item',
},
grid:
{backgroundColor: '#eeb0ae',
left:'0%',
show:true,
zlevel:0,
}
,
xAxis:
{
data:[{value:'未来一个月'}],
axisLabel:{
fontSize:5
}
// gridIndex: 0,
},
yAxis: {
min:0.8,
max:2,
type: 'value',
show:false,
// gridIndex: 1
},
series: {
type: 'boxplot',
boxWidth : [2, 10],
data:[{value: this.future,} ],
// 线
// zlevel: 3,
// x使nullECharts
// ...
markArea:{
label: { // 线
// position: 'end',
formatter: '预测值'
},
itemStyle:{
color:'yellow'
}
// data: [[ {
// name: '',
// type: 'average'
// },
// {
// type: 'max'
// }]]
},
tooltip: {
formatter: function (param) {
return [
// 'Experiment ' + param.name + ': ',
'最大值: ' + future[4],
'均值+标准差: ' + future[3],
'中位数: ' +future[2],
'均值-标准差: ' + future[1],
'最小值: ' + future[0]
].join('<br/>');
}
}
}
}
myChart.setOption(option);
myChartFuture.setOption(opt2)
const that=this
myChart.on('datazoom', function (params) {
// Y
this.yMax = myChart.getModel().getComponent('yAxis').axis.scale._extent[1];
// Y
this.yMin = myChart.getModel().getComponent('yAxis').axis.scale._extent[0];
that.$nextTick(() => {
// myChartFuture y
myChartFuture.setOption({
yAxis: {
min: this.yMin,
max: this.yMax
}
});
});
// that.$emit("datazoom",[params.start,params.end])
});
// myChart.dispatchAction({
// type: 'dataZoom',
// batch: [{
// // dataZoom
// start: this.datazoom[0],
// end: this.datazoom[1]
// }]
// })
}
},
}
</script>
<style scoped>
.warning-component {
background-color: #ffffff;
border: 1px solid #ddd;
border-radius: 8px;
padding: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
max-width: 100%;
text-align: center;
margin: auto;
}
.warning-dates {
display: flex;
justify-content: space-between;
//margin-bottom: 10px;
}
.date-item {
margin: 0 10px;
font-weight: bold;
}
.warning-recent {
color: #ff4d4f;
font-weight: bold;
margin-bottom: 10px;
}
</style>

View File

@ -0,0 +1,112 @@
<template>
<div>
<el-carousel :interval="5000" arrow="always" height="380px" :autoplay="false" indicator-position="outside" style="margin-top: 9px">
<el-carousel-item v-for="item in 8" :key="item">
<!-- <h3 class="medium">{{ item }}</h3>-->
<!-- <el-button type="mini" icon="el-icon-arrow-left" circle style="margin: 3px" @click="sendMessage"> </el-button>-->
<div ref="chartContainer" style="width:1150px; height: 330px;margin: 1px"></div>
</el-carousel-item>
</el-carousel>
</div>
</template>
<script>
import * as echarts from "echarts";
import http from "@/utils/request";
export default {
name: "systemRiskFuture",
data(){
return{
date:[],
rate:[],
macro:[],
montary:[],
income:[],
investment:[],
loan:[],
lever:[],
other:[],
whole:[],
title:['利率','宏观指标','货币','收入和融资','银行理财','信贷','整体杠杆','其他']
}
},
mounted() {
this.initGraph()
},
methods:{
sendMessage(){
this.$emit('transmit', 'systemRiskComponent')
},
initGraph(){
http.get('/risk/future_risk/').then((res)=>{
this.date=res.data.date
this.rate=res.data.rate
this.macro=res.data.macro
this.montary=res.data.montary
this.income=res.data.income
this.investment=res.data.investment
this.loan=res.data.loan
this.lever=res.data.lever
this.other=res.data.other
this.whole.push(this.rate)
this.whole.push(this.macro)
this.whole.push(this.montary)
this.whole.push(this.income)
this.whole.push(this.investment)
this.whole.push(this.loan)
this.whole.push(this.lever)
this.whole.push(this.other)
}).then(()=>{
for(let i = 0; i < 8; i++) {
let echart = echarts.init(this.$refs.chartContainer[i])
const option = {
title:{text:this.title[i],
left:'center'
},
tooltip: {
trigger: 'axis'
},
legend: {
top:30,
},
xAxis: {
type: 'category',
data: this.date
},
yAxis: {
type: 'value'
},
series: this.whole[i]
};
echart.setOption(option)
}}
)
},
}
}
</script>
<style scoped>
.el-carousel__item h3 {
color: #475669;
font-size: 18px;
opacity: 0.75;
line-height: 300px;
margin: 0;
}
.el-carousel__item:nth-child(2n) {
background-color: #d3dce6;
}
.el-carousel__item:nth-child(2n+1) {
background-color: #d3dce6;
}
</style>

54
src_old/config/drag.js Normal file
View File

@ -0,0 +1,54 @@
import Vue from 'vue';
//使用Vue.directive()定义一个全局指令
//1.参数一指令的名称定义时指令前面不需要写v-
//2.参数二:是一个对象,该对象中有相关的操作函数
//3.在调用的时候必须写v-
const drag = Vue.directive('drag', {
//1.指令绑定到元素上回立刻执行bind函数只执行一次
//2.每个函数中第一个参数永远是el表示绑定指令的元素el参数是原生js对象
//3.通过el.focus()是无法获取焦点的因为只有插入DOM后才生效
bind: function (el) {
el.style.cursor = "move"; //鼠标样式变move样式
},
//inserted表示一个元素插入到DOM中会执行inserted函数只触发一次
inserted: function (el) {
el.onmousedown = function (e) {
var distX = e.pageX - el.offsetLeft;
var distY = e.pageY - el.offsetTop;
console.log("元素本身的高:" + el.clientHeight + ",元素本身的宽:" + el.clientWidth)
if (e.preventDefault) {
e.preventDefault();
} else{
e.returnValue=false;
};//解决快速拖动滞后问题
document.onmousemove = function (e) {
// 用鼠标的位置减去鼠标相对元素的位置,得到元素的位置
let left = e.clientX - distX;
let top = e.clientY - distY;
if (left <= 0) {
left = 5; //设置成5是为了不离边缘太近
} else if (left > document.documentElement.clientWidth - el.clientWidth) {
//document.documentElement.clientWidth 屏幕的可视宽度
left = document.documentElement.clientWidth - el.clientWidth - 5
}
if (top <= 0) {
top = 5;
} else if (top > document.documentElement.clientHeight - el.clientHeight) {
top = document.documentElement.clientHeight - el.clientHeight - 5
}
el.style.left = left + 'px';
el.style.top = top + 'px';
}
document.onmouseup = function () {
document.onmousemove = document.onmouseup = null;
}
}
},
//当VNode更新的时候会执行updated可以触发多次
updated: function (el) {}
})
export default drag;

58
src_old/libs/rem.js Normal file
View File

@ -0,0 +1,58 @@
class DevicePixelRatio {
constructor() {
// this.flag = false;
}
// 获取系统类型
_getSystem() {
// let flag = false;
var agent = navigator.userAgent.toLowerCase();
// var isMac = /macintosh|mac os x/i.test(navigator.userAgent);
// if(isMac) {
// return false;
// }
// 现只针对windows处理其它系统暂无该情况如有继续在此添加
if (agent.indexOf('windows') >= 0) {
return true;
}
}
// 获取页面缩放比例
// _getDevicePixelRatio() {
// let t = this;
// }
// 监听方法兼容写法
_addHandler(element, type, handler) {
if (element.addEventListener) {
element.addEventListener(type, handler, false);
} else if (element.attachEvent) {
element.attachEvent('on' + type, handler);
} else {
element['on' + type] = handler;
}
}
// 校正浏览器缩放比例
_correct() {
let t = this;
// 页面devicePixelRatio设备像素比例变化后计算页面body标签zoom修改其大小来抵消devicePixelRatio带来的变化。
document.getElementsByTagName('body')[0].style.zoom = 1.2 / window.devicePixelRatio;
// 修改这个代码可以调整显示大小参考代码是1/……style.zoom = 1.2 / window.devicePixelRatio; 参考链接https://blog.csdn.net/qq_39548550/article/details/127664450
}
// 监听页面缩放
_watch() {
let t = this;
t._addHandler(window, 'resize', function() { // 注意这个方法是解决全局有两个window.resize
// 重新校正
t._correct()
})
}
// 初始化页面比例
init() {
let t = this;
if (t._getSystem()) { // 判断设备目前只在windows系统下校正浏览器缩放比例
// 初始化页面校正浏览器缩放比例
t._correct();
// 开启监听页面缩放
t._watch();
}
}
}
export default DevicePixelRatio;

37
src_old/main.js Normal file
View File

@ -0,0 +1,37 @@
import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui';//全局引入
// import {Row,Button} from 'element-ui';//按需引入
import 'element-ui/lib/theme-chalk/index.css';
import router from './router'
import store from './store'
// import axios from 'axios'
import drag from '@/config/drag';//弹窗可以拖拽
Vue.config.productionTip = false
Vue.use(ElementUI);//全局引入
// axios.defaults.baseURL = 'http://61.240.140.173:8000/proxy_url'
// Vue.use(Row)//按需引入
// Vue.use(Button)//按需引入
// 5以上的echarts不用引入4要引入
// import * as echarts from 'echarts'
import * as echarts from "echarts";
Vue.prototype.$echarts = echarts;
// 将自动注册所有组件为全局组件
import dataV from '@jiaminghi/data-view'
Vue.use(dataV)
new Vue({
router,
store,
render: h => h(App),
}).$mount('#app')

View File

@ -0,0 +1,171 @@
// use this to isolate the scope
(function () {
if(!$axure.document.configuration.showConsole) { return; }
$(document).ready(function () {
$axure.player.createPluginHost({
id: 'debugHost',
context: 'inspect',
title: 'Console',
gid: 3
});
generateDebug();
$('#variablesClearLink').click(clearvars_click);
$('#traceClear').click(cleartrace_click);
$('#traceToggle').click(stoptrace_click);
$('#traceStart').click(starttrace_click);
$('#traceClear').hide();
$('#traceToggle').hide();
$('#closeConsole').click(close);
var currentStack= [];
var finishedStack = [];
$axure.messageCenter.addMessageListener(function (message, data) {
if(message == 'axCompositeEventMessage') {
for(var i = 0; i < data.length; i++) {
processMessages(data[i].message, data[i].data);
}
} else processMessages(message, data);
});
var processMessages = function(message, data) {
if(message == 'globalVariableValues') {
$('#variablesDiv').empty();
for(var key in data) {
var value = data[key] == '' ? '(blank)' : data[key];
$('#variablesDiv').append('<div class="variableList"><div class="variableName">' + key + '</div><div class="variableValue">' + value + '</div></div>');
}
} else if(message == 'axEvent') {
var addToStack = "<div class='axEventBlock'>";
addToStack += "<div class='axEventContainer'>";
addToStack += " <div class='axTime'>" + new Date().toLocaleTimeString() + "</div>";
addToStack += " <div class='axEvent'>" + data.event.description + ": </div>";
addToStack += " <div class='axLabel'>" + data.label + " (" + data.type + ")</div>";
addToStack += "</div>";
currentStack.push(addToStack);
} else if (message == 'axEventComplete') {
currentStack[currentStack.length - 1] += "</div>";
finishedStack.push(currentStack.pop());
if(currentStack.length == 0) {
$('#traceEmptyState').hide();
$('#traceClear').show();
$('#traceToggle').show();
for(var i = finishedStack.length - 1; i >= 0; i--) {
if($('#traceDiv').children().length > 99) $('#traceDiv').children().last().remove();
$('#traceDiv').prepend(finishedStack[i]);
}
finishedStack = [];
}
} else if (message == 'axCase') {
//var addToStack = "<div class='axCaseContainer' style='background-color: #" + data.color + "'>";
var addToStack = "<div class='axCaseContainer'>";
addToStack += " <div class='axCaseItem'>" + data.item + "</div>";
if (data.description) { addToStack += " <div class='axCaseDescription' title='" + data.description + "'>" + data.description + "</div>" };
addToStack += "</div>";
currentStack[currentStack.length - 1] += addToStack;
} else if (message == 'axAction') {
var addToStack = "<div class='axActionContainer'>";
addToStack += " <div class='axActionItem'>" + data.name + "</div>";
//addToStack += " <div class='axActionItem'>" + data.item + "</div>";
//if (data.description) { addToStack += " <div class='axActionDescription' title='" + data.description + "'>" + data.description + "</div>" };
addToStack += "</div>";
currentStack[currentStack.length - 1] += addToStack;
} else if (message == 'axInfo') {
var addToStack = "<div class='axInfoContainer'>";
addToStack += " <div class='axInfoItem'>" + data.item + "</div>";
if (data.description) { addToStack += " <div class='axInfoDescription' title='" + data.longDescription + "'>" + data.description + "</div>" };
addToStack += "</div>";
currentStack[currentStack.length - 1] += addToStack;
}
}
// bind to the page load
$axure.page.bind('load.debug', function () {
var traceStr = $axure.player.getHashStringVar(TRACE_VAR_NAME);
if (traceStr.length > 0) $axure.messageCenter.setState("isTracing", true);
else $axure.messageCenter.setState("isTracing", false);
$axure.messageCenter.postMessage('getGlobalVariables', '');
return false;
});
function clearvars_click(event) {
$axure.messageCenter.postMessage('resetGlobalVariables', '');
}
function close() {
$axure.player.pluginClose("debugHost");
}
function cleartrace_click(event) {
$('#traceDiv').html('');
}
function starttrace_click(event) {
$axure.messageCenter.setState("isTracing", true);
//$('#traceDiv').html('');
$('#traceEmptyState').hide();
$('#traceClear').show();
$('#traceToggle').text('Stop Trace');
$('#traceToggle').off("click");
$('#traceToggle').click(stoptrace_click);
$('#traceToggle').show();
console.log("starting trace");
$axure.player.setVarInCurrentUrlHash(TRACE_VAR_NAME, 1);
}
function stoptrace_click(event) {
$axure.messageCenter.setState("isTracing", false);
$('#traceDiv').prepend('<div class="tracePausedNotification">Trace Paused<div>');
$('#traceToggle').text('Restart Trace');
$('#traceToggle').off("click");
$('#traceToggle').click(starttrace_click);
console.log("stopping trace");
$axure.player.deleteVarFromCurrentUrlHash(TRACE_VAR_NAME);
}
});
function generateDebug() {
var pageNotesUi = "<div id='debugHeader'>";
pageNotesUi += "<div id='debugToolbar'>";
pageNotesUi += "<div id='consoleTitle' class='pluginNameHeader'>Console</div>";
pageNotesUi += "</div>";
pageNotesUi += "</div>";
pageNotesUi += "<div id='variablesContainer' style='max-height:300px; overflow-y:auto'>";
pageNotesUi += "<div id='variablesTitle' class='sectionTitle'>Variables</div>";
pageNotesUi += "<a id='variablesClearLink' class='traceOption'>Reset Variables</a>";
pageNotesUi += "<div id='variablesDiv'></div></div>";
pageNotesUi += "<div id='traceContainer'>";
pageNotesUi += "<div id='traceHeader'>";
pageNotesUi += "<span class='sectionTitle'>Trace</span><a id='traceClear' class='traceOption'>Clear Trace</a><a id='traceToggle' class='traceOption'>Stop Trace</a>";
pageNotesUi += "</div>";
pageNotesUi += "</div>";
pageNotesUi += "<div id='debugScrollContainer'>";
pageNotesUi += "<div id='debugContainer'>";
pageNotesUi += "<div id='traceEmptyState'>";
pageNotesUi += "<div class='startInstructions'>Click the button below to start recording interactions as you click through the prototype.</div>";
pageNotesUi += "<div id='traceStart' class='startButton'>Start Trace</div>";
pageNotesUi += "</div>";
pageNotesUi += "<div id='traceDiv'></div></div>";
pageNotesUi += "</div></div>";
$('#debugHost').html(pageNotesUi);
$('#traceEmptyState').show();
}
})();

View File

@ -0,0 +1,265 @@
#debugHost {
display: flex;
flex-direction: column;
font-size: 13px;
color: #4a4a4a;
height: 100%;
}
#debugHostBtn {
order: 4;
}
#debugHostBtn a {
background: url('images/console_panel_on.svg') no-repeat center center, linear-gradient(transparent, transparent);
}
#debugHostBtn a.selected, #debugHostBtn a.selected:hover {
background: url('images/console_panel_off.svg') no-repeat center center, linear-gradient(transparent, transparent);
}
#debugToolbar {
margin-left: 8px;
}
#variablesClearLink {
display: inline-block;
margin-bottom: 15px;
}
#variablesClearLink:hover {
color: #0a6cd6;
}
#traceClearLink {
display: inline-block;
margin-bottom: 15px;
}
#traceClearLink:hover {
color: #0a6cd6;
}
#debugScrollContainer
{
overflow: auto;
width: 100%;
-webkit-overflow-scrolling: touch;
flex: 1;
}
#debugContainer {
padding: 10px 0px 10px 0px;
}
#consoleTitle {
clear: right;
margin: 12px 0px;
}
.variableName
{
font-weight: bold;
}
.variableDiv
{
margin-bottom: 20px;
line-height: 16px;
}
#variablesDiv
{
clear: right;
}
#variablesContainer {
border-bottom: solid 1px #e7e7e7;
padding: 0px 10px 12px 10px;
}
#traceContainer {
margin-bottom: 5px;
padding: 15px 10px 0px 10px;
}
#variablesTitle {
margin-bottom: 9px;
}
.sectionTitle {
font-size: 11px;
color: #2c2c2c;
display: inline-block;
}
.debugToolbarButton
{
font-size: 1em;
color: #069;
}
.axEventBlock {
display: inline-block;
width: 100%;
margin: 5px 0px 5px 0px;
line-height: 21px;
border-bottom: solid 5px #e7e7e7;
}
.axEventContainer {
background-color: #e7e7e7;
padding: 0px 10px 0px 10px;
}
.axTime {
margin: 0px 0px 0px 5px;
font-size: 10px;
color: #575757;
display: inline-block;
float: right;
}
.axLabel {
display: inline-block;
}
.axEvent {
margin: 0px 0px 2px 0px;
font-size: 15px;
font-weight: bold;
overflow: hidden;
text-overflow: ellipsis;
}
.axCaseContainer, .axActionContainer, .axInfoContainer {
justify-content: space-between;
padding: 0px 10px 0px 10px;
}
.axCaseContainer {
border-top: solid 2px #e7e7e7;
/*background-color: #47b6b5;*/
background-color: #e7e7e7;
/*color: #ffffff;*/
}
.axActionContainer {
border-top: solid 3px #e7e7e7;
}
.axInfoContainer {
border-top: solid 1px #e7e7e7;
}
.axCaseItem, .axActionItem, .axInfoItem {
overflow: hidden;
text-overflow: ellipsis;
}
.axCaseItem {
font-size: 15px;
font-weight: bold;
}
.axActionItem {
font-weight: bold;
}
.axInfoItem {
color: #8c8c8c;
}
.axCaseDescription {
flex: 5 0 33%;
margin-left: 10px;
text-align: right;
}
/*.axActionDescription, .axInfoDescription {
flex: 5 0 33%;
margin-left: 10px;
text-align: right;
}*/
.axCaseDescription, .axActionDescription {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.axInfoDescription, .axActionDescription {
color: #8c8c8c;
font-size: 11px;
}
.variableName {
width: 55%;
line-height: 0.92;
text-align: left;
color: #0891b3;
display: inline-block;
word-wrap: break-word;
vertical-align: top;
}
.variableValue {
width: 45%;
line-height: 0.92;
text-align: right;
color: #373d48;
display: inline-block;
word-wrap: break-word;
}
.traceEvent {
border-bottom: solid 1px #e7e7e7;
}
.tracePausedNotification {
height: 25px;
/*background-color: #e7e7e7;*/
border-radius: 5px;
line-height: 25px;
margin: 5px 10px;
text-align: center
}
#traceEmptyState.emptyStateContainer {
margin-top: 0px;
}
.variableList{
width: 100%;
margin-bottom: 4px;
}
.traceOption {
margin-left: 11px;
height: 16px;
float: right;
font-size: 12px;
font-style: italic;
line-height: 1.45;
text-align: right;
color: #8c8c8c;
text-decoration: underline;
display: inline-block;
}
.startInstructions {
margin: auto;
width: 179px;
font-size: 11px;
text-align: center;
color: #666666;
}
.startButton {
margin: auto;
margin-top: 10px;
width: 181px;
height: 24px;
border-radius: 2px;
border: solid 1px #008fe0;
text-align: center;
line-height: 24px;
color: #008fe0;
cursor: pointer;
}
.debugLinksContainer {
text-align: right;
}

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path fill="#008DCB" fill-rule="evenodd" d="M14 2.5l-2 1V2H2v12h12v1a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v1.5zm-2.981 3.702c.78-1.06 1.407-1.803 1.882-2.23.475-.428.938-.641 1.389-.641.54 0 .913.184 1.118.553.11.192.164.424.164.698 0 .28-.113.536-.339.769a1.1 1.1 0 0 1-.82.348c-.198 0-.422-.075-.672-.225-.25-.15-.439-.226-.569-.226-.253 0-.494.13-.723.39-.229.26-.623.81-1.184 1.65l.195 1.026c.102.526.188.959.256 1.297.069.338.144.651.226.938.11.397.219.684.328.862.11.177.27.266.482.266.191 0 .424-.14.697-.42.15-.15.38-.427.687-.83l.43.297a8.113 8.113 0 0 1-1.409 1.733c-.578.546-1.143.82-1.697.82-.465 0-.848-.192-1.148-.574-.171-.205-.322-.486-.452-.841a11.32 11.32 0 0 1-.282-.98 24.82 24.82 0 0 0-.23-.866l-.144.246c-.677 1.162-1.172 1.918-1.487 2.266-.471.52-1.018.78-1.64.78-.356 0-.665-.122-.928-.364a1.172 1.172 0 0 1-.395-.898c0-.294.097-.565.292-.815.195-.25.467-.374.815-.374.212 0 .474.075.785.226.31.15.514.225.61.225.212 0 .395-.094.548-.282.154-.188.457-.654.908-1.4l.41-.676c-.068-.287-.142-.64-.22-1.056-.079-.417-.16-.845-.241-1.282l-.164-.872c-.117-.629-.301-1.042-.554-1.24-.144-.117-.38-.175-.708-.175a14.992 14.992 0 0 0-.636.051v-.564c.616-.075 1.29-.17 2.026-.287a52.738 52.738 0 0 0 1.471-.246c.205.274.374.605.508.995.133.39.234.803.302 1.24l.113.688z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

Some files were not shown because too many files have changed in this diff Show More