f6aed480 by zhangmeng

中间部分

1 parent 51762012
import request from '@/utils/request'
/**
* 营业收入
* @returns {*}
*/
export function getYS001() {
return request({
method: 'post',
data: {
'INTERFACEID': 'YS001',
'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77'
}
})
}
/**
* 应收余额
* @returns {*}
*/
export function getYS002() {
return request({
method: 'post',
data: {
'INTERFACEID': 'YS002',
'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77'
}
})
}
/**
* 现金余额
* @returns {*}
*/
export function getYS003() {
return request({
method: 'post',
data: {
'INTERFACEID': 'YS003',
'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77'
}
})
}
/**
* DSO天数
* @returns {*}
*/
export function getYS004() {
return request({
method: 'post',
data: {
'INTERFACEID': 'YS004',
'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77'
}
})
}
/**
* (五)董事会得分、领导重点关注
* @returns {*}
*/
export function getYS005() {
return request({
method: 'post',
data: {
'INTERFACEID': 'YS005',
'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77'
}
})
}
import { ElMessage, ElMessageBox, ElNotification, ElLoading } from 'element-plus'
import {ElMessage, ElMessageBox, ElNotification, ElLoading} from 'element-plus'
import {useStorage} from "@vueuse/core/index";
const language= useStorage('language',0)
const language = useStorage('language', 0)
let loadingInstance
export default {
......@@ -23,19 +23,19 @@ export default {
},
// 弹出提示
alert(content) {
return ElMessageBox.alert(content, language.value==0 ? language.value==0 ? '系统提示' :'Tips' :'Tips')
return ElMessageBox.alert(content, language.value == 0 ? language.value == 0 ? '系统提示' : 'Tips' : 'Tips')
},
// 错误提示
alertError(content) {
return ElMessageBox.alert(content, language.value==0 ? language.value==0 ? '系统提示' :'Tips' :'Tips', { type: 'error' })
return ElMessageBox.alert(content, language.value == 0 ? language.value == 0 ? '系统提示' : 'Tips' : 'Tips', {type: 'error'})
},
// 成功提示
alertSuccess(content) {
return ElMessageBox.alert(content, language.value==0 ? '系统提示' :'Tips', { type: 'success' })
return ElMessageBox.alert(content, language.value == 0 ? '系统提示' : 'Tips', {type: 'success'})
},
// 警告提示
alertWarning(content) {
return ElMessageBox.alert(content, language.value==0 ? '系统提示' :'Tips', { type: 'warning' })
return ElMessageBox.alert(content, language.value == 0 ? '系统提示' : 'Tips', {type: 'warning'})
},
// 通知提示
notify(content) {
......@@ -55,17 +55,17 @@ export default {
},
// 确认窗体
confirm(content) {
return ElMessageBox.confirm(content, language.value==0 ? '系统提示' :'Tips', {
confirmButtonText: language.value==0 ? '确定' :'OK',
cancelButtonText: language.value==0 ? '取消' :'Cancel',
return ElMessageBox.confirm(content, language.value == 0 ? '系统提示' : 'Tips', {
confirmButtonText: language.value == 0 ? '确定' : 'OK',
cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
type: 'warning'
})
},
// 提交内容
prompt(content) {
return ElMessageBox.prompt(content, language.value==0 ? '系统提示' :'Tips', {
confirmButtonText: language.value==0 ? '确定' :'OK',
cancelButtonText: language.value==0 ? '取消' :'Cancel',
return ElMessageBox.prompt(content, language.value == 0 ? '系统提示' : 'Tips', {
confirmButtonText: language.value == 0 ? '确定' : 'OK',
cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
type: 'warning'
})
},
......@@ -79,6 +79,6 @@ export default {
},
// 关闭遮罩层
closeLoading() {
loadingInstance.close()
loadingInstance?.close()
}
}
......
......@@ -110,26 +110,28 @@ NProgress.configure({showSpinner: false})
router.beforeEach((to, from, next) => {
NProgress.start()
if (getToken()) {
// 判断当前用户是否已拉取完user_info信息
if (!useUserStore().user) {
isRelogin.show = true
useUserStore().getInfo().then(() => {
isRelogin.show = false
next() // hack方法 确保addRoutes已完成
}).catch(err => {
useUserStore().logOut().then(() => {
ElMessage.error(err)
next({path: '/'})
})
})
} else {
next()
}
} else {
// 没有token
next()
}
// if (getToken()) {
// // 判断当前用户是否已拉取完user_info信息
// if (!useUserStore().user) {
//
// isRelogin.show = true
// useUserStore().getInfo().then(() => {
// isRelogin.show = false
// next() // hack方法 确保addRoutes已完成
// }).catch(err => {
// useUserStore().logOut().then(() => {
// ElMessage.error(err)
// next({path: '/'})
// })
// })
// } else {
// next()
// }
// } else {
// // 没有token
// next()
// }
})
router.afterEach((to) => {
......
......@@ -5,25 +5,20 @@ import {
ElMessage,
ElLoading
} from 'element-plus'
import { getToken } from '@/utils/auth'
import {getToken} from '@/utils/auth'
import errorCode from '@/utils/errorCode'
import { tansParams, blobValidate } from '@/utils/ruoyi'
import {tansParams, blobValidate} from '@/utils/ruoyi'
import cache from '@/plugins/cache'
import modal from '@/plugins/modal'
import { saveAs } from 'file-saver'
import useUserStore from '@/store/modules/user'
import { sendNotification } from '@/assets/lib/extend'
import _ from 'lodash'
// const language = cache.local.get('language') || 0
import {useStorage} from "@vueuse/core/index";
const language= useStorage('language',0)
import {saveAs} from 'file-saver'
import {sendNotification} from '@/assets/lib/extend'
let downloadLoadingInstance
// 是否显示重新登录
export const isRelogin = { show: false }
export const isRelogin = {show: false}
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 对应国际化资源文件后缀
axios.defaults.headers['Content-Language'] = (language.value==0? 'zh_CN':'en_US' )
// 创建axios实例
const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
......@@ -32,15 +27,12 @@ const service = axios.create({
timeout: 0
})
const otherWeb = ['ztx-match/', 'ztx-webSite/', 'ztx-train/']
const excludeUrl = ['system/remindCount/getCounts']
const noModal = ['person/info/extractInfo']
// request拦截器
service.interceptors.request.use(
(config) => {
if (config.method.toLowerCase() !== 'get' && !_.some(noModal, (m) => config.url.indexOf(m) > -1)) {
modal.loading()
if (!config.url) {
config.url = '/portal/r/jd?cmd=com.dr.coslexpro.cwys.unifiedInterface'
}
// 是否需要设置 token
......@@ -50,9 +42,6 @@ service.interceptors.request.use(
if (getToken() && !isToken) {
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
}
if (_.some(otherWeb, (w) => config.url.indexOf(w) > -1)) {
config.headers['Ztx-Per-Id'] = useUserStore().perId || -1
}
// get请求映射params参数
if (config.method === 'get') {
......@@ -93,20 +82,21 @@ service.interceptors.request.use(
const s_data = sessionObj.data // 请求数据
const s_time = sessionObj.time // 请求时间
const interval = 1000 // 间隔时间(ms),小于此时间视为重复提交
if (
s_data === requestObj.data &&
requestObj.time - s_time < interval &&
s_url === requestObj.url
) {
const message = '数据正在处理,请勿重复提交'
console.warn(`[${s_url}]: ` + message)
modal.closeLoading()
return Promise.reject(new Error(message))
} else {
// if (
// s_data === requestObj.data &&
// requestObj.time - s_time < interval &&
// s_url === requestObj.url
// ) {
// const message = '数据正在处理,请勿重复提交'
// console.warn(`[${s_url}]: ` + message)
// modal.closeLoading()
// return Promise.reject(new Error(message))
// } else {
// cache.session.setJSON('sessionObj', requestObj)
// }
cache.session.setJSON('sessionObj', requestObj)
}
}
}
return config
},
(error) => {
......@@ -119,11 +109,8 @@ service.interceptors.request.use(
// 响应拦截器
service.interceptors.response.use(
(res) => {
if (res.config.method.toLowerCase() !== 'get' && !_.some(noModal, (m) => res.config.url.indexOf(m) > -1)) {
modal.closeLoading()
}
// 未设置状态码则默认成功状态
const code = res.data.code || 200
const code = res.code || 200
// 获取错误信息
const msg = errorCode[code] || res.data.msg
// const msg = errorCode[code] || res.data.msg || errorCode['default']
......@@ -137,9 +124,6 @@ service.interceptors.response.use(
return res
}
if (_.some(excludeUrl, (m) => res.config.url.indexOf(m) > -1)) {
return Promise.resolve(res.data)
}
if (code === 401) {
if (!isRelogin.show) {
isRelogin.show = true
......@@ -167,16 +151,16 @@ service.interceptors.response.use(
}
return Promise.reject('会话已过期,请重新登录。')
} else if (code === 500) {
if(msg){
ElMessage({ message: msg, type: 'error' })
sendNotification('错误提示', { body: msg })
if (msg) {
ElMessage({message: msg, type: 'error'})
sendNotification('错误提示', {body: msg})
}
return Promise.reject(new Error(msg))
} else if (code === 601) {
ElMessage({ message: msg, type: 'warning' })
ElMessage({message: msg, type: 'warning'})
return Promise.reject(new Error(msg))
} else if (code !== 200) {
ElNotification.error({ title: msg })
ElNotification.error({title: msg})
return Promise.reject('error')
} else {
return Promise.resolve(res.data)
......@@ -184,7 +168,7 @@ service.interceptors.response.use(
},
(error) => {
console.log('err' + error)
let { message } = error
let {message} = error
if (message === 'Network Error') {
message = '后端接口连接异常'
} else if (message.includes('timeout')) {
......@@ -192,8 +176,8 @@ service.interceptors.response.use(
} else if (message.includes('Request failed with status code')) {
message = '系统接口' + message.substr(message.length - 3) + '异常'
}
ElMessage({ message: message, type: 'error', duration: 5 * 1000 })
sendNotification('错误提示', { body: message })
ElMessage({message: message, type: 'error', duration: 5 * 1000})
sendNotification('错误提示', {body: message})
modal.closeLoading()
return Promise.reject(error)
}
......@@ -212,11 +196,11 @@ export function download(url, params, filename, config) {
return tansParams(params)
}
],
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
responseType: 'blob',
...config
})
.then(async(res) => {
.then(async (res) => {
const data = res.data
const isBlob = blobValidate(data)
if (isBlob) {
......
......@@ -3,8 +3,8 @@
<div ref="textRef" class="top">
<div class="left">
<div class="titleTop">董事会得分</div>
<div class="titleCenter">预计得分 <span class="tex1">5</span></div>
<div class="titleCenter">标准得分 <span class="tex2">10</span>
<div class="titleCenter">预计得分 <span class="tex1">{{ form.YJSCORE }}</span></div>
<div class="titleCenter">标准得分 <span class="tex2">{{ form.STANDARDSCORE }}</span>
</div>
</div>
<div class="right">
......@@ -13,7 +13,7 @@
<div><img alt="" class="rTop-img" src="@/assets/image/more@2x.png"></div>
</div>
<div class="rBotton">
<ScrollingData :data="dataItems" speed="1"/>
<ScrollingData :data="form.leaderinfo" speed="1"/>
</div>
</div>
</div>
......@@ -29,7 +29,7 @@
<div ref="bing1" style="width: 100%;height:13vh;">
</div>
<div class="bingBottom">
<div>2025年营业收入</div>
<div>{{ activeName1 }}年营业收入</div>
<div>(万元)</div>
</div>
</div>
......@@ -48,7 +48,7 @@
<div ref="bing2" style="width: 100%;height:13vh;">
</div>
<div class="bingBottom">
<div>2025年3月前 累计应收余额</div>
<div>{{ `${dayjs().format('YYYY')}年${dayjs().format('MM')}月` }}累计应收余额</div>
<div>(万元)</div>
</div>
</div>
......@@ -67,7 +67,7 @@
<div ref="bing3" style="width: 100%;height:13vh;">
</div>
<div class="bingBottom">
<div>2025年3月前 累计现金余额</div>
<div>{{ `${dayjs().format('YYYY')}年${dayjs().format('MM')}月` }}前累计应收余额</div>
<div>(万元)</div>
</div>
</div>
......@@ -84,7 +84,6 @@
</div>
</div>
</div>
</div>
......@@ -92,28 +91,15 @@
<script setup>
import {autoToolTip} from "@/plugins/auto-toolTip";
import ScrollingData from './scrollingData .vue'
import ScrollingData from './scrollingData.vue'
import * as echarts from "echarts";
import * as api from "@/apiPc/common"
import {onMounted, ref} from 'vue'
import {dayjs} from 'element-plus'
import {getYS001, getYS002, getYS003, getYS004, getYS005} from '@/api/server.js'
const dataItems = ref([
'数据项 1: 当前值 256',
'数据项 2: 当前值 189',
'数据项 3: 当前值 342',
'数据项 4: 当前值 127',
'数据项 5: 当前值 298',
'数据项 6: 当前值 431',
'数据项 7: 当前值 156',
'数据项 8: 当前值 321',
'数据项 9: 当前值 456',
'数据项 10: 当前值 234',
'数据项 11: 当前值 321',
'数据项 12: 当前值 456',
'数据项 13: 当前值 234',
'数据项 14: 当前值 321',
]);
const dataItems = ref([]);
const zhuRef1 = ref(null)
const zhuRef2 = ref(null)
const zhuRef3 = ref(null)
......@@ -122,6 +108,15 @@ const bing1 = ref(null)
const bing2 = ref(null)
const bing3 = ref(null)
const textRef = ref(null)
const form = ref({})
const resYear1 = ref()
const resYear2 = ref()
const resYear3 = ref()
const activeName1 = ref()
const activeName2 = ref()
const activeName3 = ref()
let chart1
let chart11
......@@ -139,15 +134,57 @@ let intervalA = null
onMounted(() => {
// init()
window.addEventListener('resize', handleResize);
handelBing1()
handelZhu1()
handelBing2()
handelZhu2()
handelBing3()
handelZhu3()
handelZhu4()
// handelBing1()
// handelZhu1()
handelGetYS001()
handelGetYS002()
handelGetYS003()
handelGetYS004()
handelGetYS005()
// handelBing2()
// handelZhu2()
// handelBing3()
// handelZhu3()
// handelZhu4()
})
async function handelGetYS001() {
const res = await getYS001()
resYear1.value = res.data.yeargroup
handelBing1(res.data.yeargroup[0], res.data.yeargroup[1])
handelZhu1(res.data.yeargroup[0], res.data.yeargroup[1])
activeName1.value = res.data.yeargroup[1].YEAR
}
async function handelGetYS002() {
const res = await getYS002()
resYear2.value = res.data.yeargroup
handelBing2(res.data.yeargroup[0], res.data.yeargroup[1])
handelZhu2(res.data.yeargroup[0], res.data.yeargroup[1])
activeName2.value = res.data.yeargroup[1].YEAR
}
async function handelGetYS003() {
const res = await getYS003()
resYear3.value = res.data.yeargroup
handelBing3(res.data.yeargroup[0], res.data.yeargroup[1])
handelZhu3(res.data.yeargroup[0], res.data.yeargroup[1])
activeName3.value = res.data.yeargroup[1].YEAR
}
async function handelGetYS004() {
const res = await getYS004()
handelZhu4(res.data.blockgroup[0], res.data.blockgroup[1])
}
async function handelGetYS005() {
const res = await getYS005()
form.value = res.data
console.log(res)
}
const init = () => {
if (!intervalA) {
......@@ -176,7 +213,7 @@ function handleResize() {
chart44?.resize()
}
const handelBing1 = () => {
const handelBing1 = (arr1, arr2) => {
chart1 = echarts.init(bing1.value)
const option = {
tooltip: {
......@@ -185,7 +222,7 @@ const handelBing1 = () => {
series: [
{
name: '1',
name: '',
type: 'pie',
radius: ['99%', '100%'],
center: ['50%', '60%'],
......@@ -199,9 +236,9 @@ const handelBing1 = () => {
startAngle: 180,
endAngle: 360,
data: [
{value: 48, name: '1'},
{value: 1, name: '1'},
{value: 48, name: '1'}
{value: 48},
{value: 1},
{value: 48}
],
itemStyle: {
color: 'rgba(1, 162, 237, 1)',
......@@ -209,7 +246,7 @@ const handelBing1 = () => {
barWidth: 2
},
{
name: '2',
name: arr1.YEAR,
type: 'pie',
radius: ['75%', '95%'],
center: ['50%', '60%'],
......@@ -223,15 +260,15 @@ const handelBing1 = () => {
scale: false
},
data: [
{value: 735, name: 'Direct', itemStyle: {color: "rgb(255,217,0)"}},
{value: 1048, name: 'Search Engine'},
{value: arr1.TOTAL, name: '营业收入', itemStyle: {color: "rgb(255,217,0)"}},
{value: arr1.TOTAL ? arr1.TOTAL * 2 : 1, name: '营业收入'},
],
itemStyle: {
color: 'rgba(1, 162, 237, .3)',
},
},
{
name: '3',
name: arr2.YEAR,
type: 'pie',
radius: ['55%', '70%'],
center: ['50%', '60%'],
......@@ -247,8 +284,8 @@ const handelBing1 = () => {
startAngle: 180,
endAngle: 360,
data: [
{value: 1048, name: '2025', itemStyle: {color: "rgba(240, 255, 0, .5)"}},
{value: 735, name: '2025'}
{value: arr2.TOTAL, name: '', itemStyle: {color: "rgba(240, 255, 0, .5)"}},
{value: arr2.TOTAL ? arr2.TOTAL * 2 : 1, name: (arr2.TOTAL / 10000).toFixed(0) + 'W'}
],
itemStyle: {
color: 'rgba(1, 162, 237, .3)',
......@@ -286,7 +323,7 @@ const handelBing1 = () => {
chart1.setOption(option)
autoHover(chart1, option, 3, 2000)
}
const handelBing2 = () => {
const handelBing2 = (row1, row2) => {
chart2 = echarts.init(bing2.value)
const option = {
tooltip: {
......@@ -318,7 +355,7 @@ const handelBing2 = () => {
barWidth: 2
},
{
name: '2',
name: row2.YEAR,
type: 'pie',
radius: ['75%', '95%'],
center: ['50%', '60%'],
......@@ -332,8 +369,8 @@ const handelBing2 = () => {
scale: false
},
data: [
{value: 1048, name: 'Search Engine', itemStyle: {color: "rgba(0, 255, 190,1)"}},
{value: 735, name: 'Direct'}
{value: row1.TOTAL, name: (row1.TOTAL / 10000).toFixed(0) + 'W', itemStyle: {color: "rgba(0, 255, 190,1)"}},
{value: row2.TOTAL, name: (row2.TOTAL / 10000).toFixed(0) + 'W'}
],
itemStyle: {
color: 'rgba(1, 162, 237, .5)',
......@@ -356,7 +393,7 @@ const handelBing2 = () => {
startAngle: 180,
endAngle: 360,
data: [
{value: 1048, name: '2025'},
{value: 1048,},
],
itemStyle: {
color: {
......@@ -375,7 +412,7 @@ const handelBing2 = () => {
chart2.setOption(option)
autoHover(chart2, option, 2, 2000)
}
const handelBing3 = () => {
const handelBing3 = (row1, row2) => {
chart3 = echarts.init(bing3.value)
const option = {
tooltip: {
......@@ -421,7 +458,7 @@ const handelBing3 = () => {
},
data: [
{
value: 1048, name: 'Search Engine',
value: row2.TOTAL, name: row2.YEAR,
itemStyle: {
color: {
type: 'linear',
......@@ -433,7 +470,7 @@ const handelBing3 = () => {
}
}
},
{value: 735, name: 'Direct'}
{value: row1.TOTAL, name: row1.YEAR}
],
itemStyle: {
color: 'rgba(1, 162, 237, .3)',
......@@ -456,7 +493,7 @@ const handelBing3 = () => {
startAngle: 180,
endAngle: 360,
data: [
{value: 1048, name: '2025'},
{value: 1048, name: ''},
],
itemStyle: {
color: {
......@@ -473,17 +510,18 @@ const handelBing3 = () => {
}
chart3.setOption(option)
autoHover(chart3, option, 2, 2000)
autoHover(chart3, option, 0, 2000)
}
const handelZhu1 = () => {
const handelZhu1 = (row1, row2) => {
chart11 = echarts.init(zhuRef1.value)
const option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
// formatter: '{a0},{b0},{c}W <br /> {a1},{b1},{c1}W '
},
legend: {
top: '0',
......@@ -492,6 +530,7 @@ const handelZhu1 = () => {
},
},
grid: {
top: '25%',
left: '0%',
right: '0%',
bottom: '1%',
......@@ -527,13 +566,15 @@ const handelZhu1 = () => {
],
series: [
{
name: '2025年',
name: row1.YEAR,
type: 'bar',
barGap: 0,
emphasis: {
focus: 'series'
},
data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290,],
data: row1.list.map(val => {
return (val.SRJE / 10000).toFixed(2)
}),
itemStyle: {
color: {
type: 'linear',
......@@ -550,12 +591,14 @@ const handelZhu1 = () => {
borderColor: 'rgba(240, 255, 0, 1)'
},
{
name: '2024年',
name: row2.YEAR,
type: 'bar',
emphasis: {
focus: 'series'
},
data: [150, 232, 201, 154, 190, 330, 410, 201, 154, 190, 330, 410],
data: row2.list.map(val => {
return (val.SRJE / 10000).toFixed(2)
}),
itemStyle: {
color: {
type: 'linear',
......@@ -575,7 +618,7 @@ const handelZhu1 = () => {
chart11.setOption(option)
autoHover(chart11, option, 0, 2000)
}
const handelZhu2 = () => {
const handelZhu2 = (row1, row2) => {
chart22 = echarts.init(zhuRef2.value)
const option = {
tooltip: {
......@@ -591,6 +634,7 @@ const handelZhu2 = () => {
},
},
grid: {
top: "25%",
left: '3%',
right: '4%',
bottom: '3%',
......@@ -626,13 +670,16 @@ const handelZhu2 = () => {
],
series: [
{
name: '2025年',
name: row1.YEAR,
type: 'bar',
barGap: 0,
emphasis: {
focus: 'series'
},
data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290,],
// data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290,],
data: row1.list.map(val => {
return (val.YSCOST / 10000).toFixed(2)
}),
itemStyle: {
color: {
type: 'linear',
......@@ -648,12 +695,15 @@ const handelZhu2 = () => {
barWidth: '35%',
},
{
name: '2024年',
name: row2.YEAR,
type: 'bar',
emphasis: {
focus: 'series'
},
data: [150, 232, 201, 154, 190, 330, 410, 201, 154, 190, 330, 410],
// data: [150, 232, 201, 154, 190, 330, 410, 201, 154, 190, 330, 410],
data: row2.list.map(val => {
return (val.YSCOST / 10000).toFixed(2)
}),
itemStyle: {
color: {
type: 'linear',
......@@ -673,7 +723,9 @@ const handelZhu2 = () => {
chart22.setOption(option)
autoHover(chart22, option, 0, 2000)
}
const handelZhu3 = () => {
const handelZhu3 = (row1, row2) => {
let name1 = row1.YEAR + '年'
let name2 = row2.YEAR + '年'
chart33 = echarts.init(zhuRef3.value)
const option = {
color: ['#80FFA5', '#00DDFF', '#37A2FF', '#FF0087', '#FFBF00'],
......@@ -727,6 +779,7 @@ const handelZhu3 = () => {
yAxis: [
{
type: 'value',
name: '单位(万)',
axisLine: {
show: true,
lineStyle: {
......@@ -739,7 +792,7 @@ const handelZhu3 = () => {
],
series: [
{
name: '2024年',
name: name1,
type: 'line',
stack: 'Total',
smooth: false,
......@@ -763,10 +816,13 @@ const handelZhu3 = () => {
emphasis: {
focus: 'series'
},
data: [140, 232, 301, 264, 200, 340, 250, 301, 264, 200, 340, 250]
// data: [140, 232, 301, 264, 200, 340, 250, 301, 264, 200, 340, 250]
data: row1.list.map(val => {
return (val.XJCOST / 10000).toFixed(0)
})
},
{
name: '2025年',
name: name2,
type: 'line',
stack: 'Total',
smooth: false,
......@@ -790,14 +846,37 @@ const handelZhu3 = () => {
emphasis: {
focus: 'series'
},
data: [120, 282, 211, 234, 220, 340, 310, 120, 282, 211, 234, 220]
// data: [120, 282, 211, 234, 220, 340, 310, 120, 282, 211, 234, 220]
data: row2.list.map(val => {
return (val.XJCOST / 10000).toFixed(0)
})
},
]
}
chart33.setOption(option)
autoHover(chart33, option, 0, 2000)
}
const handelZhu4 = () => {
const handelZhu4 = (row1, row2) => {
let name1 = row1.BLOCK
let name2 = row2.BLOCK
let x1 = row1.list.forEach(val => val.type = 1) || []
let x2 = row2.list.forEach(val => val.type = 2) || []
let list = [...x1, ...x2].map(val => val.BASE)
let listX = []
let listL = []
let listH = []
for (const val of list) {
listX.push(val.BASE)
if (val.type == 1) {
listL.push(val.DSO)
listH.push(0)
} else {
listL.push(0)
listH.push(val.DSO)
}
}
chart44 = echarts.init(zhuRef4.value)
const option = {
tooltip: {
......@@ -821,7 +900,8 @@ const handelZhu4 = () => {
{
type: 'category',
stack: 'Ad',
data: ['山西', '陕西', '新疆', '伊拉克', '塘沽', '深圳', '湛江', '汉南', '上海'],
// data: ['山西', '陕西', '新疆', '伊拉克', '塘沽', '深圳', '湛江', '汉南', '上海'],
data: listX,
axisLine: {
show: true,
lineStyle: {
......@@ -835,7 +915,7 @@ const handelZhu4 = () => {
yAxis: [
{
type: 'value',
name: '金额(万元)',
name: '',
axisLine: {
show: true,
lineStyle: {
......@@ -848,13 +928,14 @@ const handelZhu4 = () => {
],
series: [
{
name: '海陆',
name: name1,
type: 'bar',
stack: 'Ad',
barGap: 0,
emphasis: {
focus: 'series'
},
data: [320, 332, 301, 334, 390, 330, 320, 320, 332, 301, 334, 390],
// data: [320, 332, 301, 334, 390, 330, 320, 320, 332, 301, 334, 390],
data: listL,
itemStyle: {
color: {
type: 'linear',
......@@ -867,7 +948,30 @@ const handelZhu4 = () => {
borderColor: 'rgba(0, 255, 190, 1)',
borderWidth: 1
},
barWidth: '35%',
barWidth: '30%',
},
{
name: name2,
type: 'bar',
barGap: 0,
emphasis: {
focus: 'series'
},
// data: [30, 332, 301, 334, 390, 330, 320, 320, 332, 301, 334, 390],
data: listH,
itemStyle: {
color: {
type: 'linear',
x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变
colorStops: [
{offset: 0, color: 'rgba(0, 168, 255, 1)'}, // 顶部颜色
{offset: 1, color: 'rgba(77, 197, 243, 1)'} // 底部颜色
]
},
borderColor: 'rgba(0, 168, 255, .5)',
borderWidth: 1
},
barWidth: '30%',
},
]
}
......
import { defineConfig, loadEnv } from 'vite'
import path, { resolve } from 'path'
import {defineConfig, loadEnv} from 'vite'
import path, {resolve} from 'path'
import createVitePlugins from './vite/plugins'
import inject from '@rollup/plugin-inject'
import commonjs from '@rollup/plugin-commonjs'
// import legacy from '@vitejs/plugin-legacy'
// https://vitejs.dev/config/
export default defineConfig(({ mode, command }) => {
export default defineConfig(({mode, command}) => {
const env = loadEnv(mode, process.cwd())
return {
// 部署生产环境和开发环境下的URL。
......@@ -20,32 +18,8 @@ export default defineConfig(({ mode, command }) => {
'window.katex': 'katex',
'window.Quill': ['@vueup/vue-quill', 'Quill']
})
// legacy({
// targets: ['defaults', 'not IE 11'], // 需要兼容的目标列表,可以设置多个
// additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
// renderLegacyChunks: true,
// polyfills: [
// 'es.symbol',
// 'es.array.filter',
// 'es.promise',
// 'es.promise.finally',
// 'es/map',
// 'es/set',
// 'es.array.for-each',
// 'es.object.define-properties',
// 'es.object.define-property',
// 'es.object.get-own-property-descriptor',
// 'es.object.get-own-property-descriptors',
// 'es.object.keys',
// 'es.object.to-string',
// 'web.dom-collections.for-each',
// 'esnext.global-this',
// 'esnext.string.match-all'
// ]
// })
],
resolve: {
// https://cn.vitejs.dev/config/#resolve-alias
alias: {
// 设置路径
'~': path.resolve(__dirname, './'),
......@@ -62,41 +36,14 @@ export default defineConfig(({ mode, command }) => {
host: true,
open: true,
proxy: {
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api/ztx-train': {
// target: 'http://123.60.96.243:1896/stage-api',
target: 'https://jijin.wtwuxicenter.com/stage-api',
'/dev-api/portal': {
// target: 'http://116.63.185.147:8088',
target: 'https://ff9451fo0879.vicp.fun',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api\/ztx-train/, '')
},
'/dev-api/ztx-match': {
// target: 'http://192.168.1.118:8083',
target: 'https://jijin.wtwuxicenter.com/stage-api',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api\/ztx-match/, '')
},
'/dev-api/ztx-webSite': {
target: 'https://wdsfwuxicenter.com/stage-api/',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '')
},
'/dev-api': {
// target: 'http://192.168.1.207:5511/',
target: 'https://jijin.wtwuxicenter.com/stage-api',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
},
'/ticket': {
// target: 'http://192.168.1.131:8098/',
// target: 'http://192.168.1.131:8081/',
target: 'https://jijin.wtwuxicenter.com/h5/',
// target: 'https://ticketh5.wdsfwuxicenter.com/h5/',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/ticket/, '')
rewrite: (p) => p.replace(/^\/dev-api\/portal/, '')
}
}
},
// fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file
css: {
postcss: {
plugins: [
......@@ -114,7 +61,6 @@ export default defineConfig(({ mode, command }) => {
}
},
build: {
// target: 'es2015',
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html')
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!