|
|
@@ -2,6 +2,7 @@ let app = new Vue({
|
|
|
el: '#app',
|
|
|
data () {
|
|
|
return {
|
|
|
+ env: 'prd',
|
|
|
fling: false, //水球光泽
|
|
|
centerOriginalConfig6: '',
|
|
|
rightAdd: {},// 左边新增筛选参数
|
|
|
@@ -109,7 +110,6 @@ let app = new Vue({
|
|
|
mounted () {
|
|
|
this.getUrlParams()
|
|
|
this.countYear()
|
|
|
- this.comeIn()
|
|
|
},
|
|
|
methods: {
|
|
|
// 获取地址栏参数
|
|
|
@@ -118,6 +118,7 @@ let app = new Vue({
|
|
|
// 通过 ? 分割获取后面的参数字符串
|
|
|
let urlStr = url.split('?')[1]
|
|
|
if (!urlStr) {
|
|
|
+ this.comeIn()
|
|
|
return
|
|
|
}
|
|
|
// 创建空对象存储参数
|
|
|
@@ -132,6 +133,8 @@ let app = new Vue({
|
|
|
if (obj.model) {
|
|
|
obj.model == 'A' || obj.model == 'a' ? this.mockData = false : this.mockData = true
|
|
|
}
|
|
|
+ obj.env && (this.env = obj.env)
|
|
|
+ this.comeIn()
|
|
|
},
|
|
|
// 计算展示的年份
|
|
|
countYear () {
|
|
|
@@ -231,42 +234,98 @@ let app = new Vue({
|
|
|
// 获取token
|
|
|
getAppToken () {
|
|
|
// dev环境
|
|
|
- // let value = {
|
|
|
- // "appId": "xilan1014", //系统编码
|
|
|
- // "appSecret": "12345678910Aa@Bb@Cc", //AccessToken加密认证密钥
|
|
|
- // "tenantid": "", //租户id
|
|
|
- // "accountId": "", //数据中心id
|
|
|
- // "language": "zh_CN"
|
|
|
- // }
|
|
|
- // SIT环境
|
|
|
- let value = {
|
|
|
- "appId": "68dp",
|
|
|
- "appSecret": "9ErhY^O{n?@Pc#eb7HYX",
|
|
|
- "tenantid": "",
|
|
|
- // "accountId": "1635498801198269440",
|
|
|
- "accountId": "1686324824621711360", // 新
|
|
|
- "language": "zh_CN"
|
|
|
+ if (this.env == 'sit' || this.env == 'SIT') {
|
|
|
+ // SIT环境
|
|
|
+ let value = {
|
|
|
+ "appId": "68dp",
|
|
|
+ "appSecret": "9ErhY^O{n?@Pc#eb7HYX",
|
|
|
+ "tenantid": "",
|
|
|
+ // "accountId": "1635498801198269440",
|
|
|
+ "accountId": "1686324824621711360", // 新
|
|
|
+ "language": "zh_CN"
|
|
|
+ }
|
|
|
+ post('/ierp/api/getAppToken.do', value).then(res => {
|
|
|
+ this.app_token = res.data.app_token
|
|
|
+ this.getAccessToken()
|
|
|
+ })
|
|
|
+ } else if (this.env == 'uat' || this.env == 'UAT') {
|
|
|
+ // UAT环境
|
|
|
+ let value = {
|
|
|
+ "appId": "68dp",
|
|
|
+ "appSecret": "9ErhY^O{n?@Pc#eb7HYX",
|
|
|
+ "tenantid": "",
|
|
|
+ // "accountId": "1635498801198269440",
|
|
|
+ "accountId": "1591303792463183872", // 新
|
|
|
+ "language": "zh_CN"
|
|
|
+ }
|
|
|
+ post('/ierp/api/getAppToken.do', value).then(res => {
|
|
|
+ this.app_token = res.data.app_token
|
|
|
+ this.getAccessToken()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ // prd环境
|
|
|
+ let value = {
|
|
|
+ "appId": "68dp",
|
|
|
+ "appSecret": "9ErhY^O{n?@Pc#eb7HYX",
|
|
|
+ "tenantid": "",
|
|
|
+ // "accountId": "1635498801198269440",
|
|
|
+ "accountId": "1591303792463183872", // 新
|
|
|
+ "language": "zh_CN"
|
|
|
+ }
|
|
|
+ post('/ierp/api/getAppToken.do', value).then(res => {
|
|
|
+ this.app_token = res.data.app_token
|
|
|
+ this.getAccessToken()
|
|
|
+ })
|
|
|
}
|
|
|
- post('/ierp/api/getAppToken.do', value).then(res => {
|
|
|
- this.app_token = res.data.app_token
|
|
|
- this.getAccessToken()
|
|
|
- })
|
|
|
},
|
|
|
// 获取AccessToken
|
|
|
getAccessToken () {
|
|
|
- let value = {
|
|
|
- // "user": "19900000001", //登录用户手机号
|
|
|
- "user": "15835113238", // 新
|
|
|
- "apptoken": this.app_token, //应用令牌
|
|
|
- "tenantid": "", //租户id
|
|
|
- // "accountId": "1635498801198269440",//数据中心id
|
|
|
- "accountId": "1686324824621711360",// 新
|
|
|
- "usertype": "Mobile"
|
|
|
+ if (this.env == 'sit' || this.env == 'SIT') {
|
|
|
+ // SIT环境
|
|
|
+ let value = {
|
|
|
+ // "user": "19900000001", //登录用户手机号
|
|
|
+ "user": "15835113238", // 新
|
|
|
+ "apptoken": this.app_token, //应用令牌
|
|
|
+ "tenantid": "", //租户id
|
|
|
+ // "accountId": "1635498801198269440",//数据中心id
|
|
|
+ "accountId": "1686324824621711360",// 新
|
|
|
+ "usertype": "Mobile"
|
|
|
+ }
|
|
|
+ post('/ierp/api/login.do', value).then(res => {
|
|
|
+ this.access_token = res.data.access_token
|
|
|
+ this.getOrg()
|
|
|
+ })
|
|
|
+ } else if (this.env == 'uat' || this.env == 'UAT') {
|
|
|
+ // UAT环境
|
|
|
+ let value = {
|
|
|
+ // "user": "19900000001", //登录用户手机号
|
|
|
+ "user": "15835113238", // 新
|
|
|
+ "apptoken": this.app_token, //应用令牌
|
|
|
+ "tenantid": "", //租户id
|
|
|
+ // "accountId": "1635498801198269440",//数据中心id
|
|
|
+ "accountId": "1591303792463183872",// 新
|
|
|
+ "usertype": "Mobile"
|
|
|
+ }
|
|
|
+ post('/ierp/api/login.do', value).then(res => {
|
|
|
+ this.access_token = res.data.access_token
|
|
|
+ this.getOrg()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ // PRD环境
|
|
|
+ let value = {
|
|
|
+ // "user": "19900000001", //登录用户手机号
|
|
|
+ "user": "15835113238", // 新
|
|
|
+ "apptoken": this.app_token, //应用令牌
|
|
|
+ "tenantid": "", //租户id
|
|
|
+ // "accountId": "1635498801198269440",//数据中心id
|
|
|
+ "accountId": "1591303792463183872",// 新
|
|
|
+ "usertype": "Mobile"
|
|
|
+ }
|
|
|
+ post('/ierp/api/login.do', value).then(res => {
|
|
|
+ this.access_token = res.data.access_token
|
|
|
+ this.getOrg()
|
|
|
+ })
|
|
|
}
|
|
|
- post('/ierp/api/login.do', value).then(res => {
|
|
|
- this.access_token = res.data.access_token
|
|
|
- this.getOrg()
|
|
|
- })
|
|
|
},
|
|
|
// 获取组织架构列表
|
|
|
getOrg () {
|
|
|
@@ -312,7 +371,6 @@ let app = new Vue({
|
|
|
pageSize: 1000
|
|
|
}
|
|
|
post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/tqqyedfx', value).then(res => {
|
|
|
- console.log(res.data.rows, '企业额度分析')
|
|
|
if (res.data.rows.length > 0) {
|
|
|
let dataList = res.data.rows[0].entryentity
|
|
|
left3 = [[], [], []]
|
|
|
@@ -379,7 +437,6 @@ let app = new Vue({
|
|
|
pageSize: 1000
|
|
|
}
|
|
|
post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/tqcebjfx', value).then(res => {
|
|
|
- console.log(res.data, '产业布局分析')
|
|
|
if (res.data.rows.length > 0) {
|
|
|
let dataList = this.classify(res.data.rows[0].mdnb_entryentity, 'mdnb_textfield1')
|
|
|
// 传统产业分析
|
|
|
@@ -905,7 +962,6 @@ let app = new Vue({
|
|
|
pageSize: 1000
|
|
|
}
|
|
|
post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/yjct', value).then(res => {
|
|
|
- console.log(res.data, '看看左边穿透')
|
|
|
if (res.data.rows.length > 0) {
|
|
|
if (typeNum == 2) {
|
|
|
common4 = []
|
|
|
@@ -2145,7 +2201,7 @@ let app = new Vue({
|
|
|
this.list[i].classList.remove('light')
|
|
|
}
|
|
|
}
|
|
|
- this.chartCarousel.dispose()
|
|
|
+ this.chartCarousel ? this.chartCarousel.dispose() : ''
|
|
|
this.initChartL9()
|
|
|
},
|
|
|
initChartBall () {
|
|
|
@@ -2155,7 +2211,7 @@ let app = new Vue({
|
|
|
{
|
|
|
type: "liquidFill",
|
|
|
radius: "80%",
|
|
|
- data: [left2[0], left2[0] + 0.02, left2[0] - 0.02],
|
|
|
+ data: [common2[0], common2[0] + 0.02, common2[0] - 0.02],
|
|
|
amplitude: '4%',
|
|
|
waveLength: '20%', //波浪长度
|
|
|
// data: [
|
|
|
@@ -2877,7 +2933,7 @@ let app = new Vue({
|
|
|
show: true,
|
|
|
trigger: "axis",
|
|
|
formatter: data => {
|
|
|
- return `${data[0].name}<br /><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${data[0].color.colorStops[0].color}"></span> ${data[0].seriesName}:${that.numFormat(data[0].value)}亿<br/><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${data[1].color.colorStops[0].color}"></span> ${data[1].seriesName}:${that.numFormat(data[1].value + data[0].value)}亿`
|
|
|
+ return `${data[0].name}<br /><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${data[0].color.colorStops[0].color}"></span> ${data[0].seriesName}:${that.numFormat(data[0].value)}亿<br/><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${data[1].color.colorStops[0].color}"></span> ${data[1].seriesName}:${that.numFormat(data[1].value)}亿`
|
|
|
},
|
|
|
axisPointer: {
|
|
|
// 坐标轴指示器,坐标轴触发有效
|
|
|
@@ -2956,12 +3012,13 @@ let app = new Vue({
|
|
|
name: "已用额度",
|
|
|
type: "bar",
|
|
|
data: left3[0],
|
|
|
- stack: 'Ad',
|
|
|
+ // stack: 'Ad',
|
|
|
showBackground: false,
|
|
|
backgroundStyle: {
|
|
|
color: "#18416F",
|
|
|
},
|
|
|
- barWidth: "20",
|
|
|
+
|
|
|
+ barWidth: "15",
|
|
|
itemStyle: {
|
|
|
// barBorderRadius: [10, 10, 0, 0],
|
|
|
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
|
|
@@ -2976,17 +3033,19 @@ let app = new Vue({
|
|
|
},
|
|
|
]),
|
|
|
},
|
|
|
+ zlevel: 1
|
|
|
},
|
|
|
{
|
|
|
name: "总额度",
|
|
|
type: "bar",
|
|
|
- data: left3[1],
|
|
|
- stack: 'Ad',
|
|
|
+ data: left3[2],
|
|
|
+ // stack: 'Ad',
|
|
|
+ barGap: '-130%',
|
|
|
showBackground: false,
|
|
|
backgroundStyle: {
|
|
|
color: "#18416F",
|
|
|
},
|
|
|
- barWidth: "20",
|
|
|
+ barWidth: "25",
|
|
|
itemStyle: {
|
|
|
// barBorderRadius: [10, 10, 0, 0],
|
|
|
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
|
|
@@ -3038,6 +3097,7 @@ let app = new Vue({
|
|
|
common1[5] = findData.mdnb_amountfield25
|
|
|
common2[0] = findData.mdnb_decimalfield6
|
|
|
}
|
|
|
+ console.log(common2[0], '看看百分比')
|
|
|
setTimeout(() => {
|
|
|
that.initChartBall()
|
|
|
});
|