中间部分
Showing
7 changed files
with
323 additions
and
216 deletions
src/api/server.js.js
0 → 100644
| 1 | import request from '@/utils/request' | ||
| 2 | |||
| 3 | /** | ||
| 4 | * 营业收入 | ||
| 5 | * @returns {*} | ||
| 6 | */ | ||
| 7 | export function getYS001() { | ||
| 8 | return request({ | ||
| 9 | method: 'post', | ||
| 10 | data: { | ||
| 11 | 'INTERFACEID': 'YS001', | ||
| 12 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | ||
| 13 | } | ||
| 14 | }) | ||
| 15 | } | ||
| 16 | |||
| 17 | /** | ||
| 18 | * 应收余额 | ||
| 19 | * @returns {*} | ||
| 20 | */ | ||
| 21 | export function getYS002() { | ||
| 22 | return request({ | ||
| 23 | method: 'post', | ||
| 24 | data: { | ||
| 25 | 'INTERFACEID': 'YS002', | ||
| 26 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | ||
| 27 | } | ||
| 28 | }) | ||
| 29 | } | ||
| 30 | |||
| 31 | /** | ||
| 32 | * 现金余额 | ||
| 33 | * @returns {*} | ||
| 34 | */ | ||
| 35 | export function getYS003() { | ||
| 36 | return request({ | ||
| 37 | method: 'post', | ||
| 38 | data: { | ||
| 39 | 'INTERFACEID': 'YS003', | ||
| 40 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | ||
| 41 | } | ||
| 42 | }) | ||
| 43 | } | ||
| 44 | |||
| 45 | /** | ||
| 46 | * DSO天数 | ||
| 47 | * @returns {*} | ||
| 48 | */ | ||
| 49 | export function getYS004() { | ||
| 50 | return request({ | ||
| 51 | method: 'post', | ||
| 52 | data: { | ||
| 53 | 'INTERFACEID': 'YS004', | ||
| 54 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | ||
| 55 | } | ||
| 56 | }) | ||
| 57 | } | ||
| 58 | |||
| 59 | /** | ||
| 60 | * (五)董事会得分、领导重点关注 | ||
| 61 | * @returns {*} | ||
| 62 | */ | ||
| 63 | export function getYS005() { | ||
| 64 | return request({ | ||
| 65 | method: 'post', | ||
| 66 | data: { | ||
| 67 | 'INTERFACEID': 'YS005', | ||
| 68 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | ||
| 69 | } | ||
| 70 | }) | ||
| 71 | } |
| 1 | import { ElMessage, ElMessageBox, ElNotification, ElLoading } from 'element-plus' | 1 | import {ElMessage, ElMessageBox, ElNotification, ElLoading} from 'element-plus' |
| 2 | import {useStorage} from "@vueuse/core/index"; | 2 | import {useStorage} from "@vueuse/core/index"; |
| 3 | 3 | ||
| 4 | const language= useStorage('language',0) | 4 | const language = useStorage('language', 0) |
| 5 | let loadingInstance | 5 | let loadingInstance |
| 6 | 6 | ||
| 7 | export default { | 7 | export default { |
| ... | @@ -23,19 +23,19 @@ export default { | ... | @@ -23,19 +23,19 @@ export default { |
| 23 | }, | 23 | }, |
| 24 | // 弹出提示 | 24 | // 弹出提示 |
| 25 | alert(content) { | 25 | alert(content) { |
| 26 | return ElMessageBox.alert(content, language.value==0 ? language.value==0 ? '系统提示' :'Tips' :'Tips') | 26 | return ElMessageBox.alert(content, language.value == 0 ? language.value == 0 ? '系统提示' : 'Tips' : 'Tips') |
| 27 | }, | 27 | }, |
| 28 | // 错误提示 | 28 | // 错误提示 |
| 29 | alertError(content) { | 29 | alertError(content) { |
| 30 | return ElMessageBox.alert(content, language.value==0 ? language.value==0 ? '系统提示' :'Tips' :'Tips', { type: 'error' }) | 30 | return ElMessageBox.alert(content, language.value == 0 ? language.value == 0 ? '系统提示' : 'Tips' : 'Tips', {type: 'error'}) |
| 31 | }, | 31 | }, |
| 32 | // 成功提示 | 32 | // 成功提示 |
| 33 | alertSuccess(content) { | 33 | alertSuccess(content) { |
| 34 | return ElMessageBox.alert(content, language.value==0 ? '系统提示' :'Tips', { type: 'success' }) | 34 | return ElMessageBox.alert(content, language.value == 0 ? '系统提示' : 'Tips', {type: 'success'}) |
| 35 | }, | 35 | }, |
| 36 | // 警告提示 | 36 | // 警告提示 |
| 37 | alertWarning(content) { | 37 | alertWarning(content) { |
| 38 | return ElMessageBox.alert(content, language.value==0 ? '系统提示' :'Tips', { type: 'warning' }) | 38 | return ElMessageBox.alert(content, language.value == 0 ? '系统提示' : 'Tips', {type: 'warning'}) |
| 39 | }, | 39 | }, |
| 40 | // 通知提示 | 40 | // 通知提示 |
| 41 | notify(content) { | 41 | notify(content) { |
| ... | @@ -55,17 +55,17 @@ export default { | ... | @@ -55,17 +55,17 @@ export default { |
| 55 | }, | 55 | }, |
| 56 | // 确认窗体 | 56 | // 确认窗体 |
| 57 | confirm(content) { | 57 | confirm(content) { |
| 58 | return ElMessageBox.confirm(content, language.value==0 ? '系统提示' :'Tips', { | 58 | return ElMessageBox.confirm(content, language.value == 0 ? '系统提示' : 'Tips', { |
| 59 | confirmButtonText: language.value==0 ? '确定' :'OK', | 59 | confirmButtonText: language.value == 0 ? '确定' : 'OK', |
| 60 | cancelButtonText: language.value==0 ? '取消' :'Cancel', | 60 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', |
| 61 | type: 'warning' | 61 | type: 'warning' |
| 62 | }) | 62 | }) |
| 63 | }, | 63 | }, |
| 64 | // 提交内容 | 64 | // 提交内容 |
| 65 | prompt(content) { | 65 | prompt(content) { |
| 66 | return ElMessageBox.prompt(content, language.value==0 ? '系统提示' :'Tips', { | 66 | return ElMessageBox.prompt(content, language.value == 0 ? '系统提示' : 'Tips', { |
| 67 | confirmButtonText: language.value==0 ? '确定' :'OK', | 67 | confirmButtonText: language.value == 0 ? '确定' : 'OK', |
| 68 | cancelButtonText: language.value==0 ? '取消' :'Cancel', | 68 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', |
| 69 | type: 'warning' | 69 | type: 'warning' |
| 70 | }) | 70 | }) |
| 71 | }, | 71 | }, |
| ... | @@ -79,6 +79,6 @@ export default { | ... | @@ -79,6 +79,6 @@ export default { |
| 79 | }, | 79 | }, |
| 80 | // 关闭遮罩层 | 80 | // 关闭遮罩层 |
| 81 | closeLoading() { | 81 | closeLoading() { |
| 82 | loadingInstance.close() | 82 | loadingInstance?.close() |
| 83 | } | 83 | } |
| 84 | } | 84 | } | ... | ... |
| ... | @@ -110,26 +110,28 @@ NProgress.configure({showSpinner: false}) | ... | @@ -110,26 +110,28 @@ NProgress.configure({showSpinner: false}) |
| 110 | 110 | ||
| 111 | router.beforeEach((to, from, next) => { | 111 | router.beforeEach((to, from, next) => { |
| 112 | NProgress.start() | 112 | NProgress.start() |
| 113 | if (getToken()) { | ||
| 114 | // 判断当前用户是否已拉取完user_info信息 | ||
| 115 | if (!useUserStore().user) { | ||
| 116 | isRelogin.show = true | ||
| 117 | useUserStore().getInfo().then(() => { | ||
| 118 | isRelogin.show = false | ||
| 119 | next() // hack方法 确保addRoutes已完成 | ||
| 120 | }).catch(err => { | ||
| 121 | useUserStore().logOut().then(() => { | ||
| 122 | ElMessage.error(err) | ||
| 123 | next({path: '/'}) | ||
| 124 | }) | ||
| 125 | }) | ||
| 126 | } else { | ||
| 127 | next() | 113 | next() |
| 128 | } | 114 | // if (getToken()) { |
| 129 | } else { | 115 | // // 判断当前用户是否已拉取完user_info信息 |
| 130 | // 没有token | 116 | // if (!useUserStore().user) { |
| 131 | next() | 117 | // |
| 132 | } | 118 | // isRelogin.show = true |
| 119 | // useUserStore().getInfo().then(() => { | ||
| 120 | // isRelogin.show = false | ||
| 121 | // next() // hack方法 确保addRoutes已完成 | ||
| 122 | // }).catch(err => { | ||
| 123 | // useUserStore().logOut().then(() => { | ||
| 124 | // ElMessage.error(err) | ||
| 125 | // next({path: '/'}) | ||
| 126 | // }) | ||
| 127 | // }) | ||
| 128 | // } else { | ||
| 129 | // next() | ||
| 130 | // } | ||
| 131 | // } else { | ||
| 132 | // // 没有token | ||
| 133 | // next() | ||
| 134 | // } | ||
| 133 | }) | 135 | }) |
| 134 | 136 | ||
| 135 | router.afterEach((to) => { | 137 | router.afterEach((to) => { | ... | ... |
| ... | @@ -5,25 +5,20 @@ import { | ... | @@ -5,25 +5,20 @@ import { |
| 5 | ElMessage, | 5 | ElMessage, |
| 6 | ElLoading | 6 | ElLoading |
| 7 | } from 'element-plus' | 7 | } from 'element-plus' |
| 8 | import { getToken } from '@/utils/auth' | 8 | import {getToken} from '@/utils/auth' |
| 9 | import errorCode from '@/utils/errorCode' | 9 | import errorCode from '@/utils/errorCode' |
| 10 | import { tansParams, blobValidate } from '@/utils/ruoyi' | 10 | import {tansParams, blobValidate} from '@/utils/ruoyi' |
| 11 | import cache from '@/plugins/cache' | 11 | import cache from '@/plugins/cache' |
| 12 | import modal from '@/plugins/modal' | 12 | import modal from '@/plugins/modal' |
| 13 | import { saveAs } from 'file-saver' | 13 | import {saveAs} from 'file-saver' |
| 14 | import useUserStore from '@/store/modules/user' | 14 | import {sendNotification} from '@/assets/lib/extend' |
| 15 | import { sendNotification } from '@/assets/lib/extend' | 15 | |
| 16 | import _ from 'lodash' | ||
| 17 | // const language = cache.local.get('language') || 0 | ||
| 18 | import {useStorage} from "@vueuse/core/index"; | ||
| 19 | const language= useStorage('language',0) | ||
| 20 | let downloadLoadingInstance | 16 | let downloadLoadingInstance |
| 21 | // 是否显示重新登录 | 17 | // 是否显示重新登录 |
| 22 | export const isRelogin = { show: false } | 18 | export const isRelogin = {show: false} |
| 23 | 19 | ||
| 24 | axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' | 20 | axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' |
| 25 | // 对应国际化资源文件后缀 | 21 | |
| 26 | axios.defaults.headers['Content-Language'] = (language.value==0? 'zh_CN':'en_US' ) | ||
| 27 | // 创建axios实例 | 22 | // 创建axios实例 |
| 28 | const service = axios.create({ | 23 | const service = axios.create({ |
| 29 | // axios中请求配置有baseURL选项,表示请求URL公共部分 | 24 | // axios中请求配置有baseURL选项,表示请求URL公共部分 |
| ... | @@ -32,15 +27,12 @@ const service = axios.create({ | ... | @@ -32,15 +27,12 @@ const service = axios.create({ |
| 32 | timeout: 0 | 27 | timeout: 0 |
| 33 | }) | 28 | }) |
| 34 | 29 | ||
| 35 | const otherWeb = ['ztx-match/', 'ztx-webSite/', 'ztx-train/'] | ||
| 36 | const excludeUrl = ['system/remindCount/getCounts'] | ||
| 37 | const noModal = ['person/info/extractInfo'] | ||
| 38 | 30 | ||
| 39 | // request拦截器 | 31 | // request拦截器 |
| 40 | service.interceptors.request.use( | 32 | service.interceptors.request.use( |
| 41 | (config) => { | 33 | (config) => { |
| 42 | if (config.method.toLowerCase() !== 'get' && !_.some(noModal, (m) => config.url.indexOf(m) > -1)) { | 34 | if (!config.url) { |
| 43 | modal.loading() | 35 | config.url = '/portal/r/jd?cmd=com.dr.coslexpro.cwys.unifiedInterface' |
| 44 | } | 36 | } |
| 45 | 37 | ||
| 46 | // 是否需要设置 token | 38 | // 是否需要设置 token |
| ... | @@ -50,9 +42,6 @@ service.interceptors.request.use( | ... | @@ -50,9 +42,6 @@ service.interceptors.request.use( |
| 50 | if (getToken() && !isToken) { | 42 | if (getToken() && !isToken) { |
| 51 | config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改 | 43 | config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改 |
| 52 | } | 44 | } |
| 53 | if (_.some(otherWeb, (w) => config.url.indexOf(w) > -1)) { | ||
| 54 | config.headers['Ztx-Per-Id'] = useUserStore().perId || -1 | ||
| 55 | } | ||
| 56 | 45 | ||
| 57 | // get请求映射params参数 | 46 | // get请求映射params参数 |
| 58 | if (config.method === 'get') { | 47 | if (config.method === 'get') { |
| ... | @@ -93,20 +82,21 @@ service.interceptors.request.use( | ... | @@ -93,20 +82,21 @@ service.interceptors.request.use( |
| 93 | const s_data = sessionObj.data // 请求数据 | 82 | const s_data = sessionObj.data // 请求数据 |
| 94 | const s_time = sessionObj.time // 请求时间 | 83 | const s_time = sessionObj.time // 请求时间 |
| 95 | const interval = 1000 // 间隔时间(ms),小于此时间视为重复提交 | 84 | const interval = 1000 // 间隔时间(ms),小于此时间视为重复提交 |
| 96 | if ( | 85 | // if ( |
| 97 | s_data === requestObj.data && | 86 | // s_data === requestObj.data && |
| 98 | requestObj.time - s_time < interval && | 87 | // requestObj.time - s_time < interval && |
| 99 | s_url === requestObj.url | 88 | // s_url === requestObj.url |
| 100 | ) { | 89 | // ) { |
| 101 | const message = '数据正在处理,请勿重复提交' | 90 | // const message = '数据正在处理,请勿重复提交' |
| 102 | console.warn(`[${s_url}]: ` + message) | 91 | // console.warn(`[${s_url}]: ` + message) |
| 103 | modal.closeLoading() | 92 | // modal.closeLoading() |
| 104 | return Promise.reject(new Error(message)) | 93 | // return Promise.reject(new Error(message)) |
| 105 | } else { | 94 | // } else { |
| 95 | // cache.session.setJSON('sessionObj', requestObj) | ||
| 96 | // } | ||
| 106 | cache.session.setJSON('sessionObj', requestObj) | 97 | cache.session.setJSON('sessionObj', requestObj) |
| 107 | } | 98 | } |
| 108 | } | 99 | } |
| 109 | } | ||
| 110 | return config | 100 | return config |
| 111 | }, | 101 | }, |
| 112 | (error) => { | 102 | (error) => { |
| ... | @@ -119,11 +109,8 @@ service.interceptors.request.use( | ... | @@ -119,11 +109,8 @@ service.interceptors.request.use( |
| 119 | // 响应拦截器 | 109 | // 响应拦截器 |
| 120 | service.interceptors.response.use( | 110 | service.interceptors.response.use( |
| 121 | (res) => { | 111 | (res) => { |
| 122 | if (res.config.method.toLowerCase() !== 'get' && !_.some(noModal, (m) => res.config.url.indexOf(m) > -1)) { | ||
| 123 | modal.closeLoading() | ||
| 124 | } | ||
| 125 | // 未设置状态码则默认成功状态 | 112 | // 未设置状态码则默认成功状态 |
| 126 | const code = res.data.code || 200 | 113 | const code = res.code || 200 |
| 127 | // 获取错误信息 | 114 | // 获取错误信息 |
| 128 | const msg = errorCode[code] || res.data.msg | 115 | const msg = errorCode[code] || res.data.msg |
| 129 | // const msg = errorCode[code] || res.data.msg || errorCode['default'] | 116 | // const msg = errorCode[code] || res.data.msg || errorCode['default'] |
| ... | @@ -137,9 +124,6 @@ service.interceptors.response.use( | ... | @@ -137,9 +124,6 @@ service.interceptors.response.use( |
| 137 | return res | 124 | return res |
| 138 | } | 125 | } |
| 139 | 126 | ||
| 140 | if (_.some(excludeUrl, (m) => res.config.url.indexOf(m) > -1)) { | ||
| 141 | return Promise.resolve(res.data) | ||
| 142 | } | ||
| 143 | if (code === 401) { | 127 | if (code === 401) { |
| 144 | if (!isRelogin.show) { | 128 | if (!isRelogin.show) { |
| 145 | isRelogin.show = true | 129 | isRelogin.show = true |
| ... | @@ -167,16 +151,16 @@ service.interceptors.response.use( | ... | @@ -167,16 +151,16 @@ service.interceptors.response.use( |
| 167 | } | 151 | } |
| 168 | return Promise.reject('会话已过期,请重新登录。') | 152 | return Promise.reject('会话已过期,请重新登录。') |
| 169 | } else if (code === 500) { | 153 | } else if (code === 500) { |
| 170 | if(msg){ | 154 | if (msg) { |
| 171 | ElMessage({ message: msg, type: 'error' }) | 155 | ElMessage({message: msg, type: 'error'}) |
| 172 | sendNotification('错误提示', { body: msg }) | 156 | sendNotification('错误提示', {body: msg}) |
| 173 | } | 157 | } |
| 174 | return Promise.reject(new Error(msg)) | 158 | return Promise.reject(new Error(msg)) |
| 175 | } else if (code === 601) { | 159 | } else if (code === 601) { |
| 176 | ElMessage({ message: msg, type: 'warning' }) | 160 | ElMessage({message: msg, type: 'warning'}) |
| 177 | return Promise.reject(new Error(msg)) | 161 | return Promise.reject(new Error(msg)) |
| 178 | } else if (code !== 200) { | 162 | } else if (code !== 200) { |
| 179 | ElNotification.error({ title: msg }) | 163 | ElNotification.error({title: msg}) |
| 180 | return Promise.reject('error') | 164 | return Promise.reject('error') |
| 181 | } else { | 165 | } else { |
| 182 | return Promise.resolve(res.data) | 166 | return Promise.resolve(res.data) |
| ... | @@ -184,7 +168,7 @@ service.interceptors.response.use( | ... | @@ -184,7 +168,7 @@ service.interceptors.response.use( |
| 184 | }, | 168 | }, |
| 185 | (error) => { | 169 | (error) => { |
| 186 | console.log('err' + error) | 170 | console.log('err' + error) |
| 187 | let { message } = error | 171 | let {message} = error |
| 188 | if (message === 'Network Error') { | 172 | if (message === 'Network Error') { |
| 189 | message = '后端接口连接异常' | 173 | message = '后端接口连接异常' |
| 190 | } else if (message.includes('timeout')) { | 174 | } else if (message.includes('timeout')) { |
| ... | @@ -192,8 +176,8 @@ service.interceptors.response.use( | ... | @@ -192,8 +176,8 @@ service.interceptors.response.use( |
| 192 | } else if (message.includes('Request failed with status code')) { | 176 | } else if (message.includes('Request failed with status code')) { |
| 193 | message = '系统接口' + message.substr(message.length - 3) + '异常' | 177 | message = '系统接口' + message.substr(message.length - 3) + '异常' |
| 194 | } | 178 | } |
| 195 | ElMessage({ message: message, type: 'error', duration: 5 * 1000 }) | 179 | ElMessage({message: message, type: 'error', duration: 5 * 1000}) |
| 196 | sendNotification('错误提示', { body: message }) | 180 | sendNotification('错误提示', {body: message}) |
| 197 | modal.closeLoading() | 181 | modal.closeLoading() |
| 198 | return Promise.reject(error) | 182 | return Promise.reject(error) |
| 199 | } | 183 | } |
| ... | @@ -212,11 +196,11 @@ export function download(url, params, filename, config) { | ... | @@ -212,11 +196,11 @@ export function download(url, params, filename, config) { |
| 212 | return tansParams(params) | 196 | return tansParams(params) |
| 213 | } | 197 | } |
| 214 | ], | 198 | ], |
| 215 | headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, | 199 | headers: {'Content-Type': 'application/x-www-form-urlencoded'}, |
| 216 | responseType: 'blob', | 200 | responseType: 'blob', |
| 217 | ...config | 201 | ...config |
| 218 | }) | 202 | }) |
| 219 | .then(async(res) => { | 203 | .then(async (res) => { |
| 220 | const data = res.data | 204 | const data = res.data |
| 221 | const isBlob = blobValidate(data) | 205 | const isBlob = blobValidate(data) |
| 222 | if (isBlob) { | 206 | if (isBlob) { | ... | ... |
| ... | @@ -3,8 +3,8 @@ | ... | @@ -3,8 +3,8 @@ |
| 3 | <div ref="textRef" class="top"> | 3 | <div ref="textRef" class="top"> |
| 4 | <div class="left"> | 4 | <div class="left"> |
| 5 | <div class="titleTop">董事会得分</div> | 5 | <div class="titleTop">董事会得分</div> |
| 6 | <div class="titleCenter">预计得分 <span class="tex1">5</span></div> | 6 | <div class="titleCenter">预计得分 <span class="tex1">{{ form.YJSCORE }}</span></div> |
| 7 | <div class="titleCenter">标准得分 <span class="tex2">10</span> | 7 | <div class="titleCenter">标准得分 <span class="tex2">{{ form.STANDARDSCORE }}</span> |
| 8 | </div> | 8 | </div> |
| 9 | </div> | 9 | </div> |
| 10 | <div class="right"> | 10 | <div class="right"> |
| ... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
| 13 | <div><img alt="" class="rTop-img" src="@/assets/image/more@2x.png"></div> | 13 | <div><img alt="" class="rTop-img" src="@/assets/image/more@2x.png"></div> |
| 14 | </div> | 14 | </div> |
| 15 | <div class="rBotton"> | 15 | <div class="rBotton"> |
| 16 | <ScrollingData :data="dataItems" speed="1"/> | 16 | <ScrollingData :data="form.leaderinfo" speed="1"/> |
| 17 | </div> | 17 | </div> |
| 18 | </div> | 18 | </div> |
| 19 | </div> | 19 | </div> |
| ... | @@ -29,7 +29,7 @@ | ... | @@ -29,7 +29,7 @@ |
| 29 | <div ref="bing1" style="width: 100%;height:13vh;"> | 29 | <div ref="bing1" style="width: 100%;height:13vh;"> |
| 30 | </div> | 30 | </div> |
| 31 | <div class="bingBottom"> | 31 | <div class="bingBottom"> |
| 32 | <div>2025年营业收入</div> | 32 | <div>{{ activeName1 }}年营业收入</div> |
| 33 | <div>(万元)</div> | 33 | <div>(万元)</div> |
| 34 | </div> | 34 | </div> |
| 35 | </div> | 35 | </div> |
| ... | @@ -48,7 +48,7 @@ | ... | @@ -48,7 +48,7 @@ |
| 48 | <div ref="bing2" style="width: 100%;height:13vh;"> | 48 | <div ref="bing2" style="width: 100%;height:13vh;"> |
| 49 | </div> | 49 | </div> |
| 50 | <div class="bingBottom"> | 50 | <div class="bingBottom"> |
| 51 | <div>2025年3月前 累计应收余额</div> | 51 | <div>{{ `${dayjs().format('YYYY')}年${dayjs().format('MM')}月` }}前累计应收余额</div> |
| 52 | <div>(万元)</div> | 52 | <div>(万元)</div> |
| 53 | </div> | 53 | </div> |
| 54 | </div> | 54 | </div> |
| ... | @@ -67,7 +67,7 @@ | ... | @@ -67,7 +67,7 @@ |
| 67 | <div ref="bing3" style="width: 100%;height:13vh;"> | 67 | <div ref="bing3" style="width: 100%;height:13vh;"> |
| 68 | </div> | 68 | </div> |
| 69 | <div class="bingBottom"> | 69 | <div class="bingBottom"> |
| 70 | <div>2025年3月前 累计现金余额</div> | 70 | <div>{{ `${dayjs().format('YYYY')}年${dayjs().format('MM')}月` }}前累计应收余额</div> |
| 71 | <div>(万元)</div> | 71 | <div>(万元)</div> |
| 72 | </div> | 72 | </div> |
| 73 | </div> | 73 | </div> |
| ... | @@ -84,7 +84,6 @@ | ... | @@ -84,7 +84,6 @@ |
| 84 | </div> | 84 | </div> |
| 85 | </div> | 85 | </div> |
| 86 | </div> | 86 | </div> |
| 87 | |||
| 88 | </div> | 87 | </div> |
| 89 | 88 | ||
| 90 | 89 | ||
| ... | @@ -92,28 +91,15 @@ | ... | @@ -92,28 +91,15 @@ |
| 92 | 91 | ||
| 93 | <script setup> | 92 | <script setup> |
| 94 | import {autoToolTip} from "@/plugins/auto-toolTip"; | 93 | import {autoToolTip} from "@/plugins/auto-toolTip"; |
| 95 | import ScrollingData from './scrollingData .vue' | 94 | import ScrollingData from './scrollingData.vue' |
| 96 | import * as echarts from "echarts"; | 95 | import * as echarts from "echarts"; |
| 97 | import * as api from "@/apiPc/common" | 96 | import * as api from "@/apiPc/common" |
| 98 | import {onMounted, ref} from 'vue' | 97 | import {onMounted, ref} from 'vue' |
| 98 | import {dayjs} from 'element-plus' | ||
| 99 | import {getYS001, getYS002, getYS003, getYS004, getYS005} from '@/api/server.js' | ||
| 99 | 100 | ||
| 100 | 101 | ||
| 101 | const dataItems = ref([ | 102 | const dataItems = ref([]); |
| 102 | '数据项 1: 当前值 256', | ||
| 103 | '数据项 2: 当前值 189', | ||
| 104 | '数据项 3: 当前值 342', | ||
| 105 | '数据项 4: 当前值 127', | ||
| 106 | '数据项 5: 当前值 298', | ||
| 107 | '数据项 6: 当前值 431', | ||
| 108 | '数据项 7: 当前值 156', | ||
| 109 | '数据项 8: 当前值 321', | ||
| 110 | '数据项 9: 当前值 456', | ||
| 111 | '数据项 10: 当前值 234', | ||
| 112 | '数据项 11: 当前值 321', | ||
| 113 | '数据项 12: 当前值 456', | ||
| 114 | '数据项 13: 当前值 234', | ||
| 115 | '数据项 14: 当前值 321', | ||
| 116 | ]); | ||
| 117 | const zhuRef1 = ref(null) | 103 | const zhuRef1 = ref(null) |
| 118 | const zhuRef2 = ref(null) | 104 | const zhuRef2 = ref(null) |
| 119 | const zhuRef3 = ref(null) | 105 | const zhuRef3 = ref(null) |
| ... | @@ -122,6 +108,15 @@ const bing1 = ref(null) | ... | @@ -122,6 +108,15 @@ const bing1 = ref(null) |
| 122 | const bing2 = ref(null) | 108 | const bing2 = ref(null) |
| 123 | const bing3 = ref(null) | 109 | const bing3 = ref(null) |
| 124 | const textRef = ref(null) | 110 | const textRef = ref(null) |
| 111 | const form = ref({}) | ||
| 112 | |||
| 113 | const resYear1 = ref() | ||
| 114 | const resYear2 = ref() | ||
| 115 | const resYear3 = ref() | ||
| 116 | const activeName1 = ref() | ||
| 117 | const activeName2 = ref() | ||
| 118 | const activeName3 = ref() | ||
| 119 | |||
| 125 | 120 | ||
| 126 | let chart1 | 121 | let chart1 |
| 127 | let chart11 | 122 | let chart11 |
| ... | @@ -139,15 +134,57 @@ let intervalA = null | ... | @@ -139,15 +134,57 @@ let intervalA = null |
| 139 | onMounted(() => { | 134 | onMounted(() => { |
| 140 | // init() | 135 | // init() |
| 141 | window.addEventListener('resize', handleResize); | 136 | window.addEventListener('resize', handleResize); |
| 142 | handelBing1() | 137 | // handelBing1() |
| 143 | handelZhu1() | 138 | // handelZhu1() |
| 144 | handelBing2() | 139 | handelGetYS001() |
| 145 | handelZhu2() | 140 | handelGetYS002() |
| 146 | handelBing3() | 141 | handelGetYS003() |
| 147 | handelZhu3() | 142 | handelGetYS004() |
| 148 | handelZhu4() | 143 | handelGetYS005() |
| 144 | // handelBing2() | ||
| 145 | // handelZhu2() | ||
| 146 | // handelBing3() | ||
| 147 | // handelZhu3() | ||
| 148 | // handelZhu4() | ||
| 149 | |||
| 149 | }) | 150 | }) |
| 150 | 151 | ||
| 152 | async function handelGetYS001() { | ||
| 153 | const res = await getYS001() | ||
| 154 | resYear1.value = res.data.yeargroup | ||
| 155 | handelBing1(res.data.yeargroup[0], res.data.yeargroup[1]) | ||
| 156 | handelZhu1(res.data.yeargroup[0], res.data.yeargroup[1]) | ||
| 157 | activeName1.value = res.data.yeargroup[1].YEAR | ||
| 158 | } | ||
| 159 | |||
| 160 | |||
| 161 | async function handelGetYS002() { | ||
| 162 | const res = await getYS002() | ||
| 163 | resYear2.value = res.data.yeargroup | ||
| 164 | handelBing2(res.data.yeargroup[0], res.data.yeargroup[1]) | ||
| 165 | handelZhu2(res.data.yeargroup[0], res.data.yeargroup[1]) | ||
| 166 | activeName2.value = res.data.yeargroup[1].YEAR | ||
| 167 | } | ||
| 168 | |||
| 169 | async function handelGetYS003() { | ||
| 170 | const res = await getYS003() | ||
| 171 | resYear3.value = res.data.yeargroup | ||
| 172 | handelBing3(res.data.yeargroup[0], res.data.yeargroup[1]) | ||
| 173 | handelZhu3(res.data.yeargroup[0], res.data.yeargroup[1]) | ||
| 174 | activeName3.value = res.data.yeargroup[1].YEAR | ||
| 175 | } | ||
| 176 | |||
| 177 | async function handelGetYS004() { | ||
| 178 | const res = await getYS004() | ||
| 179 | handelZhu4(res.data.blockgroup[0], res.data.blockgroup[1]) | ||
| 180 | } | ||
| 181 | |||
| 182 | async function handelGetYS005() { | ||
| 183 | const res = await getYS005() | ||
| 184 | form.value = res.data | ||
| 185 | console.log(res) | ||
| 186 | |||
| 187 | } | ||
| 151 | 188 | ||
| 152 | const init = () => { | 189 | const init = () => { |
| 153 | if (!intervalA) { | 190 | if (!intervalA) { |
| ... | @@ -176,7 +213,7 @@ function handleResize() { | ... | @@ -176,7 +213,7 @@ function handleResize() { |
| 176 | chart44?.resize() | 213 | chart44?.resize() |
| 177 | } | 214 | } |
| 178 | 215 | ||
| 179 | const handelBing1 = () => { | 216 | const handelBing1 = (arr1, arr2) => { |
| 180 | chart1 = echarts.init(bing1.value) | 217 | chart1 = echarts.init(bing1.value) |
| 181 | const option = { | 218 | const option = { |
| 182 | tooltip: { | 219 | tooltip: { |
| ... | @@ -185,7 +222,7 @@ const handelBing1 = () => { | ... | @@ -185,7 +222,7 @@ const handelBing1 = () => { |
| 185 | 222 | ||
| 186 | series: [ | 223 | series: [ |
| 187 | { | 224 | { |
| 188 | name: '1', | 225 | name: '', |
| 189 | type: 'pie', | 226 | type: 'pie', |
| 190 | radius: ['99%', '100%'], | 227 | radius: ['99%', '100%'], |
| 191 | center: ['50%', '60%'], | 228 | center: ['50%', '60%'], |
| ... | @@ -199,9 +236,9 @@ const handelBing1 = () => { | ... | @@ -199,9 +236,9 @@ const handelBing1 = () => { |
| 199 | startAngle: 180, | 236 | startAngle: 180, |
| 200 | endAngle: 360, | 237 | endAngle: 360, |
| 201 | data: [ | 238 | data: [ |
| 202 | {value: 48, name: '1'}, | 239 | {value: 48}, |
| 203 | {value: 1, name: '1'}, | 240 | {value: 1}, |
| 204 | {value: 48, name: '1'} | 241 | {value: 48} |
| 205 | ], | 242 | ], |
| 206 | itemStyle: { | 243 | itemStyle: { |
| 207 | color: 'rgba(1, 162, 237, 1)', | 244 | color: 'rgba(1, 162, 237, 1)', |
| ... | @@ -209,7 +246,7 @@ const handelBing1 = () => { | ... | @@ -209,7 +246,7 @@ const handelBing1 = () => { |
| 209 | barWidth: 2 | 246 | barWidth: 2 |
| 210 | }, | 247 | }, |
| 211 | { | 248 | { |
| 212 | name: '2', | 249 | name: arr1.YEAR, |
| 213 | type: 'pie', | 250 | type: 'pie', |
| 214 | radius: ['75%', '95%'], | 251 | radius: ['75%', '95%'], |
| 215 | center: ['50%', '60%'], | 252 | center: ['50%', '60%'], |
| ... | @@ -223,15 +260,15 @@ const handelBing1 = () => { | ... | @@ -223,15 +260,15 @@ const handelBing1 = () => { |
| 223 | scale: false | 260 | scale: false |
| 224 | }, | 261 | }, |
| 225 | data: [ | 262 | data: [ |
| 226 | {value: 735, name: 'Direct', itemStyle: {color: "rgb(255,217,0)"}}, | 263 | {value: arr1.TOTAL, name: '营业收入', itemStyle: {color: "rgb(255,217,0)"}}, |
| 227 | {value: 1048, name: 'Search Engine'}, | 264 | {value: arr1.TOTAL ? arr1.TOTAL * 2 : 1, name: '营业收入'}, |
| 228 | ], | 265 | ], |
| 229 | itemStyle: { | 266 | itemStyle: { |
| 230 | color: 'rgba(1, 162, 237, .3)', | 267 | color: 'rgba(1, 162, 237, .3)', |
| 231 | }, | 268 | }, |
| 232 | }, | 269 | }, |
| 233 | { | 270 | { |
| 234 | name: '3', | 271 | name: arr2.YEAR, |
| 235 | type: 'pie', | 272 | type: 'pie', |
| 236 | radius: ['55%', '70%'], | 273 | radius: ['55%', '70%'], |
| 237 | center: ['50%', '60%'], | 274 | center: ['50%', '60%'], |
| ... | @@ -247,8 +284,8 @@ const handelBing1 = () => { | ... | @@ -247,8 +284,8 @@ const handelBing1 = () => { |
| 247 | startAngle: 180, | 284 | startAngle: 180, |
| 248 | endAngle: 360, | 285 | endAngle: 360, |
| 249 | data: [ | 286 | data: [ |
| 250 | {value: 1048, name: '2025', itemStyle: {color: "rgba(240, 255, 0, .5)"}}, | 287 | {value: arr2.TOTAL, name: '', itemStyle: {color: "rgba(240, 255, 0, .5)"}}, |
| 251 | {value: 735, name: '2025'} | 288 | {value: arr2.TOTAL ? arr2.TOTAL * 2 : 1, name: (arr2.TOTAL / 10000).toFixed(0) + 'W'} |
| 252 | ], | 289 | ], |
| 253 | itemStyle: { | 290 | itemStyle: { |
| 254 | color: 'rgba(1, 162, 237, .3)', | 291 | color: 'rgba(1, 162, 237, .3)', |
| ... | @@ -286,7 +323,7 @@ const handelBing1 = () => { | ... | @@ -286,7 +323,7 @@ const handelBing1 = () => { |
| 286 | chart1.setOption(option) | 323 | chart1.setOption(option) |
| 287 | autoHover(chart1, option, 3, 2000) | 324 | autoHover(chart1, option, 3, 2000) |
| 288 | } | 325 | } |
| 289 | const handelBing2 = () => { | 326 | const handelBing2 = (row1, row2) => { |
| 290 | chart2 = echarts.init(bing2.value) | 327 | chart2 = echarts.init(bing2.value) |
| 291 | const option = { | 328 | const option = { |
| 292 | tooltip: { | 329 | tooltip: { |
| ... | @@ -318,7 +355,7 @@ const handelBing2 = () => { | ... | @@ -318,7 +355,7 @@ const handelBing2 = () => { |
| 318 | barWidth: 2 | 355 | barWidth: 2 |
| 319 | }, | 356 | }, |
| 320 | { | 357 | { |
| 321 | name: '2', | 358 | name: row2.YEAR, |
| 322 | type: 'pie', | 359 | type: 'pie', |
| 323 | radius: ['75%', '95%'], | 360 | radius: ['75%', '95%'], |
| 324 | center: ['50%', '60%'], | 361 | center: ['50%', '60%'], |
| ... | @@ -332,8 +369,8 @@ const handelBing2 = () => { | ... | @@ -332,8 +369,8 @@ const handelBing2 = () => { |
| 332 | scale: false | 369 | scale: false |
| 333 | }, | 370 | }, |
| 334 | data: [ | 371 | data: [ |
| 335 | {value: 1048, name: 'Search Engine', itemStyle: {color: "rgba(0, 255, 190,1)"}}, | 372 | {value: row1.TOTAL, name: (row1.TOTAL / 10000).toFixed(0) + 'W', itemStyle: {color: "rgba(0, 255, 190,1)"}}, |
| 336 | {value: 735, name: 'Direct'} | 373 | {value: row2.TOTAL, name: (row2.TOTAL / 10000).toFixed(0) + 'W'} |
| 337 | ], | 374 | ], |
| 338 | itemStyle: { | 375 | itemStyle: { |
| 339 | color: 'rgba(1, 162, 237, .5)', | 376 | color: 'rgba(1, 162, 237, .5)', |
| ... | @@ -356,7 +393,7 @@ const handelBing2 = () => { | ... | @@ -356,7 +393,7 @@ const handelBing2 = () => { |
| 356 | startAngle: 180, | 393 | startAngle: 180, |
| 357 | endAngle: 360, | 394 | endAngle: 360, |
| 358 | data: [ | 395 | data: [ |
| 359 | {value: 1048, name: '2025'}, | 396 | {value: 1048,}, |
| 360 | ], | 397 | ], |
| 361 | itemStyle: { | 398 | itemStyle: { |
| 362 | color: { | 399 | color: { |
| ... | @@ -375,7 +412,7 @@ const handelBing2 = () => { | ... | @@ -375,7 +412,7 @@ const handelBing2 = () => { |
| 375 | chart2.setOption(option) | 412 | chart2.setOption(option) |
| 376 | autoHover(chart2, option, 2, 2000) | 413 | autoHover(chart2, option, 2, 2000) |
| 377 | } | 414 | } |
| 378 | const handelBing3 = () => { | 415 | const handelBing3 = (row1, row2) => { |
| 379 | chart3 = echarts.init(bing3.value) | 416 | chart3 = echarts.init(bing3.value) |
| 380 | const option = { | 417 | const option = { |
| 381 | tooltip: { | 418 | tooltip: { |
| ... | @@ -421,7 +458,7 @@ const handelBing3 = () => { | ... | @@ -421,7 +458,7 @@ const handelBing3 = () => { |
| 421 | }, | 458 | }, |
| 422 | data: [ | 459 | data: [ |
| 423 | { | 460 | { |
| 424 | value: 1048, name: 'Search Engine', | 461 | value: row2.TOTAL, name: row2.YEAR, |
| 425 | itemStyle: { | 462 | itemStyle: { |
| 426 | color: { | 463 | color: { |
| 427 | type: 'linear', | 464 | type: 'linear', |
| ... | @@ -433,7 +470,7 @@ const handelBing3 = () => { | ... | @@ -433,7 +470,7 @@ const handelBing3 = () => { |
| 433 | } | 470 | } |
| 434 | } | 471 | } |
| 435 | }, | 472 | }, |
| 436 | {value: 735, name: 'Direct'} | 473 | {value: row1.TOTAL, name: row1.YEAR} |
| 437 | ], | 474 | ], |
| 438 | itemStyle: { | 475 | itemStyle: { |
| 439 | color: 'rgba(1, 162, 237, .3)', | 476 | color: 'rgba(1, 162, 237, .3)', |
| ... | @@ -456,7 +493,7 @@ const handelBing3 = () => { | ... | @@ -456,7 +493,7 @@ const handelBing3 = () => { |
| 456 | startAngle: 180, | 493 | startAngle: 180, |
| 457 | endAngle: 360, | 494 | endAngle: 360, |
| 458 | data: [ | 495 | data: [ |
| 459 | {value: 1048, name: '2025'}, | 496 | {value: 1048, name: ''}, |
| 460 | ], | 497 | ], |
| 461 | itemStyle: { | 498 | itemStyle: { |
| 462 | color: { | 499 | color: { |
| ... | @@ -473,17 +510,18 @@ const handelBing3 = () => { | ... | @@ -473,17 +510,18 @@ const handelBing3 = () => { |
| 473 | } | 510 | } |
| 474 | 511 | ||
| 475 | chart3.setOption(option) | 512 | chart3.setOption(option) |
| 476 | autoHover(chart3, option, 2, 2000) | 513 | autoHover(chart3, option, 0, 2000) |
| 477 | } | 514 | } |
| 478 | 515 | ||
| 479 | const handelZhu1 = () => { | 516 | const handelZhu1 = (row1, row2) => { |
| 480 | chart11 = echarts.init(zhuRef1.value) | 517 | chart11 = echarts.init(zhuRef1.value) |
| 481 | const option = { | 518 | const option = { |
| 482 | tooltip: { | 519 | tooltip: { |
| 483 | trigger: 'axis', | 520 | trigger: 'axis', |
| 484 | axisPointer: { | 521 | axisPointer: { |
| 485 | type: 'shadow' | 522 | type: 'shadow' |
| 486 | } | 523 | }, |
| 524 | // formatter: '{a0},{b0},{c}W <br /> {a1},{b1},{c1}W ' | ||
| 487 | }, | 525 | }, |
| 488 | legend: { | 526 | legend: { |
| 489 | top: '0', | 527 | top: '0', |
| ... | @@ -492,6 +530,7 @@ const handelZhu1 = () => { | ... | @@ -492,6 +530,7 @@ const handelZhu1 = () => { |
| 492 | }, | 530 | }, |
| 493 | }, | 531 | }, |
| 494 | grid: { | 532 | grid: { |
| 533 | top: '25%', | ||
| 495 | left: '0%', | 534 | left: '0%', |
| 496 | right: '0%', | 535 | right: '0%', |
| 497 | bottom: '1%', | 536 | bottom: '1%', |
| ... | @@ -527,13 +566,15 @@ const handelZhu1 = () => { | ... | @@ -527,13 +566,15 @@ const handelZhu1 = () => { |
| 527 | ], | 566 | ], |
| 528 | series: [ | 567 | series: [ |
| 529 | { | 568 | { |
| 530 | name: '2025年', | 569 | name: row1.YEAR, |
| 531 | type: 'bar', | 570 | type: 'bar', |
| 532 | barGap: 0, | 571 | barGap: 0, |
| 533 | emphasis: { | 572 | emphasis: { |
| 534 | focus: 'series' | 573 | focus: 'series' |
| 535 | }, | 574 | }, |
| 536 | data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290,], | 575 | data: row1.list.map(val => { |
| 576 | return (val.SRJE / 10000).toFixed(2) | ||
| 577 | }), | ||
| 537 | itemStyle: { | 578 | itemStyle: { |
| 538 | color: { | 579 | color: { |
| 539 | type: 'linear', | 580 | type: 'linear', |
| ... | @@ -550,12 +591,14 @@ const handelZhu1 = () => { | ... | @@ -550,12 +591,14 @@ const handelZhu1 = () => { |
| 550 | borderColor: 'rgba(240, 255, 0, 1)' | 591 | borderColor: 'rgba(240, 255, 0, 1)' |
| 551 | }, | 592 | }, |
| 552 | { | 593 | { |
| 553 | name: '2024年', | 594 | name: row2.YEAR, |
| 554 | type: 'bar', | 595 | type: 'bar', |
| 555 | emphasis: { | 596 | emphasis: { |
| 556 | focus: 'series' | 597 | focus: 'series' |
| 557 | }, | 598 | }, |
| 558 | data: [150, 232, 201, 154, 190, 330, 410, 201, 154, 190, 330, 410], | 599 | data: row2.list.map(val => { |
| 600 | return (val.SRJE / 10000).toFixed(2) | ||
| 601 | }), | ||
| 559 | itemStyle: { | 602 | itemStyle: { |
| 560 | color: { | 603 | color: { |
| 561 | type: 'linear', | 604 | type: 'linear', |
| ... | @@ -575,7 +618,7 @@ const handelZhu1 = () => { | ... | @@ -575,7 +618,7 @@ const handelZhu1 = () => { |
| 575 | chart11.setOption(option) | 618 | chart11.setOption(option) |
| 576 | autoHover(chart11, option, 0, 2000) | 619 | autoHover(chart11, option, 0, 2000) |
| 577 | } | 620 | } |
| 578 | const handelZhu2 = () => { | 621 | const handelZhu2 = (row1, row2) => { |
| 579 | chart22 = echarts.init(zhuRef2.value) | 622 | chart22 = echarts.init(zhuRef2.value) |
| 580 | const option = { | 623 | const option = { |
| 581 | tooltip: { | 624 | tooltip: { |
| ... | @@ -591,6 +634,7 @@ const handelZhu2 = () => { | ... | @@ -591,6 +634,7 @@ const handelZhu2 = () => { |
| 591 | }, | 634 | }, |
| 592 | }, | 635 | }, |
| 593 | grid: { | 636 | grid: { |
| 637 | top: "25%", | ||
| 594 | left: '3%', | 638 | left: '3%', |
| 595 | right: '4%', | 639 | right: '4%', |
| 596 | bottom: '3%', | 640 | bottom: '3%', |
| ... | @@ -626,13 +670,16 @@ const handelZhu2 = () => { | ... | @@ -626,13 +670,16 @@ const handelZhu2 = () => { |
| 626 | ], | 670 | ], |
| 627 | series: [ | 671 | series: [ |
| 628 | { | 672 | { |
| 629 | name: '2025年', | 673 | name: row1.YEAR, |
| 630 | type: 'bar', | 674 | type: 'bar', |
| 631 | barGap: 0, | 675 | barGap: 0, |
| 632 | emphasis: { | 676 | emphasis: { |
| 633 | focus: 'series' | 677 | focus: 'series' |
| 634 | }, | 678 | }, |
| 635 | data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290,], | 679 | // data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290,], |
| 680 | data: row1.list.map(val => { | ||
| 681 | return (val.YSCOST / 10000).toFixed(2) | ||
| 682 | }), | ||
| 636 | itemStyle: { | 683 | itemStyle: { |
| 637 | color: { | 684 | color: { |
| 638 | type: 'linear', | 685 | type: 'linear', |
| ... | @@ -648,12 +695,15 @@ const handelZhu2 = () => { | ... | @@ -648,12 +695,15 @@ const handelZhu2 = () => { |
| 648 | barWidth: '35%', | 695 | barWidth: '35%', |
| 649 | }, | 696 | }, |
| 650 | { | 697 | { |
| 651 | name: '2024年', | 698 | name: row2.YEAR, |
| 652 | type: 'bar', | 699 | type: 'bar', |
| 653 | emphasis: { | 700 | emphasis: { |
| 654 | focus: 'series' | 701 | focus: 'series' |
| 655 | }, | 702 | }, |
| 656 | data: [150, 232, 201, 154, 190, 330, 410, 201, 154, 190, 330, 410], | 703 | // data: [150, 232, 201, 154, 190, 330, 410, 201, 154, 190, 330, 410], |
| 704 | data: row2.list.map(val => { | ||
| 705 | return (val.YSCOST / 10000).toFixed(2) | ||
| 706 | }), | ||
| 657 | itemStyle: { | 707 | itemStyle: { |
| 658 | color: { | 708 | color: { |
| 659 | type: 'linear', | 709 | type: 'linear', |
| ... | @@ -673,7 +723,9 @@ const handelZhu2 = () => { | ... | @@ -673,7 +723,9 @@ const handelZhu2 = () => { |
| 673 | chart22.setOption(option) | 723 | chart22.setOption(option) |
| 674 | autoHover(chart22, option, 0, 2000) | 724 | autoHover(chart22, option, 0, 2000) |
| 675 | } | 725 | } |
| 676 | const handelZhu3 = () => { | 726 | const handelZhu3 = (row1, row2) => { |
| 727 | let name1 = row1.YEAR + '年' | ||
| 728 | let name2 = row2.YEAR + '年' | ||
| 677 | chart33 = echarts.init(zhuRef3.value) | 729 | chart33 = echarts.init(zhuRef3.value) |
| 678 | const option = { | 730 | const option = { |
| 679 | color: ['#80FFA5', '#00DDFF', '#37A2FF', '#FF0087', '#FFBF00'], | 731 | color: ['#80FFA5', '#00DDFF', '#37A2FF', '#FF0087', '#FFBF00'], |
| ... | @@ -727,6 +779,7 @@ const handelZhu3 = () => { | ... | @@ -727,6 +779,7 @@ const handelZhu3 = () => { |
| 727 | yAxis: [ | 779 | yAxis: [ |
| 728 | { | 780 | { |
| 729 | type: 'value', | 781 | type: 'value', |
| 782 | name: '单位(万)', | ||
| 730 | axisLine: { | 783 | axisLine: { |
| 731 | show: true, | 784 | show: true, |
| 732 | lineStyle: { | 785 | lineStyle: { |
| ... | @@ -739,7 +792,7 @@ const handelZhu3 = () => { | ... | @@ -739,7 +792,7 @@ const handelZhu3 = () => { |
| 739 | ], | 792 | ], |
| 740 | series: [ | 793 | series: [ |
| 741 | { | 794 | { |
| 742 | name: '2024年', | 795 | name: name1, |
| 743 | type: 'line', | 796 | type: 'line', |
| 744 | stack: 'Total', | 797 | stack: 'Total', |
| 745 | smooth: false, | 798 | smooth: false, |
| ... | @@ -763,10 +816,13 @@ const handelZhu3 = () => { | ... | @@ -763,10 +816,13 @@ const handelZhu3 = () => { |
| 763 | emphasis: { | 816 | emphasis: { |
| 764 | focus: 'series' | 817 | focus: 'series' |
| 765 | }, | 818 | }, |
| 766 | data: [140, 232, 301, 264, 200, 340, 250, 301, 264, 200, 340, 250] | 819 | // data: [140, 232, 301, 264, 200, 340, 250, 301, 264, 200, 340, 250] |
| 820 | data: row1.list.map(val => { | ||
| 821 | return (val.XJCOST / 10000).toFixed(0) | ||
| 822 | }) | ||
| 767 | }, | 823 | }, |
| 768 | { | 824 | { |
| 769 | name: '2025年', | 825 | name: name2, |
| 770 | type: 'line', | 826 | type: 'line', |
| 771 | stack: 'Total', | 827 | stack: 'Total', |
| 772 | smooth: false, | 828 | smooth: false, |
| ... | @@ -790,14 +846,37 @@ const handelZhu3 = () => { | ... | @@ -790,14 +846,37 @@ const handelZhu3 = () => { |
| 790 | emphasis: { | 846 | emphasis: { |
| 791 | focus: 'series' | 847 | focus: 'series' |
| 792 | }, | 848 | }, |
| 793 | data: [120, 282, 211, 234, 220, 340, 310, 120, 282, 211, 234, 220] | 849 | // data: [120, 282, 211, 234, 220, 340, 310, 120, 282, 211, 234, 220] |
| 850 | data: row2.list.map(val => { | ||
| 851 | return (val.XJCOST / 10000).toFixed(0) | ||
| 852 | }) | ||
| 794 | }, | 853 | }, |
| 795 | ] | 854 | ] |
| 796 | } | 855 | } |
| 797 | chart33.setOption(option) | 856 | chart33.setOption(option) |
| 798 | autoHover(chart33, option, 0, 2000) | 857 | autoHover(chart33, option, 0, 2000) |
| 799 | } | 858 | } |
| 800 | const handelZhu4 = () => { | 859 | const handelZhu4 = (row1, row2) => { |
| 860 | let name1 = row1.BLOCK | ||
| 861 | let name2 = row2.BLOCK | ||
| 862 | |||
| 863 | let x1 = row1.list.forEach(val => val.type = 1) || [] | ||
| 864 | let x2 = row2.list.forEach(val => val.type = 2) || [] | ||
| 865 | let list = [...x1, ...x2].map(val => val.BASE) | ||
| 866 | let listX = [] | ||
| 867 | let listL = [] | ||
| 868 | let listH = [] | ||
| 869 | for (const val of list) { | ||
| 870 | listX.push(val.BASE) | ||
| 871 | if (val.type == 1) { | ||
| 872 | listL.push(val.DSO) | ||
| 873 | listH.push(0) | ||
| 874 | } else { | ||
| 875 | listL.push(0) | ||
| 876 | listH.push(val.DSO) | ||
| 877 | } | ||
| 878 | } | ||
| 879 | |||
| 801 | chart44 = echarts.init(zhuRef4.value) | 880 | chart44 = echarts.init(zhuRef4.value) |
| 802 | const option = { | 881 | const option = { |
| 803 | tooltip: { | 882 | tooltip: { |
| ... | @@ -821,7 +900,8 @@ const handelZhu4 = () => { | ... | @@ -821,7 +900,8 @@ const handelZhu4 = () => { |
| 821 | { | 900 | { |
| 822 | type: 'category', | 901 | type: 'category', |
| 823 | stack: 'Ad', | 902 | stack: 'Ad', |
| 824 | data: ['山西', '陕西', '新疆', '伊拉克', '塘沽', '深圳', '湛江', '汉南', '上海'], | 903 | // data: ['山西', '陕西', '新疆', '伊拉克', '塘沽', '深圳', '湛江', '汉南', '上海'], |
| 904 | data: listX, | ||
| 825 | axisLine: { | 905 | axisLine: { |
| 826 | show: true, | 906 | show: true, |
| 827 | lineStyle: { | 907 | lineStyle: { |
| ... | @@ -835,7 +915,7 @@ const handelZhu4 = () => { | ... | @@ -835,7 +915,7 @@ const handelZhu4 = () => { |
| 835 | yAxis: [ | 915 | yAxis: [ |
| 836 | { | 916 | { |
| 837 | type: 'value', | 917 | type: 'value', |
| 838 | name: '金额(万元)', | 918 | name: '天', |
| 839 | axisLine: { | 919 | axisLine: { |
| 840 | show: true, | 920 | show: true, |
| 841 | lineStyle: { | 921 | lineStyle: { |
| ... | @@ -848,13 +928,14 @@ const handelZhu4 = () => { | ... | @@ -848,13 +928,14 @@ const handelZhu4 = () => { |
| 848 | ], | 928 | ], |
| 849 | series: [ | 929 | series: [ |
| 850 | { | 930 | { |
| 851 | name: '海陆', | 931 | name: name1, |
| 852 | type: 'bar', | 932 | type: 'bar', |
| 853 | stack: 'Ad', | 933 | barGap: 0, |
| 854 | emphasis: { | 934 | emphasis: { |
| 855 | focus: 'series' | 935 | focus: 'series' |
| 856 | }, | 936 | }, |
| 857 | data: [320, 332, 301, 334, 390, 330, 320, 320, 332, 301, 334, 390], | 937 | // data: [320, 332, 301, 334, 390, 330, 320, 320, 332, 301, 334, 390], |
| 938 | data: listL, | ||
| 858 | itemStyle: { | 939 | itemStyle: { |
| 859 | color: { | 940 | color: { |
| 860 | type: 'linear', | 941 | type: 'linear', |
| ... | @@ -867,7 +948,30 @@ const handelZhu4 = () => { | ... | @@ -867,7 +948,30 @@ const handelZhu4 = () => { |
| 867 | borderColor: 'rgba(0, 255, 190, 1)', | 948 | borderColor: 'rgba(0, 255, 190, 1)', |
| 868 | borderWidth: 1 | 949 | borderWidth: 1 |
| 869 | }, | 950 | }, |
| 870 | barWidth: '35%', | 951 | barWidth: '30%', |
| 952 | }, | ||
| 953 | { | ||
| 954 | name: name2, | ||
| 955 | type: 'bar', | ||
| 956 | barGap: 0, | ||
| 957 | emphasis: { | ||
| 958 | focus: 'series' | ||
| 959 | }, | ||
| 960 | // data: [30, 332, 301, 334, 390, 330, 320, 320, 332, 301, 334, 390], | ||
| 961 | data: listH, | ||
| 962 | itemStyle: { | ||
| 963 | color: { | ||
| 964 | type: 'linear', | ||
| 965 | x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 | ||
| 966 | colorStops: [ | ||
| 967 | {offset: 0, color: 'rgba(0, 168, 255, 1)'}, // 顶部颜色 | ||
| 968 | {offset: 1, color: 'rgba(77, 197, 243, 1)'} // 底部颜色 | ||
| 969 | ] | ||
| 970 | }, | ||
| 971 | borderColor: 'rgba(0, 168, 255, .5)', | ||
| 972 | borderWidth: 1 | ||
| 973 | }, | ||
| 974 | barWidth: '30%', | ||
| 871 | }, | 975 | }, |
| 872 | ] | 976 | ] |
| 873 | } | 977 | } | ... | ... |
| 1 | import { defineConfig, loadEnv } from 'vite' | 1 | import {defineConfig, loadEnv} from 'vite' |
| 2 | import path, { resolve } from 'path' | 2 | import path, {resolve} from 'path' |
| 3 | import createVitePlugins from './vite/plugins' | 3 | import createVitePlugins from './vite/plugins' |
| 4 | import inject from '@rollup/plugin-inject' | 4 | import inject from '@rollup/plugin-inject' |
| 5 | import commonjs from '@rollup/plugin-commonjs' | 5 | import commonjs from '@rollup/plugin-commonjs' |
| 6 | // import legacy from '@vitejs/plugin-legacy' | ||
| 7 | 6 | ||
| 8 | // https://vitejs.dev/config/ | 7 | export default defineConfig(({mode, command}) => { |
| 9 | export default defineConfig(({ mode, command }) => { | ||
| 10 | const env = loadEnv(mode, process.cwd()) | 8 | const env = loadEnv(mode, process.cwd()) |
| 11 | return { | 9 | return { |
| 12 | // 部署生产环境和开发环境下的URL。 | 10 | // 部署生产环境和开发环境下的URL。 |
| ... | @@ -20,32 +18,8 @@ export default defineConfig(({ mode, command }) => { | ... | @@ -20,32 +18,8 @@ export default defineConfig(({ mode, command }) => { |
| 20 | 'window.katex': 'katex', | 18 | 'window.katex': 'katex', |
| 21 | 'window.Quill': ['@vueup/vue-quill', 'Quill'] | 19 | 'window.Quill': ['@vueup/vue-quill', 'Quill'] |
| 22 | }) | 20 | }) |
| 23 | // legacy({ | ||
| 24 | // targets: ['defaults', 'not IE 11'], // 需要兼容的目标列表,可以设置多个 | ||
| 25 | // additionalLegacyPolyfills: ['regenerator-runtime/runtime'], | ||
| 26 | // renderLegacyChunks: true, | ||
| 27 | // polyfills: [ | ||
| 28 | // 'es.symbol', | ||
| 29 | // 'es.array.filter', | ||
| 30 | // 'es.promise', | ||
| 31 | // 'es.promise.finally', | ||
| 32 | // 'es/map', | ||
| 33 | // 'es/set', | ||
| 34 | // 'es.array.for-each', | ||
| 35 | // 'es.object.define-properties', | ||
| 36 | // 'es.object.define-property', | ||
| 37 | // 'es.object.get-own-property-descriptor', | ||
| 38 | // 'es.object.get-own-property-descriptors', | ||
| 39 | // 'es.object.keys', | ||
| 40 | // 'es.object.to-string', | ||
| 41 | // 'web.dom-collections.for-each', | ||
| 42 | // 'esnext.global-this', | ||
| 43 | // 'esnext.string.match-all' | ||
| 44 | // ] | ||
| 45 | // }) | ||
| 46 | ], | 21 | ], |
| 47 | resolve: { | 22 | resolve: { |
| 48 | // https://cn.vitejs.dev/config/#resolve-alias | ||
| 49 | alias: { | 23 | alias: { |
| 50 | // 设置路径 | 24 | // 设置路径 |
| 51 | '~': path.resolve(__dirname, './'), | 25 | '~': path.resolve(__dirname, './'), |
| ... | @@ -62,41 +36,14 @@ export default defineConfig(({ mode, command }) => { | ... | @@ -62,41 +36,14 @@ export default defineConfig(({ mode, command }) => { |
| 62 | host: true, | 36 | host: true, |
| 63 | open: true, | 37 | open: true, |
| 64 | proxy: { | 38 | proxy: { |
| 65 | // https://cn.vitejs.dev/config/#server-proxy | 39 | '/dev-api/portal': { |
| 66 | '/dev-api/ztx-train': { | 40 | // target: 'http://116.63.185.147:8088', |
| 67 | // target: 'http://123.60.96.243:1896/stage-api', | 41 | target: 'https://ff9451fo0879.vicp.fun', |
| 68 | target: 'https://jijin.wtwuxicenter.com/stage-api', | ||
| 69 | changeOrigin: true, | 42 | changeOrigin: true, |
| 70 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-train/, '') | 43 | rewrite: (p) => p.replace(/^\/dev-api\/portal/, '') |
| 71 | }, | ||
| 72 | '/dev-api/ztx-match': { | ||
| 73 | // target: 'http://192.168.1.118:8083', | ||
| 74 | target: 'https://jijin.wtwuxicenter.com/stage-api', | ||
| 75 | changeOrigin: true, | ||
| 76 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-match/, '') | ||
| 77 | }, | ||
| 78 | '/dev-api/ztx-webSite': { | ||
| 79 | target: 'https://wdsfwuxicenter.com/stage-api/', | ||
| 80 | changeOrigin: true, | ||
| 81 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') | ||
| 82 | }, | ||
| 83 | '/dev-api': { | ||
| 84 | // target: 'http://192.168.1.207:5511/', | ||
| 85 | target: 'https://jijin.wtwuxicenter.com/stage-api', | ||
| 86 | changeOrigin: true, | ||
| 87 | rewrite: (p) => p.replace(/^\/dev-api/, '') | ||
| 88 | }, | ||
| 89 | '/ticket': { | ||
| 90 | // target: 'http://192.168.1.131:8098/', | ||
| 91 | // target: 'http://192.168.1.131:8081/', | ||
| 92 | target: 'https://jijin.wtwuxicenter.com/h5/', | ||
| 93 | // target: 'https://ticketh5.wdsfwuxicenter.com/h5/', | ||
| 94 | changeOrigin: true, | ||
| 95 | rewrite: (p) => p.replace(/^\/ticket/, '') | ||
| 96 | } | 44 | } |
| 97 | } | 45 | } |
| 98 | }, | 46 | }, |
| 99 | // fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file | ||
| 100 | css: { | 47 | css: { |
| 101 | postcss: { | 48 | postcss: { |
| 102 | plugins: [ | 49 | plugins: [ |
| ... | @@ -114,7 +61,6 @@ export default defineConfig(({ mode, command }) => { | ... | @@ -114,7 +61,6 @@ export default defineConfig(({ mode, command }) => { |
| 114 | } | 61 | } |
| 115 | }, | 62 | }, |
| 116 | build: { | 63 | build: { |
| 117 | // target: 'es2015', | ||
| 118 | rollupOptions: { | 64 | rollupOptions: { |
| 119 | input: { | 65 | input: { |
| 120 | main: resolve(__dirname, 'index.html') | 66 | main: resolve(__dirname, 'index.html') | ... | ... |
-
Please register or sign in to post a comment