diff --git a/src/api/daikin/base.ts b/src/api/daikin/base.ts index 6b2ee1d..520567b 100755 --- a/src/api/daikin/base.ts +++ b/src/api/daikin/base.ts @@ -1417,3 +1417,32 @@ export async function fetchPostList(params?: any) { export async function fetchInternalUserStat(params?: any) { return http.get(`/moduleStat/internalUserStat`, { params }) } + +// CD-三个据点总发注金额饼状图 +export async function fetchPartStatisRate(params?: any) { + return http.get(`/cdcontent/partStatisRate`, { params }) +} + +// CD-三据点历年发注金额 +export async function fetchPartHisList(params?: any) { + return http.get(`/cdcontent/partHisList`, { params }) +} + +// CD-小业种发注金额 +export async function fetchPartminBusSeedsRate(params?: any) { + return http.get(`/cdcontent/partminBusSeedsRate`, { params }) +} + +// CD-大业种发注金额 +export async function fetchPartmaxBusSeedsRate(params?: any) { + return http.get(`/cdcontent/partmaxBusSeedsRate`, { params }) +} + +// CD-图表2-大业种发注金额 +export async function fetchPartmaxBusSeedsDetailList(params?: any) { + return http.get(`/cdcontent/maxBusSeedsDetailList`, { params }) +} +// CD-图表2-大业种发注金额供应商 +export async function fetchPartmaxBusSeedsRateBySupplier(params?: any) { + return http.get(`/cdcontent/partmaxBusSeedsRateBySupplier`, { params }) +} diff --git a/src/components/AppHeadUserInfo.vue b/src/components/AppHeadUserInfo.vue index 15d6666..76762d5 100755 --- a/src/components/AppHeadUserInfo.vue +++ b/src/components/AppHeadUserInfo.vue @@ -56,11 +56,11 @@ const noticeShow = ref(false) let showIs = false //模块id,1-情报 2-市况汇率 3-数据平台 4-BCP管理 5-碳中和 6-品质 7-差别化LAB const goModeuls = (obj) => { - const { moduleId } = obj + const { moduleId, type } = obj if (!moduleId) return switch (moduleId) { case 1: - if (store.user.isReview === 1 || store.user.isPublish === 1) { + if ((store.user.isReview === 1 || store.user.isPublish === 1) && type == 2) { push('/Home/Process') } else { push('/Home/intelligence') @@ -85,7 +85,7 @@ const goModeuls = (obj) => { push({ name: 'Diffspace' }) break case 9: - push({ name: 'DataBaseReview' }) + push({ name: type === 2 ? 'DataBaseReview' : 'DataBase' }) break default: push('/Home/intelligence') @@ -146,12 +146,18 @@ const toFootPrint = () => {
-
{{ ite.moduleName }}
- {{ ite.moduleCount }} + +
@@ -161,8 +167,8 @@ const toFootPrint = () => { {{ store.user.reviewCount ?? 0 }} - --> - - - + + --> @@ -222,7 +225,7 @@ const toFootPrint = () => { position: absolute; top: 52px; left: -3px; - width: 200px; + min-width: 240px; background: rgb(255, 255, 255); max-height: 520px; z-index: 500; diff --git a/src/main.ts b/src/main.ts index 07486b4..9048b45 100755 --- a/src/main.ts +++ b/src/main.ts @@ -1,22 +1,21 @@ -import { createApp } from "vue"; -import { createPinia } from "pinia"; +import { createApp } from 'vue' +import { createPinia } from 'pinia' import ECharts from 'vue-echarts' -import App from "./App.vue"; -import router from "./router"; -import "./styles/smallDog.css" -import "./styles/main.css"; -import "uno.css"; -import "animate.css"; // https://animate.style/ +import App from './App.vue' +import router from './router' +import './styles/smallDog.css' +import './styles/main.css' +import 'uno.css' +import 'animate.css' // https://animate.style/ import * as ElementPlusIconsVue from '@element-plus/icons-vue' - -const app = createApp(App); +const app = createApp(App) for (const [key, component] of Object.entries(ElementPlusIconsVue)) { - app.component(key, component) - } -app.component('VChart',ECharts) -app.use(createPinia()); -app.use(router); + app.component(key, component) +} +app.component('VChart', ECharts) +app.use(createPinia()) +app.use(router) -app.mount("#app"); +app.mount('#app') diff --git a/src/types/auto-import.d.ts b/src/types/auto-import.d.ts index 0fd063c..64ff13c 100755 --- a/src/types/auto-import.d.ts +++ b/src/types/auto-import.d.ts @@ -275,5 +275,6 @@ declare global { // for type re-export declare global { // @ts-ignore - export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue' + export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' + import('vue') } diff --git a/src/views/home/Home.vue b/src/views/home/Home.vue index 74fe2ab..e0fe1f7 100755 --- a/src/views/home/Home.vue +++ b/src/views/home/Home.vue @@ -190,19 +190,25 @@ const { chartRef: chartRef2, option: chartOption2, state } = useChart21() const { chartRef: chartRef22, option: chartOption22 } = useChart22() const { chartRef: chartRef23, option: chartOption23 } = useChart23() const { chartRef: chartRef3, option: chartOption3 } = useChart3() + const displayDiffValue = (diffValue: number) => { + // return diffValue + '%' if (diffValue > 0) { - return `+${diffValue} %` + return `+${diffValue}%` } else if (diffValue < 0) { - return `-${Math.abs(diffValue)} %` + return `-${Math.abs(diffValue)}%` } else { - return `${diffValue} %` + // return `${formatNumber(diffValue)} %` + return `${diffValue}%` } } async function setModule(codes: any, names: any) { const moduleCode = codes console.log(codes, names) + if (names == 'CD' && !userCode.value) { + return + } push({ name: names }) const { code } = await report({ moduleCode }) } diff --git a/src/views/home/cd/CD-bak1.vue b/src/views/home/cd/CD-bak1.vue new file mode 100755 index 0000000..e3ab885 --- /dev/null +++ b/src/views/home/cd/CD-bak1.vue @@ -0,0 +1,479 @@ + + + + + + diff --git a/src/views/home/cd/CD.vue b/src/views/home/cd/CD.vue index 6b889c4..8e3ae49 100755 --- a/src/views/home/cd/CD.vue +++ b/src/views/home/cd/CD.vue @@ -1,464 +1,612 @@ diff --git a/src/views/home/cd/chartData.ts b/src/views/home/cd/chartData.ts new file mode 100644 index 0000000..bd9caaf --- /dev/null +++ b/src/views/home/cd/chartData.ts @@ -0,0 +1,270 @@ +import { color, type EChartsOption } from 'echarts' + +//数字转千分位 +export function formatNum(num: any) { + const n = String(num).replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,') + return n +} + +export function totalPieCharData(arr: any = [], colorList: any = {}) { + // const color: any = [] + // const data = arr.map((item: any) => { + // color.push(colorList[item.moduleCode]) + // return { + // name: item.moduleName, + // value: item.visitCount, + // _code: item.moduleCode + // } + // }) + const option: EChartsOption = { + tooltip: { + // formatter: '{b} : {c}百万 ({d}%)', + // formatter: '{b} : {c} ({d}%)', + formatter: function (params: any) { + return ( + params.data.name + + ' : ' + + formatNum(params.data.value) + + '\n' + + '(' + + params.percent + + '%' + + ')' + ) + }, + trigger: 'item' + }, + legend: { + show: false, + // top: '5%', + left: 'center', + textStyle: { + fontSize: 12, + color: '#fff' + } + }, + graphic: { + type: 'text', + left: 'center', + top: 'center', + style: { + text: + '总计' + //圆饼中心显示数据,这里是显示得总数 + '\n' + + formatNum(222299939.23), + fill: '#fff', + fontSize: 14, + width: 30, + height: 30, + textAlign: 'center' + } + }, + grid: { + containLabel: true + }, + series: [ + { + // name: 'Access', + type: 'pie', + radius: ['40%', '70%'], + avoidLabelOverlap: false, + label: { + show: true, + color: '#fff', + fontSize: 12, + formatter: '{b} ({d}%)' + // position: 'center' + }, + // emphasis: { + // label: { + // show: true, + // fontSize: 40, + // fontWeight: 'bold', + // color: '#fff' + // } + // }, + // labelLine: { + // show: true + // }, + data: [] + } + ] + } + return option +} + +export function totalBarCharData(params: any = {}) { + const option = { + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'cross', + crossStyle: { + color: '#999' + } + } + }, + legend: { + // type: 'scroll', + data: ['Evaporation', 'Precipitation', 'Temperature'], + textStyle: { + fontSize: 12, + color: '#fff' + } + }, + grid: { + left: '7%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: [ + { + type: 'category', + // data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], + data: [], + axisPointer: { + type: 'shadow' + }, + axisLabel: { + color: '#fff' + } + } + ], + // graphic: { + // type: 'text', + // left: '0', + // top: 'center', + // rotation: 90, + // style: { + // text: '百万元', + // fill: '#fff', + // fontSize: 14, + // textAlign: 'center' + // } + // }, + yAxis: [ + { + type: 'value', + name: '百万元', + // min: 0, + // max: 250, + // interval: 50, + axisLabel: { + formatter: '{value}', + color: '#fff' + }, + nameTextStyle: { + color: '#fff', + align: 'right', + padding: [0, 8, 0, 0] + }, + // nameRotate: 90, + // nameTruncate: { + // maxWidth: 80, + // ellipsis: '...' + // }, + // nameLocation: 'left', + // nameGap: 50, + axisLine: { + lineStyle: { + color: '#1f78af', + width: 2 //y轴宽度,这里是为了突出显示加上的 + } + } + }, + { + type: 'value', + // name: 'Temperature', + // min: 0, + // max: 25, + // interval: 5, + axisLabel: { + formatter: '{value}', + color: '#fff' + } + } + ], + series: [] + } + + return option +} + +export function disBarCharData(params: any = {}) { + const option = { + minBusSeeds: '', + tooltip: { + trigger: 'axis', + axisPointer: { + // Use axis to trigger tooltip + type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow' + } + }, + legend: { + left: 'center', + right: 'center', + type: 'scroll', + pageIconInactiveColor: '#aaa', + pageIconColor: '#fff', + pageTextStyle: { + color: '#fff' + }, + data: [], + textStyle: { + fontSize: 12, + color: '#fff' + } + }, + grid: { + left: '6%', + right: '4%', + bottom: '3%', + containLabel: true + }, + yAxis: { + type: 'value', + name: '百万元', + axisLabel: { + color: '#fff' + }, + nameTextStyle: { + color: '#fff', + align: 'right', + padding: [0, 8, 0, 0] + } + // nameRotate: 90, + // nameTruncate: { + // maxWidth: 80, + // ellipsis: '...' + // }, + // nameLocation: 'end' + // nameGap: 50 + }, + xAxis: { + type: 'category', + // data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], + data: [], + axisLabel: { + color: '#fff' + } + }, + series: [] + // series: [ + // { + // name: 'Direct', + // type: 'bar', + // stack: 'total', + // label: { + // show: true + // }, + // emphasis: { + // focus: 'series' + // }, + // data: [320, 302, 301, 334, 390, 330, 320] + // }, + // ] + } + + return option +} diff --git a/src/views/home/cd/img/1.png b/src/views/home/cd/img/1.png new file mode 100755 index 0000000..cb567c6 Binary files /dev/null and b/src/views/home/cd/img/1.png differ diff --git a/src/views/home/cd/img/2.png b/src/views/home/cd/img/2.png new file mode 100755 index 0000000..61a7de0 Binary files /dev/null and b/src/views/home/cd/img/2.png differ diff --git a/src/views/home/cd/img/3.png b/src/views/home/cd/img/3.png new file mode 100644 index 0000000..a628a26 Binary files /dev/null and b/src/views/home/cd/img/3.png differ diff --git a/src/views/home/cd/img/Vector@2x(1).png b/src/views/home/cd/img/Vector@2x(1).png new file mode 100755 index 0000000..63b461c Binary files /dev/null and b/src/views/home/cd/img/Vector@2x(1).png differ diff --git a/src/views/home/cd/img/Vector@2x.png b/src/views/home/cd/img/Vector@2x.png new file mode 100755 index 0000000..6f5c2e5 Binary files /dev/null and b/src/views/home/cd/img/Vector@2x.png differ diff --git a/src/views/home/cd/img/bg-1.png b/src/views/home/cd/img/bg-1.png new file mode 100644 index 0000000..47001a0 Binary files /dev/null and b/src/views/home/cd/img/bg-1.png differ diff --git a/src/views/home/cd/img/bg.png b/src/views/home/cd/img/bg.png new file mode 100644 index 0000000..67b84d6 Binary files /dev/null and b/src/views/home/cd/img/bg.png differ diff --git a/src/views/home/cd/img/h.png b/src/views/home/cd/img/h.png new file mode 100755 index 0000000..c49f48e Binary files /dev/null and b/src/views/home/cd/img/h.png differ diff --git a/src/views/home/cd/img/y.png b/src/views/home/cd/img/y.png new file mode 100755 index 0000000..7bfaa39 Binary files /dev/null and b/src/views/home/cd/img/y.png differ diff --git a/src/views/home/cd/img/you.png b/src/views/home/cd/img/you.png new file mode 100755 index 0000000..aac2629 Binary files /dev/null and b/src/views/home/cd/img/you.png differ diff --git a/src/views/home/cd/img/z.png b/src/views/home/cd/img/z.png new file mode 100755 index 0000000..4a85954 Binary files /dev/null and b/src/views/home/cd/img/z.png differ diff --git a/src/views/home/cd/img/zt.png b/src/views/home/cd/img/zt.png new file mode 100755 index 0000000..6366f6c Binary files /dev/null and b/src/views/home/cd/img/zt.png differ diff --git a/src/views/home/cd/img/zuo.png b/src/views/home/cd/img/zuo.png new file mode 100755 index 0000000..e1a69f6 Binary files /dev/null and b/src/views/home/cd/img/zuo.png differ diff --git a/src/views/home/csr/CSRContent23.vue b/src/views/home/csr/CSRContent23.vue index 401a522..e76abb5 100755 --- a/src/views/home/csr/CSRContent23.vue +++ b/src/views/home/csr/CSRContent23.vue @@ -69,6 +69,7 @@ const getCsrSupplier = () => { } const csrSupplierList = ref([]) +// const selMonth = ref((new Date().getMonth() + 1).toString()) const selMonth = ref('') const getCsrSupplierList = (index?: any) => { const _m = +months[index] @@ -332,7 +333,9 @@ getCsrSupplierTaskInfo()
- 未提交供应商明细({{ +selMonth < 4 ? +query.year + 1 : query.year }}年{{ selMonth }}月) + 未提交供应商明细({{ selMonth && +selMonth < 4 ? +query.year + 1 : query.year }}年{{ + selMonth + }}{{ selMonth ? '月' : '' }})
更新时间:{{ updateTime }} diff --git a/src/views/home/search/index.vue b/src/views/home/search/index.vue index 4b9a887..928cb8c 100755 --- a/src/views/home/search/index.vue +++ b/src/views/home/search/index.vue @@ -148,11 +148,11 @@ function getFileNameFromUrl(url: string) { } const goModule = (item, type) => { - const { moduleCode, id } = item + const { moduleCode, id, cateId } = item const { modulePath, path } = codePath[moduleCode] if (modulePath) { if (type === 'module') { - push(modulePath) + moduleCode === 'App_Database' ? push(modulePath + `?id=${cateId}`) : push(modulePath) } else { push(path + id) } diff --git a/src/views/index.vue b/src/views/index.vue index 9016b5f..851776a 100755 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -6,6 +6,7 @@ import { NModal, NPopover } from 'naive-ui' import { useUserStore } from '@/stores/modules/user' import Searchs from '@/components/search.vue' import { report, treeDbList } from '@/api/daikin/base' +// import axios from 'axios' useTitle('大金中国调达本部 HOMEPAGE') const { push } = useRouter() const store = useUserStore() @@ -69,7 +70,8 @@ const Menus = ref([ { key: 'YCWZ', name: '调达本部才望子', - link: 'http://172.31.119.37/scripts/cbgrn/grn.exe/portal/index' + isClick: true + // link: 'http://172.31.119.37/scripts/cbgrn/grn.exe/portal/index' }, { key: 'GCDB', @@ -166,6 +168,10 @@ watchEffect(() => { }, 0) }) function goChild(menu: any) { + if (menu.isClick) { + goUrl() + return + } activeItem = menu.key if (menu.key === 'CODE') { shorm.value = true @@ -176,6 +182,15 @@ function goChild(menu: any) { push({ name: menu.key, query: menu.params || {} }) } } + +const goUrl = () => { + const url = store.user?.cwzLoginUrl + const doman = url ? url.split('?')?.shift() : '' + if (!doman) return + fetch(url).then((res) => { + window.open(doman, '_blank') + }) +} var activeItem = 0 @@ -288,7 +303,12 @@ var activeItem = 0