生产日报

yangwl
zhaoxiaolin 1 year ago
parent a049592e60
commit 92184acc56

@ -74,3 +74,11 @@ export function getWorkcenterList() {
method: 'get'
});
}
export function getLineChartData() {
return request({
url: '/mes/reportWork/getLineChartData',
method: 'get'
});
}

@ -2,7 +2,7 @@
<div class="app-container home">
<el-row :gutter="20">
<el-col :sm="24" :lg="24">
<span style="font-size: 20px;margin: 40%;color: cadetblue;">小榄工厂本月产量</span>
<span style="font-size: 20px;margin: 40%;color: cadetblue;">{{title}}</span>
</el-col>
</el-row>
<el-row :gutter="20">
@ -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;
});
}
},
};
</script>

@ -56,6 +56,7 @@
:default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column prop="deptId" label="部门Id" width="100"></el-table-column>
<el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
<el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
<el-table-column prop="status" label="状态" width="100">
@ -100,11 +101,16 @@
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="24" v-if="form.parentId !== 0">
<el-col :span="12" v-if="form.parentId !== 0">
<el-form-item label="上级部门" prop="parentId">
<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="部门id" prop="deptId">
<el-input-number v-model="form.deptId" controls-position="right" :min="0" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
@ -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;

Loading…
Cancel
Save