Commit 05a8623e authored by 李苏's avatar 李苏 💬

fme仪表盘

parent c11e64bf
......@@ -295,6 +295,20 @@ export const powerRoutes = [
name: 'fmesjhpcecfx',
path: "fmesjhpcecfx",
},
{
erpComponent: false,
component: 'fmegl/fmezbpgl/index',
hidden: false,
meta: {
"title": "FME(年/月度)指标盘管理",
"icon": "",
"noCache": false,
"link": null,
"mkid": '920050520',
},
name: 'fmezbpgl',
path: "fmezbpgl",
},
{
erpComponent: false,
component: 'fmegl/glqwpdj/index',
......@@ -484,7 +498,7 @@ export const powerRoutes = [
path: '/sbjxgl',
component: "Layout",
hidden: false,
alwaysShow: true,
alwaysShow: false,
redirect: 'sbjxxx',
meta: {
title: "设备检修管理",
......@@ -537,20 +551,20 @@ export const powerRoutes = [
name: 'sbjxxx',
path: "sbjxxx",
},
{
erpComponent: false,
component: 'sbjxgl/jxzyff/index',
hidden: false,
meta: {
"title": "检修作业方法",
"icon": "",
"noCache": false,
"link": null,
"mkid": '920030400',
},
name: 'jxzyff',
path: "jxzyff",
}
// {
// erpComponent: false,
// component: 'sbjxgl/jxzyff/index',
// hidden: false,
// meta: {
// "title": "检修作业方法",
// "icon": "",
// "noCache": false,
// "link": null,
// "mkid": '920030400',
// },
// name: 'jxzyff',
// path: "jxzyff",
// }
]
}
]
......
<!--
* @Description:生成基础baseEdit组件,屏蔽不必要细节
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:47:46
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-10-29 14:43:46
* @FilePath: /zghywpc-vue/src/views/fmegl/fmezbpgl/biao/edit.vue
-->
<template>
<!-- prop 穿透赋值 -->
<BaseEdit labelWidth='130px' v-bind="$attrs" :config='editConfig'>
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.editPage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面从表上方插槽 ctx.editPage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.editPage)" size='mini' type="primary">示例按钮</el-button> -->
<!-- <AuxButton :dynamic='true' :queryParams="{
sbxxTreeId:that.form.sbxxTreeId,
zt:'N'
}" :component='Qxsj' rename='选择缺陷数据' code='dynamic' @save="saveQxsj" /> -->
</template>
</BaseEdit>
</template>
<script>
export default {
data() {
return {
editConfig: {
/* 生成form表单 */
editColItemList: [{
show: true,
label: '类型',
prop: 'type',
span: 12,
"type": "RelSelect",
"value": "year",
"typeConfig": {
change: (v) => {
console.log(this.editConfig.editColItemList)
let changList = ['dbrwcq', 'yhrwcq', 'lhqx', 'sjtbyc', 'sjgbcq','month']
let changList2 = ['rlkkx']
if (v.id == 'year') {
this.editConfig.editColItemList.forEach(item => {
if (changList.includes(item.prop)) {
item.show = false
}
})
} else {
this.editConfig.editColItemList.forEach(item => {
if (changList.includes(item.prop)) {
item.show = true
}
if (changList2.includes(item.prop)) {
item.show = false
}
})
}
},
clearable: false,
"optionsData": [{
id: 'year',
name: '年'
},
{
id: 'month',
name: '月'
}
],
"match": {
"value": "id",
"label": "name"
}
}
},
{
"label": "一级异物事件",
"prop": "oneywsj",
"span": 12,
"type": "inputNumber",
show: true
},
{
"label": "二级异物事件",
"prop": "twoywsj",
"span": 12,
"type": "inputNumber",
show: true
},
{
"label": "外部引入异物事件",
"prop": "wbyrywsj",
"span": 12,
"type": "inputNumber",
show: true
},
{
"label": "燃料可靠性",
"prop": "rlkkx",
"span": 12,
"type": "inputNumber",
show: true
},
{
"label": "督办任务超期",
"prop": "dbrwcq",
"span": 12,
"type": "inputNumber",
show: false
},
{
"label": "月会任务超期",
"prop": "yhrwcq",
"span": 12,
"type": "inputNumber",
show: false
},
{
"label": "例会缺席",
"prop": "lhqx",
"span": 12,
"type": "inputNumber",
show: false
},
{
"label": "事件通报异常",
"prop": "sjtbyc",
"span": 12,
"type": "inputNumber",
show: false
},
{
"label": "事件关闭超期",
"prop": "sjgbcq",
"span": 12,
"type": "inputNumber",
show: false
},
{
"label": "年份",
"prop": "year",
"span": 12,
"type": "year",
show: true,
required: true
},
{
required: true,
"label": "月份",
"prop": "month", // 假设字段名应为 'month'
"span": 12,
"type": "RelSelect",
typeConfig: {
optionsData: [{
id: 1,
name: "一月份"
},
{
id: 2,
name: "二月份"
},
{
id: 3,
name: "三月份"
},
{
id: 4,
name: "四月份"
},
{
id: 5,
name: "五月份"
},
{
id: 6,
name: "六月份"
},
{
id: 7,
name: "七月份"
},
{
id: 8,
name: "八月份"
},
{
id: 9,
name: "九月份"
},
{
id: 10,
name: "十月份"
},
{
id: 11,
name: "十一月份"
},
{
id: 12,
name: "十二月份"
}
]
},
show: false
}
],
/* 生成主从表,为空数组默认不展示 */
editTableTitle: [
// {
// title: "序号",
// field: "xh",
// width: 50,
// align: "center"
// },
// {
// title: "点检部位",
// field: "bw",
// width: 180,
// },
// {
// title: "点检项目",
// field: "project",
// width: 160
// },
// {
// title: "点检标准",
// field: "standard",
// width: 140
// },
],
/* 子表名,可选 同editTableTitle一起用*/
detailTable: ''
}
}
},
methods: {
/**
* @description:示例按钮
* @param {*} ctx操作edit实例内容
* @return {*}
* @author: lisu
*/
// demo(ctx){}
}
}
</script>
<style>
</style>
<!--
* @Description: 生成基础basePage组件,屏蔽不必要细节
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:55:27
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-10-29 15:08:36
* @FilePath: /zghywpc-vue/src/views/fmegl/fmezbpgl/biao/index.vue
-->
<template>
<BasePage class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
name: 'template',
data() {
return {
config: {
/* 基本配置*/
url: 'fme/ufmezbp',
tableTitle: [{
title: "年份",
field: "year",
width: 100
},
{
title: "月份",
field: "month",
width: 100
},
{
title: "一级异物事件",
field: "oneywsj",
width: 100
},
{
title: "二级异物事件",
field: "twoywsj",
width: 100
},
{
title: "外部引入异物事件",
field: "wbyrywsj",
width: 180
},
{
title: "燃料可靠性",
field: "rlkkx",
width: 100
},
{
title: "督办任务超期",
field: "dbrwcq",
width: 100
},
{
title: "月会任务超期",
field: "yhrwcq",
width: 100
},
{
title: "例会缺席",
field: "lhqx",
width: 100
},
{
title: "事件通报异常",
field: "sjtbyc",
width: 100
},
{
title: "事件关闭超期",
field: "sjgbcq",
width: 100
},
{
title: "类型",
field: "type",
width: 100,
formatter(a, b, v) {
let map = {
'year': '年',
'month': '月'
}
return map[v]
}
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: "ftDateTime"
},
],
queryParams: [
[{
label: '年度',
prop: 'year',
span: 6,
type: 'year',
value: new Date().getFullYear()
},
{
label: '类型',
prop: 'type',
span: 6,
type: 'RelSelect',
value: 'year',
typeConfig: {
clearable: false,
optionsData: [{
id: 'year',
name: '年'
},
{
id: 'month',
name: '月'
}
],
}
}
]
],
/* 默认启停用 */
}
}
},
methods: {
/**
* @description:示例按钮
* @param {*} ctx操作basePage实例内容
* @return {*}
* @author: lisu
*/
// demo(ctx){}
},
components: {
Edit
}
}
</script>
<style>
</style>
<!--
* @Description: 生成基础basePage组件,屏蔽不必要细节
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:55:27
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-10-29 15:28:24
* @FilePath: /zghywpc-vue/src/views/fmegl/fmezbpgl/index.vue
-->
<template>
<div class="fmezbpgl">
<!-- 切换-->
<div class="qh">
<el-button @click="showPic=!showPic" type="success" icon="el-icon-refresh" circle></el-button>
</div>
<Tu class="leftOpt animate__animated " v-show="showPic" :class="{
'animate__fadeInLeft':showPic,
'animate__fadeOutLeft':!showPic
}" />
<Biao class="leftOpt animate__animated " v-show="!showPic" :class="{
'animate__fadeInRight':!showPic,
'animate__fadeOutRight':showPic
}" />
</div>
</template>
<script>
import Biao from './biao'
import Tu from './tu'
export default {
name: 'fmezbpgl',
components: {
Biao,
Tu
},
data() {
return {
showPic: true
}
}
}
</script>
<style lang="scss" scoped>
.fmezbpgl {
position: relative
}
.qh {
position: absolute;
right: 55px;
bottom: 55px;
z-index: 9999;
font-size: 18px;
color: cornflowerblue;
}
</style>
<template>
<div class="min_full">
<div class="search" v-condition>
<!-- <SearchButton :app='app'></SearchButton> -->
<el-row :gutter="20" class="search-row-1">
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">年度:</span>
<RelYearSelect @change="init()&&initMonth()" v-model="queryParams.year" size="small" class="search-input"></RelYearSelect>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">月份:</span>
<RelSelect @change="initMonth" filterable style="width: 100%;" :optionsData="optionsData"
:match="{value:'id',label:'name'}" v-model='queryParams.month'></RelSelect>
</div>
</el-col>
</el-row>
</div>
<!-- 展示-->
<div class="showMain flex" style="flex-direction:column">
<div class="showYear">
<div class="showYearTitle">
FME管理年度指标({{queryParams.year}})
</div>
<div class="showYearBody">
<div class="showYearBodyItem flex1" :class="{
'bg-red':yearItem.oneywsj>=1,
// 'bg-yellow':yearItem.yearOneywsjMark=='黄',
'bg-green':yearItem.oneywsj<1,
}">
<div class="showYearBodyItemTitle">
一级异物事件
</div>
<div class="showYearBodyItemValue flex-center">
{{yearItem.oneywsj||0}}
</div>
</div>
<div class="showYearBodyItem flex1" :class="{
'bg-green':yearItem.twoywsj<4,
'bg-yellow':yearItem.twoywsj>=4,
'bg-red':yearItem.twoywsj>6,
}">
<div class="showYearBodyItemTitle">
二级异物事件
</div>
<div class="showYearBodyItemValue flex-center">
{{yearItem.twoywsj||0}}
</div>
</div>
<div class="showYearBodyItem flex1" :class="{
'bg-yellow':yearItem.rlkkx==1,
'bg-green':yearItem.rlkkx<1,
'bg-red':yearItem.rlkkx>1,
}">
<div class="showYearBodyItemTitle">
燃料可靠性
</div>
<div class="showYearBodyItemValue flex-center">
{{yearItem.rlkkx||0}}
</div>
</div>
<div class="showYearBodyItem flex1" :class="{
'bg-yellow':yearItem.wbyrywsj<=12,
'bg-green':yearItem.wbyrywsj<6,
'bg-red':yearItem.wbyrywsj>12,
}">
<div class="showYearBodyItemTitle">
外部引入异物事件
</div>
<div class="showYearBodyItemValue flex-center">
{{yearItem.wbyrywsj||0}}
</div>
</div>
</div>
</div>
<div class="showYear">
<div class="showYearTitle">
FME管理月度指标({{queryParams.month}}月)
</div>
<div class="showYearBody">
<div class="showYearBodyItem flex1" :class="{
'bg-red':monthItem.oneywsj>=1,
// 'bg-yellow':yearItem.yearOneywsjMark=='黄',
'bg-green':monthItem.oneywsj<1,
}">
<div class="showYearBodyItemTitle">
一级异物事件
</div>
<div class="showYearBodyItemValue flex-center">
{{monthItem.oneywsj||0}}
</div>
</div>
<div class="showYearBodyItem flex1" :class="{
'bg-green':monthItem.twoywsj<1,
'bg-yellow':monthItem.twoywsj==1,
'bg-red':monthItem.twoywsj>1,
}">
<div class="showYearBodyItemTitle">
二级异物事件
</div>
<div class="showYearBodyItemValue flex-center">
{{monthItem.twoywsj||0}}
</div>
</div>
<div class="showYearBodyItem flex1" :class="{
'bg-green':monthItem.wbyrywsj<3,
'bg-yellow':monthItem.wbyrywsj>=3,
'bg-red':monthItem.wbyrywsj>6,
}">
<div class="showYearBodyItemTitle">
外部引入异物事件
</div>
<div class="showYearBodyItemValue flex-center">
{{monthItem.wbyrywsj||0}}
</div>
</div>
<div class="showYearBodyItem flex1" :class="{
'bg-green':monthItem.dbrwcq<1,
'bg-yellow':monthItem.dbrwcq==1,
'bg-red':monthItem.dbrwcq>1,
}">
<div class="showYearBodyItemTitle">
督办任务超期
</div>
<div class="showYearBodyItemValue flex-center">
{{monthItem.dbrwcq||0}}
</div>
</div>
</div>
<div class="showYearBody" style="margin-top: 10px;">
<div class="showYearBodyItem flex1" :class="{
'bg-green':monthItem.yhrwcq<1,
'bg-yellow':monthItem.yhrwcq>=1&&yearItem.yhrwcq<3,
'bg-red':monthItem.yhrwcq>=3,
}">
<div class="showYearBodyItemTitle">
月会任务超期
</div>
<div class="showYearBodyItemValue flex-center">
{{monthItem.yhrwcq||0}}
</div>
</div>
<div class="showYearBodyItem flex1" :class="{
'bg-green':monthItem.lhqx<1,
'bg-yellow':monthItem.lhqx>=1&&monthItem.lhqx<3,
'bg-red':monthItem.lhqx>=3,
}">
<div class="showYearBodyItemTitle">
例会缺席
</div>
<div class="showYearBodyItemValue flex-center">
{{monthItem.lhqx||0}}
</div>
</div>
<div class="showYearBodyItem flex1" :class="{
'bg-green':monthItem.sjtbyc<1,
'bg-yellow':monthItem.sjtbyc>=1&&monthItem.sjtbyc<3,
'bg-red':monthItem.sjtbyc>=3,
}">
<div class="showYearBodyItemTitle">
事件通报异常
</div>
<div class="showYearBodyItemValue flex-center">
{{monthItem.sjtbyc||0}}
</div>
</div>
<div class="showYearBodyItem flex1" :class="{
'bg-green':monthItem.sjgbcq<1,
'bg-yellow':monthItem.sjgbcq>=1&&monthItem.sjgbcq<3,
'bg-red':monthItem.sjgbcq>=3,
}">
<div class="showYearBodyItemTitle">
事件关闭超期
</div>
<div class="showYearBodyItemValue flex-center">
{{monthItem.sjgbcq||0}}
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
optionsData: [{
id: 1,
name: "一月份"
},
{
id: 2,
name: "二月份"
},
{
id: 3,
name: "三月份"
},
{
id: 4,
name: "四月份"
},
{
id: 5,
name: "五月份"
},
{
id: 6,
name: "六月份"
},
{
id: 7,
name: "七月份"
},
{
id: 8,
name: "八月份"
},
{
id: 9,
name: "九月份"
},
{
id: 10,
name: "十月份"
},
{
id: 11,
name: "十一月份"
},
{
id: 12,
name: "十二月份"
}
],
yearItem: {
oneywsj: 0,
twoywsj: 0,
rlkkx: 0,
wbyrywsj: 0
},
monthItem: {
oneywsj: 0,
twoywsj: 0,
wbyrywsj: 0,
dbrwcq: 0,
yhrwcq: 0,
lhqx: 0,
sjtbyc: 0,
sjgbcq: 0
},
queryParams: {
year: new Date().getFullYear(),
month: new Date().getMonth() + 1
}
}
},
mounted() {
this.init()
this.initMonth()
},
methods: {
init() {
this.$post('fme/ufmezbp/query', {
year: this.queryParams.year,
type: 'year'
}).then(res => {
let records = res.data.records || []
if (records.length != 0) {
let recordItem = records[0]
this.$set(this, 'yearItem', recordItem)
let keyList = Object.keys(this.yearItem)
keyList.forEach(key => {
this.yearItem[key]=recordItem[key]||0
})
} else {
let keyList = Object.keys(this.yearItem)
keyList.forEach(key => {
this.yearItem[key]=0
})
}
this.$forceUpdate()
})
return true
},
initMonth() {
this.$post('fme/ufmezbp/query', {
year: this.queryParams.year,
month: this.queryParams.month,
type: 'month'
}).then(res => {
let records = res.data.records || []
if (records.length != 0) {
let recordItem = records[0]
let keyList = Object.keys(this.monthItem)
keyList.forEach(key => {
this.monthItem[key]=recordItem[key]||0
})
} else {
let keyList = Object.keys(this.monthItem)
keyList.forEach(key => {
this.monthItem[key]=0
})
}
this.$forceUpdate()
})
}
}
}
</script>
<style lang="scss" scoped>
.showMain {
height: calc(100% - 50px);
width: 100%;
}
.showYear {
width: 100%;
}
.showYearTitle {
line-height: 40px;
text-align: center;
width: 100%;
font-size: 16px;
color: #666;
font-weight: 700;
}
.showYearBody {
padding: 10px;
padding-top: 0px;
padding-bottom: 0px;
display: flex;
height: 156px;
}
.showYearBodyItem {
background-color: #eee;
margin-right: 10px;
}
.showYearBodyItemTitle {
line-height: 40px;
width: 100%;
font-size: 15px;
color: #39d4ff;
text-align: center;
font-weight: 800;
}
.showYearBodyItemValue {
height: calc(100% - 40px);
font-size: 34px;
}
.bg-red {
background-color: red;
}
.bg-yellow {
background-color: #ffe30b;
}
.bg-green {
background-color: #61ff7b;
}
</style>
......@@ -52,20 +52,36 @@
label: '分类',
prop: 'fl',
span: 12,
type: 'input',
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "jyfggl/ujyfk/init/ywcsyy",
"match": {
"value": "id",
"label": "name"
}
}
},
{
label: '事件分级',
prop: 'sjfj',
span: 12,
type: 'input',
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "ywxxgl/uywsj/init/sjfj",
"match": {
"value": "id",
"label": "name"
}
}
},
{
label: '是否关闭',
prop: 'sfgb',
span: 12,
type: 'checkbox',
value:'N'
value: 'N'
},
{
label: '责任专业',
......@@ -84,42 +100,42 @@
prop: 'wzx',
span: 12,
type: 'checkbox',
value:'N'
value: 'N'
},
{
label: 'IOE',
prop: 'ioe',
span: 12,
type: 'checkbox',
value:'N'
value: 'N'
},
{
label: '是否一回路或二次侧',
prop: 'sfyhlhecc',
span: 12,
type: 'checkbox',
value:'N'
value: 'N'
},
{
label: '异物事件单是否签字',
prop: 'ywsjdsfqz',
span: 12,
type: 'checkbox',
value:'N'
value: 'N'
},
{
label: 'SAP任务是否关闭',
prop: 'saprwsfgb',
span: 12,
type: 'checkbox',
value:'N'
value: 'N'
},
{
label: 'SAP通知单是否关闭',
prop: 'saptzdsfgb',
span: 12,
type: 'checkbox',
value:'N'
value: 'N'
},
],
/* 生成主从表,为空数组默认不展示 */
......
......@@ -3,7 +3,7 @@
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:55:27
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-10-28 16:31:32
* @LastEditTime: 2024-10-29 17:50:09
* @FilePath: /zghywpc-vue/src/views/ywxxgl/ywsjgl/index.vue
-->
<template>
......@@ -50,13 +50,21 @@
{
label: "分类",
prop: "fl",
fieldType: "ftString",
"transform": {
"url": "jyfggl/ujyfk/init/ywcsyy",
"label": "name",
"value": "id"
},
width: 192
},
{
label: "事件分级",
prop: "sjfj",
fieldType: "int"
"transform": {
"url": "ywxxgl/uywsj/init/sjfj",
"label": "name",
"value": "id"
},
},
{
label: "是否关闭",
......@@ -139,9 +147,7 @@
span: 6,
type: 'input',
value: ''
}
]
}]
],
/* 默认启停用 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment