权限控制及原料磨页面

This commit is contained in:
shijing 2023-06-20 10:04:21 +08:00
parent 94904bcff8
commit 1d55dc3c19
9 changed files with 444 additions and 59 deletions

View File

@ -115,8 +115,8 @@ const routes = [
]
},
{
"name": "rm",
"path": "/rm",
"name": "rm_enm",
"path": "/rm_enm",
"meta": {
"title": "原料磨",
"icon": "el-icon-grid",
@ -126,13 +126,13 @@ const routes = [
"children": [
{
"name": "report",
"path": "/rm/report",
"path": "/rm_enm/report",
"meta": {
"title": "生产报告",
"icon": "el-icon-grid",
"perms": ["dataset"]
"perms": ["bi"]
},
"component": "rm/report"
"component": "rm_enm/report"
},
{
"name": "power",
@ -140,49 +140,49 @@ const routes = [
"meta": {
"title": "单位产品电耗",
"icon": "el-icon-grid",
"perms": ["dataset"]
"perms": ["bi"]
},
"component": "rm/power"
"component": "rm_enm/power"
},
{
"name": "teamAnalysis",
"path": "/rm/teamAnalysis",
"path": "/rm_enm/teamAnalysis",
"meta": {
"title": "班组月度对比",
"icon": "el-icon-grid",
"perms": ["dataset"]
"perms": ["bi"]
},
"component": "rm/teamAnalysis"
"component": "rm_enm/teamAnalysis"
},
{
"name": "workshopAnalysis",
"path": "/rm/workshopAnalysis",
"path": "/rm_enm/workshopAnalysis",
"meta": {
"title": "车间单耗分析",
"icon": "el-icon-grid",
"perms": ["dataset"]
"perms": ["bi"]
},
"component": "rm/workshopAnalysis"
"component": "rm_enm/workshopAnalysis"
},
{
"name": "handoverLog",
"path": "/rm/handoverLog",
"path": "/rm_enm/handoverLog",
"meta": {
"title": "交接班日志",
"icon": "el-icon-grid",
"perms": ["dataset"]
"perms": ["bi"]
},
"component": "rm/handoverLog"
"component": "rm_enm/handoverLog"
},
{
"name": "handovereEnter",
"path": "/rm/handovereEnter",
"path": "/rm_enm/handovereEnter",
"meta": {
"title": "交接班记录",
"icon": "el-icon-grid",
"perms": ["dataset"]
"perms": ["bi"]
},
"component": "rm/handovereEnter"
"component": "rm_enm/handovereEnter"
}
]
},
@ -256,6 +256,7 @@ const routes = [
"title": "事件详情",
"icon": "el-icon-menu",
"hidden": true,
"perms": ["event"]
},
"component": "ecm/event_from"
}
@ -266,6 +267,7 @@ const routes = [
"meta": {
"title": "处理事件",
"icon": "el-icon-menu",
"perms": ["event"],
"hidden": true,
},
"component": "ecm/event_handlefrom"
@ -546,6 +548,7 @@ const routes = [
"title": "访客",
"icon": "el-icon-user-filled",
"type": "menu",
"perms":['visit']
},
"children": [
{
@ -554,6 +557,7 @@ const routes = [
"meta": {
"title": "来访项目",
"icon": "el-icon-tickets",
"perms":['visit']
},
"component": "vm/visit"
},
@ -563,6 +567,7 @@ const routes = [
"meta": {
"title": "我的访客",
"icon": "el-icon-user",
"perms":['visit']
},
"component": "vm/visitor"
},{
@ -571,6 +576,7 @@ const routes = [
"meta": {
"title": "访客人员",
"icon": "el-icon-menu",
"perms":['visit'],
"hidden": true,
},
"component": "vm/people"
@ -582,11 +588,10 @@ const routes = [
"title": "项目信息",
"icon": "el-icon-menu",
"hidden": true,
"perms":['visit']
},
"component": "vm/vistoradd"
},
]
},
{
@ -681,6 +686,7 @@ const routes = [
"title": "工单详情",
"icon": "el-icon-menu",
"hidden": true,
"perms": ["duty"]
},
"component": "wf/ticketdetail"
},

View File

@ -0,0 +1,204 @@
<template>
<div class="app-container">
<el-header>
<div class="left-panel">
<el-date-picker
v-model="query.time"
type="date"
value-format="YYYY-MM-DD"
format="YYYY-MM-DD"
placeholder="日志时间"
/>
<el-select
v-model="query.class"
placeholder="班次"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in optionsClass"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<el-select
v-model="query.team"
placeholder="班组"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
<el-link type="primary" icon="el-icon-plus" v-auth="'rparty.create'"></el-link>
</div>
<div class="right-panel">
<div class="right-panel-search">
</div>
</div>
</el-header>
<el-card style="margin-top:5px">
<div ref="print" id="myReport" class="printContainer">
<h3 style="text-align: center;display: flex;justify-content: space-around;">
<span>2023.06.21 </span>
<span>白班</span>
<span>甲班</span>
</h3>
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="numTable">
<tbody>
<tr>
<td class="numCell">产量t</td>
<td class="numCell">{{value1}}</td>
<td class="numCell">台时t/h</td>
<td class="numCell">{{value3}}</td>
<td class="numCell">运转时间h</td>
<td class="numCell">{{value5}}</td>
</tr>
<tr>
<td class="numCell">运转率%</td>
<td class="numCell">{{value1}}</td>
<td class="numCell">停机时长h</td>
<td class="numCell">{{value3}}</td>
<td class="numCell">当期单位产品电耗kW·h/t</td>
<td class="numCell">{{value5}}</td>
</tr>
<tr>
<td class="numCell">辅料细度合格率%</td>
<td class="numCell">{{value1}}</td>
<td class="numCell">辅料Fe₂O₃合格率%</td>
<td class="numCell">{{value3}}</td>
<td class="numCell">辅料水分合格率%</td>
<td class="numCell">{{value5}}</td>
</tr>
<tr>
<td class="numCell">干混生料CaO合格率%</td>
<td class="numCell">{{value1}}</td>
<td class="numCell">干混生料Fe₂O₃合格率%</td>
<td class="numCell">{{value3}}</td>
<td class="numCell">干混生料细度合格率%</td>
<td class="numCell">{{value5}}</td>
</tr>
<tr>
<td class="numCell">干混生料水分合格率%</td>
<td class="numCell">{{value1}}</td>
<td class="numCell">单位成本/</td>
<td class="numCell">{{value3}}</td>
<td class="numCell"></td>
<td class="numCell"></td>
</tr>
<tr>
<td class="numCell">生产情况记录</td>
<td class="numCell" colspan="5">时间类别原因处置措施处置人</td>
</tr>
</tbody>
</table>
</div>
</el-card>
</div>
</template>
<script>
import scEcharts from "@/components/scEcharts";
import { defineAsyncComponent } from 'vue'
export default {
components: {
scEcharts,
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
},
data() {
return {
chartShow: false,
myOption: null,
listQuery:{
belong_dept:'',
task2__year:'',
page:0
},
query:{
time:'',
team:'',
class:''
},
options:[
{label:'甲班',value:1},
{label:'乙班',value:2},
{label:'丙班',value:3},
],
optionsClass:[
{label:'白班',value:1},
{label:'夜班',value:2},
],
value1:1,
value3:3,
value5:5,
modelValue:true,
apiObj:'',
showClose:true,
echartType:'line',
asynDialog:false,
};
},
mounted() {
},
methods: {
itemClick(type,item){
this.type=type;
this.asynDialog = true;
},
itemClick1(type,item){
this.chartShow = false;
this.$API.bi.dataset.exec
.req('3322567213885833216')
.then((res) => {
this.myOption = JSON.parse(res.echart_options);
debugger;
console.log(this.myOption)
this.chartShow = true;
});
},
handlePrint() {
this.$PRINT('#myReport');
},
}
};
</script>
<style>
.printContainer{
width: 1075px;
}
#numTable{
margin-left: 37px;
}
#numTable td{
height: 32px;
padding-left: 5px;
}
.numCell{
width: 80px;
}
.numCell.numCell_last{
width: 100px;
}
.searchHead{
display:flex
}
.middleText{
height: 32px;
line-height: 32px;
margin: 0 5px;
display: inline-block;
}
.searchBtn{
margin-left: 5px;
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-card style="margin-top:10px">
<el-card style="margin-top:5px">
<div ref="print" id="myReport" class="printContainer">
<h3 style="text-align: center;">主要设备100KW以上单位产品电耗数据表</h3>
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="numTable">

View File

@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-card style="margin-top:10px">
<el-card style="margin-top:5px">
<div ref="print" id="myReport" class="printContainer">
<h3 style="text-align: center;">生产报告</h3>
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="numTable">

View File

@ -1,38 +1,61 @@
<template>
<div class="app-container">
<el-card style="margin-top:10px">
<div ref="print" id="myReport" class="printContainer">
<h3 style="text-align: center;">主要设备100KW以上单位产品电耗数据表</h3>
<table border="1" cellspacing="0" :key="timeStamp" id="numTable">
<thead style="background: #efefef;height: 40px;">
<tr>
<th rowspan="2">月份</th>
<th rowspan="2">班组</th>
<th colspan="2">产量</th>
<th>运转率</th>
<th>成本</th>
<th colspan="4">质量</th>
<th colspan="7">单位产品电耗</th>
</tr>
<tr>
<th>总产量t</th>
<th>台时产量t/h</th>
<th>运转率%</th>
<th>单位产品成本/</th>
<th>细度%</th>
<th>Fe₂O₃%</th>
<th>水分%</th>
<th>CaO%</th>
<th>当期单位产品电耗kW·h/h</th>
<th>单位产品电耗目标值kW·h/h</th>
<th>当期单位产品电耗与目标值差值kW·h/h</th>
<th>环期单位产品电耗kW·h/h</th>
<th>当期单位产品电耗与环期差值kW·h/h</th>
<th>当期单位产品电耗环比增长率%</th>
<th>同比增长率%</th>
</tr>
</thead>
<tr v-for="(item,index) in tableDatas" :key="index">
<el-header>
<div class="left-panel">
<el-date-picker
v-model="query.time"
type="month"
value-format="YYYY-MM"
format="YYYY-MM"
placeholder="基础月份"
/>
<el-date-picker
v-model="query.time2"
type="month"
value-format="YYYY-MM"
format="YYYY-MM"
placeholder="对比月份"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</el-header>
<el-card style="margin-top:5px">
<div ref="print" id="myReport" class="printContainer">
<h3 style="text-align: center;">主要设备100KW以上单位产品电耗数据表</h3>
<table border="1" cellspacing="0" :key="timeStamp" id="numTable">
<thead style="background: #efefef;height: 40px;">
<tr>
<th rowspan="2">月份</th>
<th rowspan="2">班组</th>
<th colspan="2">产量</th>
<th>运转率</th>
<th>成本</th>
<th colspan="4">质量</th>
<th colspan="7">单位产品电耗</th>
</tr>
<tr>
<th>总产量t</th>
<th>台时产量t/h</th>
<th>运转率%</th>
<th>单位产品成本/</th>
<th>细度%</th>
<th>Fe₂O₃%</th>
<th>水分%</th>
<th>CaO%</th>
<th>当期单位产品电耗kW·h/h</th>
<th>单位产品电耗目标值kW·h/h</th>
<th>当期单位产品电耗与目标值差值kW·h/h</th>
<th>环期单位产品电耗kW·h/h</th>
<th>当期单位产品电耗与环期差值kW·h/h</th>
<th>当期单位产品电耗环比增长率%</th>
<th>同比增长率%</th>
</tr>
</thead>
<tr v-for="(item,index) in tableDatas" :key="index">
<td v-if="index%3==0" rowspan="3" style="width:50px">{{item.month}}</td>
<td class="numCell">{{item.name}}</td>
<td class="numCell">{{item.number}}</td>
@ -51,9 +74,9 @@
<td class="numCell">{{item.days}}</td>
<td class="numCell">{{item.months}}</td>
</tr>
</table>
</div>
</el-card>
</table>
</div>
</el-card>
</div>
</template>
<script>
@ -66,6 +89,10 @@
task2__year:'',
page:0
},
query:{
time:'',
time2:'',
},
tableDatas:[
{month:'2023.1',name:'甲组',number:'NM001',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
{month:'2023.1',name:'乙组',number:'NM002',unit:'KW·h/t',hours:'1',days:'2',months:'3'},

View File

@ -0,0 +1,148 @@
<template>
<div class="app-container">
<el-header>
<div class="left-panel">
<el-date-picker
v-model="monthrange"
type="monthrange"
range-separator="至"
start-placeholder="开始月份"
end-placeholder="结束月份"
value-format="YYYY-MM"
format="YYYY-MM"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
<el-link type="primary" icon="el-icon-plus" v-auth="'rparty.create'"></el-link>
</div>
<div class="right-panel">
<div class="right-panel-search">
</div>
</div>
</el-header>
<el-card style="margin-top:5px">
<div ref="print" id="myReport" class="printContainer">
<h3 style="text-align: center;">车间单位产品电耗月度分析表</h3>
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="numTable">
<thead style="background: #efefef;height: 40px;">
<tr>
<th>月份</th>
<th>当期值KW·h/t</th>
<th>目标值KW·h/t</th>
<th>当期与目标差值KW·h/t</th>
<th>环期值KW·h/t</th>
<th>当期与环期差值KW·h/t</th>
<th>环比增长率%</th>
<th>同比增长率%</th>
</tr>
</thead>
<tbody>
<tr v-for="(item) in tableDatas" :key="item">
<td class="numCell">{{item.month}}</td>
<td class="numCell">{{item.value1}}</td>
<td class="numCell">{{item.value2}}</td>
<td class="numCell">{{item.value3}}</td>
<td class="numCell">{{item.value4}}</td>
<td class="numCell">{{item.value5}}</td>
<td class="numCell">{{item.value6}}</td>
<td class="numCell">{{item.value7}}</td>
</tr>
</tbody>
</table>
</div>
</el-card>
</div>
</template>
<script>
import scEcharts from "@/components/scEcharts";
import { defineAsyncComponent } from 'vue'
export default {
components: {
scEcharts,
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
},
data() {
return {
chartShow: false,
myOption: null,
timeStamp:0,
listQuery:{
belong_dept:'',
task2__year:'',
page:0
},
query:{
time:''
},
tableDatas:[
{month:'2023-05',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
{month:'2023-06',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
{month:'2023-07',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
],
modelValue:true,
type:'hours',
title:'title',
apiObj:'',
showClose:true,
echartType:'line',
asynDialog:false,
};
},
mounted() {
},
methods: {
itemClick(type,item){
this.type=type;
this.asynDialog = true;
},
itemClick1(type,item){
this.chartShow = false;
this.$API.bi.dataset.exec
.req('3322567213885833216')
.then((res) => {
this.myOption = JSON.parse(res.echart_options);
debugger;
console.log(this.myOption)
this.chartShow = true;
});
},
handlePrint() {
this.$PRINT('#myReport');
},
}
};
</script>
<style>
.printContainer{
width: 1075px;
}
#numTable{
margin-left: 37px;
}
#numTable td{
height: 32px;
padding-left: 5px;
}
.numCell{
width: 80px;
}
.numCell.numCell_last{
width: 100px;
}
.searchHead{
display:flex
}
.middleText{
height: 32px;
line-height: 32px;
margin: 0 5px;
display: inline-block;
}
.searchBtn{
margin-left: 5px;
}
</style>