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