Commit 14f7740f by wangren

客户数据分析临时提交

parent 757199d3
......@@ -2077,8 +2077,7 @@
"version": "3.21.1",
"resolved": "https://registry.npmmirror.com/core-js/-/core-js-3.21.1.tgz",
"integrity": "sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig==",
"dev": true,
"hasInstallScript": true
"dev": true
},
"node_modules/@vue/babel-preset-jsx": {
"version": "1.2.4",
......@@ -3246,8 +3245,7 @@
"version": "2.6.12",
"resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz",
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
"deprecated": "core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.",
"hasInstallScript": true
"deprecated": "core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js."
},
"node_modules/balanced-match": {
"version": "1.0.2",
......@@ -4735,8 +4733,7 @@
"node_modules/core-js": {
"version": "3.21.1",
"resolved": "https://registry.npmmirror.com/core-js/-/core-js-3.21.1.tgz",
"integrity": "sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig==",
"hasInstallScript": true
"integrity": "sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig=="
},
"node_modules/core-js-compat": {
"version": "3.21.1",
......@@ -5756,7 +5753,6 @@
"resolved": "https://registry.npmmirror.com/ejs/-/ejs-2.7.4.tgz",
"integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==",
"dev": true,
"hasInstallScript": true,
"engines": {
"node": ">=0.10.0"
}
......@@ -5957,7 +5953,6 @@
"version": "0.10.59",
"resolved": "https://registry.npmmirror.com/es5-ext/-/es5-ext-0.10.59.tgz",
"integrity": "sha512-cOgyhW0tIJyQY1Kfw6Kr0viu9ZlUctVchRMZ7R0HiH3dxTSp5zJDLecwxUqPUrGKMsgBI1wd1FL+d9Jxfi4cLw==",
"hasInstallScript": true,
"dependencies": {
"es6-iterator": "^2.0.3",
"es6-symbol": "^3.1.3",
......@@ -6731,7 +6726,6 @@
"resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
......@@ -13318,7 +13312,6 @@
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.",
"dev": true,
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
......@@ -13741,7 +13734,6 @@
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.",
"dev": true,
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
......
import Api from "~/service/Api"
import Utils from "~/utils"
export default {
async handleSearch(){
let rtnmsg = await this.executeRule("infbut.butprt")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async handleReset(){
let rtnmsg = await this.executeRule("infbut.butprt")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
}
\ No newline at end of file
import Api from "~/service/Api"
import Utils from "~/utils"
export default {
async handleSearch(){
let rtnmsg = await this.executeRule("infbut.butprt")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async handleReset(){
let rtnmsg = await this.executeRule("infbut.butprt")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
}
\ No newline at end of file
......@@ -11,3 +11,15 @@ export function my(data) {
export function ins(data) {
return Api.post("/report/task/ins", data)
}
export function busvolume(data) {
return Api.post("/report/customer/businessVolume", data)
}
export function finamount(data) {
return Api.post("/report/customer/financedAmount", data)
}
export function expincome(data) {
return Api.post("/report/customer/expenseIncome", data)
}
......@@ -107,7 +107,7 @@ const Status = {
},
setTaskList(state, options) {
state.taskList[options.key] = options.val;
}
},
}
}
export default Status
\ No newline at end of file
......@@ -127,6 +127,9 @@ import Infpty from "./Infpty"
import Dbipty from "./Dbipty"
import Notice from "./Notice"
import Iaefts from "./Iaefts"
import Expben from "./Expben"
/**
* 带有name的才会被添加进顶部的标签页里
*/
......@@ -267,5 +270,10 @@ const BusRouter = [
{ path: 'getsel', component: Getsel, name: 'Getsel', meta: { title: 'Getsel' } },
{ path: 'getcrq', component: Getcrq, name: 'Getcrq', meta: { title: 'Getcrq' } },
{ path: 'notice', component: Notice, name: 'Notice', meta: { title: '通知公告设置' } },
{ path: 'Iaefts', component: Iaefts, name: 'Iaefts', meta: { title: '进出口融资交易' } },
{ path: 'Expben', component: Expben, name: 'Expben', meta: { title: '费用收益交易' } },
]
export default BusRouter
<template>
<div class="eibs-tab">
<c-col :span="8">
<el-form-item label="客户名称">
<c-input
v-model="customername"
placeholder="请输入客户名称"
></c-input>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="起止日期">
<c-col :span="11">
<c-date-picker
type="date"
style="width: 100%"
value-format="yyyy-MM-dd"
placeholder="请选择Date"
></c-date-picker>
</c-col>
<c-col :span="2" style="text-align: center">
<label style="display: inline-block; width: 100%">-</label>
</c-col>
<c-col :span="11">
<c-date-picker
type="date"
style="width: 100%"
value-format="yyyy-MM-dd"
placeholder="请选择Date"
></c-date-picker>
</c-col>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="业务编号">
<c-input placeholder="请输入Reference"> </c-input>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="经办柜员">
<c-select style="width: 100%" palceholder="请选择User"></c-select>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="请选择费用变化状态">
<c-select style="width: 100%" placeholder="费用变化状态"></c-select>
</el-form-item>
</c-col>
<c-col :span="8" style="text-align: right">
<el-button size="small" @click="handleReset">重置</el-button>
<el-button
type="primary"
icon="el-icon-search"
size="small"
@click="handleSearch"
>查询</el-button
>
</c-col>
<c-col class="clearfix" :span="24" style="margin-top: 10px">
<div style="border-bottom: 10px solid rgb(232, 232, 232)"></div>
</c-col>
<c-col :span="24" style="">
<c-istream-table
:list="stmData.data"
:columns="stmData.columns"
:showButtonFlg="true"
>
<c-table-column fixed="right" prop="op" label="操作" width="165px">
<template slot-scope="{ scope }">
<c-button
style="margin-left: 0"
size="small"
@click="onInfbutDsp(scope.$index, scope.row)"
>
详情
</c-button>
<c-button
style="margin-left: 0"
size="small"
type="primary"
@click="continueEdit(scope.row)"
>
处理
</c-button>
<el-popover placement="top-start" width="50" trigger="click">
<ul class="table-button-item-list">
<li>
<c-button size="small" style="margin-left: 0"
>指派</c-button
>
</li>
<li>
<c-button size="small" style="margin-left: 0"
>删除</c-button
>
</li>
</ul>
<a
slot="reference"
href="javascript:void(0)"
style="margin-left: 5px"
><i class="el-icon-more"></i
></a>
</el-popover>
</template>
</c-table-column>
</c-istream-table>
</c-col>
</div>
</template>
<script>
import commonProcess from "~/mixin/commonProcess";
import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Expben/Event";
export default {
inject: ["root"],
props: ["model", "codes"],
mixins: [commonProcess],
data() {
return {
trnName: "ExpenseIncome",
customername:"",
stmData: {
columns: [
'4 1 "客户名称" 0 ',
'5 2 "业务编号" 0',
'7 3 "经办柜员" 0',
'20 4 "费用变化状态" 0',
'21 5 "融资状态" 0',
],
data: [],
},
};
},
computed: {},
//注意此处应为$route当前组件的this 不是$router vuerouter的this其不含query值
created(){
if(this.$route.query){
this.customername=this.$route.query.name
}},
methods: {...Event},
};
</script>
<style></style>
<template>
<div class="eContainer">
<el-form :model="model" :rules="rules" ref="modelForm" label-width="150px" label-position="right" size="small" :validate-on-rule-change="false">
<c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="tabClick">
<el-tab-pane label="费用收益" name="ExpenseIncome">
<m-ExpenseIncome :model="model" :codes="codes"/>
</el-tab-pane>
</c-tabs>
</el-form>
</div>
</template>
<script>
import commonProcess from "~/mixin/commonProcess"
import CodeTable from "~/config/CodeTable"
import ExpenseIncome from "./ExpenseIncome"
export default {
name:"Expben",
components:{
"m-ExpenseIncome" : ExpenseIncome,
},
provide() {
return {
root: this
}
},
mixins: [commonProcess],
data(){
return {
tabVal: "ExpenseIncome",
trnName: "expenseIncome",
model: null,
rules:null,
codes: {...CodeTable},
};
},
methods:{
tabClick(){
}
},
created:async function(){
console.log("进入费用收益")
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-col :span="24">
<c-col :span="8">
<el-form-item label="客户名称">
<c-input
v-model="customername"
placeholder="请输入客户名称"
></c-input>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="起止日期" style="width: 100%">
<c-col :span="11">
<c-date-picker
type="date"
value-format="yyyy-MM-dd"
style="width: 100%"
placeholder="请选择Date"
></c-date-picker>
</c-col>
<c-col :span="2" style="text-align: center">
<label style="display: inline-block; width: 100%">-</label>
</c-col>
<c-col :span="11">
<c-date-picker
type="date"
value-format="yyyy-MM-dd"
style="width: 100%"
placeholder="请选择Date"
></c-date-picker>
</c-col>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="业务编号">
<c-input placeholder="请输入Reference"> </c-input>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="经办柜员">
<c-select style="width: 100%" palceholder="请选择User"></c-select>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="请选择融资种类">
<c-select style="width: 100%" placeholder="融资种类"></c-select>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="请选择融资状态">
<c-select style="width: 100%" placeholder="融资状态"></c-select>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="请选择收支标志">
<c-select style="width: 100%" placeholder="收支标志"></c-select>
</el-form-item>
</c-col>
<c-col :span="16" style="text-align: right">
<el-button size="small" @click="handleReset">重置</el-button>
<el-button
type="primary"
icon="el-icon-search"
size="small"
@click="handleSearch"
>查询</el-button
>
</c-col>
<c-col class="clearfix" :span="24" style="margin-top: 10px">
<div style="border-bottom: 10px solid rgb(232, 232, 232)"></div>
</c-col>
<c-col :span="24" style="">
<c-istream-table
:list="stmData.data"
:columns="stmData.columns"
:showButtonFlg="true"
>
<c-table-column fixed="right" prop="op" label="操作" width="165px">
<template slot-scope="{ scope }">
<c-button
style="margin-left: 0"
size="small"
@click="onInfbutDsp(scope.$index, scope.row)"
>
详情
</c-button>
<c-button
style="margin-left: 0"
size="small"
type="primary"
@click="continueEdit(scope.row)"
>
处理
</c-button>
<el-popover placement="top-start" width="50" trigger="click">
<ul class="table-button-item-list">
<li>
<c-button size="small" style="margin-left: 0"
>指派</c-button
>
</li>
<li>
<c-button size="small" style="margin-left: 0"
>删除</c-button
>
</li>
</ul>
<a
slot="reference"
href="javascript:void(0)"
style="margin-left: 5px"
><i class="el-icon-more"></i
></a>
</el-popover>
</template>
</c-table-column>
</c-istream-table>
</c-col>
</c-col>
</div>
</template>
<script>
import commonProcess from "~/mixin/commonProcess";
import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Iaefts/Event";
export default {
inject: ["root"],
props: ["model", "codes"],
mixins: [commonProcess],
data() {
return {
trnName: "Finance",
customername:"",
stmData: {
columns: [
'4 1 "客户名称" 0 ',
'5 2 "收支标志" 0',
'7 3 "业务编号" 0',
'20 4 "融资种类" 0',
'21 5 "融资状态" 0',
],
data: [],
},
};
},
computed: {},
//注意此处应为$route当前组件的this 不是$router vuerouter的this其不含query值
created () {
if(this.$route.query){
this.customername=this.$route.query.name
}
},
methods: {...Event,},
};
</script>
<style></style>
<template>
<div class="eContainer">
<el-form :model="model" :rules="rules" ref="modelForm" label-width="150px" label-position="right" size="small" :validate-on-rule-change="false">
<c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="tabClick">
<el-tab-pane label="进出口融资量" name="Finance">
<m-Finance :model="model" :codes="codes"/>
</el-tab-pane>
</c-tabs>
</el-form>
</div>
</template>
<script>
import commonProcess from "~/mixin/commonProcess"
import CodeTable from "~/config/CodeTable"
import Finance from "./Finance"
export default {
name:"Iaefts",
mixins: [commonProcess],
components:{
"m-Finance" : Finance,
},
provide() {
return {
root: this
}
},
data(){
return {
tabVal: "Finance",
trnName: "iaefts",
model: null,
rules: null,
codes: {
},
}
},
methods:{
tabClick(){
}
},
created:async function(){
console.log("进入进出口融资")
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-content>
<!-- ----------左 ---------->
<c-col :span="11">
<c-col :span="24">
......@@ -202,7 +202,7 @@
</c-table-column>
</c-istream-table>
</c-col>
</c-content>
<!-- <c-col :span="12">
<c-button size="small" type="primary" @click="onInfbutDsp">
Display
......
......@@ -20,6 +20,7 @@
<script>
import CellWrapper from "../common/CellWrapper.vue";
import * as echarts from "echarts";
import { busvolume, finamount, expincome } from "~/service/report";
export default {
name: "CustomerAnalyse",
......@@ -28,6 +29,12 @@ export default {
data() {
return {
echartInstance: null,
//componentIndex
mapping: {
0: "trnfnd",
1: "iaefts",
2: "expben",
},
};
},
mounted() {
......@@ -38,17 +45,101 @@ export default {
});
},
methods: {
loadCharts() {
//加载图标函数
async loadCharts() {
if (this.echartInstance) {
this.echartInstance.dispose();
}
this.echartInstance = echarts.init(
this.$el.querySelector(".chart-container .chartWrapper .chart")
);
//统计 业务量
let volume = await busvolume();
//统计 融资量
let amount = await finamount();
//统计 费用收益
let income = await expincome();
//定义 seriesData数组 金额 category数组 客户名
let seriesData = [];
let seriesData1 = [];
let seriesData2 = [];
let category = [];
// 优先遍历客户名,方便后续的数组匹配
// volume.forEach((v) => {
// console.log(v.nam1)
// category.push(v.nam1);
// console.log(category.toString());
// console.log(category)
// });
console.log("volume.length:" + volume.length);
console.log(category);
for (let i = 0; i < volume.length; i++) {
let v = volume[i].nam1;
// console.log(typeof v);
// console.log(volume[i].nam1);
category.push(v);
// console.log(category.toString());
// console.log(category);
// console.log(typeof category);
}
//存在bug后续要解决
// amount.forEach((v) => {
// for (let i = 0; i < category.length; i++) {
// if (category[i] == v.nam1) {
// continue;
// } else {
// category.push(v.nam1);
// }
// }
// });
//存在bug后续要解决
// income.forEach((v) => {
// for (let i = 0; i < category.length; i++) {
// if (category[i] == v.nam1) {
// continue;
// } else {
// category.push(v.nam1);
// }
// }
// });
volume.forEach((v) => {
for (let i = 0; i < category.length; i++) {
if (category[i] == v.nam1) {
seriesData[i] = v.amount;
break;
}
}
});
amount.forEach((v) => {
for (let i = 0; i < category.length; i++) {
if (category[i] == v.nam1) {
seriesData1[i] = v.amount;
break;
}
}
});
income.forEach((v) => {
for (let i = 0; i < category.length; i++) {
if (category[i] == v.nam1) {
seriesData2[i] = v.amount;
break;
}
}
});
console.log(category);
console.log(seriesData);
console.log(seriesData1);
console.log(seriesData2);
const option = {
title: {
// text: "Test Demo",
},
tooltip: {
trigger: "axis",
axisPointer: {
......@@ -66,47 +157,82 @@ export default {
},
xAxis: {
type: "value",
boundaryGap: [0, 0.01],
boundaryGap: ["10%", "20%"],
},
yAxis: {
type: "category",
data: [
"海康威视",
"春晖指控",
"苏奥传感",
"东方财富",
"隆基股份",
"贵州茅台",
],
data: category,
},
series: [
{
name: "业务量(万美元)",
name: "业务量金额(美元)",
type: "bar",
data: [18203, 23489, 29034, 104970, 131744, 230230],
data: seriesData,
},
{
name: "融资量(万美元)",
name: "融资量金额(万美元)",
type: "bar",
data: [19325, 23438, 31000, 121594, 134141, 381807],
data: seriesData1,
},
{
name: "费用收益(千美元)",
name: "费用收益金额(千美元)",
type: "bar",
data: [49325, 53438, 11000, 221594, 43241, 455807],
data: seriesData2,
},
],
};
this.echartInstance.setOption(option);
//echart on事件来跳转页面
// this.echartInstance.on(
// 'click',
// function (params) =>{
// alert(params.name);
// this.$router.push('/taskList')
// }
this.echartInstance.on("click", (params) => {
console.log(params);
console.log(params.name);
var name = parseInt(params.name);
let path = params.componentIndex;
// 要使用=>函数使内外的this指向一致
if (path === 0) {
this.$router.push("/taskList").then(() => {
this.$store.commit(
"setTaskListTabVal",
this.mapping[params.componentIndex]
);
});
} else if (path === 1) {
//{path:"/xxxpath",query:"id:xxx"} router跳转页面传参业务 接受页面用created(){if(this.$route.query){todo}}
this.$router.push({
path:"/business/Iaefts",
query:{name: params.name}
});
} else {
//{path:"/xxxpath",query:"id:xxx"} router跳转页面传参业务 接受页面用created(){if(this.$route.query){todo}}
this.$router.push({
path:"/business/Expben",
query:{name:params.name}
});
}
});
},
},
destroyed() {
window.removeEventListener("resize", this.loadChartsBind);
},
},
};
</script>
<style scoped>
<style>
.chart-container {
height: 100%;
display: flex;
......@@ -126,5 +252,7 @@ export default {
.chartWrapper .chart {
width: 100%;
height: 100%;
/* 将指针改变为可以跳转 */
cursor: pointer;
}
</style>
......@@ -183,6 +183,7 @@ export default {
justify-content: center;
align-items: center;
border-right: 1px solid;
/* 鼠标改为指针可以跳转 */
cursor: pointer;
}
.task-stat-display.total .display-wrapper .stat-item:last-child .stat-count {
......
......@@ -47,19 +47,18 @@ module.exports = {
'^/gjjs/report': '/gjjs/report'
}
},
<<<<<<< HEAD
'/gjjs/notice/': {
target: 'http://127.0.0.1:8085',
changeOrigin: true,
pathRewrite: {
'^/gjjs/notice': '/gjjs/notice'
=======
}
},
'/gjjs/devtools/': {
target: 'http://127.0.0.1:8083',
changeOrigin: true,
pathRewrite: {
'^/gjjs/devtools': '/gjjs/devtools'
>>>>>>> e711bf965506eb41654c479eae2b7e633e370da4
}
},
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment