Commit b748a906 authored by 秦嘉's avatar 秦嘉

Merge remote-tracking branch 'origin/master'

parents ed49a369 f7c7cedc
......@@ -3,18 +3,6 @@ ENV = 'production'
# 生产环境
# base api
VUE_APP_BASE_API = 'http://117.122.212.91:8082'
# workFlow链接地址
VUE_APP_WORKFLOW = 'http://zt.cebitic.com:10184/workFlow'
# internal链接地址
VUE_APP_INTERNAL = 'http://zt.cebitic.com:10184/internal'
# login地址
VUE_APP_LOGIN = 'http://login.cebitic.com:10181/#/login'
# 中台地址
VUE_APP_ZT = 'http://zt.cebitic.com:10181'
# 内勤地址
VUE_APP_NQ = 'http://nq.cebitic.com:10181'
# 根域名
VUE_APP_ROOT = 'cebitic.com'
# 模板地址
VUE_APP_TEMPLATE = 'http://zt.cebitic.com:10191/'
# VUE_APP_BASE_API = 'http://172.20.23.96:8085'
VUE_APP_BASE_API = 'http://124.71.16.228:8085'
......@@ -12,7 +12,8 @@
"build:test": "vue-cli-service build --mode test",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
"postinstall": "patch-package"
},
"dependencies": {
"@riophae/vue-treeselect": "^0.4.0",
......@@ -60,6 +61,7 @@
"html-webpack-plugin": "3.2.0",
"mockjs": "1.0.1-beta3",
"node-sass": "^4.9.0",
"patch-package": "^6.4.7",
"runjs": "^4.3.2",
"sass-loader": "^7.1.0",
"script-ext-html-webpack-plugin": "2.1.3",
......
......@@ -220,9 +220,9 @@
right: 12px!important;
}
.is-active.submenu-title-noDropdown {
background-color: #fff !important;
}
//.is-active.submenu-title-noDropdown {
// background-color: #fff !important;
//}
#app .sidebar-container .el-submenu .el-menu-item.is-active {
background-color: #D20A10 !important;
......
......@@ -16,11 +16,10 @@
:clearable="false"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
@change="changeTime"
style="width: 220px"
:default-time="'07:00:00'"
>
</el-date-picker>
@change="changeTime"
/>
<span>-</span>
<el-date-picker
v-model="queryParams.endDate"
......@@ -32,10 +31,9 @@
:clearable="false"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
@change="changeTime"
:default-time="'07:00:00'"
>
</el-date-picker>
@change="changeTime"
/>
</el-form-item>
</el-form>
</div>
......@@ -53,7 +51,7 @@
<img src="@/assets/image/jihuashuliang@2x.png" class="logoClass">
<div class="cardLabel">
<div>计划数量</div>
<div style="color: #D94142; margin-top: 10px; font-size: 20px;font-weight: 700;">{{imagData.planSum}}</div>
<div style="color: #D94142; margin-top: 10px; font-size: 20px;font-weight: 700;">{{ imagData.planSum }}</div>
</div>
</div>
</div>
......@@ -64,7 +62,7 @@
<img src="@/assets/image/wanchengshuliang@2x.png" class="logoClass">
<div class="cardLabel">
<div>完成数量</div>
<div style="color: #EC7E15; margin-top: 10px; font-size: 20px;font-weight: 700;">{{imagData.completeSum}}</div>
<div style="color: #EC7E15; margin-top: 10px; font-size: 20px;font-weight: 700;">{{ imagData.completeSum }}</div>
</div>
</div>
</div>
......@@ -75,7 +73,7 @@
<img src="@/assets/image/wangonglv@2x.png" class="logoClass">
<div class="cardLabel">
<div>完工率</div>
<div style="color: #E8AC08; margin-top: 10px; font-size: 20px;font-weight: 700;">{{imagData.complePropo + '%'}}</div>
<div style="color: #E8AC08; margin-top: 10px; font-size: 20px;font-weight: 700;">{{ imagData.complePropo + '%' }}</div>
</div>
</div>
</div>
......@@ -86,7 +84,7 @@
<img src="@/assets/image/yicilianglv@2x.png" class="logoClass">
<div class="cardLabel">
<div>一次良率</div>
<div style="color: #86B504; margin-top: 10px; font-size: 20px;font-weight: 700;">{{imagData.goodPropo + '%'}}</div>
<div style="color: #86B504; margin-top: 10px; font-size: 20px;font-weight: 700;">{{ imagData.goodPropo + '%' }}</div>
</div>
</div>
</div>
......@@ -106,7 +104,7 @@
<img src="@/assets/image/jihuashuliang2@2x.png" class="logoClass">
<div class="cardLabel">
<div>计划数量</div>
<div style="color: #7875CD; margin-top: 10px; font-size: 20px;font-weight: 700;">{{imagData.planSum1}}</div>
<div style="color: #7875CD; margin-top: 10px; font-size: 20px;font-weight: 700;">{{ imagData.planSum1 }}</div>
</div>
</div>
</div>
......@@ -117,7 +115,7 @@
<img src="@/assets/image/wanchengshuliang2@2x.png" class="logoClass">
<div class="cardLabel">
<div>完成数量</div>
<div style="color: #2396EF; margin-top: 10px; font-size: 20px;font-weight: 700;">{{imagData.completeSum1}}</div>
<div style="color: #2396EF; margin-top: 10px; font-size: 20px;font-weight: 700;">{{ imagData.completeSum1 }}</div>
</div>
</div>
</div>
......@@ -128,7 +126,7 @@
<img src="@/assets/image/wangonglv2@2x.png" class="logoClass">
<div class="cardLabel">
<div>完工率</div>
<div style="color: #17B5CE; margin-top: 10px; font-size: 20px;font-weight: 700;">{{imagData.complePropo1 + '%'}}</div>
<div style="color: #17B5CE; margin-top: 10px; font-size: 20px;font-weight: 700;">{{ imagData.complePropo1 + '%' }}</div>
</div>
</div>
</div>
......@@ -151,7 +149,7 @@
<div class="heightLine">
<div class="span_middle">生产看板</div>
</div>
<home-page-table></home-page-table>
<home-page-table />
</el-card>
</div>
</div>
......@@ -171,16 +169,16 @@ export default {
const date = new Date()
return {
// 开始时间范围限定
start_date:{
disabledDate:time => {
if(this.queryParams.endDate) {
start_date: {
disabledDate: time => {
if (this.queryParams.endDate) {
return time.getTime() >= new Date(this.queryParams.endDate).getTime() - 86400000
}
}
},
// 结束时间范围限定
end_date:{
disabledDate:time => {
end_date: {
disabledDate: time => {
return time.getTime() <= new Date(this.queryParams.startDate).getTime()
}
},
......@@ -353,7 +351,7 @@ export default {
trigger: 'axis',
axisPointer: {
type: 'cross'
},
}
},
grid: {
right: '10%',
......@@ -374,13 +372,13 @@ export default {
axisLabel: {
// x轴文字的配置
show: true,
interval: 0 ,// 使x轴文字显示全
interval: 0, // 使x轴文字显示全
// x轴文字过长遮挡其他文字
formatter: function (value) {
let res = value;
formatter: function(value) {
let res = value
// 长度大于15的加入省略号
if (res.length > 15) {
res = res.substring(0, 14) + "..."
res = res.substring(0, 14) + '...'
}
return res
}
......@@ -441,10 +439,10 @@ export default {
yAxisIndex: 1,
data: data3,
tooltip: {
valueFormatter: function (value) {
return value + ' %';
valueFormatter: function(value) {
return value + ' %'
}
},
}
}
]
}
......@@ -455,7 +453,7 @@ export default {
*/
getImagData() {
const params = {
startDate: this.queryParams.startDate ,
startDate: this.queryParams.startDate,
endDate: this.queryParams.endDate
}
getImagData(params).then(response => {
......
......@@ -7,3 +7,9 @@ export function getDataDetails(params) {
params
})
}
export function getProDetails(params) {
return request({
url: '/datamonitor/getStatisticsForProduce/' + '?beginDate=' + params.beginDate + '&endDate=' + params.endDate + '&type=' + params.type,
method: 'get'
})
}
<template>
<div>产出统计</div>
<div class="RepairStatistics_module">
<div class="search">
<el-form ref="queryForm" :model="queryParams" :inline="true">
<el-form-item label="计划开工时间">
<div slot="label" class="labelClass">
<div>开始时间</div>
</div>
<el-date-picker
v-model="queryParams.startDate"
:picker-options="choseType === 'day' ? start_date :choseType === 'week' ? week_date : choseType === 'month' ? month_date : start_date "
type="datetime"
placeholder="选择日期"
popper-class="date_picker"
:editable="false"
:clearable="false"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 220px"
:default-time="'00:00:00'"
@change="changeTime"
/>
<span>-</span>
<el-date-picker
v-model="queryParams.endDate"
:picker-options="choseType === 'day' ? end_date :choseType === 'week' ? week_end :choseType === 'month' ? month_end : end_date"
type="datetime"
popper-class="date_picker"
placeholder="选择日期"
:editable="false"
:clearable="false"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 220px"
:default-time="'23:59:59'"
@change="changeTime"
/>
</el-form-item>
</el-form>
</div>
<el-divider />
<div class="search_btn">
<el-button
v-for="(item,index) in btnList"
:key="index"
class="setupBtn"
:class="{activeBtn:choseType === item.dictValue}"
@click="choseBtn(item)"
>
{{ item.dictLabel }}
<img v-if="choseType === item.dictValue" :src="logo" class="chose-icon">
</el-button>
</div>
<div class="homePageIndex-body">
<el-card class="box-card">
<div class="heightLine">
<!-- <div style="margin-left: 7px" class="span_middle">生产线投入产出统计</div>-->
</div>
<div id="echarts-proLineMonitor" class="span_1">
<div id="dataCharts_proLineMonitor" ref="chart_stay" :data="HistoricalInvestigation" style="height: 40vh" />
</div>
</el-card>
<el-row>
<el-col :span="8">
<el-card class="box-card-small">
<div class="heightLine">
<div style="margin-left: 7px" class="span_middle">统计占比</div>
</div>
<div id="echarts-statistics" class="span_1">
<div id="dataCharts_statistics" ref="chart_stay" :data="HistoricalInvestigation" style="height: 40vh" />
</div>
</el-card>
</el-col>
</el-row>
<div style="border-top: 14px solid #f4f4f4; padding: 20px">
<el-table
border
:data="dataList"
>
<el-table-column type="index" label="序号" width="50" />
<el-table-column align="center" prop="type" :show-overflow-tooltip="true">
<template #header>
<div>统计日期</div>
<div>Statistical Date</div>
</template>
<template slot-scope="scope">
{{ scope.row.type || '-' }}
</template>
</el-table-column>
<!-- <el-table-column align="center" prop="defectQty" :show-overflow-tooltip="true">-->
<!-- <template slot="header">-->
<!-- <div>计划生产数量</div>-->
<!-- <div>Planned output</div>-->
<!-- </template>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.plannedOutput || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" prop="inPut" :show-overflow-tooltip="true">
<template #header>
<div>实际生产数量</div>
<div>InPut</div>
</template>
<template slot-scope="scope">
{{ scope.row.inPut || '-' }}
</template>
</el-table-column>
<el-table-column align="center" prop="failureRate" :show-overflow-tooltip="true">
<template slot="header">
<div>良率</div>
<div>goodRate</div>
</template>
<template slot-scope="scope">
{{ scope.row.goodRate + '%' || '-' }}
</template>
</el-table-column>
<el-table-column align="center" prop="failureProportion" :show-overflow-tooltip="true">
<template #header>
<div>统计占比</div>
<div>InPut Proportion</div>
</template>
<template slot-scope="scope">
{{ scope.row.inPutProportion + '%' || '-' }}
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</template>
<script>
import moment from 'moment'
import * as echarts from 'echarts'
import { getProDetails } from './apis'
export default {
name: "produceStatistics"
name: 'ProduceStatistics',
data() {
return {
// 开始时间范围限定
start_date: {
disabledDate: time => {
if (this.queryParams.endDate) {
return time.getTime() > new Date(this.queryParams.endDate).getTime() ||
time.getTime() < new Date(moment(new Date().getTime() - 3600 * 1000 * 24 * 20).format('YYYY-MM-DD')).getTime()
}
}
},
// 选周报时开始时间范围(20周内)
week_date: {
disabledDate: time => {
if (this.queryParams.endDate) {
return time.getTime() > new Date(this.queryParams.endDate).getTime() ||
time.getTime() < new Date(moment(new Date().getTime() - 3600 * 1000 * 24 * 7 * 20).format('YYYY-MM-DD')).getTime()
}
}
},
// 选月报时开始时间范围(20月内)
month_date: {
disabledDate: time => {
if (this.queryParams.endDate) {
return time.getTime() > new Date(this.queryParams.endDate).getTime() ||
time.getTime() < new Date(moment(new Date().getTime() - 3600 * 1000 * 24 * 30 * 20).format('YYYY-MM-DD')).getTime()
}
}
},
// 结束时间范围限定
end_date: {
disabledDate: time => {
if (this.queryParams.startDate) {
return time.getTime() >= new Date(moment(new Date()).format('YYYY-MM-DD')).getTime() ||
time.getTime() < new Date(moment(new Date().getTime() - 3600 * 1000 * 24 * 20).format('YYYY-MM-DD')).getTime() ||
time.getTime() < new Date(moment(new Date(this.queryParams.startDate).getTime()).format('YYYY-MM-DD')).getTime()
}
}
},
// 选周报时结束时间范围(20周内)
week_end: {
disabledDate: time => {
return time.getTime() >= new Date(moment(new Date()).format('YYYY-MM-DD')).getTime() ||
time.getTime() < new Date(moment(new Date().getTime() - 3600 * 1000 * 24 * 7 * 20).format('YYYY-MM-DD')).getTime() ||
time.getTime() < new Date(moment(new Date(this.queryParams.startDate).getTime()).format('YYYY-MM-DD')).getTime()
}
},
// 选月报时结束时间范围(20月内)
month_end: {
disabledDate: time => {
return time.getTime() >= new Date(moment(new Date()).format('YYYY-MM-DD')).getTime() ||
time.getTime() < new Date(moment(new Date().getTime() - 3600 * 1000 * 24 * 30 * 20).format('YYYY-MM-DD')).getTime() ||
time.getTime() < new Date(moment(new Date(this.queryParams.startDate).getTime()).format('YYYY-MM-DD')).getTime()
}
},
// 搜索框数据
queryParams: {
startDate: moment(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 19)).format('YYYY-MM-DD') + ' 00:00:00',
endDate: moment(new Date()).format('YYYY-MM-DD') + ' 23:59:59'
},
HistoricalInvestigation: [],
logo: require('@/assets/image/btnChose.png'),
choseType: 'day',
dataList: [],
btnList: [
{ dictLabel: '日报', dictValue: 'day' },
{ dictLabel: '周报', dictValue: 'week' },
{ dictLabel: '月报', dictValue: 'month' },
{ dictLabel: '按班次统计', dictValue: 'Shift' },
{ dictLabel: '按线体统计', dictValue: 'Line' },
{ dictLabel: '按工单统计', dictValue: 'Working Order' },
{ dictLabel: '按追溯号统计', dictValue: 'Batch Number' },
{ dictLabel: '按PO号统计', dictValue: 'Po Number' },
{ dictLabel: '按项目统计', dictValue: 'Project' },
{ dictLabel: '按成品料号统计', dictValue: 'PartNumber' }
]
}
},
created() {
},
mounted() {
this.getRepairStats() // 获取页面数据
// 通过监听内容部分的宽度让图表resize
const elementResizeDetectorMaker = require('element-resize-detector')
const erd = elementResizeDetectorMaker()
const that = this
erd.listenTo(document.getElementById('echarts-proLineMonitor'), function(element) {
const width = element.offsetWidth
const height = element.offsetHeight
self.tableHeight = height // 将监听到的宽高进行赋值
self.tableWidth = width
that.$nextTick(function() {
console.log('Size: ' + width + 'x' + height)
// 使echarts尺寸重置
echarts.init(document.getElementById('dataCharts_proLineMonitor')).resize()
})
})
erd.listenTo(document.getElementById('echarts-statistics'), function(element) {
const width = element.offsetWidth
const height = element.offsetHeight
self.tableHeight = height // 将监听到的宽高进行赋值
self.tableWidth = width
that.$nextTick(function() {
console.log('Size: ' + width + 'x' + height)
// 使echarts尺寸重置
echarts.init(document.getElementById('dataCharts_statistics')).resize()
})
})
},
methods: {
/** 获取页面数据*/
getRepairStats() {
const params = {
beginDate: this.queryParams.startDate,
endDate: this.queryParams.endDate,
type: this.choseType
}
getProDetails(params).then(res => {
this.dataList = res.data
this.getProLineMonitor()
this.getStatistics()
})
},
/** 更改筛选时间*/
changeTime() {
const params = {
beginDate: this.queryParams.startDate,
endDate: this.queryParams.endDate,
type: this.choseType
}
getProDetails(params).then(res => {
this.dataList = res.data
this.getProLineMonitor()
this.getStatistics()
})
},
/** 选择按钮类型*/
choseBtn(item) {
this.choseType = item.dictValue
const params = {
beginDate: this.queryParams.startDate,
endDate: this.queryParams.endDate,
type: this.choseType
}
getProDetails(params).then(res => {
this.dataList = res.data
this.getProLineMonitor()
this.getStatistics()
})
},
/** 统计占比echarts*/
getStatistics() {
const myChartAge = echarts.init(document.getElementById('dataCharts_statistics'))
const statisticsData = []
this.dataList.forEach(item => {
const row = {
value: item.inPutProportion, name: item.type
}
statisticsData.push(row)
})
const option = {
tooltip: {
trigger: 'item'
// formatter: '{a} <br/>{b} : {c}% ({d}%)'
},
series: [
{
name: '统计占比',
type: 'pie',
radius: '50%',
data: statisticsData,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
}
myChartAge.setOption(option)
},
/** 生产线监控*/
getProLineMonitor() {
const myChartAge = echarts.init(document.getElementById('dataCharts_proLineMonitor'))
const colors = [ '#BC2C29', '#FF8919']
const xData = [] // x轴显示
const proOutput = [] // y计划生产数量
const inputData = [] // y实际生产数量
const goodRate = [] // 良率
let dataTemp = []
let maxNum1 = 0
this.dataList.forEach(item => {
xData.push(item.type)
// proOutput.push(item.plannedOutput)
inputData.push(item.inPut)
goodRate.push(item.goodRate)
})
dataTemp = proOutput.concat(inputData)
maxNum1 = Math.max(...dataTemp) // y计划生产和实际生产的最大值
const option = {
color: colors,
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross'
}
},
grid: {
right: '20%'
},
xAxis: [
{
type: 'category',
axisTick: {
alignWithLabel: true
},
// prettier-ignore
data: xData
}
],
yAxis: [
{
type: 'value',
position: 'left',
min: 0,
max: maxNum1,
interval: Math.ceil(maxNum1 / 5),
alignTicks: true,
axisLine: {
show: true
},
axisLabel: {
formatter: '{value}'
}
},
{
name: ' ',
type: 'value',
position: 'right',
alignTicks: true,
min: 0,
max: 100,
interval: 20,
axisLine: {
show: true
},
axisLabel: {
formatter: '{value} %'
}
}
],
series: [
// {
// name: '计划生产数量',
// type: 'bar',
// barWidth: 18,
// barGap: 0,
// data: proOutput
// },
{
name: '实际生产数量',
type: 'bar',
barWidth: 18,
barGap: 0,
data: inputData
},
{
name: '良率',
type: 'line',
yAxisIndex: 1,
data: goodRate,
tooltip: {
valueFormatter: function(value) {
return value + ' %'
}
}
}
]
}
myChartAge.setOption(option)
}
}
}
</script>
<style scoped>
<style scoped lang="scss">
.RepairStatistics_module{
.search{
padding: 0 20px;
}
.el-divider--horizontal{
margin: 10px 0;
}
.search_btn{
border-bottom: 14px solid rgb(244, 244, 244);
//display: flex;
.chose-icon{
width: 15px;
position: absolute;
right: -1px;
top: -1px;
}
.setupBtn{
font-size: 16px;
color: #333333;
position: relative;
border-radius: 5px;
margin: 10px;
height: 32px;
}
.activeBtn{
border-radius: 5px;
height: 32px;
border: 1px solid #D20A10;
background-color: white;
color: #D20A10;
}
}
.homePageIndex-body{
.box-card-small{
}
::v-deep .el-table th .cell{
display: inline-block!important;
}
.table-drop{
vertical-align: 2px;
//line-height: 20px;
margin-left: 15px
}
}
}
</style>
......@@ -8,30 +8,31 @@
</div>
<el-date-picker
v-model="queryParams.startDate"
:picker-options="choseType === 'day' ? start_date :choseType === 'week' ? week_date : choseType === 'month' ? month_date : '' "
:picker-options="choseType === 'day' ? start_date :choseType === 'week' ? week_date : choseType === 'month' ? month_date : start_date "
type="datetime"
placeholder="选择日期"
popper-class="date_picker"
:editable="false"
:clearable="false"
format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 220px"
:default-time="'07:00:00'"
:default-time="'00:00:00'"
@change="changeTime"
/>
<span>-</span>
<el-date-picker
v-model="queryParams.endDate"
:picker-options="choseType === 'day' ? end_date :choseType === 'week' ? week_end :choseType === 'month' ? month_end : ''"
:picker-options="choseType === 'day' ? end_date :choseType === 'week' ? week_end :choseType === 'month' ? month_end : end_date"
type="datetime"
popper-class="date_picker"
placeholder="选择日期"
:editable="false"
:clearable="false"
format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="'07:00:00'"
style="width: 220px"
:default-time="'23:59:59'"
@change="changeTime"
/>
</el-form-item>
......@@ -66,9 +67,43 @@
>
<el-table-column type="index" label="序号" width="50" />
<el-table-column align="center" prop="type" :show-overflow-tooltip="true">
<template slot="header">
<div>统计日期</div>
<div>Statistical Date</div>
<template #header>
<div v-if="choseType === 'day' || choseType === 'week' || choseType === 'month'">
<div>统计日期</div>
<div>Statistical Date</div>
</div>
<div v-if="choseType === 'reason' || choseType === 'phenomenon'">
<div>报修原因</div>
<div>Reason</div>
</div>
<div v-if="choseType === 'parts'">
<div>不良部件</div>
<div>Parts</div>
</div>
<div v-if="choseType === 'disadvantage'">
<div>不良描述</div>
<div>Disadvantage</div>
</div>
<div v-if="choseType === 'operation'">
<div>维修操作</div>
<div>Operation</div>
</div>
<div v-if="choseType === 'xtCode'">
<div>线体号</div>
<div>XtCode</div>
</div>
<div v-if="choseType === 'station'">
<div>报修工站</div>
<div>Station</div>
</div>
<div v-if="choseType === 'materCode'">
<div>成品料号</div>
<div>MaterCode</div>
</div>
<div v-if="choseType === 'family'">
<div>按项目</div>
<div>Project</div>
</div>
</template>
<template slot-scope="scope">
{{ scope.row.type || '-' }}
......@@ -76,7 +111,8 @@
</el-table-column>
<el-table-column align="center" prop="defectQty" :show-overflow-tooltip="true">
<template slot="header">
<div>不良数量</div>
<div v-if="choseType === 'day' || choseType === 'week' || choseType === 'month'">不良数量</div>
<div v-else>维修数量</div>
<div>DefectQty</div>
</template>
<template slot-scope="scope">
......@@ -84,9 +120,10 @@
</template>
</el-table-column>
<el-table-column align="center" prop="inPut" :show-overflow-tooltip="true">
<template slot="header">
<div>计划生产数量</div>
<div>InPut</div>
<template #header>
<div>生产完成数量</div>
<div v-if="choseType === 'reason'">InPut</div>
<div v-else>OutPut</div>
</template>
<template slot-scope="scope">
{{ scope.row.inPut || '-' }}
......@@ -98,7 +135,8 @@
<div>FailureRate</div>
</template>
<template slot-scope="scope">
{{ scope.row.failureRate || '-' }}
<span v-if="scope.row.failureRate"> {{ scope.row.failureRate }}%</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column align="center" prop="failureProportion" :show-overflow-tooltip="true">
......@@ -114,7 +152,8 @@
</template>
<template slot-scope="scope">
<span v-if="choseType === 'day'|| choseType === 'week'|| choseType === 'month' ">
{{ scope.row.failureProportion || '-' }}
<span v-if="scope.row.failureProportion"> {{ scope.row.failureProportion }}%</span>
<span v-else>-</span>
</span>
<span v-else>
{{ scope.row.errorNum || '-' }}
......@@ -166,28 +205,33 @@ export default {
// 结束时间范围限定
end_date: {
disabledDate: time => {
return time.getTime() >= new Date(moment(new Date()).format('YYYY-MM-DD')).getTime() ||
time.getTime() < new Date(moment(new Date().getTime() - 3600 * 1000 * 24 * 20).format('YYYY-MM-DD')).getTime()
if (this.queryParams.startDate) {
return time.getTime() >= new Date(moment(new Date()).format('YYYY-MM-DD')).getTime() ||
time.getTime() < new Date(moment(new Date().getTime() - 3600 * 1000 * 24 * 20).format('YYYY-MM-DD')).getTime() ||
time.getTime() < new Date(moment(new Date(this.queryParams.startDate).getTime()).format('YYYY-MM-DD')).getTime()
}
}
},
// 选周报时结束时间范围(20周内)
week_end: {
disabledDate: time => {
return time.getTime() >= new Date(moment(new Date()).format('YYYY-MM-DD')).getTime() ||
time.getTime() < new Date(moment(new Date().getTime() - 3600 * 1000 * 24 * 7 * 20).format('YYYY-MM-DD')).getTime()
time.getTime() < new Date(moment(new Date().getTime() - 3600 * 1000 * 24 * 7 * 20).format('YYYY-MM-DD')).getTime() ||
time.getTime() < new Date(moment(new Date(this.queryParams.startDate).getTime()).format('YYYY-MM-DD')).getTime()
}
},
// 选月报时结束时间范围(20月内)
month_end: {
disabledDate: time => {
return time.getTime() >= new Date(moment(new Date()).format('YYYY-MM-DD')).getTime() ||
time.getTime() < new Date(moment(new Date().getTime() - 3600 * 1000 * 24 * 30 * 20).format('YYYY-MM-DD')).getTime()
time.getTime() < new Date(moment(new Date().getTime() - 3600 * 1000 * 24 * 30 * 20).format('YYYY-MM-DD')).getTime() ||
time.getTime() < new Date(moment(new Date(this.queryParams.startDate).getTime()).format('YYYY-MM-DD')).getTime()
}
},
// 搜索框数据
queryParams: {
startDate: moment(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 19)).format('YYYY-MM-DD') + ' 07:00:00',
endDate: moment(new Date()).format('YYYY-MM-DD') + ' 07:00:00'
startDate: moment(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 19)).format('YYYY-MM-DD') + ' 00:00:00',
endDate: moment(new Date()).format('YYYY-MM-DD') + ' 23:59:59'
},
HistoricalInvestigation: [],
logo: require('@/assets/image/btnChose.png'),
......@@ -204,6 +248,7 @@ export default {
{ dictLabel: '维修操作', dictValue: 'operation' },
{ dictLabel: '线体号', dictValue: 'xtCode' },
{ dictLabel: '报修工站', dictValue: 'station' },
{ dictLabel: '按项目', dictValue: 'family' },
{ dictLabel: '成品料号', dictValue: 'materCode' }
]
}
......@@ -269,6 +314,7 @@ export default {
/** 生产线监控*/
getProLineMonitor() {
const myChartAge = echarts.init(document.getElementById('dataCharts_proLineMonitor'))
const _this = this
const colors = ['#209DFF', '#BC2C29', '#FF8919']
const xData = [] // x轴显示
const defectQtyData = [] // y不良数量
......@@ -336,7 +382,7 @@ export default {
show: true
},
axisLabel: {
formatter: '{value} %'
formatter: _this.choseType === 'day' || _this.choseType === 'week' || _this.choseType === 'month' ? '{value} %' : '{value}'
}
}
......@@ -357,13 +403,17 @@ export default {
data: inputData
},
{
name: '不良占比',
name: _this.choseType === 'day' || _this.choseType === 'week' || _this.choseType === 'month' ? '不良占比' : '误测次数',
type: 'line',
yAxisIndex: 1,
data: failureProportionData,
tooltip: {
valueFormatter: function(value) {
return value + ' %'
if (_this.choseType === 'day' || _this.choseType === 'week' || _this.choseType === 'month') {
return value + ' %'
} else {
return value
}
}
}
}
......
......@@ -87,10 +87,10 @@ export default {
}
updateUserPwd(params).then(res => {
this.$message.success('密码修改成功!')
this.$router.push('/login')
// this.$store.dispatch('LogOut').then(() => {
// location.reload()
// })
// this.$router.push('/login')
this.$store.dispatch('FedLogOut').then(() => {
location.reload()
})
})
} else {
return false
......
......@@ -81,17 +81,9 @@ module.exports = {
[process.env.VUE_APP_BASE_API]: {
// target: `http://192.168.1.17:10010/internal`,
// target: `http://10.5.87.231:10010/internal`,
target: `http://117.122.212.91:8082/`,
// target: `http://192.168.1.88:8082/`,
// target: `http://192.168.1.44:8082/`,
// target: `http://192.168.1.45:8082/`,
// target: `http://192.168.1.69:8082/`,
// target: `http://192.168.1.95:8082/`,
// target: `http://192.168.1.63:8082/`,
// target: `http://192.168.1.25:8088/`,
// target: `http://192.168.1.18:8082/`,
// target: `http://192.168.1.11:8082/`,
// target: `http://192.168.1.12:8082/`,
target: `http://124.71.16.228:8085/`,
// target: `http://192.168.1.20:8083/`,
// target: `http://192.168.1.47:8082/`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
......
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