diff --git a/src/api/mes/reportWork.js b/src/api/mes/reportWork.js index 97e8bb75..423b8b19 100644 --- a/src/api/mes/reportWork.js +++ b/src/api/mes/reportWork.js @@ -74,3 +74,11 @@ export function getWorkcenterList() { method: 'get' }); } + +export function getLineChartData() { + return request({ + url: '/mes/reportWork/getLineChartData', + method: 'get' + }); +} + diff --git a/src/views/index.vue b/src/views/index.vue index 42d2f29d..bb0aa0bf 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -2,7 +2,7 @@
- 小榄工厂本月产量 + {{title}} @@ -30,60 +30,32 @@ import LineChart from './dashboard/LineChart'; import PieChart from './dashboard/PieChart'; import PieChart2 from './dashboard/PieChart2'; +import {getLineChartData} from '@/api/mes/reportWork' export default { name: "Index", components: { - LineChart,PieChart,PieChart2 + LineChart//,PieChart,PieChart2 }, data() { - const lineChartData= { - seriesNames: ['榄菊大盘薰衣草蚊香筒装(18装)', '榄菊儿宝健蚊香(60装)', '榄菊小盘无烟型蚊香赠品装(288装)', '榄菊无烟型蚊香优惠装(30装)', '榄菊加大盘儿宝健蚊香(60装)'], - xAxisDatas: ['2023/08/01', '2023/08/02', '2023/08/03', '2023/08/04', '2023/08/05', '2023/08/06', '2023/08/07', - '2023/08/08','2023/08/09','2023/08/10','2023/08/11','2023/08/12','2023/08/13','2023/08/14', - ], - seriesDatas: [ - { - name: '榄菊大盘薰衣草蚊香筒装(18装)', - type: 'line', - stack: 'Total', - data: [120, 132, 101, 134, 90, 230, 210,120, 132, 101, 134, 90, 230, 210] - }, - { - name: '榄菊儿宝健蚊香(60装)', - type: 'line', - stack: 'Total', - data: [220, 182, 191, 234, 290, 330, 310,220, 182, 191, 234, 290, 330, 310] - }, - { - name: '榄菊小盘无烟型蚊香赠品装(288装)', - type: 'line', - stack: 'Total', - data: [150, 232, 201, 154, 190, 330, 410,150, 232, 201, 154, 190, 330, 410] - }, - { - name: '榄菊无烟型蚊香优惠装(30装)', - type: 'line', - stack: 'Total', - data: [320, 332, 301, 334, 390, 330, 150, 320, 332, 301, 334, 390, 330, 320] - }, - { - name: '榄菊加大盘儿宝健蚊香(60装)', - type: 'line', - stack: 'Total', - data: [820, 932, 901, 934, 1290, 1330, 1320,820, 932, 901, 934, 1290, 1330, 1320] - } - ] - } return { // 版本号 version: "1.0.0", - lineChartData: lineChartData + lineChartData: null, + title:"本月工厂产量" }; }, + created() { + this.getLineChartData(); + }, methods: { goTarget(href) { window.open(href, "_blank"); }, + getLineChartData(){ + getLineChartData().then(data => { + this.lineChartData = data; + }); + } }, }; diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 5b898a2e..746828e5 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -56,6 +56,7 @@ :default-expand-all="isExpandAll" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" > + @@ -100,11 +101,16 @@ - + + + + + + @@ -196,6 +202,9 @@ export default { parentId: [ { required: true, message: "上级部门不能为空", trigger: "blur" } ], + deptId: [ + { required: true, message: "部门Id不能为空", trigger: "blur" } + ], deptName: [ { required: true, message: "部门名称不能为空", trigger: "blur" } ], @@ -306,7 +315,7 @@ export default { submitForm: function() { this.$refs["form"].validate(valid => { if (valid) { - if (this.form.deptId != undefined) { + if (this.form.createTime!= undefined) { updateDept(this.form).then(response => { this.$modal.msgSuccess("修改成功"); this.open = false;