diff --git a/.env.dev b/.env.dev index a0f83b9..2cefa71 100644 --- a/.env.dev +++ b/.env.dev @@ -5,7 +5,7 @@ ENV = 'development' VUE_APP_TITLE = 芋道管理系统 # 芋道管理系统/开发环境 -VUE_APP_BASE_API = 'http://192.168.0.30:48080' +VUE_APP_BASE_API = 'http://192.168.1.61:48080' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/package.json b/package.json index efe8720..0a67be3 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "highlight.js": "^11.9.0", "js-beautify": "^1.15.1", "jsencrypt": "3.3.1", + "mockjs": "^1.1.0", "moment": "^2.30.1", "nprogress": "0.2.0", "quill": "^1.3.7", diff --git a/src/assets/YouSheBiaoTiHei-2.ttf b/src/assets/YouSheBiaoTiHei-2.ttf new file mode 100644 index 0000000..3729151 Binary files /dev/null and b/src/assets/YouSheBiaoTiHei-2.ttf differ diff --git a/src/assets/bgearth.png b/src/assets/bgearth.png new file mode 100644 index 0000000..66d9af2 Binary files /dev/null and b/src/assets/bgearth.png differ diff --git a/src/assets/images/copilot-bg.png b/src/assets/images/copilot-bg.png new file mode 100644 index 0000000..11ebf19 Binary files /dev/null and b/src/assets/images/copilot-bg.png differ diff --git a/src/assets/images/export-icon.png b/src/assets/images/export-icon.png new file mode 100644 index 0000000..4575cd1 Binary files /dev/null and b/src/assets/images/export-icon.png differ diff --git a/src/assets/images/full-icon.png b/src/assets/images/full-icon.png new file mode 100644 index 0000000..18a35dc Binary files /dev/null and b/src/assets/images/full-icon.png differ diff --git a/src/assets/images/homeindex/bipv-icon.png b/src/assets/images/homeindex/bipv-icon.png new file mode 100644 index 0000000..a0860c1 Binary files /dev/null and b/src/assets/images/homeindex/bipv-icon.png differ diff --git a/src/assets/images/homeindex/chip-icon-2.png b/src/assets/images/homeindex/chip-icon-2.png new file mode 100644 index 0000000..8faa317 Binary files /dev/null and b/src/assets/images/homeindex/chip-icon-2.png differ diff --git a/src/assets/images/homeindex/chip-icon.png b/src/assets/images/homeindex/chip-icon.png new file mode 100644 index 0000000..cc39d90 Binary files /dev/null and b/src/assets/images/homeindex/chip-icon.png differ diff --git a/src/assets/images/homeindex/exit-fullscreen.png b/src/assets/images/homeindex/exit-fullscreen.png new file mode 100644 index 0000000..d581c1f Binary files /dev/null and b/src/assets/images/homeindex/exit-fullscreen.png differ diff --git a/src/assets/images/homeindex/fto-icon.png b/src/assets/images/homeindex/fto-icon.png new file mode 100644 index 0000000..cc13204 Binary files /dev/null and b/src/assets/images/homeindex/fto-icon.png differ diff --git a/src/assets/images/homeindex/fullscreen.png b/src/assets/images/homeindex/fullscreen.png new file mode 100644 index 0000000..25676e5 Binary files /dev/null and b/src/assets/images/homeindex/fullscreen.png differ diff --git a/src/assets/images/homeindex/header-bg.png b/src/assets/images/homeindex/header-bg.png new file mode 100644 index 0000000..905a8a8 Binary files /dev/null and b/src/assets/images/homeindex/header-bg.png differ diff --git a/src/assets/images/homeindex/std-icon.png b/src/assets/images/homeindex/std-icon.png new file mode 100644 index 0000000..b3a492b Binary files /dev/null and b/src/assets/images/homeindex/std-icon.png differ diff --git a/src/assets/pinicon.png b/src/assets/pinicon.png new file mode 100644 index 0000000..e68458c Binary files /dev/null and b/src/assets/pinicon.png differ diff --git a/src/main.js b/src/main.js index 9e61108..248c7f8 100644 --- a/src/main.js +++ b/src/main.js @@ -9,67 +9,78 @@ import Vue from 'vue' import Element from 'element-ui' // 修改如下样式文件,覆盖样式,或者新增样式文件 -import './assets/styles/element-variables.scss' -import '@/assets/styles/index.scss' // global css -import '@/assets/styles/ruoyi.scss' // ruoyi css +import "./assets/styles/element-variables.scss"; +import "@/assets/styles/index.scss"; // global css +import "@/assets/styles/ruoyi.scss"; // ruoyi css -import App from './App' -import store from './store' -import router from './router' -import directive from './directive' // directive -import plugins from './plugins' // plugins +import App from "./App"; +import store from "./store"; +import router from "./router"; +import directive from "./directive"; // directive +import plugins from "./plugins"; // plugins -import './assets/icons' // icon -import './permission' // permission control +import "./assets/icons"; // icon +import "./permission"; // permission control import { getDicts } from "@/api/system/dict/data"; -import { parseTime, resetForm, handleTree, addBeginAndEndTime, divide } from "@/utils/ruoyi"; +import { + parseTime, + resetForm, + handleTree, + addBeginAndEndTime, + divide, +} from "@/utils/ruoyi"; import Pagination from "@/components/Pagination"; // 自定义表格工具扩展 -import RightToolbar from "@/components/RightToolbar" +import RightToolbar from "@/components/RightToolbar"; // 代码高亮插件 // import hljs from 'highlight.js' // import 'highlight.js/styles/github-gist.css' -import { DICT_TYPE, getDictDataLabel, getDictDatas, getDictDatas2 } from "@/utils/dict"; -import CodeBrickZj from 'code-brick-zj'; -import './theme/index.css'; // 自定义主题包 - code-brick-zj +import { + DICT_TYPE, + getDictDataLabel, + getDictDatas, + getDictDatas2, +} from "@/utils/dict"; + +import "./theme/index.css"; // 自定义主题包 - code-brick-zj // 全局方法挂载 -Vue.prototype.getDicts = getDicts -Vue.prototype.parseTime = parseTime -Vue.prototype.resetForm = resetForm -Vue.prototype.getDictDatas = getDictDatas -Vue.prototype.getDictDatas2 = getDictDatas2 -Vue.prototype.getDictDataLabel = getDictDataLabel -Vue.prototype.DICT_TYPE = DICT_TYPE -Vue.prototype.handleTree = handleTree -Vue.prototype.addBeginAndEndTime = addBeginAndEndTime -Vue.prototype.divide = divide +Vue.prototype.getDicts = getDicts; +Vue.prototype.parseTime = parseTime; +Vue.prototype.resetForm = resetForm; +Vue.prototype.getDictDatas = getDictDatas; +Vue.prototype.getDictDatas2 = getDictDatas2; +Vue.prototype.getDictDataLabel = getDictDataLabel; +Vue.prototype.DICT_TYPE = DICT_TYPE; +Vue.prototype.handleTree = handleTree; +Vue.prototype.addBeginAndEndTime = addBeginAndEndTime; +Vue.prototype.divide = divide; // 全局组件挂载 -Vue.component('DictTag', DictTag) -Vue.component('Pagination', Pagination) -Vue.component('RightToolbar', RightToolbar) +Vue.component("DictTag", DictTag); +Vue.component("Pagination", Pagination); +Vue.component("RightToolbar", RightToolbar); // 字典标签组件 -import DictTag from '@/components/DictTag' +import DictTag from "@/components/DictTag"; // 头部标签插件 -import VueMeta from 'vue-meta' +import VueMeta from "vue-meta"; Vue.use(directive) Vue.use(plugins) Vue.use(VueMeta) Vue.use(CodeBrickZj); // Form Generator 组件需要使用到 tinymce -import Tinymce from '@/components/tinymce/index.vue' -Vue.component('tinymce', Tinymce) -import '@/assets/icons' -import request from "@/utils/request" -console.log(request) -Vue.prototype.$axios = request -import '@/styles/index.scss' +import Tinymce from "@/components/tinymce/index.vue"; +Vue.component("tinymce", Tinymce); +import "@/assets/icons"; +import request from "@/utils/request"; +console.log(request); +Vue.prototype.$axios = request; +import "@/styles/index.scss"; // 默认点击背景不关闭弹窗 -import ElementUI from 'element-ui' -ElementUI.Dialog.props.closeOnClickModal.default = false +import ElementUI from "element-ui"; +ElementUI.Dialog.props.closeOnClickModal.default = false; /** * If you don't want to use mock-server @@ -84,11 +95,11 @@ Vue.use(Element, { size: localStorage.getItem("size") || "medium", // set element-ui default size }); -Vue.config.productionTip = false +Vue.config.productionTip = false; new Vue({ - el: '#app', + el: "#app", router, store, - render: h => h(App) -}) + render: (h) => h(App), +}); diff --git a/src/mixins/basic-add.js b/src/mixins/basic-add.js index 73cafd7..0aa7ea3 100644 --- a/src/mixins/basic-add.js +++ b/src/mixins/basic-add.js @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2022-08-24 11:19:43 * @LastEditors: zwq - * @LastEditTime: 2024-04-02 09:34:56 + * @LastEditTime: 2024-04-09 16:56:16 * @Description: */ import { listData } from "@/api/system/dict/data"; //数据字典接口 @@ -14,7 +14,7 @@ export default { createURL: '', //新增接口 updateURL: '', //编辑提交接口 infoURL: '', //编辑时获取单条数据接口 - codeURL: '', //获取code接口(返回结果为dataForm.code字段) + codeURL: null, //获取code接口(返回结果为dataForm.code字段) optionArrUrl: [], //需要获取下拉框的方法数组 optionArr: {}, //需要获取下拉框的方法数组的返回结果 dictNameList: [], //数据字典name数组 @@ -35,7 +35,7 @@ export default { if (this.urlOptions.optionArrUrl.length > 0) { this.getArr() } - if (this.urlOptions.dictNameList > 0) { + if (this.urlOptions.dictNameList.length > 0) { this.getDict() } this.$nextTick(() => { @@ -78,7 +78,7 @@ export default { }, /** 查询字典数据列表 */ getDict() { - this.dictNameList.forEach((item,index)=>{ + this.urlOptions.dictNameList.forEach((item,index)=>{ const queryParams = { pageNo: 1, pageSize: 99, diff --git a/src/mixins/chart.js b/src/mixins/chart.js new file mode 100644 index 0000000..a6c0ef9 --- /dev/null +++ b/src/mixins/chart.js @@ -0,0 +1,101 @@ +import * as echarts from "echarts"; + +function __resizeHandler(entries) { + for (const entry of entries) { + if (entry.contentBoxSize) { + // manipulate contentBoxSize + const contentBoxSize = Array.isArray(entry.contentBoxSize) + ? entry.contentBoxSize[0] + : entry.contentBoxSize; + this.chart_mixin_chartInstance.resize({ + width: + contentBoxSize.inlineSize < this.MIN_WIDTH + ? this.MIN_WIDTH + : contentBoxSize.inlineSize, + height: contentBoxSize.blockSize, + }); + } else { + // manipulate contentRect + this.chart_mixin_chartInstance.resize({ + width: + entry.contentRect.width < this.MIN_WIDTH + ? this.MIN_WIDTH + : entry.contentRect.width, + height: entry.contentRect.height, + }); + } + } +} + +export default { + data() { + const resizeObserver = new ResizeObserver(__resizeHandler.bind(this)); + + return { + MIN_WIDTH: 400, + chart_mixin_chartInstance: null, + chart_mixin_observer: resizeObserver, + chart_mixin_options: { + grid: { + left: "3%", + right: "4%", + bottom: "3%", + containLabel: true, + }, + tooltip: {}, + legend: { + data: ["Sales"], + }, + xAxis: { + data: [ + "shirt", + "cardign", + "chiffon shirt", + "pants", + "heels", + "socks", + ], + }, + yAxis: {}, + series: [ + { + name: "Sales", + type: "bar", + data: [5, 20, 36, 10, 10, 20], + }, + ], + }, + }; + }, + mounted() { + // this.$nextTick(() => { + // this.initChart().then(() => { + // this.initOptions(this.chart_mixin_options); + // this.initListener(); + // }); + // }); + this.initChart(); + this.initListener(); + }, + methods: { + initChart() { + (this.$refs.chart || + console.warn('[mixins/chart] 注意是否有 ref="chart" 的元素存在')) && + (this.chart_mixin_chartInstance = echarts.init(this.$refs.chart)); + // return new Promise((resolve, reject) => { + // this.$refs.chart ? resolve(true) : reject(false); + // }); + }, + initOptions(options) { + this.chart_mixin_chartInstance.setOption(options); + }, + initListener() { + this.chart_mixin_observer.observe(this.$refs.chart); + }, + }, + beforeDestroy() { + if (this.chart_mixin_chartInstance) { + this.chart_mixin_chartInstance.dispose(); + } + }, +}; diff --git a/src/mixins/fullscreen.js b/src/mixins/fullscreen.js new file mode 100644 index 0000000..03aa6e4 --- /dev/null +++ b/src/mixins/fullscreen.js @@ -0,0 +1,23 @@ +import screenfull from "screenfull"; + +export default { + data() { + return { + isFullscreen: false, + }; + }, + watch: { + /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */ + isFullscreen(val) { + // 暴露一个全屏状态改变的回调函数 + this.fullscreenCallback(val); + }, + }, + mounted() { + if (screenfull.isEnabled) { + screenfull.on("change", () => { + this.isFullscreen = screenfull.isFullscreen; + }); + } + }, +}; diff --git a/src/store/getters.js b/src/store/getters.js index 79cdf2c..0748b1c 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -18,6 +18,9 @@ const getters = { defaultRoutes:state => state.permission.defaultRoutes, sidebarRouters:state => state.permission.sidebarRouters, // 数据字典 - dict_datas: state => state.dict.dictDatas + dict_datas: state => state.dict.dictDatas, + // 驾驶舱和首页 + home: state => state.copilot.home, + copilot: state => state.copilot.copilot, } export default getters diff --git a/src/store/index.js b/src/store/index.js index 116d6d6..9e98a78 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -6,6 +6,7 @@ import tagsView from './modules/tagsView' import permission from './modules/permission' import settings from './modules/settings' import dict from './modules/dict' +import copilot from './modules/home' import getters from './getters' Vue.use(Vuex) @@ -17,7 +18,8 @@ const store = new Vuex.Store({ tagsView, permission, settings, - dict + dict, + copilot }, getters }) diff --git a/src/store/modules/home.js b/src/store/modules/home.js new file mode 100644 index 0000000..e9f8163 --- /dev/null +++ b/src/store/modules/home.js @@ -0,0 +1,195 @@ +import axios from "@/utils/request"; + +function random_default() { + return 0; + let a = Math.floor(Math.random() * 1000); + while (a < 600) { + a = Math.floor(Math.random() * 1000); + } + return a; +} + +/* 接口 */ +async function getHomeInfo() { + const { code, data } = await axios.post("/ip/prod-output/query-by-date", { + factorys: [], + date: 4, + }); + if (code == 0) { + return data; + } + console.warn("getHomeInfo failed, code: ", code); + return null; +} + +async function getHomeTarget() { + const { code, data } = await axios.post("/ip/prod-target/query-by-date", { + factorys: [], + date: 4, + }); + if (code == 0) { + return data; + } + console.warn("getHomeTarget failed, code: ", code); + return null; +} + +/* 状态 */ +const state = { + copilot: { + /* 产量驾驶舱 */ + yield: {}, + /* 能源驾驶舱 */ + energy: {}, + /* 效率驾驶舱 */ + efficiency: {}, + }, + home: { + ftoInvest: null, + chipInvest: null, + chipOutput: null, + stdOutput: null, + bipvOutput: null, + }, +}; + +const mutations = { + SET_HOME_INFO: (state, payload) => { + state.home.ftoInvest = payload.ftoInvest; + state.home.chipInvest = payload.chipInvest; + state.home.chipOutput = payload.chipOutput; + state.home.stdOutput = payload.stdOutput; + state.home.bipvOutput = payload.bipvOutput; + }, + SET_COPILOT_INFO: (state) => {}, +}; + +const actions = { + /** 初始化首页数据 */ + async initHome({ commit }) { + const dataArr = await getHomeInfo(); + const targetArr = await getHomeTarget(); + + const chipInvest = { + current: Array(7).fill(0), + previous: Array(7).fill(0), + }; // 芯片投入 + const ftoInvest = { + current: Array(7).fill(0), + previous: Array(7).fill(0), + }; // FTO投入 + const chipOutput = { + current: Array(7).fill(0), + previous: Array(7).fill(0), + target: Array(7).fill(0), + }; // 芯片产出 + const stdOutput = { + current: Array(7).fill(0), + previous: Array(7).fill(0), + target: Array(7).fill(0), + }; // 标准组件产出 + const bipvOutput = { + current: Array(7).fill(0), + previous: Array(7).fill(0), + target: Array(7).fill(0), + }; // BIPV产出 + + if (dataArr) { + for (const factory of dataArr) { + /* 工厂索引 */ + const factoryId = factory.factory; + /* 收集目标数据 */ + if (targetArr) { + const target = targetArr.find((item) => item.factory === factoryId); + if (target) { + chipOutput.target.splice(factoryId, 1, target.chipYield ?? 0); + stdOutput.target.splice(factoryId, 1, target.componentYield ?? 0); + bipvOutput.target.splice(factoryId, 1, target.bipvProductOutput ?? 0); + } + } + /* 收集芯片投入数据 */ + chipInvest.current.splice( + factoryId, + 1, + factory.inputNumber ?? random_default() + ); + chipInvest.previous.splice( + factoryId, + 1, + factory.previousYearInputNumber ?? random_default() + ); + /* 收集FTO投入数据 */ + ftoInvest.current.splice( + factoryId, + 1, + factory.chipInput ?? random_default() + ); + ftoInvest.previous.splice( + factoryId, + 1, + factory.previousYearChipInput ?? random_default() + ); + /* 收集产出数据 */ + switch (factory.glassType) { + case 0: + // 玻璃芯片 产出 + chipOutput.current.splice( + factoryId, + 1, + factory.outputNumber ?? random_default() + ); + chipOutput.previous.splice( + factoryId, + 1, + factory.previousYearOutputNumber ?? random_default() + ); + break; + case 1: + // 标准组件 产出 + stdOutput.current.splice( + factoryId, + 1, + factory.outputNumber ?? random_default() + ); + stdOutput.previous.splice( + factoryId, + 1, + factory.previousYearOutputNumber ?? random_default() + ); + break; + case 2: + // BIPV 产出 + bipvOutput.current.splice( + factoryId, + 1, + factory.outputNumber ?? random_default() + ); + bipvOutput.previous.splice( + factoryId, + 1, + factory.previousYearOutputNumber ?? random_default() + ); + break; + } + } + + /* 更新 state */ + commit("SET_HOME_INFO", { + ftoInvest, + chipInvest, + chipOutput, + stdOutput, + bipvOutput, + }); + } + }, + /** 初始化驾驶舱数据 */ + async initCopilot({ commit }) {}, +}; + +export default { + namespaced: true, + state, + mutations, + actions, +}; diff --git a/src/views/components/ChartContainer.vue b/src/views/components/ChartContainer.vue new file mode 100644 index 0000000..2dec009 --- /dev/null +++ b/src/views/components/ChartContainer.vue @@ -0,0 +1,69 @@ + + + + + + + + + + + diff --git a/src/views/copilot/components/Container.vue b/src/views/copilot/components/Container.vue new file mode 100644 index 0000000..1e59c2c --- /dev/null +++ b/src/views/copilot/components/Container.vue @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + {{ title }} + + + + + + + + + + diff --git a/src/views/copilot/components/ContainerIcon.vue b/src/views/copilot/components/ContainerIcon.vue new file mode 100644 index 0000000..0158a5a --- /dev/null +++ b/src/views/copilot/components/ContainerIcon.vue @@ -0,0 +1,58 @@ + + + + + + + + + diff --git a/src/views/copilot/components/CopilotHeader.vue b/src/views/copilot/components/CopilotHeader.vue new file mode 100644 index 0000000..8ee26cf --- /dev/null +++ b/src/views/copilot/components/CopilotHeader.vue @@ -0,0 +1,127 @@ + + + + + + $emit('update:active', i)" + /> + + + $emit('update:period', i)" + /> + + + + + + {{ active }}驾驶舱 + + + + + + diff --git a/src/views/copilot/components/button.vue b/src/views/copilot/components/button.vue new file mode 100644 index 0000000..cb1d9d7 --- /dev/null +++ b/src/views/copilot/components/button.vue @@ -0,0 +1,90 @@ + + + + + {{ label }} + + + + + + + + diff --git a/src/views/copilot/components/charts/BipvOutput.vue b/src/views/copilot/components/charts/BipvOutput.vue new file mode 100644 index 0000000..174c704 --- /dev/null +++ b/src/views/copilot/components/charts/BipvOutput.vue @@ -0,0 +1,33 @@ + + + + + + + + + diff --git a/src/views/copilot/components/charts/ChipOutput.vue b/src/views/copilot/components/charts/ChipOutput.vue new file mode 100644 index 0000000..539720b --- /dev/null +++ b/src/views/copilot/components/charts/ChipOutput.vue @@ -0,0 +1,33 @@ + + + + + + + + + diff --git a/src/views/copilot/components/charts/StdOutput.vue b/src/views/copilot/components/charts/StdOutput.vue new file mode 100644 index 0000000..e09df94 --- /dev/null +++ b/src/views/copilot/components/charts/StdOutput.vue @@ -0,0 +1,33 @@ + + + + + + + + + diff --git a/src/views/copilot/components/charts/base/DoubleRingChart.vue b/src/views/copilot/components/charts/base/DoubleRingChart.vue new file mode 100644 index 0000000..15b90d5 --- /dev/null +++ b/src/views/copilot/components/charts/base/DoubleRingChart.vue @@ -0,0 +1,119 @@ + + + + + + + + + {{ item.label }} + {{ + item.value.toLocaleString() + }} + + + + + + + + diff --git a/src/views/copilot/components/charts/base/DoubleRingWrapper.vue b/src/views/copilot/components/charts/base/DoubleRingWrapper.vue new file mode 100644 index 0000000..2adcacf --- /dev/null +++ b/src/views/copilot/components/charts/base/DoubleRingWrapper.vue @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + diff --git a/src/views/copilot/components/charts/base/double-ring-chart-options.js b/src/views/copilot/components/charts/base/double-ring-chart-options.js new file mode 100644 index 0000000..b41cd15 --- /dev/null +++ b/src/views/copilot/components/charts/base/double-ring-chart-options.js @@ -0,0 +1,127 @@ +export default { + grid: { + left: 0, + right: 0, + bottom: 0, + top: 0, + containLabel: true, + }, + tooltip: {}, + title: { + text: "78%", + left: "50%", + top: "40%", + textAlign: "center", + textStyle: { + fontWeight: 600, + fontSize: 32, + color: "#fffd", + }, + subtext: "\u200224年累计产出\u2002", + subtextStyle: { + fontSize: 14, + fontWeight: 100, + color: "#fffd", + align: "right", + }, + }, + series: [ + // 背景 series - 2024计划 + { + type: "pie", + name: "2024目标", + radius: ["70%", "85%"], + center: ["50%", "52%"], + emptyCircleStyle: { + color: "#042c5f33", + }, + }, + // 数据 series - 2024累计 + { + type: "pie", + radius: ["70%", "85%"], + center: ["50%", "52%"], + avoidLabelOvervlap: false, + label: { + show: false, + // position: "center", + }, + labelLine: { + show: false, + }, + data: [ + { + value: 90, + name: "2024累计产出", + selected: false, + itemStyle: { + borderJoin: "round", + borderCap: "round", + borderWidth: 12, + borderRadius: "50%", + color: { + type: "linear", + x: 1, + y: 0, + x2: 0, + y2: 1, + colorStops: [ + { offset: 0, color: "#4CF0E811" }, + { offset: 1, color: "#4CF0E8" }, + ], + }, + }, + }, + { + value: 20, + name: "-", + itemStyle: { color: "transparent" }, + label: { show: false }, + }, + ], + }, + // 数据 series2 - 2023累计 + { + type: "pie", + radius: ["55%", "70%"], + center: ["50%", "52%"], + avoidLabelOvervlap: false, + label: { + show: false, + }, + labelLine: { + show: false, + }, + data: [ + { + value: 90, + name: "2023累计产出", + selected: false, + itemStyle: { + borderJoin: "round", + borderCap: "round", + borderWidth: 12, + borderRadius: "50%", + color: { + type: "linear", + x: 1, + y: 0, + x2: 0, + y2: 1, + colorStops: [ + { offset: 0, color: "#1065ff66" }, + { offset: 1, color: "#1065ff" }, + ], + }, + }, + }, + { + value: 20, + name: "-", + itemStyle: { color: "transparent" }, + label: { show: false }, + }, + ], + }, + ], +}; diff --git a/src/views/copilot/components/charts/base/fetcherDoubleRing.js b/src/views/copilot/components/charts/base/fetcherDoubleRing.js new file mode 100644 index 0000000..6f452a6 --- /dev/null +++ b/src/views/copilot/components/charts/base/fetcherDoubleRing.js @@ -0,0 +1,10 @@ +export default { + getData: async function (url) { + // + return await new Promise((resolve, reject) => { + setTimeout(() => { + resolve([90119, 40801, 44028]); + }, 1200); + }); + }, +}; diff --git a/src/views/copilot/components/name.vue b/src/views/copilot/components/name.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/views/copilot/components/select.vue b/src/views/copilot/components/select.vue new file mode 100644 index 0000000..4ecf30f --- /dev/null +++ b/src/views/copilot/components/select.vue @@ -0,0 +1,75 @@ + + + + + + + {{ item }} + + + + + + + + diff --git a/src/views/copilot/container.vue b/src/views/copilot/container.vue new file mode 100644 index 0000000..97d3803 --- /dev/null +++ b/src/views/copilot/container.vue @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + diff --git a/src/views/copilot/efficiency/index.vue b/src/views/copilot/efficiency/index.vue new file mode 100644 index 0000000..55a1d4b --- /dev/null +++ b/src/views/copilot/efficiency/index.vue @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + diff --git a/src/views/copilot/energy/index.vue b/src/views/copilot/energy/index.vue new file mode 100644 index 0000000..5e4ae78 --- /dev/null +++ b/src/views/copilot/energy/index.vue @@ -0,0 +1,25 @@ + + + + 能源驾驶舱 + + + + + diff --git a/src/views/copilot/yield/index.vue b/src/views/copilot/yield/index.vue new file mode 100644 index 0000000..2bc0134 --- /dev/null +++ b/src/views/copilot/yield/index.vue @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/dashboard/charts/Bipv.vue b/src/views/dashboard/charts/Bipv.vue new file mode 100644 index 0000000..1793791 --- /dev/null +++ b/src/views/dashboard/charts/Bipv.vue @@ -0,0 +1,89 @@ + + + + + + + + + diff --git a/src/views/dashboard/charts/ChipInvest.vue b/src/views/dashboard/charts/ChipInvest.vue new file mode 100644 index 0000000..670ca78 --- /dev/null +++ b/src/views/dashboard/charts/ChipInvest.vue @@ -0,0 +1,70 @@ + + + + + + + diff --git a/src/views/dashboard/charts/ChipYield.vue b/src/views/dashboard/charts/ChipYield.vue new file mode 100644 index 0000000..f901a6b --- /dev/null +++ b/src/views/dashboard/charts/ChipYield.vue @@ -0,0 +1,231 @@ + + + + + + + + + + 成都 + + + 邯郸 + + + 株洲 + + + 瑞昌 + + + + + 佳木斯 + + + 凯盛光伏 + + + 蚌埠兴科 + + + + + + 2024年累计 + {{ output.current }} + + + 2024年目标 + {{ output.target }} + + + 2023年累计 + {{ output.previous }} + + + + + + + + + diff --git a/src/views/dashboard/charts/ChipYieldChart.vue b/src/views/dashboard/charts/ChipYieldChart.vue new file mode 100644 index 0000000..bee0eb6 --- /dev/null +++ b/src/views/dashboard/charts/ChipYieldChart.vue @@ -0,0 +1,269 @@ + + + + + + + + + + + diff --git a/src/views/dashboard/charts/Fto.vue b/src/views/dashboard/charts/Fto.vue new file mode 100644 index 0000000..d72a4e0 --- /dev/null +++ b/src/views/dashboard/charts/Fto.vue @@ -0,0 +1,68 @@ + + + + + + + diff --git a/src/views/dashboard/charts/LeftChartBase.vue b/src/views/dashboard/charts/LeftChartBase.vue new file mode 100644 index 0000000..179c5fb --- /dev/null +++ b/src/views/dashboard/charts/LeftChartBase.vue @@ -0,0 +1,260 @@ + + + + + + {{ item.label }} + + + + + + + + diff --git a/src/views/dashboard/charts/RightChartBase.vue b/src/views/dashboard/charts/RightChartBase.vue new file mode 100644 index 0000000..781b3c4 --- /dev/null +++ b/src/views/dashboard/charts/RightChartBase.vue @@ -0,0 +1,325 @@ + + + + + + {{ item.label }} + + + + + + + + diff --git a/src/views/dashboard/charts/StdChart.vue b/src/views/dashboard/charts/StdChart.vue new file mode 100644 index 0000000..4a855e5 --- /dev/null +++ b/src/views/dashboard/charts/StdChart.vue @@ -0,0 +1,84 @@ + + + + + + + + + diff --git a/src/views/dashboard/components/CompanyInfo.vue b/src/views/dashboard/components/CompanyInfo.vue new file mode 100644 index 0000000..e75febc --- /dev/null +++ b/src/views/dashboard/components/CompanyInfo.vue @@ -0,0 +1,129 @@ + + + + + + + {{ info.companyName }} + + + {{ item.label }} {{ item.value | currency }} + + + + + + + + diff --git a/src/views/dashboard/components/Container.vue b/src/views/dashboard/components/Container.vue new file mode 100644 index 0000000..1fe7626 --- /dev/null +++ b/src/views/dashboard/components/Container.vue @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + {{ title }} + + + + + + + + + + diff --git a/src/views/dashboard/components/ContainerIcon.vue b/src/views/dashboard/components/ContainerIcon.vue new file mode 100644 index 0000000..0158a5a --- /dev/null +++ b/src/views/dashboard/components/ContainerIcon.vue @@ -0,0 +1,58 @@ + + + + + + + + + diff --git a/src/views/dashboard/components/Header.vue b/src/views/dashboard/components/Header.vue new file mode 100644 index 0000000..5d3ad8e --- /dev/null +++ b/src/views/dashboard/components/Header.vue @@ -0,0 +1,102 @@ + + + + + + 发电玻璃智能管控平台地图总览 + 晴转多云 14℃ + 23:12|星期一|2023.12.13 + + + + + + diff --git a/src/views/index.vue b/src/views/index.vue index be8dbca..86a9e06 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,98 +1,286 @@ - - - - - - - - - - - - + + + + + + + (ftoKey = Math.random())" + > + + + (chipInvestKey = Math.random())" + > + + + + + (chipYieldKey = Math.random())" + > + + + (stdKey = Math.random())" + > + + + (bipvKey = Math.random())" + > + + + - - - - - - - - - - - - - - + + + - - .chart-wrapper { - background: #fff; - padding: 16px 16px 0; - margin-bottom: 32px; - } + + + diff --git a/yarn.lock b/yarn.lock index d98042a..c379e40 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3201,16 +3201,16 @@ dependencies: "delayed-stream" "~1.0.0" +"commander@*", "commander@^2.18.0", "commander@^2.20.0": + "integrity" "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "resolved" "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz" + "version" "2.20.3" + "commander@^10.0.0": "integrity" "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==" "resolved" "https://registry.npmmirror.com/commander/-/commander-10.0.1.tgz" "version" "10.0.1" -"commander@^2.18.0", "commander@^2.20.0": - "integrity" "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - "resolved" "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz" - "version" "2.20.3" - "commander@^9.3.0": "integrity" "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==" "resolved" "https://registry.npmmirror.com/commander/-/commander-9.5.0.tgz" @@ -7143,6 +7143,13 @@ "resolved" "https://registry.npmmirror.com/mkdirp/-/mkdirp-1.0.4.tgz" "version" "1.0.4" +"mockjs@^1.1.0": + "integrity" "sha512-eQsKcWzIaZzEZ07NuEyO4Nw65g0hdWAyurVol1IPl1gahRwY+svqzfgfey8U8dahLwG44d6/RwEzuK52rSa/JQ==" + "resolved" "https://registry.npmmirror.com/mockjs/-/mockjs-1.1.0.tgz" + "version" "1.1.0" + dependencies: + "commander" "*" + "moment@^2.30.1": "integrity" "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==" "resolved" "https://registry.npmmirror.com/moment/-/moment-2.30.1.tgz"