projects/mescc/dy #37

Merged
juzi merged 2 commits from projects/mescc/dy into projects/mescc/develop 2024-06-07 14:55:58 +08:00
5 changed files with 30 additions and 23 deletions

View File

@ -1,7 +1,7 @@
### ###
# @Author: zhp # @Author: zhp
# @Date: 2024-04-28 13:42:51 # @Date: 2024-04-28 13:42:51
# @LastEditTime: 2024-06-05 16:07:26 # @LastEditTime: 2024-06-07 10:32:24
# @LastEditors: DY # @LastEditors: DY
# @Description: # @Description:
### ###
@ -13,9 +13,9 @@ VUE_APP_TITLE = 发电玻璃智能管控平台
# 芋道管理系统/开发环境 # 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://192.168.1.70:30307' # VUE_APP_BASE_API = 'http://192.168.1.70:30307'
VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com' # VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com'
# sara # sara
# VUE_APP_BASE_API = 'http://192.168.1.63:48080' VUE_APP_BASE_API = 'http://192.168.1.63:48080'
# 张一丁 # 张一丁
# VUE_APP_BASE_API = 'http://192.168.4.139:48080' # VUE_APP_BASE_API = 'http://192.168.4.139:48080'

View File

@ -1,12 +1,12 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:15:30 * @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-06-05 15:28:07 * @LastEditTime: 2024-06-07 10:28:51
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
<template> <template>
<el-drawer class="drawer" :visible.sync="visible" size="55%" @closed="$emit('destroy')"> <el-drawer class="drawer" :visible.sync="visible" size="60%" @closed="$emit('destroy')">
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
{{ '碲化镉工厂生产数据详情' }} {{ '碲化镉工厂生产数据详情' }}
</small-title> </small-title>
@ -22,7 +22,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<p class="title">时间</p> <p class="title">时间</p>
<p class="text">{{ dataForm.reportDate.length > 0 ? dataForm.reportDate[0] + '年' + dataForm.reportDate[1] + '月' + dataForm.reportDate[2] + '日' : '' }}</p> <p class="text">{{ dataForm.reportDate?.length > 0 ? dataForm.reportDate[0] + '年' + dataForm.reportDate[1] + '月' + dataForm.reportDate[2] + '日' : '' }}</p>
</el-col> </el-col>
</el-row> </el-row>
<el-divider></el-divider> <el-divider></el-divider>
@ -350,7 +350,6 @@ export default {
margin: 0; margin: 0;
padding: 32px 32px 24px; padding: 32px 32px 24px;
border-bottom: 1px solid #dcdfe6; border-bottom: 1px solid #dcdfe6;
margin-bottom: 30px;
} }
.detailBox p { .detailBox p {
margin: 0; margin: 0;
@ -374,5 +373,9 @@ export default {
color: rgba(102,102,102,0.75); color: rgba(102,102,102,0.75);
padding-bottom: 20px; padding-bottom: 20px;
} }
.detailBox {
width: 98%;
padding-top: 30px;
}
</style> </style>

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-15 10:49:13 * @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-06-04 14:13:23 * @LastEditTime: 2024-06-07 09:41:56
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -10,17 +10,17 @@
<div class="app-container" style="padding: 16px 24px 0;height: auto; flex-grow: 1;"> <div class="app-container" style="padding: 16px 24px 0;height: auto; flex-grow: 1;">
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip"> <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="时间维度" prop="date"> <el-form-item label="时间维度" prop="date">
<el-select size="small" clearable v-model="listQuery.mode" placeholder="请选择"> <el-select size="small" clearable v-model="listQuery.date" placeholder="请选择">
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-show="listQuery.mode === 0 || listQuery.mode === ''" label="时间范围" prop="reportTime"> <el-form-item v-show="listQuery.date === 0 || listQuery.date === ''" label="时间范围" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.reportTime" type="datetimerange" range-separator="" <el-date-picker size="small" clearable v-model="listQuery.reportTime" type="datetimerange" range-separator=""
start-placeholder="开始日期" value-format="timestamp" format="yyyy-MM-dd" @change="changeDayTime" end-placeholder="结束日期"> start-placeholder="开始日期" value-format="timestamp" format="yyyy-MM-dd" @change="changeDayTime" end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-show="listQuery.mode === 1" label="时间范围" prop="reportTime"> <el-form-item v-show="listQuery.date === 1" label="时间范围" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.start" type="week" format="yyyy 第 WW 周" placeholder="选择周" <el-date-picker size="small" clearable v-model="listQuery.start" type="week" format="yyyy 第 WW 周" placeholder="选择周"
style="width: 180px" @change="onValueChange"> style="width: 180px" @change="onValueChange">
</el-date-picker> </el-date-picker>
@ -32,12 +32,12 @@
{{ date1 }} {{ date2 }} {{ weekNum }} {{ date1 }} {{ date2 }} {{ weekNum }}
</span> </span>
</el-form-item> </el-form-item>
<el-form-item v-show="listQuery.mode === 2" label="时间范围" prop="reportTime"> <el-form-item v-show="listQuery.date === 2" label="时间范围" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.reportTime" type="monthrange" value-format="timestamp" range-separator="" <el-date-picker size="small" clearable v-model="listQuery.reportTime" type="monthrange" value-format="timestamp" range-separator=""
start-placeholder="开始月份" end-placeholder="结束月份" @change="changeTime"> start-placeholder="开始月份" end-placeholder="结束月份" @change="changeTime">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-show="listQuery.mode === 3" label="时间范围" prop="reportTime"> <el-form-item v-show="listQuery.date === 3" label="时间范围" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.start" format="yyyy-MM-dd" value-format="timestamp" type="year" <el-date-picker size="small" clearable v-model="listQuery.start" format="yyyy-MM-dd" value-format="timestamp" type="year"
placeholder="开始时间"> placeholder="开始时间">
</el-date-picker> </el-date-picker>
@ -94,7 +94,7 @@
@pagination="getDataList" @pagination="getDataList"
/> />
</div> </div>
<add-or-update v-if="detailOrUpdateVisible" ref="detailOrUpdate" :date="listQuery.mode" @refreshDataList="successSubmit" @destroy="detailOrUpdateVisible = false" /> <add-or-update v-if="detailOrUpdateVisible" ref="detailOrUpdate" :date="listQuery.date" @refreshDataList="successSubmit" @destroy="detailOrUpdateVisible = false" />
<!-- <inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" <!-- <inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all"
:type="listQuery.reportType" @refreshDataList="getDataList" /> --> :type="listQuery.reportType" @refreshDataList="getDataList" /> -->
<!-- <pagination <!-- <pagination
@ -129,7 +129,7 @@ export default {
current: 1, current: 1,
factorys: undefined, factorys: undefined,
total: 0, total: 0,
mode: 0, date: 0,
type:undefined, type:undefined,
// reportType: 2, // reportType: 2,
beginTime: undefined, beginTime: undefined,
@ -353,7 +353,7 @@ export default {
beginTime: this.listQuery.beginTime, beginTime: this.listQuery.beginTime,
endTime: this.listQuery.endTime, endTime: this.listQuery.endTime,
factorys: this.listQuery.factorys, factorys: this.listQuery.factorys,
mode: this.listQuery.mode, date: this.listQuery.date,
type: this.listQuery.type type: this.listQuery.type
}).then(resp => { }).then(resp => {
console.log('Aaa', resp.data) console.log('Aaa', resp.data)

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:15:30 * @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-06-05 15:39:35 * @LastEditTime: 2024-06-07 14:15:00
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -43,7 +43,7 @@
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<p class="title">投入状态</p> <p class="title">投入状态</p>
<p class="text">{{ dataForm.inStatus }}</p> <p class="text">{{ getDictDataLabel('work_order_in_status', dataForm.inStatus) }}</p>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
@ -98,6 +98,7 @@ import { getWorkOrderDetail } from '@/api/produceData/order';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import jsPDF from 'jspdf'; import jsPDF from 'jspdf';
import html2canvas from 'html2canvas'; import html2canvas from 'html2canvas';
import { getDictDataLabel } from "@/utils/dict";
export default { export default {
components: { components: {
@ -266,7 +267,7 @@ export default {
this.pieChart = echarts.init(this.$refs['pie']) this.pieChart = echarts.init(this.$refs['pie'])
this.pieChart.setOption({ this.pieChart.setOption({
title: { title: {
text: '产品良率', text: '产品良率 ' + (pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100 + '%',
left: 'center' left: 'center'
// subtext: 'Fake Data' // subtext: 'Fake Data'
}, },
@ -280,7 +281,7 @@ export default {
}, },
series: [ series: [
{ {
name: 'Access From', // name: 'Access From',
type: 'pie', type: 'pie',
radius: ['40%', '70%'], radius: ['40%', '70%'],
avoidLabelOverlap: false, avoidLabelOverlap: false,

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-15 10:49:13 * @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-06-03 15:15:18 * @LastEditTime: 2024-06-07 10:35:48
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -47,6 +47,7 @@ import moment from 'moment'
import basicPage from '@/mixins/basic-page' import basicPage from '@/mixins/basic-page'
import AddOrUpdate from './add-or-updata'; import AddOrUpdate from './add-or-updata';
import { factoryList, factoryArray } from "@/utils/constants"; import { factoryList, factoryArray } from "@/utils/constants";
import { publicFormatter } from "@/utils/dict";
// import FileSaver from 'file-saver' // import FileSaver from 'file-saver'
// import * as XLSX from 'xlsx' // import * as XLSX from 'xlsx'
@ -183,7 +184,8 @@ export default {
{ {
prop: 'workOrderType', prop: 'workOrderType',
label: '工单类型', label: '工单类型',
filter: (val) => ['', '芯片订单', '组件类型', 'bipv类型'][val], // filter: publicFormatter('workorder_status')
filter: (val) => ['', '芯片工单', '组件类型', 'bipv类型'][val],
}, },
{ {
prop: 'plannedInvestment', prop: 'plannedInvestment',
@ -209,7 +211,8 @@ export default {
{ {
prop: 'orderStatus', prop: 'orderStatus',
label: '工单状态', label: '工单状态',
filter: (val) => ['未开始', '生产中', '已完成'][val], filter: publicFormatter('workorder_status')
// filter: (val) => ['', '', ''][val],
}, },
{ {
prop: 'startTime', prop: 'startTime',