projects/mescc/zhp #33
8
.env.dev
8
.env.dev
@ -1,15 +1,15 @@
|
||||
###
|
||||
# @Author: zhp
|
||||
# @Date: 2024-04-28 13:42:51
|
||||
# @LastEditTime: 2024-06-03 15:41:29
|
||||
# @LastEditors: zhp
|
||||
# @LastEditTime: 2024-06-04 08:56:35
|
||||
# @LastEditors: DY
|
||||
# @Description:
|
||||
###
|
||||
# 开发环境配置
|
||||
ENV = 'development'
|
||||
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 芋道管理系统
|
||||
VUE_APP_TITLE = 发电玻璃智能管控平台
|
||||
|
||||
# 芋道管理系统/开发环境
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.70:30307'
|
||||
@ -26,7 +26,7 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
VUE_APP_TENANT_ENABLE = true
|
||||
|
||||
# 验证码的开关
|
||||
VUE_APP_CAPTCHA_ENABLE = true
|
||||
VUE_APP_CAPTCHA_ENABLE = false
|
||||
|
||||
# 文档的开关
|
||||
VUE_APP_DOC_ENABLE = true
|
||||
|
@ -2,7 +2,7 @@
|
||||
ENV = 'development'
|
||||
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 芋道管理系统
|
||||
VUE_APP_TITLE = 发电玻璃智能管控平台
|
||||
|
||||
# 芋道管理系统/本地环境
|
||||
VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn'
|
||||
@ -14,7 +14,7 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
VUE_APP_TENANT_ENABLE = true
|
||||
|
||||
# 验证码的开关
|
||||
VUE_APP_CAPTCHA_ENABLE = true
|
||||
VUE_APP_CAPTCHA_ENABLE = false
|
||||
|
||||
# 文档的开关
|
||||
VUE_APP_DOC_ENABLE = true
|
||||
|
@ -2,7 +2,7 @@
|
||||
NODE_ENV = 'production'
|
||||
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 玻璃控股信息平台
|
||||
VUE_APP_TITLE = 发电玻璃智能管控平台
|
||||
|
||||
# 芋道管理系统/生产环境
|
||||
VUE_APP_BASE_API = ''
|
||||
@ -16,7 +16,7 @@ PUBLIC_PATH = ''
|
||||
VUE_APP_TENANT_ENABLE = true
|
||||
|
||||
# 验证码的开关
|
||||
VUE_APP_CAPTCHA_ENABLE = true
|
||||
VUE_APP_CAPTCHA_ENABLE = false
|
||||
|
||||
# 文档的开关
|
||||
VUE_APP_DOC_ENABLE = false
|
||||
|
@ -1,7 +1,7 @@
|
||||
NODE_ENV = production
|
||||
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 芋道管理系统
|
||||
VUE_APP_TITLE = 发电玻璃智能管控平台
|
||||
|
||||
# 测试环境配置
|
||||
ENV = 'staging'
|
||||
@ -16,7 +16,7 @@ PUBLIC_PATH = 'http://static.yudao.iocoder.cn/'
|
||||
VUE_APP_TENANT_ENABLE = true
|
||||
|
||||
# 验证码的开关
|
||||
VUE_APP_CAPTCHA_ENABLE = true
|
||||
VUE_APP_CAPTCHA_ENABLE = false
|
||||
|
||||
# 文档的开关
|
||||
VUE_APP_DOC_ENABLE = false
|
||||
|
@ -4,7 +4,7 @@ NODE_ENV = development
|
||||
ENV = 'staging'
|
||||
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 芋道管理系统
|
||||
VUE_APP_TITLE = 发电玻璃智能管控平台
|
||||
|
||||
# 芋道管理系统/测试环境
|
||||
VUE_APP_BASE_API = 'http://127.0.0.1:48080'
|
||||
@ -18,7 +18,7 @@ VUE_APP_APP_NAME ='/admin-ui-vue2/'
|
||||
VUE_APP_TENANT_ENABLE = true
|
||||
|
||||
# 验证码的开关
|
||||
VUE_APP_CAPTCHA_ENABLE = true
|
||||
VUE_APP_CAPTCHA_ENABLE = false
|
||||
|
||||
# 文档的开关
|
||||
VUE_APP_DOC_ENABLE = true
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2024-05-07 08:54:59
|
||||
* @LastEditTime: 2024-05-31 15:08:27
|
||||
* @LastEditTime: 2024-06-03 14:25:02
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
@ -50,3 +50,11 @@ export function exportExcel(data) {
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得工单数据概览
|
||||
export function getOverView(){
|
||||
return request({
|
||||
url: '/ip/prod-work-order/getOverView',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
Binary file not shown.
@ -49,7 +49,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import logoImg from "@/assets/logo/logo.png";
|
||||
import logoImg from "@/assets/logo/cnbm.png";
|
||||
import variables from "@/assets/styles/variables.scss";
|
||||
|
||||
export default {
|
||||
@ -70,7 +70,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: "玻璃控股信息平台",
|
||||
title: "发电玻璃智能管控平台",
|
||||
logo: logoImg,
|
||||
};
|
||||
},
|
||||
@ -104,7 +104,7 @@ export default {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
vertical-align: middle;
|
||||
margin-right: 12px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
& .sidebar-title {
|
||||
@ -113,7 +113,7 @@ export default {
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
font-size: 14px;
|
||||
font-size: 19px;
|
||||
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
@ -127,7 +127,8 @@ Router.prototype.push = function push(location) {
|
||||
|
||||
export default new Router({
|
||||
base: process.env.VUE_APP_APP_NAME ? process.env.VUE_APP_APP_NAME : "/",
|
||||
mode: "history", // 去掉url中的#
|
||||
// mode: "history", // 去掉url中的#
|
||||
mode: "hash",
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRoutes,
|
||||
});
|
||||
|
@ -218,7 +218,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
codeUrl: "",
|
||||
captchaEnable: true,
|
||||
captchaEnable: false,
|
||||
tenantEnable: true,
|
||||
mobileCodeTimer: 0,
|
||||
loginForm: {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-06 15:15:30
|
||||
* @LastEditTime: 2024-05-22 15:29:18
|
||||
* @LastEditTime: 2024-06-03 15:42:47
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
@ -18,11 +18,11 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<p class="title">时间维度</p>
|
||||
<p class="text">{{ dataForm.targetType === 0 ? '月' : '年' }}</p>
|
||||
<p class="text">{{ ['日', '周', '月', '年'][dataForm.targetType] }}</p>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<p class="title">时间</p>
|
||||
<p class="text">{{ dataForm.targetType === 1 ? dataForm.targetYear + '年' : dataForm.targetYear + '年' + dataForm.targetMonth + '月'}}</p>
|
||||
<p class="text">{{ dataForm.targetTime}}</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider></el-divider>
|
||||
@ -371,5 +371,8 @@ export default {
|
||||
color: rgba(102,102,102,0.75);
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.detailBox {
|
||||
width: 98%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -1,15 +1,15 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-15 10:49:13
|
||||
* @LastEditTime: 2024-05-31 16:41:12
|
||||
* @LastEditTime: 2024-06-03 16:02:56
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div style="display: flex; flex-direction: column; min-height: calc(100vh - 96px - 31px)">
|
||||
<div style="display: flex; flex-direction: column; min-height: calc(100vh - 96px - 32px)">
|
||||
<ButtonNav v-show="false" :menus="['碲化镉工厂', '铜铟镓硒工厂']" :button-mode="true" @change="changeFactory" style="margin-top: -10px">
|
||||
</ButtonNav>
|
||||
<div class="app-container" style="padding: 16px 24px 0;height: auto; flex-grow: 1;">
|
||||
<div class="app-container" style="height: auto; flex-grow: 1;">
|
||||
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
||||
<el-form-item v-if="facType === 0" label="工厂名称" prop="factorys">
|
||||
<el-select size="small" v-model="listQuery.factorys" placeholder="请选择工厂名称" multiple clearable>
|
||||
@ -42,9 +42,9 @@
|
||||
<el-date-picker size="small" clearable v-model="end" type="week" format="yyyy 第 WW 周" placeholder="选择周"
|
||||
style="width: 180px" @change="onValueChange">
|
||||
</el-date-picker>
|
||||
<span v-if="start && end" style="margin-left: 10px">
|
||||
<!-- <span v-if="start && end" style="margin-left: 10px">
|
||||
{{ date1 }} 至 {{ date2 }},共 {{ weekNum }} 周
|
||||
</span>
|
||||
</span> -->
|
||||
</el-form-item>
|
||||
<el-form-item v-show="listQuery.date === 3" label="时间值" prop="reportTime">
|
||||
<el-date-picker size="small" v-model="listQuery.reportTime" type="monthrange" value-format="yyyyMM" range-separator="至" start-placeholder="开始月份"
|
||||
@ -173,7 +173,7 @@ export default {
|
||||
current: 1,
|
||||
factorys: null,
|
||||
total: 0,
|
||||
date: 1,
|
||||
date: 3,
|
||||
beginTime: undefined,
|
||||
endTime: undefined,
|
||||
reportTime: []
|
||||
@ -450,13 +450,12 @@ export default {
|
||||
})
|
||||
this.upload.url = process.env.VUE_APP_BASE_API + '/admin-api/ip/prod-target/to-target-import-excel'
|
||||
}
|
||||
console.log(112, this.tableProps)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.getDict()
|
||||
// this.getCurrentYearFirst()
|
||||
this.getDataList()
|
||||
created() {
|
||||
const currentMonth = new Date()
|
||||
this.listQuery.reportTime = [moment(currentMonth).format('yyyyMM'), moment(currentMonth).format('yyyyMM')]
|
||||
this.changeTime()
|
||||
},
|
||||
methods: {
|
||||
handleImport() {
|
||||
@ -469,42 +468,6 @@ export default {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
// handleFileSuccess(param, type) {
|
||||
// console.log('带的', param.file)
|
||||
// const formData = new FormData()
|
||||
// formData.append('multipartFile', param.file)
|
||||
// console.log('送送', param)
|
||||
// importDiTarget(formData).then(res => {
|
||||
// console.log(res)
|
||||
// if (res.code !== 0) {
|
||||
// this.$modal.msgError(response.msg)
|
||||
// return;
|
||||
// }
|
||||
// this.upload.open = false;
|
||||
// this.upload.isUploading = false;
|
||||
// this.$refs.upload.clearFiles();
|
||||
// }).catch(() => {
|
||||
// this.upload.open = false
|
||||
// this.upload.isUploading = false
|
||||
// })
|
||||
// // 拼接提示语
|
||||
// // let data = response.data;
|
||||
// // let text = '创建成功数量:' + data.createUsernames.length;
|
||||
// // for (const username of data.createUsernames) {
|
||||
// // text += '<br /> ' + username;
|
||||
// // }
|
||||
// // text += '<br />更新成功数量:' + data.updateUsernames.length;
|
||||
// // for (const username of data.updateUsernames) {
|
||||
// // text += '<br /> ' + username;
|
||||
// // }
|
||||
// // text += '<br />更新失败数量:' + Object.keys(data.failureUsernames).length;
|
||||
// // for (const username in data.failureUsernames) {
|
||||
// // text += '<br /> ' + username + ':' + data.failureUsernames[username];
|
||||
// // }
|
||||
// this.$message.success('导入成功!');
|
||||
// this.getDataList();
|
||||
// },
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
if (response.code !== 0) {
|
||||
this.$modal.msgError(response.msg)
|
||||
@ -529,11 +492,6 @@ export default {
|
||||
changeFactory($event) {
|
||||
this.currentMenu = $event
|
||||
this.facType = this.currentMenu === '碲化镉工厂' ? 0 : 1
|
||||
// if (this.facType === 0) {
|
||||
// this.upload.url = process.env.VUE_APP_BASE_API + '/admin-api/ip/prod-target/di-target-import-excel'
|
||||
// } else {
|
||||
// this.upload.url = process.env.VUE_APP_BASE_API + '/admin-api/ip/prod-target/to-target-import-excel'
|
||||
// }
|
||||
this.getDataList()
|
||||
},
|
||||
handleClick(val) {
|
||||
@ -544,7 +502,6 @@ export default {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
} else if (val.type === "delete") {
|
||||
console.log('啊啊', val)
|
||||
this.deleteHandle(val.data.id, val.data.factory, val.data._pageIndex)
|
||||
} else {
|
||||
this.otherMethods(val)
|
||||
@ -600,6 +557,10 @@ export default {
|
||||
this.listQuery.endTime = Number(this.end)
|
||||
}
|
||||
}
|
||||
if (!this.start && !this.end) {
|
||||
this.listQuery.beginTime = undefined
|
||||
this.listQuery.endTime = undefined
|
||||
}
|
||||
// console.log(e);
|
||||
},
|
||||
changeTime() {
|
||||
@ -615,6 +576,9 @@ export default {
|
||||
this.listQuery.beginTime = Number(this.listQuery.reportTime[0])
|
||||
this.listQuery.endTime = Number(this.listQuery.reportTime[1])
|
||||
}
|
||||
} else {
|
||||
this.listQuery.beginTime = undefined
|
||||
this.listQuery.endTime = undefined
|
||||
}
|
||||
},
|
||||
onValueChange(picker, k) { // 选中近k周后触发的操作
|
||||
@ -633,6 +597,10 @@ export default {
|
||||
this.listQuery.endTime = Number(moment(this.end.getTime()).format('YYYYWW'))
|
||||
}
|
||||
}
|
||||
if (!this.start && !this.end) {
|
||||
this.listQuery.beginTime = undefined
|
||||
this.listQuery.endTime = undefined
|
||||
}
|
||||
},
|
||||
changeDayTime() {
|
||||
if (this.listQuery.reportTime) {
|
||||
@ -647,44 +615,12 @@ export default {
|
||||
this.listQuery.beginTime = Number(this.listQuery.reportTime[0])
|
||||
this.listQuery.endTime = Number(this.listQuery.reportTime[1])
|
||||
}
|
||||
} else {
|
||||
this.listQuery.beginTime = undefined
|
||||
this.listQuery.endTime = undefined
|
||||
}
|
||||
},
|
||||
// 获取数据列表
|
||||
multipliedByHundred(str) {
|
||||
console.log(str);
|
||||
// console.log(str)
|
||||
if ( str != 0) {
|
||||
let floatVal = parseFloat(str);
|
||||
if (isNaN(floatVal)) {
|
||||
return 0;
|
||||
}
|
||||
floatVal = Math.round(str * 10000) / 100;
|
||||
let strVal = floatVal.toString();
|
||||
let searchVal = strVal.indexOf('.');
|
||||
if (searchVal < 0) {
|
||||
searchVal = strVal.length;
|
||||
strVal += '.';
|
||||
}
|
||||
while (strVal.length <= searchVal + 2) {
|
||||
strVal += '0';
|
||||
}
|
||||
return parseFloat(strVal);
|
||||
}
|
||||
|
||||
},
|
||||
async getDataList() {
|
||||
// if (this.listQuery.date === 3) {
|
||||
// if (this.listQuery.reportTime?.length > 0) {
|
||||
// this.listQuery.beginTime = this.listQuery.reportTime[0] ? Number(this.listQuery.reportTime[0]) : undefined
|
||||
// this.listQuery.endTime = this.listQuery.reportTime[1] ? this.listQuery.reportTime[1] : undefined
|
||||
// }
|
||||
// }
|
||||
// if (this.listQuery.date === 4) {
|
||||
// if (this.listQuery.reportTime?.length > 0) {
|
||||
// this.listQuery.beginTime = this.start ? this.start : undefined
|
||||
// this.listQuery.endTime = this.end ? this.end : undefined
|
||||
// }
|
||||
// }
|
||||
if (this.currentMenu === '碲化镉工厂') {
|
||||
await prodTargetDiPage(this.listQuery).then(res => {
|
||||
if (res.code === 0) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-06 15:15:30
|
||||
* @LastEditTime: 2024-05-31 16:13:22
|
||||
* @LastEditTime: 2024-06-03 10:17:33
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
@ -134,14 +134,29 @@ export default {
|
||||
exportDetail() {
|
||||
// 导出
|
||||
const pdf = new jsPDF('l', 'pt', 'a4');
|
||||
const options = {
|
||||
scale: 2
|
||||
};
|
||||
|
||||
const canvas = document.createElement('canvas')
|
||||
|
||||
const element = this.$refs['detail'];
|
||||
const width = pdf.internal.pageSize.getWidth()
|
||||
const height = pdf.internal.pageSize.getHeight()
|
||||
|
||||
canvas.width = width * 2
|
||||
canvas.height = height * 2
|
||||
|
||||
canvas.style.width = width + 'px'
|
||||
canvas.style.height = height + 'px'
|
||||
|
||||
const options = {
|
||||
// scale: 2,
|
||||
dpi: 300,
|
||||
canvas: canvas,
|
||||
useCORS: true
|
||||
};
|
||||
|
||||
html2canvas(element, options).then((canvas) => {
|
||||
const imgData = canvas.toDataURL('image/png');
|
||||
pdf.addImage(imgData, 'PNG', 0, 0, pdf.internal.pageSize.getWidth(), pdf.internal.pageSize.getHeight());
|
||||
const imgData = canvas.toDataURL('image/png', 1.0);
|
||||
pdf.addImage(imgData, 'PNG', 0, 0, width, height);
|
||||
pdf.save(this.dataForm.workOrderNumber + '详情.pdf');
|
||||
});
|
||||
},
|
||||
|
@ -1,16 +1,25 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-15 10:49:13
|
||||
* @LastEditTime: 2024-05-31 17:13:56
|
||||
* @LastEditTime: 2024-06-03 15:15:18
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div style="display: flex; flex-direction: column; min-height: calc(100vh - 96px - 31px)">
|
||||
<div class="app-container" style="margin-top: 8px;padding: 16px; height: auto;">
|
||||
<div style="display: flex; flex-direction: column; min-height: calc(100vh - 96px - 35px)">
|
||||
<div class="app-container" style="margin-top: 8px; padding: 0 16px; height: auto; font-size: 20px; text-align: center;">
|
||||
<p style="margin-bottom: 0">数据概览</p>
|
||||
<div class="view">
|
||||
<div v-for="(item, index) in data" :key="index">
|
||||
<p style="color: rgb(194,128,255)">{{ item }}</p>
|
||||
<p>{{ index }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="app-container" style="margin-top: 8px; height: auto;">
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
</div>
|
||||
<div class="app-container" style="margin-top: 8px;flex-grow: 1; height: auto; padding: 16px;">
|
||||
<div class="app-container" style="margin-top: 8px;flex-grow: 1; height: auto;">
|
||||
<search-bar :formConfigs="formConfig2" ref="searchBarForm" style="margin-bottom: 0" />
|
||||
<base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
|
||||
:table-data="tableData">
|
||||
@ -30,7 +39,7 @@
|
||||
|
||||
<script>
|
||||
// import { parseTime } from '../../core/mixins/code-filter';
|
||||
import { getWorkOrderPage, exportExcel } from '@/api/produceData/order';
|
||||
import { getWorkOrderPage, exportExcel, getOverView } from '@/api/produceData/order';
|
||||
// import inputTable from './inputTable.vue';
|
||||
import lineChart from './lineChart';
|
||||
import moment from 'moment'
|
||||
@ -217,7 +226,8 @@ export default {
|
||||
],
|
||||
tableData: [],
|
||||
xAxis: [],
|
||||
lineData: {}
|
||||
lineData: {},
|
||||
data: {}
|
||||
// proLineList: [],
|
||||
// all: {}
|
||||
};
|
||||
@ -228,7 +238,16 @@ export default {
|
||||
this.listQuery.time = [moment(sevenDaysAgo).format('yyyy-MM-DD'), moment(today).format('yyyy-MM-DD')]
|
||||
this.formConfig[2].defaultSelect = this.listQuery.time
|
||||
},
|
||||
mounted() {
|
||||
this.getOverView()
|
||||
},
|
||||
methods: {
|
||||
getOverView() {
|
||||
getOverView().then(res => {
|
||||
this.data = res.data
|
||||
console.log('aa', res.data)
|
||||
})
|
||||
},
|
||||
otherMethods(val) {
|
||||
this.detailOrUpdateVisible = true;
|
||||
// this.addOrEditTitle = "详情";
|
||||
@ -299,6 +318,12 @@ export default {
|
||||
/* padding-bottom: 10px; */
|
||||
/* } */
|
||||
/* .blueTi */
|
||||
.view {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
}
|
||||
.blueTip::before{
|
||||
display: inline-block;
|
||||
content: '';
|
||||
|
@ -6,60 +6,143 @@
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div style="display: flex; flex-direction: column; min-height: calc(100vh - 96px - 31px)">
|
||||
<div class="app-container" style="padding: 16px 24px 0; max-height: 45vh; flex-grow: 1;">
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: calc(100vh - 96px - 31px);
|
||||
"
|
||||
>
|
||||
<div
|
||||
class="app-container"
|
||||
style="padding: 16px; max-height: 45vh; flex-grow: 1"
|
||||
>
|
||||
<!-- <div style="position: relative;z-index: 999;"> -->
|
||||
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
||||
<el-form-item label="时间维度" prop="reportTime">
|
||||
<el-select clearable v-model="timeSelect" placeholder="请选择">
|
||||
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
<el-select
|
||||
clearable
|
||||
v-model="timeSelect"
|
||||
placeholder="请选择"
|
||||
style="width: 80px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in timeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="timeSelect === 'month'" label="时间范围" prop="reportTime">
|
||||
<el-date-picker clearable v-model="listQuery.reportTime" type="monthrange" range-separator="至"
|
||||
start-placeholder="开始月份" end-placeholder="结束月份" @change="changeTime">
|
||||
<el-form-item
|
||||
v-show="timeSelect === 'month'"
|
||||
label="时间范围"
|
||||
prop="reportTime"
|
||||
>
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="listQuery.reportTime"
|
||||
type="monthrange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始月份"
|
||||
end-placeholder="结束月份"
|
||||
@change="changeTime"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="timeSelect === 'year'" label="时间范围" prop="reportTime">
|
||||
<el-date-picker clearable v-model="listQuery.reportTime[0]" value-format="yyyy" type="year"
|
||||
placeholder="开始时间">
|
||||
<el-form-item
|
||||
v-show="timeSelect === 'year'"
|
||||
label="时间范围"
|
||||
prop="reportTime"
|
||||
>
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="listQuery.reportTime[0]"
|
||||
value-format="yyyy"
|
||||
type="year"
|
||||
placeholder="开始时间"
|
||||
>
|
||||
</el-date-picker>
|
||||
~
|
||||
<el-date-picker v-model="listQuery.reportTime[1]" value-format="yyyy" type="year" placeholder="结束时间"
|
||||
@change="getYear">
|
||||
<el-date-picker
|
||||
v-model="listQuery.reportTime[1]"
|
||||
value-format="yyyy"
|
||||
type="year"
|
||||
placeholder="结束时间"
|
||||
@change="getYear"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂名称" prop="factoryId">
|
||||
<el-select clearable v-model="listQuery.factoryId" placeholder="请选择工厂名称">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
||||
<el-select
|
||||
multiple
|
||||
collapse-tags
|
||||
v-model="listQuery.factoryId"
|
||||
placeholder="请选择工厂名称"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in factoryList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="玻璃类型" prop="type">
|
||||
<el-select clearable v-model="listQuery.type" placeholder="请选择玻璃类型">
|
||||
<el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id">
|
||||
<el-select
|
||||
clearable
|
||||
v-model="listQuery.type"
|
||||
placeholder="请选择玻璃类型"
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="small" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" size="small" plain @click="handleExport">导出</el-button>
|
||||
<el-button type="primary" size="small" @click="getDataList"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button type="primary" size="small" plain @click="handleExport"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- </div> -->
|
||||
<!-- <el-row style="height: 500px;"> -->
|
||||
<!-- <div> -->
|
||||
<line-chart class="yearChart" ref="lineChart" style="height: 35vh;width: 100%"></line-chart>
|
||||
<line-chart
|
||||
class="yearChart"
|
||||
ref="lineChart"
|
||||
style="height: 35vh; width: 100%"
|
||||
></line-chart>
|
||||
<!-- </div> -->
|
||||
<!-- </el-row> -->
|
||||
</div>
|
||||
<!-- <el-row style="height: 400px;"> -->
|
||||
<!-- </el-row> -->
|
||||
<div class="app-container" style="margin-top: 18px; height: unset; flex-grow: 1; padding: 16px;">
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
<base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
|
||||
:table-data="tableData">
|
||||
<div
|
||||
class="app-container"
|
||||
style="margin-top: 18px; height: unset; flex-grow: 1; padding: 16px"
|
||||
>
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick"
|
||||
/>
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData"
|
||||
>
|
||||
</base-table>
|
||||
</div>
|
||||
</div>
|
||||
@ -69,9 +152,9 @@
|
||||
// import { parseTime } from '../../core/mixins/code-filter';
|
||||
// import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
|
||||
// import inputTable from './inputTable.vue';
|
||||
import { report } from 'process';
|
||||
import lineChart from './lineChart';
|
||||
import moment from 'moment'
|
||||
import { report } from "process";
|
||||
import lineChart from "./lineChart";
|
||||
import moment from "moment";
|
||||
// import FileSaver from 'file-saver'
|
||||
// import * as XLSX from 'xlsx'
|
||||
export default {
|
||||
@ -85,50 +168,62 @@ export default {
|
||||
total: 0,
|
||||
type: null,
|
||||
// reportType: 2,
|
||||
reportTime: []
|
||||
reportTime: [],
|
||||
},
|
||||
// startDatePicker: this.beginDate(),
|
||||
// endDatePicker: this.processDate(),
|
||||
yeartsStart: '',
|
||||
yeartsEnd: '',
|
||||
yeartsStart: "",
|
||||
yeartsEnd: "",
|
||||
urlOptions: {
|
||||
// getDataListURL: getGlassPage,
|
||||
// exportURL: exportGlasscExcel
|
||||
},
|
||||
timeList: [
|
||||
{
|
||||
value: 'month',
|
||||
label:'月'
|
||||
value: "day",
|
||||
label: "日",
|
||||
},
|
||||
{
|
||||
value: 'year',
|
||||
label: '年'
|
||||
}
|
||||
value: "week",
|
||||
label: "周",
|
||||
},
|
||||
{
|
||||
value: "month",
|
||||
label: "月",
|
||||
},
|
||||
{
|
||||
value: "year",
|
||||
label: "年",
|
||||
},
|
||||
],
|
||||
factoryList: [
|
||||
{
|
||||
name: '测试',
|
||||
id:1
|
||||
}
|
||||
],
|
||||
typeList: [
|
||||
{
|
||||
name: '芯片',
|
||||
id:0,
|
||||
},
|
||||
{
|
||||
name: '标准组件',
|
||||
name: "瑞昌",
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: 'BIPV产品',
|
||||
name: "邯郸",
|
||||
id: 2,
|
||||
},
|
||||
],
|
||||
typeList: [
|
||||
{
|
||||
name: "芯片",
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
name: "标准组件",
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: "BIPV产品",
|
||||
id: 2,
|
||||
},
|
||||
],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'title',
|
||||
label: '报表管理',
|
||||
type: "title",
|
||||
label: "报表管理",
|
||||
},
|
||||
],
|
||||
tableProps: [
|
||||
@ -140,69 +235,72 @@ export default {
|
||||
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||
// },
|
||||
{
|
||||
prop: 'userName',
|
||||
label: '科目',
|
||||
prop: "userName",
|
||||
label: "科目",
|
||||
},
|
||||
{
|
||||
prop: 'nickName',
|
||||
label: '类别',
|
||||
prop: "nickName",
|
||||
label: "类别",
|
||||
},
|
||||
{
|
||||
prop: 'datas',
|
||||
label: '数值',
|
||||
prop: "datas",
|
||||
label: "数值",
|
||||
// subcomponent: row
|
||||
},
|
||||
{
|
||||
prop: 'unit',
|
||||
label: '单位',
|
||||
prop: "unit",
|
||||
label: "单位",
|
||||
// subcomponent: row
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
prop: "remark",
|
||||
label: "备注",
|
||||
// subcomponent: row
|
||||
}
|
||||
},
|
||||
],
|
||||
timeSelect:'month',
|
||||
startTimeStamp:null, //开始时间
|
||||
endTimeStamp:null, //结束时间
|
||||
date:'凯盛玻璃控股成员企业2024生产数据',
|
||||
timeSelect: "month",
|
||||
startTimeStamp: null, //开始时间
|
||||
endTimeStamp: null, //结束时间
|
||||
date: "凯盛玻璃控股成员企业2024生产数据",
|
||||
// reportTime: '',
|
||||
startTimeStamp: '',
|
||||
endTimeStamp: '',
|
||||
startTimeStamp: "",
|
||||
endTimeStamp: "",
|
||||
tableData: [
|
||||
{
|
||||
userName: 'userName',
|
||||
nickName: '用户名',
|
||||
datas:'111111'
|
||||
userName: "userName",
|
||||
nickName: "用户名",
|
||||
datas: "111111",
|
||||
},
|
||||
{
|
||||
userName: 'userName',
|
||||
nickName: '用户名',
|
||||
datas: '111111'
|
||||
userName: "userName",
|
||||
nickName: "用户名",
|
||||
datas: "111111",
|
||||
},
|
||||
{
|
||||
userName: 'userName',
|
||||
nickName: '用户名',
|
||||
datas: '111111'
|
||||
userName: "userName",
|
||||
nickName: "用户名",
|
||||
datas: "111111",
|
||||
// subcomponent: row
|
||||
}
|
||||
},
|
||||
],
|
||||
// proLineList: [],
|
||||
// all: {}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getDict()
|
||||
this.getDict();
|
||||
// this.getCurrentYearFirst()
|
||||
// this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
getYear(e) {
|
||||
if (this.listQuery.reportTime[0] && e - this.listQuery.reportTime[0] > 10) {
|
||||
if (
|
||||
this.listQuery.reportTime[0] &&
|
||||
e - this.listQuery.reportTime[0] > 10
|
||||
) {
|
||||
this.$message({
|
||||
message: '年份起止时间不能超过十年',
|
||||
type: 'warning'
|
||||
message: "年份起止时间不能超过十年",
|
||||
type: "warning",
|
||||
});
|
||||
// console.log();
|
||||
}
|
||||
@ -210,24 +308,34 @@ export default {
|
||||
},
|
||||
changeTime() {
|
||||
if (this.listQuery.reportTime) {
|
||||
this.createStartDate = moment(new Date(this.listQuery.reportTime[0]), 'yyyy-MM-dd hh:mm:ss');
|
||||
this.createEndDate = moment(new Date(this.listQuery.reportTime[1]), 'yyyy-MM-dd hh:mm:ss');
|
||||
const numDays = (new Date(this.listQuery.reportTime[1]).getTime() - new Date(this.listQuery.reportTime[0]).getTime()) / (24 * 3600 * 1000); if (numDays > 730) {
|
||||
this.createStartDate = moment(
|
||||
new Date(this.listQuery.reportTime[0]),
|
||||
"yyyy-MM-dd hh:mm:ss"
|
||||
);
|
||||
this.createEndDate = moment(
|
||||
new Date(this.listQuery.reportTime[1]),
|
||||
"yyyy-MM-dd hh:mm:ss"
|
||||
);
|
||||
const numDays =
|
||||
(new Date(this.listQuery.reportTime[1]).getTime() -
|
||||
new Date(this.listQuery.reportTime[0]).getTime()) /
|
||||
(24 * 3600 * 1000);
|
||||
if (numDays > 730) {
|
||||
this.$message({
|
||||
message: '时间范围不能超过24个月',
|
||||
type: 'warning'
|
||||
message: "时间范围不能超过24个月",
|
||||
type: "warning",
|
||||
});
|
||||
this.listQuery.reportTime = [];
|
||||
this.createStartDate = '';
|
||||
this.createEndDate = '';
|
||||
this.createStartDate = "";
|
||||
this.createEndDate = "";
|
||||
}
|
||||
} else {
|
||||
this.createStartDate = '';
|
||||
this.createEndDate = '';
|
||||
this.createStartDate = "";
|
||||
this.createEndDate = "";
|
||||
}
|
||||
},
|
||||
async getDict() {
|
||||
this.$refs.lineChart.initChart()
|
||||
this.$refs.lineChart.initChart();
|
||||
// 产线列表
|
||||
// const res = await getCorePLList();
|
||||
// this.proLineList = res.data;
|
||||
@ -236,33 +344,31 @@ export default {
|
||||
multipliedByHundred(str) {
|
||||
console.log(str);
|
||||
// console.log(str)
|
||||
if ( str != 0) {
|
||||
if (str != 0) {
|
||||
let floatVal = parseFloat(str);
|
||||
if (isNaN(floatVal)) {
|
||||
return 0;
|
||||
}
|
||||
floatVal = Math.round(str * 10000) / 100;
|
||||
let strVal = floatVal.toString();
|
||||
let searchVal = strVal.indexOf('.');
|
||||
let searchVal = strVal.indexOf(".");
|
||||
if (searchVal < 0) {
|
||||
searchVal = strVal.length;
|
||||
strVal += '.';
|
||||
strVal += ".";
|
||||
}
|
||||
while (strVal.length <= searchVal + 2) {
|
||||
strVal += '0';
|
||||
strVal += "0";
|
||||
}
|
||||
return parseFloat(strVal);
|
||||
}
|
||||
|
||||
},
|
||||
async getDataList() {
|
||||
},
|
||||
async getDataList() {},
|
||||
add0(m) {
|
||||
return m < 10 ? '0' + m : m
|
||||
return m < 10 ? "0" + m : m;
|
||||
},
|
||||
format(shijianchuo) {
|
||||
//shijianchuo是整数,否则要parseInt转换
|
||||
var time = moment(new Date(shijianchuo)).format('YYYY-MM-DD HH:mm:ss')
|
||||
var time = moment(new Date(shijianchuo)).format("YYYY-MM-DD HH:mm:ss");
|
||||
// console.log(time)
|
||||
// var y = time.getFullYear();
|
||||
// var m = time.getMonth() + 1;
|
||||
@ -270,7 +376,7 @@ export default {
|
||||
// var h = time.getHours();
|
||||
// var mm = time.getMinutes();
|
||||
// var s = time.getSeconds();
|
||||
return time
|
||||
return time;
|
||||
},
|
||||
// changeTime(val) {
|
||||
// if (val) {
|
||||
@ -295,17 +401,23 @@ export default {
|
||||
var year = 1900 + unixtimestamp.getYear();
|
||||
var month = "0" + (unixtimestamp.getMonth() + 1);
|
||||
var date = "0" + unixtimestamp.getDate();
|
||||
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
|
||||
return (
|
||||
year +
|
||||
"-" +
|
||||
month.substring(month.length - 2, month.length) +
|
||||
"-" +
|
||||
date.substring(date.length - 2, date.length)
|
||||
);
|
||||
},
|
||||
buttonClick(val) {
|
||||
this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
case "search":
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
case "export":
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
@ -344,25 +456,23 @@ export default {
|
||||
// return wbout;
|
||||
// //do something......
|
||||
// })
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.blueTip::before{
|
||||
.blueTip::before {
|
||||
display: inline-block;
|
||||
content: '';
|
||||
content: "";
|
||||
width: 4px;
|
||||
height: 18px;
|
||||
background: #0B58FF;
|
||||
background: #0b58ff;
|
||||
border-radius: 1px;
|
||||
margin-right: 8PX;
|
||||
margin-right: 8px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.app-container {
|
||||
margin: 0 16px 0;
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 16px 16px 0;
|
||||
|
@ -106,6 +106,8 @@
|
||||
import { listOperateLog, exportOperateLog } from "@/api/system/operatelog";
|
||||
import tableHeightMixin from "@/mixins/tableHeightMixin";
|
||||
import statusBtn3 from "./../components/statusBtn3.vue";
|
||||
import { DICT_TYPE, publicFormatter } from "@/utils/dict";
|
||||
import { parseTime } from "@/utils/ruoyi";
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "id",
|
||||
@ -123,9 +125,16 @@ const tableProps = [
|
||||
minWidth: 200,
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: "type",
|
||||
label: "操作类型",
|
||||
minWidth: 80,
|
||||
filter: publicFormatter(DICT_TYPE.SYSTEM_OPERATE_TYPE),
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: "userNickname",
|
||||
label: "操作人",
|
||||
label: "操作人员",
|
||||
minWidth: 80,
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
@ -134,6 +143,13 @@ const tableProps = [
|
||||
label: "操作结果",
|
||||
subcomponent: statusBtn3,
|
||||
},
|
||||
{
|
||||
prop: "startTime",
|
||||
label: "操作时间",
|
||||
filter: parseTime,
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: "duration",
|
||||
label: "执行时长",
|
||||
@ -166,6 +182,7 @@ export default {
|
||||
labelField: "label",
|
||||
valueField: "value",
|
||||
param: "type",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
@ -175,6 +192,7 @@ export default {
|
||||
{ id: false, name: "失败" },
|
||||
],
|
||||
param: "success",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
type: "datePicker",
|
||||
|
@ -193,6 +193,7 @@ export default {
|
||||
console.log(val);
|
||||
if (val.btnName === "search") {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.queryParams.name = val.name;
|
||||
this.getList();
|
||||
} else {
|
||||
this.addOrEditTitle = "新增";
|
||||
|
@ -714,7 +714,7 @@ export default {
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
username: undefined,
|
||||
mobile: undefined,
|
||||
status: undefined,
|
||||
@ -801,7 +801,7 @@ export default {
|
||||
console.log(val);
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.handleQuery();
|
||||
this.handleQuery(val);
|
||||
break;
|
||||
case "addNew":
|
||||
this.handleAdd();
|
||||
@ -899,8 +899,12 @@ export default {
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
handleQuery(val) {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.queryParams.username = val.username;
|
||||
this.queryParams.mobile = val.mobile;
|
||||
this.queryParams.status = val.status;
|
||||
this.queryParams.createTime = val.createTime;
|
||||
this.getList();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
|
Loading…
Reference in New Issue
Block a user