Merge branch 'projects/mesxc-test' of git.picaiba.com:mt-fe-group/yudao-dev into projects/mesxc-test
This commit is contained in:
commit
d9b354f0c4
6
.env.dev
6
.env.dev
@ -1,8 +1,8 @@
|
|||||||
###
|
###
|
||||||
# @Author: Do not edit
|
# @Author: Do not edit
|
||||||
# @Date: 2023-08-29 09:40:39
|
# @Date: 2023-08-29 09:40:39
|
||||||
# @LastEditTime: 2024-02-29 15:53:50
|
# @LastEditTime: 2024-03-22 14:18:33
|
||||||
# @LastEditors: DY
|
# @LastEditors: zhp
|
||||||
# @Description:
|
# @Description:
|
||||||
###
|
###
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
@ -25,7 +25,7 @@ VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
|||||||
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
|
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.47:48082'
|
# VUE_APP_BASE_API = 'http://192.168.1.47:48082'
|
||||||
# socket地址
|
# socket地址
|
||||||
VUE_APP_Socket_API = 'ws://192.168.0.30:8888'
|
VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
|
||||||
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
|
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
|
||||||
|
|
||||||
# 积木报表指向地址
|
# 积木报表指向地址
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-10-21 11:50:46
|
* @Date: 2023-10-21 11:50:46
|
||||||
* @LastEditTime: 2023-11-15 17:19:19
|
* @LastEditTime: 2024-03-21 10:49:24
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -118,6 +118,24 @@ export function getCoreWOMaPage(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获得工单预使用原料分页----根据产品id
|
||||||
|
export function getlistByProductId(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/material-product-bom-det/listByProductId',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得工单预使用原料分页----根据工艺流程
|
||||||
|
export function getlistByFlowId(query) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/process-equ-material-bom-det/listByFlowId',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 获得预计用料信息分页
|
// 获得预计用料信息分页
|
||||||
export function getMaterialBomPage(query) {
|
export function getMaterialBomPage(query) {
|
||||||
return request({
|
return request({
|
||||||
@ -162,3 +180,12 @@ export function updateConCoreWOr(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 修改分配产量----批量
|
||||||
|
export function updateBatchConCoreWOr(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-order-con-work-order/updateBatch',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -34,6 +34,15 @@ export function workOrderList(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 条件获得工单列表
|
||||||
|
export function getFreeWOlist(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-work-order/getFreeWOlist',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 获得订单分页
|
// 获得订单分页
|
||||||
export function getOrderPage(query) {
|
export function getOrderPage(query) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -6,3 +6,12 @@ export function getLineAll() {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据车间获得所有工厂产线列表
|
||||||
|
export function getLinelistByRoom(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-production-line/listFilter',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-04 14:10:37
|
* @Date: 2023-12-04 14:10:37
|
||||||
* @LastEditTime: 2023-12-14 10:06:03
|
* @LastEditTime: 2024-03-19 15:02:49
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -26,10 +26,11 @@ export function updateQualityInspectionBoxBtn(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 删除安灯按钮16键对应
|
// 删除安灯按钮16键对应
|
||||||
export function deleteQualityInspectionBoxBtn(id) {
|
export function deleteQualityInspectionBoxBtn(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/quality-inspection-box-btn/delete?id=' + id,
|
url: 'base/quality-inspection-box-btn/deleteByLineSection',
|
||||||
method: 'delete'
|
method: 'delete',
|
||||||
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2024-02-21 13:43:02
|
* @Date: 2024-02-21 13:43:02
|
||||||
* @LastEditTime: 2024-02-21 15:00:17
|
* @LastEditTime: 2024-03-14 19:12:31
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -33,3 +33,21 @@ export function listByParentId(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获得产线工段设备树形结构
|
||||||
|
export function getTree(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-factory/getTree',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得设备分组列表
|
||||||
|
export function getgroupAllList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/equipment-group/listAll',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-10-18 09:33:57
|
* @Date: 2023-10-18 09:33:57
|
||||||
* @LastEditTime: 2023-11-03 09:31:17
|
* @LastEditTime: 2024-03-20 15:39:27
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -33,3 +33,12 @@ export function exportEnergyPlcExcel(query) {
|
|||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function exportEquipmentTraceabilityExcel(query) {
|
||||||
|
return request({
|
||||||
|
url: '/analysis/equipment-analysis/export-efficiency',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:49:02
|
* @Date: 2023-12-12 13:49:02
|
||||||
* @LastEditTime: 2024-01-24 15:54:58
|
* @LastEditTime: 2024-03-12 11:16:01
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 22 KiB |
@ -94,7 +94,7 @@
|
|||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
icon="el-icon-upload2"
|
icon="el-icon-upload2"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="col.uploadTips ? beforeUploadPic : beforeUpload"
|
||||||
:on-success="
|
:on-success="
|
||||||
(response, file, fileList) => {
|
(response, file, fileList) => {
|
||||||
handleUploadSuccess(response, file, col.prop);
|
handleUploadSuccess(response, file, col.prop);
|
||||||
@ -110,7 +110,7 @@
|
|||||||
上传文件
|
上传文件
|
||||||
</el-button>
|
</el-button>
|
||||||
<div class="el-upload__tip" slot="tip" v-if="col.uploadTips">
|
<div class="el-upload__tip" slot="tip" v-if="col.uploadTips">
|
||||||
{{ col.uploadTips || '只能上传jpg/png文件, 大小不超过2MB' }}
|
{{ '只能上传jpg/png文件, 大小不超过2MB' }}
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
|
||||||
@ -416,6 +416,26 @@ export default {
|
|||||||
|
|
||||||
// 上传成功的特殊处理
|
// 上传成功的特殊处理
|
||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
|
const checkFileSize = () => {
|
||||||
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
|
if (!isLt2M) {
|
||||||
|
this.$modal.msgError('上传文件大小不能超过 2MB!');
|
||||||
|
}
|
||||||
|
return isLt2M;
|
||||||
|
};
|
||||||
|
// const checkFileType = () => {
|
||||||
|
// const isJPG =
|
||||||
|
// file.type === 'image/jpeg' ||
|
||||||
|
// file.type === 'image/png' ||
|
||||||
|
// file.type === 'image/jpg';
|
||||||
|
// return isJPG;
|
||||||
|
// };
|
||||||
|
// return checkFileSize() && checkFileType();
|
||||||
|
return checkFileSize();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 上传成功的特殊处理----图片
|
||||||
|
beforeUploadPic(file) {
|
||||||
const checkFileSize = () => {
|
const checkFileSize = () => {
|
||||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
if (!isLt2M) {
|
if (!isLt2M) {
|
||||||
@ -428,6 +448,9 @@ export default {
|
|||||||
file.type === 'image/jpeg' ||
|
file.type === 'image/jpeg' ||
|
||||||
file.type === 'image/png' ||
|
file.type === 'image/png' ||
|
||||||
file.type === 'image/jpg';
|
file.type === 'image/jpg';
|
||||||
|
if (!isJPG) {
|
||||||
|
this.$modal.msgError('只能上传jpg/png文件!');
|
||||||
|
}
|
||||||
return isJPG;
|
return isJPG;
|
||||||
};
|
};
|
||||||
return checkFileSize() && checkFileType();
|
return checkFileSize() && checkFileType();
|
||||||
|
@ -116,7 +116,9 @@ export const DICT_TYPE = {
|
|||||||
ENVIRONMENT_CHECK_UNIT: 'environment_check_unit',
|
ENVIRONMENT_CHECK_UNIT: 'environment_check_unit',
|
||||||
|
|
||||||
// ============== GROUP - 班组模块 =============
|
// ============== GROUP - 班组模块 =============
|
||||||
WORK_SHOP: 'workshop'
|
WORK_SHOP: 'workshop',
|
||||||
|
// ============== GROUP - 质量模块 =============
|
||||||
|
MATERIAL_GRADE: 'material_grade'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -42,7 +42,7 @@ const service = axios.create({
|
|||||||
let loadingInstance = null
|
let loadingInstance = null
|
||||||
function startLoading() {
|
function startLoading() {
|
||||||
loadingInstance = Loading.service({
|
loadingInstance = Loading.service({
|
||||||
fullscreen: false,
|
fullscreen: true,
|
||||||
text: '拼命加载中...',
|
text: '拼命加载中...',
|
||||||
background: 'rgba(0, 0, 0, 0.1)'
|
background: 'rgba(0, 0, 0, 0.1)'
|
||||||
})
|
})
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-07-19 15:18:30
|
* @Date: 2021-07-19 15:18:30
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2024-02-23 16:11:33
|
* @LastEditTime: 2024-03-12 09:05:20
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -715,6 +715,7 @@ export default {
|
|||||||
qualityMonthTableProps,
|
qualityMonthTableProps,
|
||||||
modelMonth: '',
|
modelMonth: '',
|
||||||
qualityList1,
|
qualityList1,
|
||||||
|
// logoutTime: 43200000,
|
||||||
qualityTableProps2,
|
qualityTableProps2,
|
||||||
qualityList2,
|
qualityList2,
|
||||||
dateType: '0',
|
dateType: '0',
|
||||||
@ -869,6 +870,8 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
|
||||||
.visual-container {
|
.visual-container {
|
||||||
width: 1920px;
|
width: 1920px;
|
||||||
height: 1080px;
|
height: 1080px;
|
||||||
@ -885,14 +888,16 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
.unit{
|
.unit{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 260px;
|
left: 290px;
|
||||||
top:25px;
|
top:25px;
|
||||||
|
color: rgba($color: #ffffff, $alpha: 8);
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
.time{
|
.time{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 1360px;
|
left: 1360px;
|
||||||
top:25px;
|
top:25px;
|
||||||
|
color: rgba($color: #ffffff, $alpha: 8);
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
.title-button {
|
.title-button {
|
||||||
|
@ -1,17 +1,11 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-29 16:50:26
|
* @Date: 2024-01-29 16:50:26
|
||||||
* @LastEditTime: 2024-02-23 16:11:40
|
* @LastEditTime: 2024-03-13 09:07:37
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<!--
|
|
||||||
* @Author: zwq
|
|
||||||
* @Date: 2021-07-19 15:18:30
|
|
||||||
* @LastEditors: zhp
|
|
||||||
* @LastEditTime: 2024-01-29 17:05:37
|
|
||||||
* @Description:
|
|
||||||
-->
|
|
||||||
<template>
|
<template>
|
||||||
<div id="container" ref="container" class="visual-container" :style="styles">
|
<div id="container" ref="container" class="visual-container" :style="styles">
|
||||||
<el-row class="container-title" :style="{
|
<el-row class="container-title" :style="{
|
||||||
@ -19,7 +13,7 @@
|
|||||||
lineHeight: 88 + 'px',
|
lineHeight: 88 + 'px',
|
||||||
fontSize: 31 + 'px'
|
fontSize: 31 + 'px'
|
||||||
}">
|
}">
|
||||||
<img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.4em" alt="">
|
<img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.22em" alt="">
|
||||||
许昌安彩冷端看板
|
许昌安彩冷端看板
|
||||||
<h3 class="unit">单位:河南汇融数字科技有限公司</h3>
|
<h3 class="unit">单位:河南汇融数字科技有限公司</h3>
|
||||||
<h3 class="time">{{ times }}</h3>
|
<h3 class="time">{{ times }}</h3>
|
||||||
@ -341,7 +335,9 @@ export default {
|
|||||||
// offsetWidth: null,
|
// offsetWidth: null,
|
||||||
cxNameList,
|
cxNameList,
|
||||||
cxDataList,
|
cxDataList,
|
||||||
|
// time:12,
|
||||||
cutProps,
|
cutProps,
|
||||||
|
// logoutTime: 43200000,
|
||||||
cutTableDataList:[],
|
cutTableDataList:[],
|
||||||
clientWidth: 0,
|
clientWidth: 0,
|
||||||
containerWidth: 111111,
|
containerWidth: 111111,
|
||||||
@ -432,36 +428,15 @@ export default {
|
|||||||
this.beilv2 = _this.clientWidth / 1920
|
this.beilv2 = _this.clientWidth / 1920
|
||||||
})()
|
})()
|
||||||
}
|
}
|
||||||
// let obj = {
|
// logoutInterval = setInterval(() => {
|
||||||
// 'a': 11111,
|
// this.logoutTime -= 1000
|
||||||
// 'b': 22222,
|
// }, 1000)
|
||||||
// 'c': 33333,
|
// if (this.logoutTime === 0) {
|
||||||
// 'd': 44444,
|
// this.SJGInitWebSocket()
|
||||||
// 'e': 55555,
|
// this.CutInitWebSocket()
|
||||||
|
// this.funInitWebSocket()
|
||||||
|
// this.logoutTimeReset()
|
||||||
// }
|
// }
|
||||||
// let index = 0
|
|
||||||
// for (let i in obj) {
|
|
||||||
// index++,
|
|
||||||
// console.log(index);
|
|
||||||
// }
|
|
||||||
// this.getList()
|
|
||||||
// const _this = this;
|
|
||||||
// window.onresize = () => {
|
|
||||||
// return (() => {
|
|
||||||
// _this.clientWidth = `${document.documentElement.clientWidth}`
|
|
||||||
// this.beilv2 = _this.clientWidth / 1920
|
|
||||||
// })()
|
|
||||||
// }
|
|
||||||
// this.beilv2 = window.innerWidth / 1920
|
|
||||||
// addEventListener('resize', resizeFun = () => {
|
|
||||||
// this.beilv2 = window.innerWidth / 1920
|
|
||||||
// })
|
|
||||||
// erd.listenTo(document, (element) => {
|
|
||||||
// this.beilv2 = element.offsetWidth / 1920
|
|
||||||
|
|
||||||
// // var width = element.offsetWidth;
|
|
||||||
// // var height = element.offsetHeight;
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
// beforeDestroy() {
|
// beforeDestroy() {
|
||||||
// //离开页面删除检测器和所有侦听器
|
// //离开页面删除检测器和所有侦听器
|
||||||
@ -469,13 +444,16 @@ export default {
|
|||||||
// removeEventListener('resize', resizeFun)
|
// removeEventListener('resize', resizeFun)
|
||||||
// },
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
|
// logoutTimeReset() {
|
||||||
|
// this.logoutTime = this.time * 60 * 60 * 1000
|
||||||
|
// },
|
||||||
CutWebsocketClose(e) {
|
CutWebsocketClose(e) {
|
||||||
console.log('WebSocket 断开连接', e)
|
console.log('WebSocket 断开连接', e)
|
||||||
},
|
},
|
||||||
SJGWebsocketClose(e) {
|
SJGWebsocketClose(e) {
|
||||||
console.log('WebSocket 断开连接', e)
|
console.log('WebSocket 断开连接', e)
|
||||||
},
|
},
|
||||||
funInitWebSocket(e) {
|
funWebSocketClose(e) {
|
||||||
console.log('WebSocket 断开连接', e)
|
console.log('WebSocket 断开连接', e)
|
||||||
},
|
},
|
||||||
formatTime(time, option) {
|
formatTime(time, option) {
|
||||||
@ -731,7 +709,7 @@ export default {
|
|||||||
`<span style="color:rgba(255,255,255,0.7)">${this.getSize(item.size) || ''}</span>`,
|
`<span style="color:rgba(255,255,255,0.7)">${this.getSize(item.size) || ''}</span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.7)">${item.productArea + '㎡' || ''}</span>`,
|
`<span style="color:rgba(255,255,255,0.7)">${item.productArea + '㎡' || ''}</span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.7)">${item.wasteArea + '㎡' || ''}</span>`,
|
`<span style="color:rgba(255,255,255,0.7)">${item.wasteArea + '㎡' || ''}</span>`,
|
||||||
`<div style = "${(item.product * 100).toFixed(2) > 91 ? 'display:block;color:rgba(255,255,255,0.7)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>
|
`<div style = "${(item.product * 100).toFixed(2) > 91 ? 'display:block;color:#00FFF7' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>
|
||||||
<div style = "${(item.product * 100).toFixed(2) < 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>`
|
<div style = "${(item.product * 100).toFixed(2) < 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>`
|
||||||
])
|
])
|
||||||
this.cutConfig.data = cutArr
|
this.cutConfig.data = cutArr
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-29 13:45:56
|
* @Date: 2024-01-29 13:45:56
|
||||||
* @LastEditTime: 2024-02-18 14:20:01
|
* @LastEditTime: 2024-03-13 08:58:01
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -87,7 +87,7 @@ export default {
|
|||||||
legend: {
|
legend: {
|
||||||
bottom: '10%',
|
bottom: '10%',
|
||||||
left: 'center',
|
left: 'center',
|
||||||
itemWidth: 20,
|
itemWidth: 12,
|
||||||
itemHeight:12,
|
itemHeight:12,
|
||||||
icon: 'rect',
|
icon: 'rect',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<div class="bar-item">
|
<div class="bar-item">
|
||||||
<div v-if="title" class="bar-title" ds>
|
<div v-if="title" class="bar-title" ds>
|
||||||
<span>
|
<span>
|
||||||
<svg-icon :icon-class="titleIcon" style="font-size: 1em; position: relative; top: .08em" />
|
<svg-icon :icon-class="titleIcon" style="font-size: 1em; position: relative; top: .01em" />
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</span>
|
</span>
|
||||||
<!-- <span v-if="showTime" style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
|
<!-- <span v-if="showTime" style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-09-21 09:06:28
|
* @Date: 2023-09-21 09:06:28
|
||||||
* @LastEditTime: 2024-02-01 15:52:41
|
* @LastEditTime: 2024-03-13 08:51:12
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -172,7 +172,7 @@ export default {
|
|||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
type: 'solid',
|
type: 'solid',
|
||||||
color: '#213259', // 左边线的颜色
|
color: '#25528f',
|
||||||
width: '1' // 坐标线的宽度
|
width: '1' // 坐标线的宽度
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -186,7 +186,7 @@ export default {
|
|||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#213259'
|
color: '#25528f'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: nameList
|
data: nameList
|
||||||
@ -215,7 +215,7 @@ export default {
|
|||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
type: 'solid',
|
type: 'solid',
|
||||||
color: '#213259', // 左边线的颜色
|
color: '#25528f',
|
||||||
width: '1' // 坐标线的宽度
|
width: '1' // 坐标线的宽度
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -228,7 +228,7 @@ export default {
|
|||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#213259'
|
color: '#25528f'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// type: 'value'
|
// type: 'value'
|
||||||
@ -260,7 +260,7 @@ export default {
|
|||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
type: 'solid',
|
type: 'solid',
|
||||||
color: '#213259', // 左边线的颜色
|
color: '#25528f', // 左边线的颜色
|
||||||
width: '1' // 坐标线的宽度
|
width: '1' // 坐标线的宽度
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -275,7 +275,7 @@ export default {
|
|||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#213259'
|
color: '#25528f'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// type: 'value'
|
// type: 'value'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div :id="id" :class="className" :style="{ height: height + 'px', width: width }" />
|
<div :id="id" :class="className" :style="{ height: '420px', width: width }" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ export default {
|
|||||||
},
|
},
|
||||||
className: {
|
className: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'chart'
|
default: 'enChart'
|
||||||
},
|
},
|
||||||
width: {
|
width: {
|
||||||
type: String,
|
type: String,
|
||||||
@ -84,7 +84,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart(nameList, dataList) {
|
initChart(nameList, dataList) {
|
||||||
console.log('1111', dataList);
|
// console.log('1111', dataList);
|
||||||
// console.log(1)
|
// console.log(1)
|
||||||
this.chart = echarts.init(document.getElementById(this.id))
|
this.chart = echarts.init(document.getElementById(this.id))
|
||||||
// if (dataList.length !== 0) {
|
// if (dataList.length !== 0) {
|
||||||
@ -123,13 +123,7 @@ export default {
|
|||||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
grid: {
|
grid: { top: 90, right: 60, bottom: 20, left: 90 },
|
||||||
top: 30,
|
|
||||||
left: '2%',
|
|
||||||
right: '2%',
|
|
||||||
bottom: '3%',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
// legend: {
|
// legend: {
|
||||||
// itemWidth: 10,
|
// itemWidth: 10,
|
||||||
// itemHeight: 10,
|
// itemHeight: 10,
|
||||||
@ -145,7 +139,7 @@ export default {
|
|||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
type: 'solid',
|
type: 'solid',
|
||||||
color: '#213259', // 左边线的颜色
|
color: '#25528f', // 左边线的颜色
|
||||||
width: '1' // 坐标线的宽度
|
width: '1' // 坐标线的宽度
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -156,7 +150,7 @@ export default {
|
|||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#213259'
|
color: '#25528f'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: this.nameList
|
data: this.nameList
|
||||||
@ -172,17 +166,17 @@ export default {
|
|||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
formatter: '{value}/kwh'
|
// formatter: '{value}/kwh'
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: "#213259",
|
color: "#25528f",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: "#213259a0",
|
color: "#25528f",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -205,4 +199,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
|
.enChart {
|
||||||
|
position: absolute;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
top: -30px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-27 13:54:52
|
* @Date: 2023-12-27 13:54:52
|
||||||
* @LastEditTime: 2024-02-21 14:38:54
|
* @LastEditTime: 2024-03-13 09:04:11
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -170,8 +170,8 @@ export default {
|
|||||||
// }
|
// }
|
||||||
this.chart.setOption({
|
this.chart.setOption({
|
||||||
legend: {
|
legend: {
|
||||||
// top: '2.5%',
|
itemWidth: 12,
|
||||||
// right: '20px',
|
itemHeight: 12,
|
||||||
icon: 'rect',
|
icon: 'rect',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#ffffff'
|
color: '#ffffff'
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-07-19 15:18:30
|
* @Date: 2021-07-19 15:18:30
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2024-02-23 16:11:48
|
* @LastEditTime: 2024-03-22 16:40:46
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -632,12 +632,12 @@ export default {
|
|||||||
])
|
])
|
||||||
this.eqConfig.data = eqArr
|
this.eqConfig.data = eqArr
|
||||||
this.$refs['eqScrollBoard'].updateRows(eqArr)
|
this.$refs['eqScrollBoard'].updateRows(eqArr)
|
||||||
this.getList()
|
this.$refs.productLineChart.initChart(['D61', 'D62', 'D63', 'D64', 'D65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
|
||||||
|
// this.getList()
|
||||||
this.initWebSocket()
|
this.initWebSocket()
|
||||||
this.SJGInitWebSocket()
|
this.SJGInitWebSocket()
|
||||||
this.getTimes()
|
this.getTimes()
|
||||||
// this.$refs.EnergyMonitoringChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [3134, 2323, 3232, 3233, 2321])
|
// this.$refs.EnergyMonitoringChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [3134, 2323, 3232, 3233, 2321])
|
||||||
// this.$refs.productLineChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
|
|
||||||
const _this = this;
|
const _this = this;
|
||||||
_this.beilv2 = document.documentElement.clientWidth / 1920
|
_this.beilv2 = document.documentElement.clientWidth / 1920
|
||||||
window.onresize = () => {
|
window.onresize = () => {
|
||||||
@ -671,52 +671,52 @@ export default {
|
|||||||
// removeEventListener('resize', resizeFun)
|
// removeEventListener('resize', resizeFun)
|
||||||
// },
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
// getList() {
|
||||||
this.$axios.get(
|
// // this.$axios.get(
|
||||||
'base/core-production-line/listAll',
|
// // 'base/core-production-line/listAll',
|
||||||
'get',
|
// // 'get',
|
||||||
this.queryParams
|
// // this.queryParams
|
||||||
).then((res) => {
|
// // ).then((res) => {
|
||||||
// console.log('11111', res);
|
// // // console.log('11111', res);
|
||||||
this.productLineList = res.data
|
// // this.productLineList = res.data
|
||||||
})
|
// // })
|
||||||
this.$axios.get(
|
// this.$axios.get(
|
||||||
'base/quality-inspection-record/dayStatistics',
|
// 'base/quality-inspection-record/dayStatistics',
|
||||||
'get',
|
// 'get',
|
||||||
).then((res) => {
|
// ).then((res) => {
|
||||||
// console.log('11111', res);
|
// // console.log('11111', res);
|
||||||
let processArr = qualityMonthList.map((item, index) => [
|
// let processArr = qualityMonthList.map((item, index) => [
|
||||||
// console.log(item)
|
// // console.log(item)
|
||||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
// `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||||
</span>`,
|
// </span>`,
|
||||||
// formatDate(item.planStartTime) || '',
|
// // formatDate(item.planStartTime) || '',
|
||||||
`
|
// `
|
||||||
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
|
// <span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
|
||||||
</span>`,
|
// </span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
|
// `<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
|
// `<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
|
// `<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
|
||||||
])
|
// ])
|
||||||
this.processConfig.data = processArr
|
// this.processConfig.data = processArr
|
||||||
this.$refs['processScrollBoard'].updateRows(processArr)
|
// this.$refs['processScrollBoard'].updateRows(processArr)
|
||||||
if (res.data.length !==0) {
|
// // if (res.data.length !==0) {
|
||||||
let processArr = res.data.map((item, index) => [
|
// // let processArr = res.data.map((item, index) => [
|
||||||
// console.log(item)
|
// // // console.log(item)
|
||||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
// // `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||||
</span>`,
|
// // </span>`,
|
||||||
// formatDate(item.planStartTime) || '',
|
// // // formatDate(item.planStartTime) || '',
|
||||||
`
|
// // `
|
||||||
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
|
// // <span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
|
||||||
</span>`,
|
// // </span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
|
// // `<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
|
// // `<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
|
// // `<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
|
||||||
])
|
// // ])
|
||||||
this.processConfig.data = processArr
|
// // this.processConfig.data = processArr
|
||||||
this.$refs['processScrollBoard'].updateRows(processArr)
|
// // this.$refs['processScrollBoard'].updateRows(processArr)
|
||||||
}
|
// // }
|
||||||
})
|
// })
|
||||||
},
|
// },
|
||||||
getTimes() {
|
getTimes() {
|
||||||
setInterval(this.getTimesInterval, 1000);
|
setInterval(this.getTimesInterval, 1000);
|
||||||
},
|
},
|
||||||
@ -837,24 +837,25 @@ export default {
|
|||||||
this.$refs['eqScrollBoard'].updateRows(eqArr)
|
this.$refs['eqScrollBoard'].updateRows(eqArr)
|
||||||
// console.log(SJGWsData.orderList)
|
// console.log(SJGWsData.orderList)
|
||||||
} else if (this.SJGWsData.type === 'productline') {
|
} else if (this.SJGWsData.type === 'productline') {
|
||||||
|
console.log('aaaaaaaaaaaaaaaaaaa', this.SJGWsData);
|
||||||
// console.log(this.wsData.detData);
|
// console.log(this.wsData.detData);
|
||||||
let nameList = []
|
let nameList = []
|
||||||
let passRateList = []
|
let passRateList = []
|
||||||
let outputNumList = []
|
let outputNumList = []
|
||||||
|
|
||||||
// console.log('2222222222', this.productLineList);
|
// console.log('2222222222', this.productLineList);
|
||||||
this.productLineList.forEach((item) => {
|
// this.productLineList.forEach((item) => {
|
||||||
this.SJGWsData.detData.forEach((ele) => {
|
this.SJGWsData.detData.forEach((ele) => {
|
||||||
if (item.id == ele.productionLineId) {
|
// if (item.id == ele.productionLineId) {
|
||||||
if (item.name.substr(0, 1) == "D") {
|
// if (item.name.substr(0, 1) == "D") {
|
||||||
console.log(ele)
|
// console.log(ele)
|
||||||
nameList.push(item.name)
|
nameList.push(ele.lineName)
|
||||||
outputNumList.push(ele.outputNum)
|
outputNumList.push(ele.outputNum)
|
||||||
passRateList.push(ele.passRate)
|
passRateList.push(ele.passRate)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
// })
|
||||||
// progressRateList = EnergyNameList
|
// progressRateList = EnergyNameList
|
||||||
// let EnergyDataList = []
|
// let EnergyDataList = []
|
||||||
// this.SJGWsData.detData.forEach((ele) => {
|
// this.SJGWsData.detData.forEach((ele) => {
|
||||||
@ -864,7 +865,22 @@ export default {
|
|||||||
// console.log(this.EnergyMonitoringNameList)
|
// console.log(this.EnergyMonitoringNameList)
|
||||||
// console.log(this.EnergyMonitoringList)
|
// console.log(this.EnergyMonitoringList)
|
||||||
// this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
this.$refs.productLineChart.initChart(Array.from(new Set(nameList)), passRateList, outputNumList)
|
this.$refs.productLineChart.initChart(nameList, passRateList, outputNumList)
|
||||||
|
} else if (this.SJGInitWebSocket === 'inspection') {
|
||||||
|
let processArr = qualityMonthList.map((item, index) => [
|
||||||
|
// console.log(item)
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||||
|
</span>`,
|
||||||
|
// formatDate(item.planStartTime) || '',
|
||||||
|
`
|
||||||
|
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
|
||||||
|
</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
|
||||||
|
])
|
||||||
|
this.processConfig.data = processArr
|
||||||
|
this.$refs['processScrollBoard'].updateRows(processArr)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 数据发送
|
// 数据发送
|
||||||
@ -982,6 +998,8 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
|
||||||
.visual-container {
|
.visual-container {
|
||||||
width: 1920px;
|
width: 1920px;
|
||||||
height: 1080px;
|
height: 1080px;
|
||||||
@ -993,12 +1011,15 @@ export default {
|
|||||||
background: url('../../assets/img/OperationalOverview/title.png') no-repeat;
|
background: url('../../assets/img/OperationalOverview/title.png') no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
color: #00fff0;
|
color: #00fff0;
|
||||||
word-spacing: 8px;
|
// word-spacing: 8px;
|
||||||
|
letter-spacing: 8px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
.unit {
|
.unit {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 260px;
|
left: 290px;
|
||||||
top: 25px;
|
top: 25px;
|
||||||
|
letter-spacing: 0px;
|
||||||
|
color: rgba($color: #ffffff, $alpha: 8);
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1006,6 +1027,8 @@ export default {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
left: 1360px;
|
left: 1360px;
|
||||||
top: 25px;
|
top: 25px;
|
||||||
|
letter-spacing: 0px;
|
||||||
|
color: rgba($color: #ffffff, $alpha: 8);
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
.title-button {
|
.title-button {
|
||||||
|
@ -32,7 +32,7 @@ import { parseTime } from '../../core/mixins/code-filter';
|
|||||||
import {
|
import {
|
||||||
getcoreAlarmLogPage
|
getcoreAlarmLogPage
|
||||||
} from '@/api/base/coreAlarmLog';
|
} from '@/api/base/coreAlarmLog';
|
||||||
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
import {DICT_TYPE, getDictDatas, publicFormatter } from "@/utils/dict";
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
@ -50,7 +50,8 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'alarmGrade',
|
prop: 'alarmGrade',
|
||||||
label: '报警级别'
|
label: '报警级别',
|
||||||
|
filter: publicFormatter(DICT_TYPE.EQU_ALARM_LEVEL)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'alarmReason',
|
prop: 'alarmReason',
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-12-12 16:04:44
|
* @LastEditTime: 2024-03-20 16:20:39
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -130,6 +130,11 @@ export default {
|
|||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
this.urlOptions.infoURL(id).then(response => {
|
this.urlOptions.infoURL(id).then(response => {
|
||||||
this.dataForm = response.data;
|
this.dataForm = response.data;
|
||||||
|
const tempPic = []
|
||||||
|
this.dataForm.files?.forEach(item => {
|
||||||
|
tempPic.push(item.fileUrl)
|
||||||
|
})
|
||||||
|
this.files = tempPic.join(',')
|
||||||
if (this.setData) {
|
if (this.setData) {
|
||||||
this.setDataForm()
|
this.setDataForm()
|
||||||
}
|
}
|
||||||
@ -150,8 +155,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.dataForm.files = []
|
this.dataForm.files = []
|
||||||
if (this.files.length > 0) {
|
if (this.files.split(',').length > 0) {
|
||||||
this.files.forEach(item => {
|
this.files.split(',').forEach(item => {
|
||||||
const temp = {
|
const temp = {
|
||||||
fileType: 1,
|
fileType: 1,
|
||||||
fileUrl: item
|
fileUrl: item
|
||||||
|
@ -7,10 +7,11 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:visible="visible"
|
:visible.sync="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="false"
|
:wrapper-closable="true"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
|
:before-close="beforeClose"
|
||||||
custom-class="mes-drawer"
|
custom-class="mes-drawer"
|
||||||
size="60%"
|
size="60%"
|
||||||
@closed="$emit('destroy')">
|
@closed="$emit('destroy')">
|
||||||
@ -81,12 +82,12 @@
|
|||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div v-if="mode == 'edit'" class="drawer-body__footer">
|
||||||
<el-button style="" @click="handleCancel">取消</el-button>
|
<el-button style="" @click="handleCancel">取消</el-button>
|
||||||
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
|
<!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button> -->
|
||||||
<el-button v-else type="primary" @click="handleConfirm">保存</el-button>
|
<el-button type="primary" @click="handleConfirm">保存</el-button>
|
||||||
<!-- sections的第二项必须是 属性列表 -->
|
<!-- sections的第二项必须是 属性列表 -->
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
v-if="sections[1].allowAdd"
|
v-if="sections[1].allowAdd"
|
||||||
@ -298,6 +299,17 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
beforeClose(done) {
|
||||||
|
if (this.mode.includes('edit')) {
|
||||||
|
this.$confirm('确认关闭?')
|
||||||
|
.then(_ => {
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(_ => {});
|
||||||
|
} else {
|
||||||
|
done()
|
||||||
|
}
|
||||||
|
},
|
||||||
handleTableBtnClick({ type, data }) {
|
handleTableBtnClick({ type, data }) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'edit':
|
case 'edit':
|
||||||
|
@ -387,6 +387,7 @@ export default {
|
|||||||
label: '设备图片',
|
label: '设备图片',
|
||||||
prop: 'files2',
|
prop: 'files2',
|
||||||
fileType: 1,
|
fileType: 1,
|
||||||
|
uploadTips: true
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[{ input: true, label: '备注', prop: 'remark' }],
|
[{ input: true, label: '备注', prop: 'remark' }],
|
||||||
@ -486,6 +487,7 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
code: '',
|
code: '',
|
||||||
name: '',
|
name: '',
|
||||||
|
special: false
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
|
@ -298,9 +298,9 @@ export default {
|
|||||||
// 工段排序
|
// 工段排序
|
||||||
sort: undefined,
|
sort: undefined,
|
||||||
// 产线统计类型
|
// 产线统计类型
|
||||||
lineDataType: undefined,
|
lineDataType: 0,
|
||||||
// 工段统计类型
|
// 工段统计类型
|
||||||
sectionDataType: undefined,
|
sectionDataType: 0,
|
||||||
};
|
};
|
||||||
this.resetForm('form');
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
|
@ -161,7 +161,7 @@ export default {
|
|||||||
{
|
{
|
||||||
upload: true,
|
upload: true,
|
||||||
label: '上传资料',
|
label: '上传资料',
|
||||||
prop: 'files',
|
prop: 'files'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[{ input: true, label: '备注', prop: 'remark' }],
|
[{ input: true, label: '备注', prop: 'remark' }],
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-12-14 13:52:42
|
* @LastEditTime: 2024-03-14 10:02:53
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -169,7 +169,7 @@ export default {
|
|||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
this.urlOptions.updateURL(this.dataForm).then(response => {
|
this.urlOptions.updateURL(this.dataForm).then(response => {
|
||||||
if (this.test.length > 1 || this.test[0].name) {
|
if (this.test.length > 1 || this.test[0]?.name) {
|
||||||
this.test.forEach(check => {
|
this.test.forEach(check => {
|
||||||
check.hotMaterialId = this.dataForm.id
|
check.hotMaterialId = this.dataForm.id
|
||||||
if (check.id) {
|
if (check.id) {
|
||||||
@ -191,7 +191,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||||
if (this.test.length > 1 || this.test[0].name) {
|
if (this.test.length > 1 || this.test[0]?.name) {
|
||||||
this.test.forEach(check => {
|
this.test.forEach(check => {
|
||||||
check.hotMaterialId = response.data
|
check.hotMaterialId = response.data
|
||||||
createHotMaterialCheck(check).then(res => {
|
createHotMaterialCheck(check).then(res => {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-02-29 15:01:25
|
* @LastEditTime: 2024-03-13 13:54:01
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -254,7 +254,7 @@ export default {
|
|||||||
dataRule: {
|
dataRule: {
|
||||||
code: [{ required: true, message: "产品编码不能为空", trigger: "blur" }],
|
code: [{ required: true, message: "产品编码不能为空", trigger: "blur" }],
|
||||||
name: [{ required: true, message: "产品名称不能为空", trigger: "blur" }],
|
name: [{ required: true, message: "产品名称不能为空", trigger: "blur" }],
|
||||||
specifications: [{ required: true, message: "规格不能为空", trigger: "blur" }],
|
specifications: [{ required: false, message: "规格不能为空", trigger: "blur" }],
|
||||||
materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }],
|
materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }],
|
||||||
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }]
|
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }]
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-02-18 13:53:09
|
* @LastEditTime: 2024-03-13 13:54:48
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -33,14 +33,14 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.roomNameDict"
|
v-model="dataForm.roomNameDict"
|
||||||
filterable
|
filterable
|
||||||
:disabled="isdetail || isedit"
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择车间名称">
|
placeholder="请选择车间名称">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(dict, index) in getDictDatas('workshop')"
|
v-for="(dict, index) in getDictDatas('workshop')"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value" />
|
:value="Number(dict.value)" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -125,6 +125,26 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
init(id) {
|
||||||
|
this.dataForm.id = id || "";
|
||||||
|
this.visible = true;
|
||||||
|
if (this.urlOptions.getOption) {
|
||||||
|
this.getArr()
|
||||||
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["dataForm"].resetFields();
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
this.urlOptions.infoURL(id).then(response => {
|
||||||
|
this.dataForm = response.data
|
||||||
|
// this.dataForm.roomNameDict = String(this.dataForm.roomNameDict)
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (this.urlOptions.isGetCode) {
|
||||||
|
this.getCode()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 工厂列表
|
// 工厂列表
|
||||||
const factoryRes = await getFactoryList();
|
const factoryRes = await getFactoryList();
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
<el-radio :label="1">产品基础BOM</el-radio>
|
<el-radio :label="1">产品基础BOM</el-radio>
|
||||||
<el-radio :label="2">工艺扩展BOM</el-radio>
|
<el-radio :label="2">工艺扩展BOM</el-radio>
|
||||||
</el-radio-group> -->
|
</el-radio-group> -->
|
||||||
<el-select v-model="dataForm.materialMethod" placeholder="请选择物料计算方式" style="width: 100%;" @change="materialMethodChange">
|
<el-select v-model="dataForm.materialMethod" placeholder="请选择物料计算方式" style="width: 100%;" clearable @change="materialMethodChange">
|
||||||
<el-option key="1" label="产品基础BOM" :value="1" />
|
<el-option key="1" label="产品基础BOM" :value="1" />
|
||||||
<el-option key="2" label="工艺扩展BOM" :value="2" />
|
<el-option key="2" label="工艺扩展BOM" :value="2" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -92,7 +92,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='8'>
|
<el-col :span='8'>
|
||||||
<el-form-item label="优先级" prop="priority">
|
<el-form-item label="优先级" prop="priority">
|
||||||
<el-select v-model="dataForm.priority" placeholder="请选择优先级" style="width: 100%;">
|
<el-select v-model="dataForm.priority" clearable placeholder="请选择优先级" style="width: 100%;">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
|
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -104,7 +104,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='8'>
|
<el-col :span='8'>
|
||||||
<el-form-item label="工单类型" prop="type">
|
<el-form-item label="工单类型" prop="type">
|
||||||
<el-select v-model="dataForm.type" placeholder="请选择工单类型" style="width: 100%;">
|
<el-select v-model="dataForm.type" clearable placeholder="请选择工单类型" style="width: 100%;">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in workOrderTypeList"
|
v-for="item in workOrderTypeList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@ -121,7 +121,9 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.roomNameDict"
|
v-model="dataForm.roomNameDict"
|
||||||
filterable
|
filterable
|
||||||
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@change="setLine"
|
||||||
placeholder="请选择车间名称">
|
placeholder="请选择车间名称">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(dict, index) in getDictDatas('workshop')"
|
v-for="(dict, index) in getDictDatas('workshop')"
|
||||||
@ -133,7 +135,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='8'>
|
<el-col :span='8'>
|
||||||
<el-form-item label="关联产线" prop="productLineIds">
|
<el-form-item label="关联产线" prop="productLineIds">
|
||||||
<el-select v-model="dataForm.productLineIds" placeholder="请选择关联产线" multiple style="width: 100%;">
|
<el-select v-model="dataForm.productLineIds" clearable placeholder="请选择关联产线" multiple style="width: 100%;">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in productLineList"
|
v-for="item in productLineList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@ -145,7 +147,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='8'>
|
<el-col :span='8'>
|
||||||
<el-form-item label="负责人" prop="workers">
|
<el-form-item label="负责人" prop="workers">
|
||||||
<el-input v-model="dataForm.workers" placeholder="请输入负责人"></el-input>
|
<el-input v-model="dataForm.workers" clearable placeholder="请输入负责人"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -162,7 +164,7 @@
|
|||||||
import { getProductAll } from '@/api/base/product'
|
import { getProductAll } from '@/api/base/product'
|
||||||
import { getProcessFlowList, workOrderList } from '@/api/base/orderManage'
|
import { getProcessFlowList, workOrderList } from '@/api/base/orderManage'
|
||||||
import { createCoreWO, updateCoreWO, getCode, getCoreWO } from '@/api/base/coreWorkOrder'
|
import { createCoreWO, updateCoreWO, getCode, getCoreWO } from '@/api/base/coreWorkOrder'
|
||||||
import { getLineAll } from '@/api/base/productionLine'
|
import { getLinelistByRoom, getLineAll } from '@/api/base/productionLine'
|
||||||
import basicAdd from '../../core/mixins/basic-add';
|
import basicAdd from '../../core/mixins/basic-add';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -184,8 +186,8 @@ export default {
|
|||||||
code: '',
|
code: '',
|
||||||
planProductId: '',
|
planProductId: '',
|
||||||
specifications: '',
|
specifications: '',
|
||||||
planStartTime: '',
|
planStartTime: undefined,
|
||||||
planFinishTime: '',
|
planFinishTime: undefined,
|
||||||
planAssignQuantity: 0,
|
planAssignQuantity: 0,
|
||||||
planQuantity: 0,
|
planQuantity: 0,
|
||||||
processFlowId: '',
|
processFlowId: '',
|
||||||
@ -204,7 +206,8 @@ export default {
|
|||||||
planAssignQuantity: [{ required: true, message: "计划投入数量不能为空", trigger: "blur" }],
|
planAssignQuantity: [{ required: true, message: "计划投入数量不能为空", trigger: "blur" }],
|
||||||
planQuantity: [{ required: true, message: "计划生产数量不能为空", trigger: "blur" }],
|
planQuantity: [{ required: true, message: "计划生产数量不能为空", trigger: "blur" }],
|
||||||
roomNameDict: [{ required: true, message: "车间名称不能为空", trigger: "blur" }],
|
roomNameDict: [{ required: true, message: "车间名称不能为空", trigger: "blur" }],
|
||||||
productLineIds: [{ required: true, message: "关联产线不能为空", trigger: "change" }]
|
productLineIds: [{ required: true, message: "关联产线不能为空", trigger: "change" }],
|
||||||
|
materialMethod: [{ required: true, message: "物料计算方式不能为空", trigger: "change" }]
|
||||||
},
|
},
|
||||||
productList: [],
|
productList: [],
|
||||||
processFlowList: [],
|
processFlowList: [],
|
||||||
@ -223,6 +226,14 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
setLine() {
|
||||||
|
// 产线
|
||||||
|
getLinelistByRoom({
|
||||||
|
room: this.dataForm.roomNameDict
|
||||||
|
}).then(res => {
|
||||||
|
this.productLineList = res.data || []
|
||||||
|
})
|
||||||
|
},
|
||||||
// 工艺变更
|
// 工艺变更
|
||||||
materialMethodChange(val) {
|
materialMethodChange(val) {
|
||||||
if (val === 2 && !this.dataForm.processFlowId) {
|
if (val === 2 && !this.dataForm.processFlowId) {
|
||||||
@ -237,7 +248,31 @@ export default {
|
|||||||
this.dataForm.materialMethod = 1
|
this.dataForm.materialMethod = 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
reset() {
|
||||||
|
this.dataForm = {
|
||||||
|
id: undefined,
|
||||||
|
workOrderId: '',
|
||||||
|
name: '',
|
||||||
|
code: '',
|
||||||
|
planProductId: '',
|
||||||
|
specifications: '',
|
||||||
|
planStartTime: undefined,
|
||||||
|
planFinishTime: undefined,
|
||||||
|
planAssignQuantity: 0,
|
||||||
|
planQuantity: 0,
|
||||||
|
processFlowId: '',
|
||||||
|
materialMethod: 1,
|
||||||
|
triggerOrigin: 1,
|
||||||
|
priority: '',
|
||||||
|
productLineIds: [],
|
||||||
|
type: '',
|
||||||
|
workers: '',
|
||||||
|
roomNameDict: '',
|
||||||
|
status: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
init(id) {
|
init(id) {
|
||||||
|
this.reset();
|
||||||
this.dataForm.id = id || "";
|
this.dataForm.id = id || "";
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
if (this.urlOptions.getOption) {
|
if (this.urlOptions.getOption) {
|
||||||
@ -245,6 +280,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs["dataForm"].resetFields();
|
this.$refs["dataForm"].resetFields();
|
||||||
|
console.log('222', this.dataForm)
|
||||||
this.planStartTime = ''
|
this.planStartTime = ''
|
||||||
this.planFinishTime = ''
|
this.planFinishTime = ''
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
@ -253,6 +289,12 @@ export default {
|
|||||||
if (this.dataForm.priority !== undefined) {
|
if (this.dataForm.priority !== undefined) {
|
||||||
this.dataForm.priority = String(this.dataForm.priority)
|
this.dataForm.priority = String(this.dataForm.priority)
|
||||||
}
|
}
|
||||||
|
if (this.dataForm.planStartTime === 0) {
|
||||||
|
this.dataForm.planStartTime = undefined
|
||||||
|
}
|
||||||
|
if (this.dataForm.planFinishTime === 0) {
|
||||||
|
this.dataForm.planFinishTime = undefined
|
||||||
|
}
|
||||||
if (this.dataForm.roomNameDict !== undefined) {
|
if (this.dataForm.roomNameDict !== undefined) {
|
||||||
this.dataForm.roomNameDict = String(this.dataForm.roomNameDict)
|
this.dataForm.roomNameDict = String(this.dataForm.roomNameDict)
|
||||||
}
|
}
|
||||||
|
@ -2,38 +2,74 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-02-29 10:01:52
|
* @LastEditTime: 2024-03-22 08:53:20
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="false"
|
:wrapper-closable="true"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
size="55%">
|
size="55%"
|
||||||
|
:before-close="beforeClose"
|
||||||
|
@closed="$emit('destroy')"
|
||||||
|
>
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
{{ '分配产量' }}
|
{{ '分配产量' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="formContent">
|
<div class="formContent">
|
||||||
|
<el-form :model="dataForm" ref="dataForm" label-width="120px" label-position="top" class="demo-ruleForm" :rules="rules">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">工单名称:{{ dataForm.name }}</el-col>
|
<el-col :span="8">
|
||||||
<el-col :span="12">工单编码:{{ dataForm.code }}</el-col>
|
<el-form-item label="工单名称" prop="name">
|
||||||
|
<!-- <el-input v-model="dataForm.name" autocomplete="off"></el-input> -->
|
||||||
|
<span>{{ dataForm.name }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="工单编码" prop="code">
|
||||||
|
<span>{{ dataForm.code }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="产品名称" prop="productName">
|
||||||
|
<span>{{ dataForm.productName }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">产品名称:{{ dataForm.productName }}</el-col>
|
<el-col :span="8">
|
||||||
<el-col :span="12">产品规格:{{ dataForm.specifications }}</el-col>
|
<el-form-item label="产品规格" prop="specifications">
|
||||||
</el-row>
|
<span>{{ dataForm.specifications }}</span>
|
||||||
<el-row :gutter="20">
|
</el-form-item>
|
||||||
<el-col :span="12">实际生产数量:{{ dataForm.expectedTime }}</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="实际生产数量" prop="actualQuantity">
|
||||||
|
<el-input v-model.number="dataForm.actualQuantity" autocomplete="off" style="width: 80%" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="实际生产完成时间" prop="finishProduceTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dataForm.finishProduceTime"
|
||||||
|
type="datetime"
|
||||||
|
value-format="timestamp"
|
||||||
|
placeholder="选择实际生产完成时间" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="attr-list">
|
<div v-show="!isdetail" class="attr-list">
|
||||||
<!-- <el-button v-show="!isdetail" type="success" size="small" style="float: right" @click="addRow()">添加一行</el-button> -->
|
<!-- <el-button v-show="!isdetail" type="success" size="small" style="float: right" @click="addRow()">添加一行</el-button> -->
|
||||||
|
<el-form ref="tableForm" :model="form" style="padding: 0">
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
ref="table"
|
||||||
|
:data="form.tableData"
|
||||||
|
row-key="id"
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-table-column type="index" label="序号" />
|
<el-table-column type="index" label="序号" />
|
||||||
<el-table-column prop="orderName" label="订单名称" />
|
<el-table-column prop="orderName" label="订单名称" />
|
||||||
@ -41,41 +77,25 @@
|
|||||||
<el-table-column prop="priority" label="优先级" />
|
<el-table-column prop="priority" label="优先级" />
|
||||||
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
|
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.planAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
|
<el-form-item prop="planAssignmentQuantity">
|
||||||
|
<el-input v-model.number="scope.row.planAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
|
||||||
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
|
<el-table-column label="*实际分配数量">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.actualAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
|
<el-form-item :prop="`tableData.${scope.$index}.actualAssignmentQuantity`" :rules="[{ required: true, message: '实际分配数量不能为空', trigger: 'blur' }]">
|
||||||
|
<el-input v-model.number="scope.row.actualAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
|
||||||
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作">
|
<!-- <el-table-column label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="saveData(scope.row)">保存</el-button>
|
<el-button type="text" size="small" @click="saveData(scope.row)">保存</el-button>
|
||||||
<!-- <el-tooltip v-if="!scope.row.isEdit" placement="top" content="编辑">
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
:style="{color:'#0B58FF'}"
|
|
||||||
size="mini"
|
|
||||||
@click="edit(scope.row)"
|
|
||||||
>
|
|
||||||
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="edit" />
|
|
||||||
</el-button>
|
|
||||||
</el-tooltip> -->
|
|
||||||
|
|
||||||
<!-- <el-tooltip placement="top" content="删除">
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
:style="{color:'#FF5454'}"
|
|
||||||
size="mini"
|
|
||||||
@click="deleteDetail(scope.row)"
|
|
||||||
>
|
|
||||||
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="table_delete" />
|
|
||||||
</el-button>
|
|
||||||
</el-tooltip> -->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
</el-form>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="listQuery.total > 0"
|
v-show="listQuery.total > 0"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@ -86,11 +106,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div class="drawer-body__footer">
|
||||||
<el-button style="" type="primary" @click="goback()">关闭</el-button>
|
<el-button style="" @click="goback()">取消</el-button>
|
||||||
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
|
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button> -->
|
||||||
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button> -->
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -104,7 +124,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import basicAdd from '../../core/mixins/basic-add';
|
import basicAdd from '../../core/mixins/basic-add';
|
||||||
import { getConOrderList, updateConCoreWOr, getCoreWO } from '@/api/base/coreWorkOrder';
|
import { getConOrderList, updateConCoreWOr, updateBatchConCoreWOr, getCoreWO, statusChange } from '@/api/base/coreWorkOrder';
|
||||||
import SmallTitle from '../material/SmallTitle';
|
import SmallTitle from '../material/SmallTitle';
|
||||||
// import { parseTime } from '../../core/mixins/code-filter';
|
// import { parseTime } from '../../core/mixins/code-filter';
|
||||||
// import attrAdd from './attr-add';
|
// import attrAdd from './attr-add';
|
||||||
@ -128,6 +148,10 @@ export default {
|
|||||||
code: undefined,
|
code: undefined,
|
||||||
productId: '',
|
productId: '',
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
|
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
tableData: []
|
||||||
},
|
},
|
||||||
productList: [],
|
productList: [],
|
||||||
materialAttrList: [],
|
materialAttrList: [],
|
||||||
@ -135,11 +159,94 @@ export default {
|
|||||||
tableData: [],
|
tableData: [],
|
||||||
visible: false,
|
visible: false,
|
||||||
isdetail: false,
|
isdetail: false,
|
||||||
idAttrShow: false
|
idAttrShow: false,
|
||||||
|
rules: {
|
||||||
|
name: [{ required: true, message: "工单名称不能为空", trigger: "blur" }],
|
||||||
|
finishProduceTime: [{ required: true, message: "实际生产完成时间不能为空", trigger: "change" }]
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
|
beforeClose(done) {
|
||||||
|
// if (this.mode.includes('edit')) {
|
||||||
|
this.$confirm('确认关闭?')
|
||||||
|
.then(_ => {
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(_ => {});
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
// console.log('嗨害嗨', this.$refs['table'])
|
||||||
|
console.log('nihc ', this.form.tableData)
|
||||||
|
// this.$refs['tableForm'].validate((valid) => {
|
||||||
|
// if (valid) {
|
||||||
|
// alert('提交成功!');
|
||||||
|
// } else {
|
||||||
|
// alert('表单验证失败!');
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
this.$refs["dataForm"].validate((valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.$refs['tableForm'].validate((valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 修改的提交
|
||||||
|
console.log('aaaaaaa', this.form.tableData)
|
||||||
|
// 判断分配数量
|
||||||
|
let num = 0
|
||||||
|
const tempList = this.form.tableData.map((item) => {
|
||||||
|
item.workOrderId = this.dataForm.id
|
||||||
|
num += item.actualAssignmentQuantity
|
||||||
|
return item
|
||||||
|
})
|
||||||
|
if (num <= this.dataForm.actualQuantity) {
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
statusChange({
|
||||||
|
id: this.dataForm.id,
|
||||||
|
status: 4,
|
||||||
|
finishProduceTime: this.dataForm.finishProduceTime,
|
||||||
|
actualQuantity: this.dataForm.actualQuantity
|
||||||
|
}).then(response => {
|
||||||
|
this.$modal.msgSuccess("操作成功!工单状态稍后将会更新!");
|
||||||
|
this.saveData(tempList)
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit("refreshDataList");
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.error('实际分配数量超过实际生产数量!')
|
||||||
|
}
|
||||||
|
console.log('2111', num, tempList)
|
||||||
|
});
|
||||||
|
// 修改的提交
|
||||||
|
// if (this.dataForm.id) {
|
||||||
|
// statusChange({
|
||||||
|
// id: this.dataForm.id,
|
||||||
|
// status: 4,
|
||||||
|
// finishProduceTime: this.dataForm.finishProduceTime,
|
||||||
|
// actualQuantity: this.dataForm.actualQuantity
|
||||||
|
// }).then(response => {
|
||||||
|
// this.$modal.msgSuccess("操作成功!工单状态稍后将会更新!");
|
||||||
|
// this.visible = false;
|
||||||
|
// this.$emit("refreshDataList");
|
||||||
|
// });
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// 添加的提交
|
||||||
|
// this.urlOptions.createURL(this.dataForm).then(response => {
|
||||||
|
// this.$modal.msgSuccess("新增成功");
|
||||||
|
// this.visible = false;
|
||||||
|
// this.$emit("refreshDataList");
|
||||||
|
// });
|
||||||
|
});
|
||||||
|
},
|
||||||
initData() {
|
initData() {
|
||||||
// this.materialAttrList.splice(0);
|
// this.materialAttrList.splice(0);
|
||||||
this.listQuery.total = 0;
|
this.listQuery.total = 0;
|
||||||
@ -147,30 +254,14 @@ export default {
|
|||||||
edit(row) {
|
edit(row) {
|
||||||
row.isEdit = true
|
row.isEdit = true
|
||||||
},
|
},
|
||||||
saveData(row) {
|
saveData(list) {
|
||||||
if (row.actualAssignmentQuantity) {
|
console.log('你好', list)
|
||||||
if (row.id) {
|
|
||||||
// updateMaterialPBDet({
|
|
||||||
// ...row
|
|
||||||
// }).then((response) => {
|
|
||||||
// this.$modal.msgSuccess('修改成功');
|
|
||||||
// // this.visible = false;
|
|
||||||
// this.getList();
|
|
||||||
// });
|
|
||||||
// return;
|
|
||||||
}
|
|
||||||
// 修改的提交
|
// 修改的提交
|
||||||
updateConCoreWOr({
|
updateBatchConCoreWOr(list).then((response) => {
|
||||||
...row,
|
|
||||||
workOrderId: this.dataForm.id
|
|
||||||
}).then((response) => {
|
|
||||||
this.$modal.msgSuccess('分配成功');
|
this.$modal.msgSuccess('分配成功');
|
||||||
// this.visible = false;
|
// this.visible = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
this.$message.warning('请填写实际分配数量');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
// 获取工单分配详细列表
|
// 获取工单分配详细列表
|
||||||
@ -183,6 +274,7 @@ export default {
|
|||||||
item.isallocation = item.actualAssignmentQuantity ? true : false
|
item.isallocation = item.actualAssignmentQuantity ? true : false
|
||||||
return item
|
return item
|
||||||
});
|
});
|
||||||
|
this.$set(this.form, 'tableData', this.tableData)
|
||||||
this.listQuery.total = response.data.length;
|
this.listQuery.total = response.data.length;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -242,6 +334,9 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
/* .item .el-form-item__label {
|
||||||
|
color: red;
|
||||||
|
} */
|
||||||
.drawer >>> .el-drawer {
|
.drawer >>> .el-drawer {
|
||||||
border-radius: 8px 0 0 8px;
|
border-radius: 8px 0 0 8px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -250,6 +345,7 @@ export default {
|
|||||||
|
|
||||||
.drawer >>> .el-form-item__label {
|
.drawer >>> .el-form-item__label {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer >>> .el-drawer__header {
|
.drawer >>> .el-drawer__header {
|
||||||
@ -296,4 +392,18 @@ export default {
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.blodTip {
|
||||||
|
height: 16px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: rgba(0,0,0,0.85);
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
.lightTip {
|
||||||
|
/* height: 16px; */
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: rgba(102,102,102,0.75);
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-02-29 15:35:02
|
* @LastEditTime: 2024-03-21 16:52:46
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -16,7 +16,13 @@
|
|||||||
<!-- <small-title slot="title" :no-padding="true">
|
<!-- <small-title slot="title" :no-padding="true">
|
||||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||||
</small-title> -->
|
</small-title> -->
|
||||||
<div v-show="workOrderButton.length" class="buttonDiv">
|
<div v-show="workOrderButton.length" style="position: relative;padding-right: 90px;">
|
||||||
|
<topTabVue :orderIdList='workOrderButton' :orderId="workorderId" @emitFun='toggleName' />
|
||||||
|
<el-button type="primary" plain size="small"
|
||||||
|
style="position: absolute;right: 0; top: 0;height: 48px;font-size: 14px;" @click="goback"><svg-icon
|
||||||
|
icon-class="return" /> 返回</el-button>
|
||||||
|
</div>
|
||||||
|
<!-- <div v-show="workOrderButton.length" class="buttonDiv">
|
||||||
<div style="display: flex; width: 100%;">
|
<div style="display: flex; width: 100%;">
|
||||||
<el-button v-show="showScroll" type="text" style="width: 30px; background: white; margin-right: 8px" @click="scrollLeft" icon="el-icon-caret-left"></el-button>
|
<el-button v-show="showScroll" type="text" style="width: 30px; background: white; margin-right: 8px" @click="scrollLeft" icon="el-icon-caret-left"></el-button>
|
||||||
<div ref="content" class="scrollDiv">
|
<div ref="content" class="scrollDiv">
|
||||||
@ -27,7 +33,7 @@
|
|||||||
<svg-icon icon-class="return"/>返回
|
<svg-icon icon-class="return"/>返回
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="boxTitle">
|
<div class="boxTitle">
|
||||||
@ -97,6 +103,10 @@
|
|||||||
<div class="blodTip">关联工艺</div>
|
<div class="blodTip">关联工艺</div>
|
||||||
<div class="lightTip">{{ dataForm.processFlowName }}</div>
|
<div class="lightTip">{{ dataForm.processFlowName }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">车间名称</div>
|
||||||
|
<div class="lightTip">{{ (dataForm.roomNameDict || dataForm.roomNameDict === 0) ? getDictDataLabel('workshop', dataForm.roomNameDict) : '-' }}</div>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -153,7 +163,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
<div class="blodTip">废片数量</div>
|
<div class="blodTip">废片数量</div>
|
||||||
<div class="lightTip">{{ dataForm.nokQuantity }}</div>
|
<div class="lightTip">{{ dataForm.nokNum }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
<div class="blodTip">检测瑕疵数</div>
|
<div class="blodTip">检测瑕疵数</div>
|
||||||
@ -218,12 +228,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import basicAdd from '../../core/mixins/basic-add';
|
// import basicAdd from '../../core/mixins/basic-add';
|
||||||
import { getCoreWO, getCoreWOMaPage, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
|
import { getCoreWO, getCoreWOMaPage, getlistByProductId, getlistByFlowId, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
|
||||||
// import { orderList } from "@/api/base/orderManage";
|
// import { orderList } from "@/api/base/orderManage";
|
||||||
import { getProcessFlowList } from '@/api/base/orderManage'
|
import { getProcessFlowList } from '@/api/base/orderManage'
|
||||||
import SmallTitle from './SmallTitle';
|
import SmallTitle from './SmallTitle';
|
||||||
import { publicFormatter } from "@/utils/dict";
|
import { publicFormatter } from "@/utils/dict";
|
||||||
import { parseTime } from '@/utils/ruoyi'
|
import { parseTime } from '@/utils/ruoyi'
|
||||||
|
import topTabVue from '../../order/base/orderManage/components/topTab.vue';
|
||||||
|
|
||||||
const tableBtn = [
|
const tableBtn = [
|
||||||
{
|
{
|
||||||
@ -261,9 +272,9 @@ const tableProps = [
|
|||||||
|
|
||||||
const tableProps1 = [
|
const tableProps1 = [
|
||||||
{
|
{
|
||||||
prop: 'material',
|
prop: 'materialName',
|
||||||
label: '物料名称',
|
label: '物料名称'
|
||||||
filter: publicFormatter('material')
|
// filter: publicFormatter('material')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'unit',
|
prop: 'unit',
|
||||||
@ -274,10 +285,14 @@ const tableProps1 = [
|
|||||||
prop: 'remaining',
|
prop: 'remaining',
|
||||||
label: '剩余生产预计消耗'
|
label: '剩余生产预计消耗'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'num',
|
||||||
|
label: '库存数量'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { SmallTitle },
|
components: { SmallTitle, topTabVue },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableBtn,
|
tableBtn,
|
||||||
@ -300,6 +315,7 @@ export default {
|
|||||||
dataForm: {},
|
dataForm: {},
|
||||||
orderList: [],
|
orderList: [],
|
||||||
materialList: [],
|
materialList: [],
|
||||||
|
workorderId: '',
|
||||||
// orderArray: [],
|
// orderArray: [],
|
||||||
visible: false,
|
visible: false,
|
||||||
isdetail: false,
|
isdetail: false,
|
||||||
@ -323,13 +339,15 @@ export default {
|
|||||||
name: work.name
|
name: work.name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const contentRef = this.$refs.content
|
this.workorderId = this.workOrderButton[0].id
|
||||||
if (contentRef.scrollWidth > contentRef.clientWidth) {
|
console.log('wawa ew', this.workorderId, this.workOrderButton)
|
||||||
this.showScroll = true
|
// const contentRef = this.$refs.content
|
||||||
} else {
|
// if (contentRef.scrollWidth > contentRef.clientWidth) {
|
||||||
this.showScroll = false
|
// this.showScroll = true
|
||||||
}
|
// } else {
|
||||||
console.log(contentRef.scrollWidth, contentRef.clientWidth)
|
// this.showScroll = false
|
||||||
|
// }
|
||||||
|
// console.log(contentRef.scrollWidth, contentRef.clientWidth)
|
||||||
this.init(this.workOrderButton[0].id, true)
|
this.init(this.workOrderButton[0].id, true)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@ -337,6 +355,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 切换tab获取订单详情
|
||||||
|
toggleName(val) {
|
||||||
|
this.workorderId = val
|
||||||
|
this.init(val, true)
|
||||||
|
},
|
||||||
scrolRight() {
|
scrolRight() {
|
||||||
// let contentRef = this.$refs.content
|
// let contentRef = this.$refs.content
|
||||||
// console.log('你好啊啊', contentRef.scrollWidth, contentRef.clientWidth)
|
// console.log('你好啊啊', contentRef.scrollWidth, contentRef.clientWidth)
|
||||||
@ -434,17 +457,38 @@ export default {
|
|||||||
// 获取预使用原料列表
|
// 获取预使用原料列表
|
||||||
console.log()
|
console.log()
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
getCoreWOMaPage({
|
if (this.dataForm.materialMethod === 1) {
|
||||||
workOrderId: this.dataForm.id,
|
// 产品
|
||||||
pageNo: 1,
|
getlistByProductId({
|
||||||
pageSize: 100
|
id: this.dataForm.planProductId
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
this.materialList = response.data.records.map((item) => {
|
this.materialList = response.data.map((item) => {
|
||||||
item.remaining = item?.num * this.dataForm.remainingQuantity || 0
|
item.remaining = item?.num * this.dataForm.remainingQuantity || 0
|
||||||
return item
|
return item
|
||||||
});
|
});
|
||||||
// this.listQuery.total = response.data.length;
|
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
// 工艺流程
|
||||||
|
getlistByFlowId({
|
||||||
|
id: this.dataForm.processFlowId
|
||||||
|
}).then((response) => {
|
||||||
|
this.materialList = response.data.map((item) => {
|
||||||
|
item.remaining = item?.num * this.dataForm.remainingQuantity || 0
|
||||||
|
return item
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// getCoreWOMaPage({
|
||||||
|
// workOrderId: this.dataForm.id,
|
||||||
|
// pageNo: 1,
|
||||||
|
// pageSize: 100
|
||||||
|
// }).then((response) => {
|
||||||
|
// this.materialList = response.data.records.map((item) => {
|
||||||
|
// item.remaining = item?.num * this.dataForm.remainingQuantity || 0
|
||||||
|
// return item
|
||||||
|
// });
|
||||||
|
// // this.listQuery.total = response.data.length;
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
// 获取订单相关信息
|
// 获取订单相关信息
|
||||||
// orderList({
|
// orderList({
|
||||||
|
@ -43,7 +43,8 @@
|
|||||||
<allocation
|
<allocation
|
||||||
v-if="allocationVisible"
|
v-if="allocationVisible"
|
||||||
ref="allocation"
|
ref="allocation"
|
||||||
@refreshDataList="getDataList" />
|
@refreshDataList="searchStatus"
|
||||||
|
@destroy="allocationVisible = false" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -353,6 +354,11 @@ export default {
|
|||||||
this.getDataList()
|
this.getDataList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
searchStatus() {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.getDataList()
|
||||||
|
}, 20000)
|
||||||
|
},
|
||||||
getWorkOrder() {
|
getWorkOrder() {
|
||||||
getCoreWOList().then(res => {
|
getCoreWOList().then(res => {
|
||||||
this.formConfig[0].selectOptions = res.data.map(item => {
|
this.formConfig[0].selectOptions = res.data.map(item => {
|
||||||
@ -431,6 +437,7 @@ export default {
|
|||||||
opration = '终止'
|
opration = '终止'
|
||||||
}
|
}
|
||||||
console.log('22',val)
|
console.log('22',val)
|
||||||
|
if (param.status !== 4) {
|
||||||
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
|
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
@ -443,16 +450,20 @@ export default {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
duration: 1500,
|
duration: 1500,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
this.getDataList();
|
this.searchStatus();
|
||||||
// 分配产量
|
// 分配产量
|
||||||
if (param.status === 4) {
|
// if (param.status === 4) {
|
||||||
this.allocationOrder(param);
|
// this.allocationOrder(param);
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => { });
|
.catch(() => { });
|
||||||
|
} else {
|
||||||
|
// 完成弹出分配框
|
||||||
|
this.allocationOrder(param);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
allocationOrder(val) {
|
allocationOrder(val) {
|
||||||
@ -460,7 +471,7 @@ export default {
|
|||||||
getConOrderList({
|
getConOrderList({
|
||||||
workOrderId: val.id,
|
workOrderId: val.id,
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
if (response.data.length > 0) {
|
|
||||||
this.$confirm('工单结束,可分配产量', "提示", {
|
this.$confirm('工单结束,可分配产量', "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
@ -469,11 +480,16 @@ export default {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
this.allocationVisible = true;
|
this.allocationVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
if (response.data.length > 0) {
|
||||||
|
// 有绑定订单带id
|
||||||
|
this.$refs.allocation.init(val.id);
|
||||||
|
} else {
|
||||||
this.$refs.allocation.init(val.id, true);
|
this.$refs.allocation.init(val.id, true);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => { });
|
.catch(() => { });
|
||||||
}
|
|
||||||
// this.listQuery.total = response.data.total;
|
// this.listQuery.total = response.data.total;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -2,14 +2,15 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-02-21 09:41:39
|
* @LastEditTime: 2024-03-21 15:21:32
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="isdetail"
|
:wrapper-closable="true"
|
||||||
|
:before-close="beforeClose"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
size="60%">
|
size="60%">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
@ -256,6 +257,17 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
beforeClose(done) {
|
||||||
|
if (!this.isdetail) {
|
||||||
|
this.$confirm('确认关闭?')
|
||||||
|
.then(_ => {
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(_ => {});
|
||||||
|
} else {
|
||||||
|
done()
|
||||||
|
}
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 物料类型列表
|
// 物料类型列表
|
||||||
// const res = await listData({
|
// const res = await listData({
|
||||||
|
@ -2,14 +2,15 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-11-27 19:50:36
|
* @LastEditTime: 2024-03-21 14:39:52
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="isdetail"
|
:wrapper-closable="true"
|
||||||
|
:before-close="beforeClose"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
size="70%">
|
size="70%">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
@ -196,6 +197,17 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
beforeClose(done) {
|
||||||
|
if (!this.isdetail) {
|
||||||
|
this.$confirm('确认关闭?')
|
||||||
|
.then(_ => {
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(_ => {});
|
||||||
|
} else {
|
||||||
|
done()
|
||||||
|
}
|
||||||
|
},
|
||||||
handleClick(raw) {
|
handleClick(raw) {
|
||||||
if (raw.type === 'delete') {
|
if (raw.type === 'delete') {
|
||||||
this.deleteDetail(raw.data);
|
this.deleteDetail(raw.data);
|
||||||
@ -246,7 +258,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
initData() {
|
initData() {
|
||||||
// this.materialAttrList.splice(0);
|
this.tableData.splice(0);
|
||||||
this.listQuery.total = 0;
|
this.listQuery.total = 0;
|
||||||
},
|
},
|
||||||
deleteDetail(raw) {
|
deleteDetail(raw) {
|
||||||
@ -284,18 +296,18 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 构造一行
|
// 构造一行
|
||||||
addRow() {
|
// addRow() {
|
||||||
const row = {
|
// const row = {
|
||||||
bomId: this.dataForm.id,
|
// bomId: this.dataForm.id,
|
||||||
materialId: '',
|
// materialId: '',
|
||||||
num: 0,
|
// num: 0,
|
||||||
materialCode: undefined,
|
// materialCode: undefined,
|
||||||
unit: undefined,
|
// unit: undefined,
|
||||||
remark: '',
|
// remark: '',
|
||||||
isEdit: true
|
// isEdit: true
|
||||||
}
|
// }
|
||||||
this.tableData.push(row)
|
// this.tableData.push(row)
|
||||||
},
|
// },
|
||||||
init(id, isdetail) {
|
init(id, isdetail) {
|
||||||
this.initData();
|
this.initData();
|
||||||
this.isdetail = isdetail || false;
|
this.isdetail = isdetail || false;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-10-17 16:50:19
|
* @Date: 2023-10-17 16:50:19
|
||||||
* @LastEditTime: 2024-01-22 09:55:32
|
* @LastEditTime: 2024-03-20 08:36:01
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -23,7 +23,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="标签类型" prop="typeId">
|
<el-form-item label="标签类型" prop="typeId">
|
||||||
<el-select v-model="dataForm.typeId" style="width: 100%;" placeholder="请选择打印方式" clearable>
|
<el-select v-model="dataForm.typeId" style="width: 100%;" placeholder="请选择标签类型" clearable>
|
||||||
<el-option v-for="dict in typeList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
<el-option v-for="dict in typeList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
import BalanceChart from '../balanceChart';
|
import BalanceChart from '../balanceChart';
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import AnalysisChart from './chart.vue';
|
import AnalysisChart from './chart.vue';
|
||||||
|
import { parseTime } from '@/utils/ruoyi'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -82,7 +83,7 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间',
|
label: '时间',
|
||||||
dateType: 'monthrange',
|
dateType: 'month',
|
||||||
format: 'yyyy-MM',
|
format: 'yyyy-MM',
|
||||||
valueFormat: 'timestamp',
|
valueFormat: 'timestamp',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
@ -255,13 +256,13 @@ export default {
|
|||||||
const date = eq.dynamicName;
|
const date = eq.dynamicName;
|
||||||
eq.children.forEach((sub) => {
|
eq.children.forEach((sub) => {
|
||||||
if (sub.dynamicName == '设备CT')
|
if (sub.dynamicName == '设备CT')
|
||||||
row[date + '_eq_ct'] = sub.dynamicValue;
|
row[date + '_eq_ct'] = sub?.dynamicValue?.toFixed(2);
|
||||||
if (sub.dynamicName == '设备TT')
|
if (sub.dynamicName == '设备TT')
|
||||||
row[date + '_eq_tt'] = sub.dynamicValue;
|
row[date + '_eq_tt'] = sub?.dynamicValue?.toFixed(2);
|
||||||
if (sub.dynamicName == '产线CT')
|
if (sub.dynamicName == '产线CT')
|
||||||
row[date + '_pl_ct'] = sub.dynamicValue;
|
row[date + '_pl_ct'] = sub.dynamicValue?.toFixed(2);
|
||||||
if (sub.dynamicName == '产线TT')
|
if (sub.dynamicName == '产线TT')
|
||||||
row[date + '_pl_tt'] = sub.dynamicValue;
|
row[date + '_pl_tt'] = sub.dynamicValue?.toFixed(2);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.tableData.push(row);
|
this.tableData.push(row);
|
||||||
@ -369,21 +370,63 @@ export default {
|
|||||||
// this.dataListLoading = false;
|
// this.dataListLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
changeTime(val) {
|
||||||
|
console.log(val)
|
||||||
|
if(val) {
|
||||||
|
const timeStamp = new Date(val).getMonth(); //标准时间转为时间戳,毫秒级别
|
||||||
|
console.log('沃尔沃', timeStamp)
|
||||||
|
const fullyear = new Date(val).getFullYear()
|
||||||
|
let days = 0
|
||||||
|
switch (timeStamp) {
|
||||||
|
case 0:
|
||||||
|
case 2:
|
||||||
|
case 4:
|
||||||
|
case 6:
|
||||||
|
case 7:
|
||||||
|
case 9:
|
||||||
|
case 11:
|
||||||
|
days = 31
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
case 8:
|
||||||
|
case 10:
|
||||||
|
days = 30
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
if ((fullyear % 400 === 0) || (fullyear % 4 === 0 && fullyear % 100 !== 0)) {
|
||||||
|
days = 29
|
||||||
|
} else {
|
||||||
|
days = 28
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
this.queryParams.startTime = new Date(fullyear, timeStamp, 1, 0, 0, 0).getTime() //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
|
this.queryParams.endTime = new Date(fullyear, timeStamp, days, 23, 59, 59).getTime() //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
|
} else {
|
||||||
|
this.queryParams.startTime = undefined
|
||||||
|
this.queryParams.endTime = undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
handleSearchBarBtnClick(btn) {
|
handleSearchBarBtnClick(btn) {
|
||||||
switch (btn.btnName) {
|
switch (btn.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.queryParams.lineId = btn.lineIds || null;
|
this.queryParams.lineId = btn.lineIds || null;
|
||||||
this.queryParams.startTime = btn.timeArr ? btn.timeArr[0] : null;
|
console.log('2222', new Date(btn.timeArr).getFullYear())
|
||||||
this.queryParams.endTime = btn.timeArr ? btn.timeArr[1] : null;
|
this.changeTime(btn.timeArr)
|
||||||
|
// this.queryParams.startTime = btn.timeArr ? btn.timeArr[0] : null;
|
||||||
|
// this.queryParams.endTime = btn.timeArr ? btn.timeArr[1] : null;
|
||||||
|
|
||||||
if (!btn.lineIds || !btn.timeArr.length) {
|
if (!btn.lineIds || !btn.timeArr) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '请选择产线和时间',
|
message: '请选择产线和时间',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
:table-data="tableData"
|
:table-data="tableData"
|
||||||
@emitFun="handleEmitFun"
|
@emitFun="handleEmitFun"
|
||||||
|
:max-height="tableH"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -45,6 +46,7 @@ export default {
|
|||||||
arr: [],
|
arr: [],
|
||||||
spanArr: [],
|
spanArr: [],
|
||||||
timeList: [],
|
timeList: [],
|
||||||
|
tableH: this.tableHeight(240),
|
||||||
tableData: [],
|
tableData: [],
|
||||||
tableProps: [],
|
tableProps: [],
|
||||||
spanInfo: {},
|
spanInfo: {},
|
||||||
@ -54,6 +56,9 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
window.addEventListener('resize', () => {
|
||||||
|
this.tableH = this.tableHeight(240)
|
||||||
|
})
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -148,6 +153,9 @@ export default {
|
|||||||
lineData['spec'] = Array.from(new Set(specs)).join(',')
|
lineData['spec'] = Array.from(new Set(specs)).join(',')
|
||||||
this.tableData.push(lineData)
|
this.tableData.push(lineData)
|
||||||
})
|
})
|
||||||
|
this.tableData.forEach((item, index) => {
|
||||||
|
item._index = index + 1
|
||||||
|
})
|
||||||
console.log('打印', this.tableData)
|
console.log('打印', this.tableData)
|
||||||
// this.setRowSpan(sectionArr)
|
// this.setRowSpan(sectionArr)
|
||||||
// console.log('工段名称列表', sectionArr)
|
// console.log('工段名称列表', sectionArr)
|
||||||
@ -176,22 +184,26 @@ export default {
|
|||||||
console.log('看看数据', res)
|
console.log('看看数据', res)
|
||||||
this.ResData = res.data
|
this.ResData = res.data
|
||||||
this.arr = [
|
this.arr = [
|
||||||
|
{
|
||||||
|
prop: '_index',
|
||||||
|
label: '序号'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'proLineName',
|
prop: 'proLineName',
|
||||||
label: '生产线',
|
label: '生产线',
|
||||||
fixed: 'left',
|
// fixed: 'left',
|
||||||
'show-overflow-tooltip': true
|
'show-overflow-tooltip': true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderName',
|
prop: 'workOrderName',
|
||||||
label: '当前工单',
|
label: '当前工单',
|
||||||
fixed: 'left',
|
// fixed: 'left',
|
||||||
'show-overflow-tooltip': true
|
'show-overflow-tooltip': true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'spec',
|
prop: 'spec',
|
||||||
label: '产品规格',
|
label: '产品规格',
|
||||||
fixed: 'left',
|
// fixed: 'left',
|
||||||
'show-overflow-tooltip': true
|
'show-overflow-tooltip': true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -30,6 +30,7 @@ import {
|
|||||||
} from '@/api/cost/costEneryAutoReport';
|
} from '@/api/cost/costEneryAutoReport';
|
||||||
import { getEnergyTypeListAll } from '@/api/base/energyType';
|
import { getEnergyTypeListAll } from '@/api/base/energyType';
|
||||||
import { publicFormatter } from '@/utils/dict';
|
import { publicFormatter } from '@/utils/dict';
|
||||||
|
import moment from 'moment';
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
@ -135,15 +136,23 @@ export default {
|
|||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 10;
|
||||||
this.listQuery.energyTypeId = val.energyTypeId;
|
this.listQuery.energyTypeId = val.energyTypeId;
|
||||||
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime
|
||||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
? moment(val.searchTime[0]).startOf('day').format('x')
|
||||||
|
: null;
|
||||||
|
this.listQuery.endTime = val.searchTime
|
||||||
|
? moment(val.searchTime[1]).endOf('day').format('x')
|
||||||
|
: null;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
const data = {
|
const data = {
|
||||||
energyTypeId:val.energyTypeId,
|
energyTypeId:val.energyTypeId,
|
||||||
startTime : val.searchTime ? val.searchTime[0] : null,
|
startTime : val.searchTime
|
||||||
endTime : val.searchTime ? val.searchTime[1] : null,
|
? moment(val.searchTime[0]).startOf('day').format('x')
|
||||||
|
: null,
|
||||||
|
endTime : val.searchTime
|
||||||
|
? moment(val.searchTime[1]).endOf('day').format('x')
|
||||||
|
: null,
|
||||||
}
|
}
|
||||||
this.handleExport(data);
|
this.handleExport(data);
|
||||||
break;
|
break;
|
||||||
|
@ -111,6 +111,7 @@ export default {
|
|||||||
startPlaceholder: '开始时间',
|
startPlaceholder: '开始时间',
|
||||||
endPlaceholder: '结束时间',
|
endPlaceholder: '结束时间',
|
||||||
param: 'searchTime',
|
param: 'searchTime',
|
||||||
|
defaultSelect: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@ -132,6 +133,14 @@ export default {
|
|||||||
},
|
},
|
||||||
components: {},
|
components: {},
|
||||||
created() {
|
created() {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||||
|
this.formConfig[2].defaultSelect = [start, end];
|
||||||
|
this.listQuery.reportTime = [
|
||||||
|
moment(start).startOf('day').format('x'),
|
||||||
|
moment(end).endOf('day').format('x'),
|
||||||
|
];
|
||||||
getEnergyTypeListAll().then((response) => {
|
getEnergyTypeListAll().then((response) => {
|
||||||
this.formConfig[1].selectOptions = response.data;
|
this.formConfig[1].selectOptions = response.data;
|
||||||
});
|
});
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 13:52:10
|
* @Date: 2023-08-01 13:52:10
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-02-19 09:36:50
|
* @LastEditTime: 2024-03-21 15:59:26
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
v-for="item in urlOptions.dictList.dict0"
|
v-for="item in urlOptions.dictList.dict0"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"></el-option>
|
:value="parseInt(item.value)"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -79,10 +79,9 @@ const tableProps = [
|
|||||||
align: 'right',
|
align: 'right',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'enabledTime',
|
prop: 'time',
|
||||||
label: '生效时间',
|
label: '生效时间',
|
||||||
filter: parseTime,
|
width: 235,
|
||||||
width: 150,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
|
@ -152,8 +152,12 @@ export default {
|
|||||||
case 'export':
|
case 'export':
|
||||||
this.listQuery.materialId = val.materialId;
|
this.listQuery.materialId = val.materialId;
|
||||||
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime
|
||||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
? moment(val.searchTime[0]).startOf('day').format('x')
|
||||||
|
: null;
|
||||||
|
this.listQuery.endTime = val.searchTime
|
||||||
|
? moment(val.searchTime[1]).endOf('day').format('x')
|
||||||
|
: null;
|
||||||
this.handleExport();
|
this.handleExport();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -110,6 +110,7 @@ export default {
|
|||||||
startPlaceholder: '开始时间',
|
startPlaceholder: '开始时间',
|
||||||
endPlaceholder: '结束时间',
|
endPlaceholder: '结束时间',
|
||||||
param: 'searchTime',
|
param: 'searchTime',
|
||||||
|
defaultSelect: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@ -131,6 +132,14 @@ export default {
|
|||||||
},
|
},
|
||||||
components: {},
|
components: {},
|
||||||
created() {
|
created() {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||||
|
this.formConfig[2].defaultSelect = [start, end];
|
||||||
|
this.listQuery.times = [
|
||||||
|
moment(start).startOf('day').format('x'),
|
||||||
|
moment(end).endOf('day').format('x'),
|
||||||
|
];
|
||||||
getHotMaterialList().then((response) => {
|
getHotMaterialList().then((response) => {
|
||||||
this.formConfig[1].selectOptions = response.data;
|
this.formConfig[1].selectOptions = response.data;
|
||||||
});
|
});
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div id="analysischartLine" style="width: 100%;height: 100%;"></div>
|
||||||
id="analysischartLine"
|
|
||||||
style="width: 100%;height: 100%;"
|
|
||||||
></div>
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import * as echarts from 'echarts'
|
import * as echarts from 'echarts'
|
||||||
@ -60,7 +57,6 @@ export default {
|
|||||||
let obj = {
|
let obj = {
|
||||||
name: '',
|
name: '',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
stack: 'Total',
|
|
||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
obj.name = keys[k]
|
obj.name = keys[k]
|
||||||
|
@ -4,38 +4,23 @@
|
|||||||
<el-col :span='12'>
|
<el-col :span='12'>
|
||||||
<el-form-item label="能源类型" prop="energyTypeId">
|
<el-form-item label="能源类型" prop="energyTypeId">
|
||||||
<el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" filterable>
|
<el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" filterable>
|
||||||
<el-option
|
<el-option v-for="item in this.energyTypeList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
v-for="item in this.energyTypeList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='12'>
|
<el-col :span='12'>
|
||||||
<el-form-item label="抄表日期" prop="recordTime">
|
<el-form-item label="抄表日期" prop="recordTime">
|
||||||
<el-date-picker
|
<el-date-picker v-model="form.recordTime" type="date" format="yyyy-MM-dd" value-format="timestamp"
|
||||||
v-model="form.recordTime"
|
placeholder="选择日期" style="width: 100%;">
|
||||||
type="date"
|
|
||||||
format="yyyy-MM-dd"
|
|
||||||
value-format="timestamp"
|
|
||||||
placeholder="选择日期"
|
|
||||||
style="width: 100%;">
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span='24'>
|
<el-col :span='24'>
|
||||||
<base-table
|
<base-table border :table-props="tableProps" :table-data="tableData" :add-button-show="addButtonShow"
|
||||||
border
|
@emitFun="inputChange" @emitButtonClick="emitButtonClick" />
|
||||||
:table-props="tableProps"
|
|
||||||
:table-data="tableData"
|
|
||||||
:add-button-show="addButtonShow"
|
|
||||||
@emitFun="inputChange"
|
|
||||||
@emitButtonClick="emitButtonClick"
|
|
||||||
/>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -48,12 +33,12 @@ import SelectArea from './SelectArea'
|
|||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'tableName',
|
prop: 'tableName',
|
||||||
label: '表名',
|
label: '表名*',
|
||||||
subcomponent: SelectArea
|
subcomponent: SelectArea
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'readingQuantity',
|
prop: 'readingQuantity',
|
||||||
label: '抄表数',
|
label: '抄表数*',
|
||||||
subcomponent: InputArea
|
subcomponent: InputArea
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -2,44 +2,20 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-bar
|
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||||
:formConfigs="formConfig"
|
|
||||||
ref="searchBarForm"
|
|
||||||
@headBtnClick="buttonClick"
|
|
||||||
/>
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table
|
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
||||||
:page="queryParams.pageNo"
|
:max-height="tableH" @selection-change="selectChange">
|
||||||
:limit="queryParams.pageSize"
|
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
||||||
:table-props="tableProps"
|
@clickBtn="handleClick" />
|
||||||
:table-data="list"
|
|
||||||
:max-height="tableH"
|
|
||||||
@selection-change="selectChange"
|
|
||||||
>
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="120"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick"
|
|
||||||
/>
|
|
||||||
</base-table>
|
</base-table>
|
||||||
<pagination
|
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
||||||
:page.sync="queryParams.pageNo"
|
@pagination="getList" />
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
:total="total"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<base-dialog
|
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="centervisible" @cancel="handleCancel"
|
||||||
:dialogTitle="addOrEditTitle"
|
@confirm="handleConfirm" :before-close="handleCancel">
|
||||||
:dialogVisible="centervisible"
|
<energy-quantity-manual-add ref="energyQuantityManualAdd" :energyTypeList="energyTypeList"
|
||||||
@cancel="handleCancel"
|
@successSubmit="successSubmit" />
|
||||||
@confirm="handleConfirm"
|
|
||||||
:before-close="handleCancel"
|
|
||||||
>
|
|
||||||
<energy-quantity-manual-add ref="energyQuantityManualAdd" :energyTypeList="energyTypeList" @successSubmit="successSubmit" />
|
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -68,7 +44,7 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'tableName',
|
prop: 'tableName',
|
||||||
label: '水/气表名',
|
label: '能源表名',
|
||||||
filter: publicFormatter('table_name'),
|
filter: publicFormatter('table_name'),
|
||||||
minWidth: 110
|
minWidth: 110
|
||||||
},
|
},
|
||||||
@ -209,7 +185,7 @@ export default {
|
|||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
this.$modal.confirm('是否确认导出').then(() => {
|
this.$modal.confirm('是否确认导出').then(() => {
|
||||||
return energyQuantityManualExport({...this.queryParams});
|
return energyQuantityManualExport({ energyTypeId: this.queryParams.energyTypeId, recordTime: this.queryParams.recordTime });
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.$download.excel(response, '能源报表.xls');
|
this.$download.excel(response, '能源报表.xls');
|
||||||
}).catch(() => { })
|
}).catch(() => { })
|
||||||
|
@ -2,27 +2,12 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-bar
|
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||||
:formConfigs="formConfig"
|
|
||||||
ref="searchBarForm"
|
|
||||||
@headBtnClick="buttonClick"
|
|
||||||
/>
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table
|
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
||||||
:page="queryParams.pageNo"
|
:selectWidth="55" :max-height="tableH" @selection-change="selectChange" />
|
||||||
:limit="queryParams.pageSize"
|
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
||||||
:table-props="tableProps"
|
@pagination="getList" />
|
||||||
:table-data="list"
|
|
||||||
:selectWidth="55"
|
|
||||||
:max-height="tableH"
|
|
||||||
@selection-change="selectChange"
|
|
||||||
/>
|
|
||||||
<pagination
|
|
||||||
:page.sync="queryParams.pageNo"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
:total="total"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -71,7 +56,8 @@ export default {
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
label: '能源类型',
|
label: '能源类型',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'energyTypeId'
|
param: 'energyTypeId',
|
||||||
|
filterable: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
|
@ -16,10 +16,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="单位" prop="unit">
|
<el-form-item label="单位" prop="unit">
|
||||||
<el-select v-model="form.unit" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.unit" placeholder="请选择" style="width: 100%;">
|
||||||
<el-option
|
<el-option v-for="item in getDictDatas(DICT_TYPE.ENERGY_UNIT)" :key="item.value" :label="item.label"
|
||||||
v-for="item in getDictDatas(DICT_TYPE.ENERGY_UNIT)"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -38,7 +35,8 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12" v-show="form.pricingMethod === 2">
|
<el-col :span="12" v-show="form.pricingMethod === 2">
|
||||||
<el-form-item label="单价(元)" prop="pricingMethod">
|
<el-form-item label="单价(元)" prop="pricingMethod">
|
||||||
<el-input-number v-model="form.singlePrice" :precision="2" :min="0" :max="999999999" style="width: 100%;"></el-input-number>
|
<el-input-number v-model="form.singlePrice" :precision="2" :min="0" :max="999999999"
|
||||||
|
style="width: 100%;"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-show="form.pricingMethod === 1">
|
<el-col :span="12" v-show="form.pricingMethod === 1">
|
||||||
@ -51,43 +49,19 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" v-show="form.pricingMethod === 0">
|
<el-col :span="24" v-show="form.pricingMethod === 0">
|
||||||
<el-form-item label="时间段" prop="pricingMethod">
|
<el-form-item label="时间段" prop="pricingMethod">
|
||||||
<base-table
|
<base-table :key='timeKye' :table-props="tableProps1" :table-data="tableData1"
|
||||||
:key='timeKye'
|
:add-button-show="addButtonShow" @emitButtonClick="emitButtonClick1" @emitFun="inputChange1">
|
||||||
:table-props="tableProps1"
|
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
||||||
:table-data="tableData1"
|
@clickBtn="handleClick1" />
|
||||||
:add-button-show="addButtonShow"
|
|
||||||
@emitButtonClick="emitButtonClick1"
|
|
||||||
@emitFun="inputChange1"
|
|
||||||
>
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="80"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick1"
|
|
||||||
/>
|
|
||||||
</base-table>
|
</base-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" v-show="form.pricingMethod === 1">
|
<el-col :span="24" v-show="form.pricingMethod === 1">
|
||||||
<el-form-item label="使用量" prop="pricingMethod">
|
<el-form-item label="使用量" prop="pricingMethod">
|
||||||
<base-table
|
<base-table :key='usedKye' :table-props="tableProps2" :table-data="tableData2"
|
||||||
:key='usedKye'
|
:add-button-show="addButtonShow" @emitButtonClick="emitButtonClick2" @emitFun="inputChange2">
|
||||||
:table-props="tableProps2"
|
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
||||||
:table-data="tableData2"
|
@clickBtn="handleClick2" />
|
||||||
:add-button-show="addButtonShow"
|
|
||||||
@emitButtonClick="emitButtonClick2"
|
|
||||||
@emitFun="inputChange2"
|
|
||||||
>
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="80"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick2"
|
|
||||||
/>
|
|
||||||
</base-table>
|
</base-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -153,9 +127,11 @@ export default {
|
|||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
unit: '',
|
unit: '',
|
||||||
|
singlePrice: 0,
|
||||||
pricingMethod: 2,
|
pricingMethod: 2,
|
||||||
leaderName: '',
|
dim: '',
|
||||||
push: false
|
push: false,
|
||||||
|
description: ''
|
||||||
},
|
},
|
||||||
isEdit: false, //是否是编辑
|
isEdit: false, //是否是编辑
|
||||||
rules: {
|
rules: {
|
||||||
@ -188,16 +164,18 @@ export default {
|
|||||||
this.form.code = res.data.code
|
this.form.code = res.data.code
|
||||||
this.form.unit = res.data.unit
|
this.form.unit = res.data.unit
|
||||||
this.form.pricingMethod = res.data.pricingMethod
|
this.form.pricingMethod = res.data.pricingMethod
|
||||||
this.form.leaderName = res.data.leaderName
|
|
||||||
this.form.push = res.data.push ? true : false
|
this.form.push = res.data.push ? true : false
|
||||||
|
this.form.description = res.data.description
|
||||||
switch (this.form.pricingMethod) {
|
switch (this.form.pricingMethod) {
|
||||||
case 0:
|
case 0:
|
||||||
this.tableData1 = res.data.segPriceList || []
|
this.tableData1 = res.data.segPriceList || []
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
this.tableData2 = res.data.usedPriceList || []
|
this.tableData2 = res.data.usedPriceList || []
|
||||||
|
this.form.dim = res.data.dim
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
this.form.singlePrice = res.data.singlePrice || 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -2,40 +2,22 @@
|
|||||||
<div class="app-container energyOverlimitLog">
|
<div class="app-container energyOverlimitLog">
|
||||||
|
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-bar
|
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||||
:formConfigs="formConfig"
|
|
||||||
ref="searchBarForm"
|
|
||||||
@headBtnClick="buttonClick"
|
|
||||||
/>
|
|
||||||
<el-tabs v-model="activeName" @tab-click="toggleTab">
|
<el-tabs v-model="activeName" @tab-click="toggleTab">
|
||||||
<el-tab-pane label="自动抄表" name="auto"></el-tab-pane>
|
<el-tab-pane label="自动抄表" name="auto"></el-tab-pane>
|
||||||
<el-tab-pane label="手动抄表" name="manual"></el-tab-pane>
|
<el-tab-pane label="手动抄表" name="manual"></el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<div v-if="activeName === 'auto'">
|
<div v-if="activeName === 'auto'">
|
||||||
<base-table
|
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
||||||
:page="queryParams.pageNo"
|
:max-height="tableH" />
|
||||||
:limit="queryParams.pageSize"
|
|
||||||
:table-props="tableProps"
|
|
||||||
:table-data="list"
|
|
||||||
:max-height="tableH"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-if="activeName === 'manual'">
|
<div v-if="activeName === 'manual'">
|
||||||
<base-table
|
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps2"
|
||||||
:page="queryParams.pageNo"
|
:table-data="list2" :max-height="tableH" />
|
||||||
:limit="queryParams.pageSize"
|
|
||||||
:table-props="tableProps2"
|
|
||||||
:table-data="list2"
|
|
||||||
:max-height="tableH"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<pagination
|
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
||||||
:page.sync="queryParams.pageNo"
|
@pagination="getList" />
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
:total="total"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -199,7 +181,13 @@ export default {
|
|||||||
item.limitValue = ''
|
item.limitValue = ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if (this.queryParams.method === '1') {
|
||||||
this.list = arr
|
this.list = arr
|
||||||
|
this.list2 = []
|
||||||
|
} else {
|
||||||
|
this.list2 = arr
|
||||||
|
this.list1 = []
|
||||||
|
}
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -232,21 +220,27 @@ export default {
|
|||||||
height: 2px;
|
height: 2px;
|
||||||
background-color: #e4e7ed;
|
background-color: #e4e7ed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-tabs__nav-wrap::after {
|
.el-tabs__nav-wrap::after {
|
||||||
width: 0;
|
width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-tabs__item {
|
.el-tabs__item {
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-tabs__item:hover {
|
.el-tabs__item:hover {
|
||||||
color: rgba(0, 0, 0, 0.85);
|
color: rgba(0, 0, 0, 0.85);
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-tabs__item.is-active {
|
.el-tabs__item.is-active {
|
||||||
color: rgba(0, 0, 0, 0.85);
|
color: rgba(0, 0, 0, 0.85);
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-tabs__item {
|
.el-tabs__item {
|
||||||
color: rgba(0, 0, 0, 0.45);
|
color: rgba(0, 0, 0, 0.45);
|
||||||
}
|
}
|
||||||
|
|
||||||
.searchBarBox {
|
.searchBarBox {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
@ -35,20 +35,20 @@ import {
|
|||||||
} from '@/api/equipment/analysis/statistics';
|
} from '@/api/equipment/analysis/statistics';
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
// {
|
||||||
prop: 'recordTime',
|
// prop: 'recordTime',
|
||||||
label: '时间段',
|
// label: '时间段',
|
||||||
filter: (val) => {
|
// filter: (val) => {
|
||||||
if (val && val.length > 0) {
|
// if (val && val.length > 0) {
|
||||||
return (
|
// return (
|
||||||
moment(val[0]).format('YYYY-MM-DD HH:mm:ss') +
|
// moment(val[0]).format('YYYY-MM-DD HH:mm:ss') +
|
||||||
' ~ ' +
|
// ' ~ ' +
|
||||||
moment(val[1]).format('YYYY-MM-DD HH:mm:ss')
|
// moment(val[1]).format('YYYY-MM-DD HH:mm:ss')
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
return '-';
|
// return '-';
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: 'lineName',
|
prop: 'lineName',
|
||||||
label: '产线',
|
label: '产线',
|
||||||
@ -158,7 +158,7 @@ export default {
|
|||||||
: '',
|
: '',
|
||||||
btnName: '导出',
|
btnName: '导出',
|
||||||
name: 'export',
|
name: 'export',
|
||||||
color: 'warning',
|
color: 'primary',
|
||||||
plain: true,
|
plain: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -104,24 +104,24 @@ export default {
|
|||||||
{ name: '故障时长', value: 580 },
|
{ name: '故障时长', value: 580 },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
// 内环
|
// // 内环
|
||||||
name: '',
|
// name: '',
|
||||||
type: 'pie',
|
// type: 'pie',
|
||||||
center: ['50%', '48%'],
|
// center: ['50%', '48%'],
|
||||||
radius: ['60%', '75%'],
|
// radius: ['60%', '75%'],
|
||||||
itemStyle: {
|
// itemStyle: {
|
||||||
borderRadius: 10,
|
// borderRadius: 10,
|
||||||
},
|
// },
|
||||||
label: {
|
// label: {
|
||||||
show: false,
|
// show: false,
|
||||||
},
|
// },
|
||||||
data: [
|
// data: [
|
||||||
//<=========
|
// //<=========
|
||||||
{ name: '总', value: 3000 },
|
// { name: '总', value: 3000 },
|
||||||
{ name: '', value: 1400 },
|
// { name: '', value: 1400 },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// name: this.value.equipmentName || 'Default',
|
// name: this.value.equipmentName || 'Default',
|
||||||
// type: 'pie',
|
// type: 'pie',
|
||||||
@ -195,22 +195,22 @@ export default {
|
|||||||
this.config.title.text = lineName;
|
this.config.title.text = lineName;
|
||||||
this.config.title.subtext = equipmentName;
|
this.config.title.subtext = equipmentName;
|
||||||
this.config.series[0].data = [
|
this.config.series[0].data = [
|
||||||
{ name: '工作时长', value: workTime },
|
{ name: '有效时长', value: workTime },
|
||||||
{ name: '停机时长', value: stopTime },
|
{ name: '关机时长', value: stopTime },
|
||||||
{ name: '故障时长', value: downTime },
|
{ name: '中断时长', value: downTime }
|
||||||
];
|
];
|
||||||
this.config.series[1].data = [
|
// this.config.series[1].data = [
|
||||||
{ name: '速度开动率', value: peEfficiency },
|
|
||||||
{ name: '', value: 100 },
|
|
||||||
// { name: '速度开动率', value: peEfficiency },
|
// { name: '速度开动率', value: peEfficiency },
|
||||||
// { name: '', value: Math.ceil(peEfficiency) - peEfficiency },
|
// // { name: '', value: 100 },
|
||||||
];
|
// // { name: '速度开动率', value: peEfficiency },
|
||||||
|
// // { name: '', value: Math.ceil(peEfficiency) - peEfficiency },
|
||||||
|
// ];
|
||||||
//
|
//
|
||||||
this.textData = {
|
this.textData = {
|
||||||
workTime: +workTime.toFixed(2),
|
workTime: +workTime?.toFixed(2),
|
||||||
stopTime: +stopTime.toFixed(2),
|
stopTime: +stopTime?.toFixed(2),
|
||||||
downTime: +downTime.toFixed(2),
|
downTime: +downTime?.toFixed(2),
|
||||||
peEfficiency: +peEfficiency.toFixed(2),
|
// peEfficiency: +peEfficiency?.toFixed(2),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
:page="queryParams.pageNo"
|
:page="queryParams.pageNo"
|
||||||
:limit="queryParams.pageSize"
|
:limit="queryParams.pageSize"
|
||||||
:table-data="list"
|
:table-data="list"
|
||||||
|
max-height="600"
|
||||||
@emitFun="handleEmitFun">
|
@emitFun="handleEmitFun">
|
||||||
<!-- <method-btn
|
<!-- <method-btn
|
||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
@ -93,17 +94,29 @@ export default {
|
|||||||
{ prop: 'downCount', label: '故障次数' },
|
{ prop: 'downCount', label: '故障次数' },
|
||||||
],
|
],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
|
// {
|
||||||
|
// type: 'select',
|
||||||
|
// label: '请选择月份',
|
||||||
|
// placeholder: '请选择月份',
|
||||||
|
// param: 'month',
|
||||||
|
// selectOptions: Array(12)
|
||||||
|
// .fill(0)
|
||||||
|
// .map((v, i) => ({
|
||||||
|
// id: i + 1,
|
||||||
|
// name: `${i + 1}月`,
|
||||||
|
// })),
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'datePicker',
|
||||||
label: '请选择月份',
|
label: '时间',
|
||||||
placeholder: '请选择月份',
|
dateType: 'month',
|
||||||
|
format: 'yyyy-MM',
|
||||||
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
|
rangeSeparator: '-',
|
||||||
|
startPlaceholder: '开始时间',
|
||||||
|
endPlaceholder: '结束时间',
|
||||||
|
width: 240,
|
||||||
param: 'month',
|
param: 'month',
|
||||||
selectOptions: Array(12)
|
|
||||||
.fill(0)
|
|
||||||
.map((v, i) => ({
|
|
||||||
id: i + 1,
|
|
||||||
name: `${i + 1}月`,
|
|
||||||
})),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__index: 'line',
|
__index: 'line',
|
||||||
@ -111,6 +124,7 @@ export default {
|
|||||||
label: '产线',
|
label: '产线',
|
||||||
placeholder: '请选择产线',
|
placeholder: '请选择产线',
|
||||||
param: 'lineId',
|
param: 'lineId',
|
||||||
|
filterable: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@ -164,7 +178,13 @@ export default {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
this.list = data;
|
this.list = data.map(item => {
|
||||||
|
item.mtbf = item.mtbf?.toFixed(2)
|
||||||
|
item.mttr = item.mttr?.toFixed(2)
|
||||||
|
item.workTime = item.workTime?.toFixed(2)
|
||||||
|
item.downTime = item.downTime?.toFixed(2)
|
||||||
|
return item
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
this.list.splice(0);
|
this.list.splice(0);
|
||||||
}
|
}
|
||||||
@ -174,12 +194,14 @@ export default {
|
|||||||
switch (btn.btnName) {
|
switch (btn.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
if (btn.month) {
|
if (btn.month) {
|
||||||
this.queryParams.recordTime = [
|
// this.queryParams.recordTime = [
|
||||||
moment()
|
// moment()
|
||||||
.month(btn.month - 1)
|
// .month(btn.month - 1)
|
||||||
.format('YYYY-MM') + '-01 00:00:00',
|
// .format('YYYY-MM') + '-01 00:00:00',
|
||||||
moment().month(btn.month).format('YYYY-MM') + '-01 00:00:00',
|
// moment().month(btn.month).format('YYYY-MM') + '-01 00:00:00',
|
||||||
];
|
// ];
|
||||||
|
this.queryParams.recordTime = [btn.month, moment().month(new Date(btn.month).getMonth() + 1).format('YYYY-MM') + '-01 00:00:00']
|
||||||
|
console.log(btn.month, moment().month(new Date(btn.month).getMonth() + 1).format('YYYY-MM') + '-01 00:00:00')
|
||||||
} else {
|
} else {
|
||||||
this.queryParams.recordTime = null;
|
this.queryParams.recordTime = null;
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
:page="queryParams.pageNo"
|
:page="queryParams.pageNo"
|
||||||
:limit="queryParams.pageSize"
|
:limit="queryParams.pageSize"
|
||||||
:table-data="list"
|
:table-data="list"
|
||||||
@emitFun="handleEmitFun"></base-table>
|
@emitFun="handleEmitFun"
|
||||||
|
:max-height="tableH"></base-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="'\u3000柱状图\u3000'" name="graph">
|
<el-tab-pane :label="'\u3000柱状图\u3000'" name="graph">
|
||||||
<div
|
<div
|
||||||
@ -57,6 +58,7 @@ export default {
|
|||||||
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
|
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
tableH: this.tableHeight(260),
|
||||||
urls: {
|
urls: {
|
||||||
page: '/analysis/equipment-analysis/quality',
|
page: '/analysis/equipment-analysis/quality',
|
||||||
},
|
},
|
||||||
@ -155,12 +157,12 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
// width: 160,
|
// width: 160,
|
||||||
prop: 'inQuantity',
|
prop: 'totalQuantity',
|
||||||
label: '加工数量',
|
label: '加工数量',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// width: 160,
|
// width: 160,
|
||||||
prop: 'outQuantity',
|
prop: 'okQuantity',
|
||||||
label: '合格数量',
|
label: '合格数量',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -252,6 +254,9 @@ export default {
|
|||||||
this.fillProductOptions();
|
this.fillProductOptions();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
window.addEventListener('resize', () => {
|
||||||
|
this.tableH = this.tableHeight(260)
|
||||||
|
})
|
||||||
this.$refs['search-bar'].headBtnClick('search');
|
this.$refs['search-bar'].headBtnClick('search');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
import SmallTitle from './SmallTitle';
|
import SmallTitle from './SmallTitle';
|
||||||
import { getworkerAll } from '@/api/base/materialUseLog';
|
import { getworkerAll } from '@/api/base/materialUseLog';
|
||||||
import Editor from '@/components/Editor';
|
import Editor from '@/components/Editor';
|
||||||
import DialogForm from '@/components/DialogForm';
|
import DialogForm from './DialogForm';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AlarmHandle',
|
name: 'AlarmHandle',
|
||||||
|
520
src/views/equipment/base/alarm/Record/DialogForm.vue
Normal file
520
src/views/equipment/base/alarm/Record/DialogForm.vue
Normal file
@ -0,0 +1,520 @@
|
|||||||
|
<!--
|
||||||
|
filename: dialogForm.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-08-15 10:32:36
|
||||||
|
description: 弹窗的表单组件
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
:label-width="`${labelWidth}px`"
|
||||||
|
:size="size"
|
||||||
|
:label-position="labelPosition"
|
||||||
|
v-loading="formLoading">
|
||||||
|
<el-row :gutter="20" v-for="(row, rindex) in rows" :key="rindex">
|
||||||
|
<el-col v-for="col in row" :key="col.label" :span="24 / row.length">
|
||||||
|
<el-form-item :label="col.label" :prop="col.prop" :rules="col.rules">
|
||||||
|
<el-input
|
||||||
|
v-if="col.input"
|
||||||
|
v-model="form[col.prop]"
|
||||||
|
@change="$emit('update', form)"
|
||||||
|
:placeholder="`请输入${col.label}`"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-bind="col.bind" />
|
||||||
|
<el-input
|
||||||
|
v-if="col.textarea"
|
||||||
|
type="textarea"
|
||||||
|
v-model="form[col.prop]"
|
||||||
|
:disabled="disabled"
|
||||||
|
@change="$emit('update', form)"
|
||||||
|
:placeholder="`请输入${col.label}`"
|
||||||
|
v-bind="col.bind" />
|
||||||
|
<el-select
|
||||||
|
v-if="col.select"
|
||||||
|
v-model="form[col.prop]"
|
||||||
|
:placeholder="`请选择${col.label}`"
|
||||||
|
:disabled="disabled"
|
||||||
|
@change="$emit('update', form)"
|
||||||
|
v-bind="col.bind">
|
||||||
|
<el-option
|
||||||
|
v-for="opt in optionListOf[col.prop]"
|
||||||
|
:key="opt.value"
|
||||||
|
:label="opt.label"
|
||||||
|
:value="opt.value" />
|
||||||
|
</el-select>
|
||||||
|
<el-date-picker
|
||||||
|
v-if="col.datetime"
|
||||||
|
v-model="form[col.prop]"
|
||||||
|
type="datetime"
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="`请选择${col.label}`"
|
||||||
|
value-format="timestamp"
|
||||||
|
@change="$emit('update', form)"
|
||||||
|
v-bind="col.bind"></el-date-picker>
|
||||||
|
<el-switch
|
||||||
|
v-if="col.switch"
|
||||||
|
v-model="form[col.prop]"
|
||||||
|
:disabled="disabled"
|
||||||
|
active-color="#0b58ff"
|
||||||
|
inactive-color="#e1e1e1"
|
||||||
|
@change="$emit('update', form)"
|
||||||
|
v-bind="col.bind"></el-switch>
|
||||||
|
<component
|
||||||
|
v-if="col.subcomponent"
|
||||||
|
:key="col.key"
|
||||||
|
:disabled="disabled"
|
||||||
|
:read-only="disabled"
|
||||||
|
:is="col.subcomponent"
|
||||||
|
v-model="form[col.prop]"
|
||||||
|
:inlineStyle="col.style"
|
||||||
|
@on-change="$emit('update', form)"
|
||||||
|
v-bind="col.bind"></component>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="upload-area"
|
||||||
|
:class="uploadOpen ? '' : 'height-48'"
|
||||||
|
ref="uploadArea"
|
||||||
|
:key="col.prop"
|
||||||
|
v-if="col.upload">
|
||||||
|
<span class="close-icon" :class="uploadOpen ? 'open' : ''">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-arrow-right"
|
||||||
|
@click="handleFilesOpen" />
|
||||||
|
</span>
|
||||||
|
<!-- :file-list="uploadedFileList" -->
|
||||||
|
<el-upload
|
||||||
|
v-if="col.upload"
|
||||||
|
class="upload-in-dialog"
|
||||||
|
:key="col.prop + '__el-upload'"
|
||||||
|
:action="uploadUrl"
|
||||||
|
:headers="uploadHeaders"
|
||||||
|
:show-file-list="false"
|
||||||
|
icon="el-icon-upload2"
|
||||||
|
:disabled="disabled"
|
||||||
|
:before-upload="beforeUpload"
|
||||||
|
:on-success="
|
||||||
|
(response, file, fileList) => {
|
||||||
|
handleUploadSuccess(response, file, col.prop);
|
||||||
|
}
|
||||||
|
"
|
||||||
|
v-bind="col.bind">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
:disabled="disabled || col.bind?.disabled || false">
|
||||||
|
<svg-icon
|
||||||
|
icon-class="icon-upload"
|
||||||
|
style="color: inherit"></svg-icon>
|
||||||
|
上传文件
|
||||||
|
</el-button>
|
||||||
|
<div class="el-upload__tip" slot="tip" v-if="col.uploadTips">
|
||||||
|
{{ col.uploadTips || '只能上传jpg/png文件, 大小不超过2MB' }}
|
||||||
|
</div>
|
||||||
|
</el-upload>
|
||||||
|
|
||||||
|
<uploadedFile
|
||||||
|
class="file"
|
||||||
|
v-for="file in form[col.prop]"
|
||||||
|
:file="file"
|
||||||
|
:key="file.fileUrl"
|
||||||
|
:disabled="disabled"
|
||||||
|
@delete="!disabled && handleDeleteFile(file, col.prop)" />
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAccessToken } from '@/utils/auth';
|
||||||
|
import tupleImg from '@/assets/images/tuple.png';
|
||||||
|
import cache from '@/utils/cache';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 找到最长的label
|
||||||
|
* @param {*} options
|
||||||
|
*/
|
||||||
|
function findMaxLabelWidth(rows) {
|
||||||
|
let max = 0;
|
||||||
|
rows.forEach((row) => {
|
||||||
|
row.forEach((opt) => {
|
||||||
|
// debugger;
|
||||||
|
if (!opt.label) return 0;
|
||||||
|
if (opt.label.length > max) {
|
||||||
|
max = opt.label.length;
|
||||||
|
if (opt.label.includes('(')) {
|
||||||
|
max = max - 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return max;
|
||||||
|
}
|
||||||
|
|
||||||
|
const uploadedFile = {
|
||||||
|
name: 'UploadedFile',
|
||||||
|
props: ['file', 'disabled'],
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleDelete() {
|
||||||
|
this.$emit('delete', this.file);
|
||||||
|
},
|
||||||
|
async handleDownload() {
|
||||||
|
const data = await this.$axios({
|
||||||
|
url: this.file.fileUrl,
|
||||||
|
method: 'get',
|
||||||
|
responseType: 'blob',
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.$message.success('开始下载');
|
||||||
|
// create download link
|
||||||
|
const url = window.URL.createObjectURL(data);
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = url;
|
||||||
|
link.download = this.file.fileName;
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
document.body.removeChild(link);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
render: function (h) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
title={this.file.fileName}
|
||||||
|
onClick={this.handleDownload}
|
||||||
|
style={{
|
||||||
|
background: `url(${tupleImg}) no-repeat`,
|
||||||
|
backgroundSize: '14px',
|
||||||
|
backgroundPosition: '0 55%',
|
||||||
|
paddingLeft: '20px',
|
||||||
|
paddingRight: '24px',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
overflow: 'hidden',
|
||||||
|
cursor: 'pointer',
|
||||||
|
display: 'inline-block',
|
||||||
|
}}>
|
||||||
|
{this.file.fileName}
|
||||||
|
{!this.disabled && (
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-close"
|
||||||
|
style="float: right; position: relative; top: 2px; left: 8px; z-index: 100"
|
||||||
|
class="dialog__upload_component__close"
|
||||||
|
onClick={this.handleDelete}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'DialogForm',
|
||||||
|
model: {
|
||||||
|
prop: 'dataForm',
|
||||||
|
event: 'update',
|
||||||
|
},
|
||||||
|
emits: ['update'],
|
||||||
|
components: { uploadedFile },
|
||||||
|
props: {
|
||||||
|
rows: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
dataForm: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
hasFiles: {
|
||||||
|
type: Boolean | Array,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
labelPosition: {
|
||||||
|
type: String,
|
||||||
|
default: 'right',
|
||||||
|
},
|
||||||
|
size: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
uploadOpen: false,
|
||||||
|
form: {},
|
||||||
|
formLoading: true,
|
||||||
|
optionListOf: {},
|
||||||
|
uploadedFileList: [],
|
||||||
|
dataLoaded: false,
|
||||||
|
uploadHeaders: { Authorization: 'Bearer ' + getAccessToken() },
|
||||||
|
uploadUrl: process.env.VUE_APP_BASE_API + '/admin-api/infra/file/upload', // 上传有关的headers,url都是固定的
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
labelWidth() {
|
||||||
|
let max = findMaxLabelWidth(this.rows);
|
||||||
|
// 每个汉字占20px
|
||||||
|
return max * 20;
|
||||||
|
// return max * 20 + 'px';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
rows: {
|
||||||
|
handler() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.handleOptions('watch');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: false,
|
||||||
|
},
|
||||||
|
dataForm: {
|
||||||
|
handler(val) {
|
||||||
|
this.form = JSON.parse(JSON.stringify(val));
|
||||||
|
if (this.hasFiles) {
|
||||||
|
if (typeof this.hasFiles == 'boolean' && this.hasFiles) {
|
||||||
|
this.form.files = this.form.files ?? [];
|
||||||
|
} else if (Array.isArray(this.hasFiles)) {
|
||||||
|
this.hasFiles.forEach((prop) => {
|
||||||
|
this.form[prop] = this.form[prop] ?? [];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// 处理 options
|
||||||
|
this.handleOptions();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 模拟透传 ref */
|
||||||
|
validate(cb) {
|
||||||
|
return this.$refs.form.validate(cb);
|
||||||
|
},
|
||||||
|
resetFields(args) {
|
||||||
|
return this.$refs.form.resetFields(args);
|
||||||
|
},
|
||||||
|
// getCode
|
||||||
|
async getCode(url) {
|
||||||
|
const response = await this.$axios(url);
|
||||||
|
return response.data;
|
||||||
|
},
|
||||||
|
async handleOptions(trigger = 'monuted') {
|
||||||
|
console.log('[dialogForm:handleOptions]');
|
||||||
|
const promiseList = [];
|
||||||
|
this.rows.forEach((cols) => {
|
||||||
|
cols.forEach((opt) => {
|
||||||
|
if (opt.value && !this.form[opt.prop]) {
|
||||||
|
// 默认值
|
||||||
|
this.form[opt.prop] = opt.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (opt.options) {
|
||||||
|
this.$set(this.optionListOf, opt.prop, opt.options);
|
||||||
|
} else if (opt.url) {
|
||||||
|
// 如果有 depends,则暂时先不获取,注册一个watcher
|
||||||
|
if (opt.depends) {
|
||||||
|
this.$watch(
|
||||||
|
() => this.form[opt.depends],
|
||||||
|
(id) => {
|
||||||
|
console.log('<', opt.depends, '>', 'changed', id);
|
||||||
|
if (id == null) return;
|
||||||
|
// 清空原有选项
|
||||||
|
this.form[opt.prop] = null;
|
||||||
|
// 获取新的选项
|
||||||
|
this.$axios({
|
||||||
|
url: `${opt.url}?id=${id}`,
|
||||||
|
}).then((res) => {
|
||||||
|
this.$set(
|
||||||
|
this.optionListOf,
|
||||||
|
opt.prop,
|
||||||
|
res.data.map((item) => ({
|
||||||
|
label: item[opt.labelKey ?? 'name'],
|
||||||
|
value: item[opt.valueKey ?? 'id'],
|
||||||
|
}))
|
||||||
|
);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: false,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 如果是下拉框,或者新增模式下的输入框,才去请求
|
||||||
|
if (opt.select || (opt.input && !this.form?.id)) {
|
||||||
|
promiseList.push(async () => {
|
||||||
|
const response = await this.$axios(opt.url, {
|
||||||
|
method: opt.method ?? 'get',
|
||||||
|
// data: opt.method == 'post' ? opt.queryParams : null
|
||||||
|
});
|
||||||
|
// console.log('[dialogForm:handleOptions:response]', response);
|
||||||
|
if (opt.select) {
|
||||||
|
// 处理下拉框选项
|
||||||
|
const list =
|
||||||
|
'list' in response.data
|
||||||
|
? response.data.list
|
||||||
|
: response.data;
|
||||||
|
|
||||||
|
if (opt.cache) {
|
||||||
|
cache.store(opt.cache, list);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$set(
|
||||||
|
this.optionListOf,
|
||||||
|
opt.prop,
|
||||||
|
list.map((item) => ({
|
||||||
|
label: item[opt.labelKey ?? 'name'],
|
||||||
|
value: item[opt.valueKey ?? 'id'],
|
||||||
|
}))
|
||||||
|
);
|
||||||
|
} else if (opt.input) {
|
||||||
|
console.log('setting code: ', response.data);
|
||||||
|
// 处理输入框数据
|
||||||
|
this.form[opt.prop] = response.data;
|
||||||
|
// 更新下外部的 dataForm,防止code字段有数据也报空的bug
|
||||||
|
this.$emit('update', this.form);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('[dialogForm:handleOptions] done!');
|
||||||
|
|
||||||
|
// 如果是 watch 触发的,不需要执行进一步的请求
|
||||||
|
if (trigger == 'watch') {
|
||||||
|
this.formLoading = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
await Promise.all(promiseList.map((fn) => fn()));
|
||||||
|
this.formLoading = false;
|
||||||
|
this.dataLoaded = true;
|
||||||
|
// console.log("[dialogForm:handleOptions:optionListOf]", this.optionListOf)
|
||||||
|
} catch (error) {
|
||||||
|
console.log('[dialogForm:handleOptions:error]', error);
|
||||||
|
this.formLoading = false;
|
||||||
|
}
|
||||||
|
if (!promiseList.length) this.formLoading = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 上传成功的特殊处理
|
||||||
|
beforeUpload(file) {
|
||||||
|
const checkFileSize = () => {
|
||||||
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
|
if (!isLt2M) {
|
||||||
|
this.$modal.msgError('上传文件大小不能超过 2MB!');
|
||||||
|
}
|
||||||
|
return isLt2M;
|
||||||
|
};
|
||||||
|
const checkFileType = () => {
|
||||||
|
const isJPG =
|
||||||
|
file.type === 'image/jpeg' ||
|
||||||
|
file.type === 'image/png' ||
|
||||||
|
file.type === 'image/jpg';
|
||||||
|
return isJPG;
|
||||||
|
};
|
||||||
|
// return checkFileSize() && checkFileType();
|
||||||
|
return checkFileSize();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 上传前的验证规则可通过 bind 属性传入
|
||||||
|
handleUploadSuccess(response, file, prop) {
|
||||||
|
console.log('[handleUploadSuccess]', response, file, prop);
|
||||||
|
this.form[prop].push({
|
||||||
|
fileName: file.name,
|
||||||
|
fileUrl: response.data,
|
||||||
|
fileType: prop == 'files' ? 2 : 1,
|
||||||
|
});
|
||||||
|
this.$modal.msgSuccess('上传成功');
|
||||||
|
this.$emit('update', this.form);
|
||||||
|
},
|
||||||
|
|
||||||
|
getFileName(fileUrl) {
|
||||||
|
return fileUrl.split('/').pop();
|
||||||
|
},
|
||||||
|
|
||||||
|
handleFilesOpen() {
|
||||||
|
this.uploadOpen = !this.uploadOpen;
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDeleteFile(file, prop) {
|
||||||
|
this.form[prop] = this.form[prop].filter(
|
||||||
|
(item) => item.fileUrl != file.fileUrl
|
||||||
|
);
|
||||||
|
this.$emit('update', this.form);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.el-date-editor,
|
||||||
|
.el-select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-area {
|
||||||
|
// background: #ccc;
|
||||||
|
// display: grid;
|
||||||
|
// grid-auto-rows: 34px;
|
||||||
|
// grid-template-columns: repeat(6, minmax(32px, max-content));
|
||||||
|
// gap: 8px;
|
||||||
|
// align-items: center;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: height 0.3s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-in-dialog {
|
||||||
|
// display: inline-block;
|
||||||
|
margin-right: 24px;
|
||||||
|
// background: #ccc;
|
||||||
|
position: relative;
|
||||||
|
// top: -13px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-icon {
|
||||||
|
// background: #ccc;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 12px;
|
||||||
|
z-index: 100;
|
||||||
|
transition: transform 0.3s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-icon.open {
|
||||||
|
transform: rotateZ(90deg);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.dialog__upload_component__close {
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
.dialog__upload_component__close:hover {
|
||||||
|
/* color: #777; */
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.height-48 {
|
||||||
|
height: 35px !important;
|
||||||
|
}
|
||||||
|
</style>
|
@ -28,7 +28,7 @@
|
|||||||
<el-form-item
|
<el-form-item
|
||||||
label="报警级别"
|
label="报警级别"
|
||||||
prop="grade"
|
prop="grade"
|
||||||
:rules="[{ required: true, message: '报警级别不能为空', trigger: 'blur' }]">
|
:rules="[{ required: false, message: '报警级别不能为空', trigger: 'blur' }]">
|
||||||
<el-select
|
<el-select
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
v-model="dataForm.grade"
|
v-model="dataForm.grade"
|
||||||
|
@ -7,10 +7,11 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:visible="visible"
|
:visible.sync="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="false"
|
:wrapper-closable="true"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
|
:before-close="beforeClose"
|
||||||
custom-class="mes-drawer"
|
custom-class="mes-drawer"
|
||||||
:size="size || '50%'"
|
:size="size || '50%'"
|
||||||
@closed="$emit('destroy')">
|
@closed="$emit('destroy')">
|
||||||
@ -43,7 +44,51 @@
|
|||||||
:rows="formRows" /> -->
|
:rows="formRows" /> -->
|
||||||
|
|
||||||
<!-- <el-row v-if="mode.includes('detail')" style="margin-bottom: 24px"> -->
|
<!-- <el-row v-if="mode.includes('detail')" style="margin-bottom: 24px"> -->
|
||||||
<el-row style="margin-bottom: 24px">
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="dataForm"
|
||||||
|
label-width="100px"
|
||||||
|
v-loading="formLoading">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="设备"
|
||||||
|
prop="equipmentId"
|
||||||
|
:rules="[{ required: true, message: '设备不能为空', trigger: 'change' }]">
|
||||||
|
<el-select
|
||||||
|
:disabled="isdetail"
|
||||||
|
v-model="dataForm.equipmentId"
|
||||||
|
placeholder="请选择设备"
|
||||||
|
@change="$emit('update', dataForm)">
|
||||||
|
<el-option
|
||||||
|
v-for="opt in equipmentList"
|
||||||
|
:key="opt.id"
|
||||||
|
:label="opt.name"
|
||||||
|
:value="opt.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="报警分组"
|
||||||
|
prop="groupId"
|
||||||
|
:rules="[{ required: true, message: '报警分组不能为空', trigger: 'change' }]">
|
||||||
|
<el-select
|
||||||
|
:disabled="isdetail"
|
||||||
|
v-model="dataForm.groupId"
|
||||||
|
placeholder="请选择报警分组"
|
||||||
|
@change="$emit('update', dataForm)">
|
||||||
|
<el-option
|
||||||
|
v-for="opt in grouList"
|
||||||
|
:key="opt.id"
|
||||||
|
:label="opt.name"
|
||||||
|
:value="opt.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<!-- <el-row style="margin-bottom: 24px">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div
|
<div
|
||||||
class="title"
|
class="title"
|
||||||
@ -62,7 +107,7 @@
|
|||||||
{{ form.code }}
|
{{ form.code }}
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row> -->
|
||||||
<!-- <el-row v-else style="margin-bottom: 24px" :gutter="20">
|
<!-- <el-row v-else style="margin-bottom: 24px" :gutter="20">
|
||||||
<el-form ref="form" :model="form">
|
<el-form ref="form" :model="form">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -128,12 +173,11 @@
|
|||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div v-if="!mode.includes('detail')" class="drawer-body__footer">
|
||||||
<el-button style="" @click="handleCancel">取消</el-button>
|
<el-button style="" @click="handleCancel">取消</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="!mode.includes('detail')"
|
@click="handleSave">
|
||||||
@click="handleCancel">
|
|
||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -163,6 +207,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import BaseInfoForm from '@/components/DialogForm';
|
import BaseInfoForm from '@/components/DialogForm';
|
||||||
import DialogForm from './dialogForm';
|
import DialogForm from './dialogForm';
|
||||||
|
import { getEquipmentList, getgroupAllList } from '@/api/equipment/base/config/config'
|
||||||
|
import { updateEquipmentBindGroup } from '@/api/base/equipmentBindGroup';
|
||||||
|
|
||||||
const SmallTitle = {
|
const SmallTitle = {
|
||||||
name: 'SmallTitle',
|
name: 'SmallTitle',
|
||||||
@ -191,16 +237,21 @@ const SmallTitle = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { SmallTitle, DialogForm, BaseInfoForm },
|
components: { SmallTitle, DialogForm, BaseInfoForm },
|
||||||
props: ['sections', 'defaultMode', 'dataId', 'size'], // dataId 作为一个通用的存放id的字段
|
props: ['sections', 'defaultMode', 'dataId', 'size', 'equipmentId', 'id'], // dataId 作为一个通用的存放id的字段
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
mode: '',
|
mode: '',
|
||||||
visible: false,
|
visible: false,
|
||||||
showForm: false,
|
showForm: false,
|
||||||
|
isdetail: false,
|
||||||
|
formLoading: false,
|
||||||
|
grouList: [],
|
||||||
|
equipmentList: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
form: {},
|
form: {},
|
||||||
list: [],
|
list: [],
|
||||||
attrTitle: '',
|
attrTitle: '',
|
||||||
|
dataForm: {},
|
||||||
attrForm: {
|
attrForm: {
|
||||||
id: null,
|
id: null,
|
||||||
equipmentGroupId: '',
|
equipmentGroupId: '',
|
||||||
@ -325,6 +376,34 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// handleSave() {
|
||||||
|
// updateEquipmentBindGroup(this.form).then((response) => {
|
||||||
|
// this.$modal.msgSuccess('修改成功');
|
||||||
|
// this.open = false;
|
||||||
|
// this.getList();
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
async getDict() {
|
||||||
|
const res = await getEquipmentList({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 100,
|
||||||
|
special: false
|
||||||
|
})
|
||||||
|
this.equipmentList = res.data.list
|
||||||
|
const groupRes = await getgroupAllList()
|
||||||
|
this.grouList = groupRes.data
|
||||||
|
},
|
||||||
|
beforeClose(done) {
|
||||||
|
if (this.mode.includes('edit')) {
|
||||||
|
this.$confirm('确认关闭?')
|
||||||
|
.then(_ => {
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(_ => {});
|
||||||
|
} else {
|
||||||
|
done()
|
||||||
|
}
|
||||||
|
},
|
||||||
handleTableBtnClick({ type, data }) {
|
handleTableBtnClick({ type, data }) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'edit':
|
case 'edit':
|
||||||
@ -342,6 +421,16 @@ export default {
|
|||||||
|
|
||||||
init() {
|
init() {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
// 设备分组传值
|
||||||
|
// this.dataForm = {
|
||||||
|
// equipmentId: this.equipmentId,
|
||||||
|
// groupId: this.dataId
|
||||||
|
// }
|
||||||
|
this.getDict()
|
||||||
|
this.$set(this.dataForm, 'equipmentId', this.equipmentId)
|
||||||
|
this.$set(this.dataForm, 'groupId', this.dataId)
|
||||||
|
this.$set(this.dataForm, 'id', this.id)
|
||||||
|
this.isdetail = this.mode === 'detail' ? true : false
|
||||||
},
|
},
|
||||||
|
|
||||||
async getAttrList() {
|
async getAttrList() {
|
||||||
@ -360,9 +449,9 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const isEdit = !this.mode.includes('detail');
|
const isEdit = !this.mode.includes('detail');
|
||||||
await this.$axios({
|
await this.$axios({
|
||||||
url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
|
url: '/base/equipment-bind-group/update',
|
||||||
method: isEdit ? 'put' : 'post',
|
method: isEdit ? 'put' : 'post',
|
||||||
data: this.form,
|
data: this.dataForm,
|
||||||
});
|
});
|
||||||
this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`);
|
this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`);
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
@ -48,6 +48,8 @@
|
|||||||
size="45%"
|
size="45%"
|
||||||
:default-mode="editMode"
|
:default-mode="editMode"
|
||||||
:data-id="alarmForm.id"
|
:data-id="alarmForm.id"
|
||||||
|
:equipment-id="equipmentId"
|
||||||
|
:id="id"
|
||||||
:sections="[
|
:sections="[
|
||||||
{
|
{
|
||||||
name: '基本信息',
|
name: '基本信息',
|
||||||
@ -220,7 +222,7 @@ export default {
|
|||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
label: '设备',
|
label: '设备',
|
||||||
url: '/base/core-equipment/page?pageNo=1&pageSize=100',
|
url: '/base/core-equipment/page?pageNo=1&pageSize=100&special=false',
|
||||||
prop: 'equipmentId',
|
prop: 'equipmentId',
|
||||||
bind: {
|
bind: {
|
||||||
filterable: true,
|
filterable: true,
|
||||||
@ -266,6 +268,8 @@ export default {
|
|||||||
equipmentGroupCode: undefined,
|
equipmentGroupCode: undefined,
|
||||||
equipmentGroupName: undefined,
|
equipmentGroupName: undefined,
|
||||||
},
|
},
|
||||||
|
equipmentId: undefined,
|
||||||
|
id: undefined,
|
||||||
editVisible: false,
|
editVisible: false,
|
||||||
editMode: '',
|
editMode: '',
|
||||||
drawerBaseInfoRows: [
|
drawerBaseInfoRows: [
|
||||||
@ -440,6 +444,8 @@ export default {
|
|||||||
this.alarmForm.id = groupId;
|
this.alarmForm.id = groupId;
|
||||||
this.alarmForm.equipmentGroupCode = groupCode;
|
this.alarmForm.equipmentGroupCode = groupCode;
|
||||||
this.alarmForm.equipmentGroupName = groupName;
|
this.alarmForm.equipmentGroupName = groupName;
|
||||||
|
this.equipmentId = equipmentId;
|
||||||
|
this.id = id;
|
||||||
this.editVisible = true;
|
this.editVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['drawer'].init();
|
this.$refs['drawer'].init();
|
||||||
|
@ -379,7 +379,7 @@ export default {
|
|||||||
});
|
});
|
||||||
this.searchBarFormConfig[1].selectOptions = plcList.map((item) => {
|
this.searchBarFormConfig[1].selectOptions = plcList.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.code,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@ -463,7 +463,10 @@ export default {
|
|||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = '添加设备与实时采集关系表(一对多)';
|
this.title = '添加设备采集配置';
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addOrUpdate.init()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
@ -472,7 +475,7 @@ export default {
|
|||||||
getEquipmentPlcConnect(id).then((response) => {
|
getEquipmentPlcConnect(id).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = '修改设备与实时采集关系表(一对多)';
|
this.title = '修改设备采集配置';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
@ -294,7 +294,7 @@ export default {
|
|||||||
name: undefined,
|
name: undefined,
|
||||||
enName: undefined,
|
enName: undefined,
|
||||||
description: undefined,
|
description: undefined,
|
||||||
collection: undefined,
|
collection: 1,
|
||||||
};
|
};
|
||||||
this.resetForm('form');
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-02-22 10:08:13
|
* @LastEditTime: 2024-03-15 18:54:23
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -39,9 +39,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import basicAdd from '../../../../core/mixins/basic-add';
|
import basicAdd from '../../../../core/mixins/basic-add';
|
||||||
import { createCorePL, updateCorePL, getCorePL, getCode, getCorePLList } from "@/api/base/coreProductionLine";
|
import { createCorePL, updateCorePL, getCorePL, getCode } from "@/api/base/coreProductionLine";
|
||||||
import { createEquipmentPlcConnect, updateEquipmentPlcConnect } from '@/api/base/equipmentPlcConnect';
|
import { createEquipmentPlcConnect, updateEquipmentPlcConnect } from '@/api/base/equipmentPlcConnect';
|
||||||
import { getplcAllList, listByParentId } from "@/api/equipment/base/config/config";
|
import { getplcAllList, getTree } from "@/api/equipment/base/config/config";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [basicAdd],
|
mixins: [basicAdd],
|
||||||
@ -95,22 +95,29 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
init() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['dataForm'].resetFields()
|
||||||
|
})
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 关联表名列表
|
// 关联表名列表
|
||||||
const res = await getplcAllList();
|
const res = await getplcAllList();
|
||||||
this.plcList = res.data;
|
this.plcList = res.data;
|
||||||
// 产线列表
|
// 树形结构
|
||||||
const res1 = await getCorePLList();
|
const res1 = await getTree();
|
||||||
this.plLineList = res1.data;
|
this.plLineList = res1.data;
|
||||||
this.plLineList.forEach(item => {
|
// const res1 = await getCorePLList();
|
||||||
listByParentId({ id: item.id }).then(resp => {
|
// this.plLineList = res1.data;
|
||||||
if (resp.data.length > 0) {
|
// this.plLineList.forEach(item => {
|
||||||
// item.children = resp.data
|
// listByParentId({ id: item.id }).then(resp => {
|
||||||
this.$set(item, 'children', resp.data)
|
// if (resp.data.length > 0) {
|
||||||
// this.$forceUpdate()
|
// // item.children = resp.data
|
||||||
}
|
// this.$set(item, 'children', resp.data)
|
||||||
})
|
// // this.$forceUpdate()
|
||||||
})
|
// }
|
||||||
|
// })
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
|
@ -99,7 +99,7 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="plc in plcList"
|
v-for="plc in plcList"
|
||||||
:key="plc.id"
|
:key="plc.id"
|
||||||
:label="plc.name"
|
:label="plc.plcTableName"
|
||||||
:value="plc.id"></el-option>
|
:value="plc.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -404,9 +404,9 @@ export default {
|
|||||||
this.eqList = data;
|
this.eqList = data;
|
||||||
});
|
});
|
||||||
this.$axios({
|
this.$axios({
|
||||||
url: '/base/equipment-plc/page',
|
url: '/base/equipment-plc/listAll',
|
||||||
}).then(({ code, data }) => {
|
}).then(({ code, data }) => {
|
||||||
this.plcList = data.list;
|
this.plcList = data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
for (const section of this.sections) {
|
for (const section of this.sections) {
|
||||||
|
@ -2,14 +2,15 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-02-29 14:59:28
|
* @LastEditTime: 2024-03-20 17:58:29
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="isdetail"
|
:wrapper-closable="true"
|
||||||
|
:before-close="beforeClose"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
size="60%">
|
size="60%">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
@ -35,7 +36,8 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.departmentId"
|
v-model="dataForm.departmentId"
|
||||||
:disabled="isdetail"
|
:disabled="isdetail"
|
||||||
:placeholder="`请选择部门`">
|
:placeholder="`请选择部门`"
|
||||||
|
style="width: 100%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="opt in departmentOptions"
|
v-for="opt in departmentOptions"
|
||||||
:key="opt.id"
|
:key="opt.id"
|
||||||
@ -78,7 +80,7 @@
|
|||||||
v-for="opt in inspectorOptions"
|
v-for="opt in inspectorOptions"
|
||||||
:key="opt.value"
|
:key="opt.value"
|
||||||
:label="opt.label"
|
:label="opt.label"
|
||||||
:value="opt.value" />
|
:value="opt.label" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -89,33 +91,32 @@
|
|||||||
type="datetime"
|
type="datetime"
|
||||||
:disabled="isdetail"
|
:disabled="isdetail"
|
||||||
placeholder="请选择巡检时间"
|
placeholder="请选择巡检时间"
|
||||||
value-format="timestamp"></el-date-picker>
|
value-format="timestamp"
|
||||||
|
style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="attr-list" v-if="idAttrShow">
|
<div v-if="idAttrShow">
|
||||||
<small-title
|
<small-title>
|
||||||
style="margin: 16px 0; padding-left: 8px"
|
|
||||||
:no-padding="true">
|
|
||||||
巡检内容
|
巡检内容
|
||||||
</small-title>
|
</small-title>
|
||||||
|
|
||||||
<div v-if="!isdetail">
|
<div v-if="!isdetail" style="display: flex">
|
||||||
<div>
|
|
||||||
<SearchBar
|
<SearchBar
|
||||||
:formConfigs="searchBarFormConfig"
|
:formConfigs="searchBarFormConfig"
|
||||||
ref="attr-search-bar"
|
ref="attr-search-bar"
|
||||||
@headBtnClick="handleSearchBarBtnClick" />
|
@headBtnClick="handleSearchBarBtnClick" />
|
||||||
</div>
|
<!-- <div class="action_btn"> -->
|
||||||
<!-- <template>
|
<el-button type="text" class="action_btn" @click="addNew()">
|
||||||
<span style="display: inline-block;" @click="addNew()">
|
<span style="display: inline-block;">
|
||||||
<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" />
|
<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" />
|
||||||
<span class="add">添加</span>
|
<span class="add">添加内容</span>
|
||||||
</span>
|
</span>
|
||||||
</template> -->
|
</el-button>
|
||||||
|
<!-- </div> -->
|
||||||
</div>
|
</div>
|
||||||
<base-table
|
<base-table
|
||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
@ -228,14 +229,14 @@ export default {
|
|||||||
btnName: '查询',
|
btnName: '查询',
|
||||||
name: 'search',
|
name: 'search',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
btnName: '新增',
|
|
||||||
name: 'add',
|
|
||||||
color: 'success',
|
|
||||||
plain: true
|
|
||||||
}
|
}
|
||||||
|
// {
|
||||||
|
// type: 'button',
|
||||||
|
// btnName: '新增',
|
||||||
|
// name: 'add',
|
||||||
|
// color: 'success',
|
||||||
|
// plain: true
|
||||||
|
// }
|
||||||
],
|
],
|
||||||
listQuery: {
|
listQuery: {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@ -269,6 +270,17 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
beforeClose(done) {
|
||||||
|
if (!this.isdetail) {
|
||||||
|
this.$confirm('确认关闭?')
|
||||||
|
.then(_ => {
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(_ => {});
|
||||||
|
} else {
|
||||||
|
done()
|
||||||
|
}
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 班次列表
|
// 班次列表
|
||||||
const res = await groupClassesListAll();
|
const res = await groupClassesListAll();
|
||||||
@ -372,6 +384,7 @@ export default {
|
|||||||
if (id) {
|
if (id) {
|
||||||
this.idAttrShow = true
|
this.idAttrShow = true
|
||||||
} else {
|
} else {
|
||||||
|
this.dataForm.checkPerson = [this.$store.getters.nickname]
|
||||||
this.idAttrShow = false
|
this.idAttrShow = false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -418,7 +431,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getConfirmed() {
|
getConfirmed() {
|
||||||
return this.$confirm('是否直接确认巡检记录', '提示', {
|
return this.$confirm('是否直接确认巡检单', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
@ -431,10 +444,16 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.getConfirmed().then(confirm => {
|
this.getConfirmed().then(confirm => {
|
||||||
|
// let checkPersonParam = '';
|
||||||
|
// if (!this.dataForm.checkPerson || this.dataForm.checkPerson.trim() == '') {
|
||||||
|
// /** 如有必要,更新巡检人 */
|
||||||
|
// checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
|
||||||
|
// } else {
|
||||||
|
// checkPersonParam = `&checkPerson=${this.dataForm.checkPerson}`
|
||||||
|
// }
|
||||||
this.$axios({
|
this.$axios({
|
||||||
url:
|
url:
|
||||||
'/base/equipment-check-order/confirm?confirmPerson=' +
|
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||||
this.$store.getters.userId,
|
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: [this.dataForm.id],
|
data: [this.dataForm.id],
|
||||||
}).then(res =>{
|
}).then(res =>{
|
||||||
@ -500,10 +519,6 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer >>> .el-form-item__label {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer >>> .el-drawer__header {
|
.drawer >>> .el-drawer__header {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 32px 32px 24px;
|
padding: 32px 32px 24px;
|
||||||
@ -532,11 +547,6 @@ export default {
|
|||||||
padding-right: 10px; /* 调整滚动条样式 */
|
padding-right: 10px; /* 调整滚动条样式 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer >>> .el-form,
|
|
||||||
.drawer >>> .attr-list {
|
|
||||||
padding: 0 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer-body__footer {
|
.drawer-body__footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
@ -544,7 +554,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.action_btn {
|
.action_btn {
|
||||||
float: right;
|
float: right;
|
||||||
margin: -32px 15px 0;
|
/* margin: 0 15px 0; */
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
.add {
|
.add {
|
||||||
|
@ -179,8 +179,14 @@ export default {
|
|||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认所有选中巡检单"?')
|
.confirm('是否确认所有选中巡检单"?')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
// let checkPersonParam = '';
|
||||||
|
// if (!row.checkPerson || row.checkPerson.trim() == '') {
|
||||||
|
// /** 如有必要,更新巡检人 */
|
||||||
|
// checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
|
||||||
|
// }
|
||||||
return this.$axios({
|
return this.$axios({
|
||||||
url: '/base/equipment-check-order/confirm?confirmPerson=' + this.$store.getters.userId,
|
// url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` + checkPersonParam,
|
||||||
|
url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||||
(item) => item.id
|
(item) => item.id
|
||||||
@ -394,11 +400,17 @@ export default {
|
|||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认巡检单"' + row.name + '"?')
|
.confirm('是否确认巡检单"' + row.name + '"?')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
// let checkPersonParam = '';
|
||||||
|
// const nickname = this.$store.getters.nickname;
|
||||||
|
// if (!row.checkPerson || row.checkPerson.trim() == '') {
|
||||||
|
// /** 如有必要,更新巡检人 */
|
||||||
|
// checkPersonParam = `&checkPerson=${nickname}`;
|
||||||
|
// } else {
|
||||||
|
// checkPersonParam = `&checkPerson=${row.checkPerson}`
|
||||||
|
// }
|
||||||
return this.$axios({
|
return this.$axios({
|
||||||
url:
|
url:
|
||||||
'/base/equipment-check-order/confirm?confirmPerson=' +
|
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||||
this.$store.getters.userId,
|
|
||||||
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
|
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: [row.id],
|
data: [row.id],
|
||||||
});
|
});
|
||||||
|
@ -98,12 +98,12 @@ export default {
|
|||||||
addContent: false,
|
addContent: false,
|
||||||
searchBarKeys: ['name', 'actualCheckTime'],
|
searchBarKeys: ['name', 'actualCheckTime'],
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
// this.$auth.hasPermi('equipment:check-record:detail')
|
this.$auth.hasPermi('equipment:check-record:detail')
|
||||||
// ? {
|
? {
|
||||||
// type: 'detail',
|
type: 'detail',
|
||||||
// btnName: '详情',
|
btnName: '详情',
|
||||||
// }
|
}
|
||||||
// : undefined,
|
: undefined,
|
||||||
// this.$auth.hasPermi('equipment:check-record:update')
|
// this.$auth.hasPermi('equipment:check-record:update')
|
||||||
// ? {
|
// ? {
|
||||||
// type: 'edit',
|
// type: 'edit',
|
||||||
@ -120,9 +120,9 @@ export default {
|
|||||||
tableProps: [
|
tableProps: [
|
||||||
{ prop: 'name', label: '巡检单名称' },
|
{ prop: 'name', label: '巡检单名称' },
|
||||||
{ prop: 'department', label: '部门' },
|
{ prop: 'department', label: '部门' },
|
||||||
{ prop: 'actualCheckTime', label: '巡检时间', filter: parseTime },
|
{ prop: 'planCheckTime', label: '巡检时间', filter: parseTime },
|
||||||
{ prop: 'groupClass', label: '班次' },
|
{ prop: 'groupClass', label: '班次' },
|
||||||
{ prop: 'opt', label: '巡检内容', name: '详情', subcomponent: btn },
|
// { prop: 'opt', label: '巡检内容', name: '详情', subcomponent: btn },
|
||||||
{ prop: 'remark', label: '备注' }
|
{ prop: 'remark', label: '备注' }
|
||||||
// { prop: 'origin', label: '数据来源', filter: (val) => ['', '手动', 'PDA'][val] },
|
// { prop: 'origin', label: '数据来源', filter: (val) => ['', '手动', 'PDA'][val] },
|
||||||
// { prop: 'sectionName', label: '计划巡检时间' },
|
// { prop: 'sectionName', label: '计划巡检时间' },
|
||||||
@ -416,10 +416,14 @@ export default {
|
|||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
handleDetail({ id }) {
|
handleDetail({ id }) {
|
||||||
this.addOrUpdateVisible = true
|
this.addContent = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addOrUpdate.init(id, true);
|
this.$refs.addContent.init(id, true);
|
||||||
});
|
});
|
||||||
|
// this.addOrUpdateVisible = true
|
||||||
|
// this.$nextTick(() => {
|
||||||
|
// this.$refs.addOrUpdate.init(id, true);
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-02-29 14:58:37
|
* @LastEditTime: 2024-03-15 18:38:52
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -11,29 +11,23 @@
|
|||||||
:rules="dataRule"
|
:rules="dataRule"
|
||||||
ref="dataForm"
|
ref="dataForm"
|
||||||
@keyup.enter.native="dataFormSubmit()"
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
label-width="120px">
|
label-width="150px">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="巡检单名称" prop="name">
|
<el-form-item label="巡检单名称" prop="name">
|
||||||
<el-input
|
<el-input v-model="dataForm.name" placeholder="请输入巡检单名称" />
|
||||||
v-model="dataForm.name"
|
|
||||||
placeholder="请输入巡检单名称" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="巡检单编码" prop="code">
|
<el-form-item label="巡检单编码" prop="code">
|
||||||
<el-input
|
<el-input v-model="dataForm.code" placeholder="请输入巡检单编码" />
|
||||||
v-model="dataForm.code"
|
|
||||||
placeholder="请输入巡检单编码" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="部门"
|
label="部门"
|
||||||
prop="departmentId"
|
prop="departmentId"
|
||||||
:rules="[{ required: true, message: '请选择部门', trigger: 'blur' }]">
|
:rules="[{ required: false, message: '请选择部门', trigger: 'blur' }]">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.departmentId"
|
v-model="dataForm.departmentId"
|
||||||
:placeholder="`请选择部门`"
|
:placeholder="`请选择部门`"
|
||||||
@ -57,8 +51,13 @@
|
|||||||
style="width: 100%" />
|
style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="12">
|
||||||
<el-row :gutter="20">
|
<el-form-item label="巡检频率(天/次)" prop="checkPeriod">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.checkPeriod"
|
||||||
|
placeholder="请输入巡检频率(天/次)" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="确认时限 (时)" prop="confirmTimeLimit">
|
<el-form-item label="确认时限 (时)" prop="confirmTimeLimit">
|
||||||
<el-input
|
<el-input
|
||||||
@ -83,8 +82,6 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="dataForm.remark" placeholder="请输入备注" />
|
<el-input v-model="dataForm.remark" placeholder="请输入备注" />
|
||||||
@ -96,9 +93,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import basicAdd from '../../../../core/mixins/basic-add';
|
import basicAdd from '../../../../core/mixins/basic-add';
|
||||||
import { getCheckOrder, getOrderCode, createCheckOrder, updateCheckOrder } from "@/api/equipment/base/inspection/settings";
|
import {
|
||||||
import { getCoreDepartmentList } from "@/api/base/coreDepartment";
|
getCheckOrder,
|
||||||
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
|
getOrderCode,
|
||||||
|
createCheckOrder,
|
||||||
|
updateCheckOrder,
|
||||||
|
} from '@/api/equipment/base/inspection/settings';
|
||||||
|
import { getCoreDepartmentList } from '@/api/base/coreDepartment';
|
||||||
|
import { groupClassesListAll } from '@/api/monitoring/teamProduction';
|
||||||
import { getDictDataLabel } from '@/utils/dict';
|
import { getDictDataLabel } from '@/utils/dict';
|
||||||
// import { getEquipmentAll } from '@/api/base/equipment'
|
// import { getEquipmentAll } from '@/api/base/equipment'
|
||||||
|
|
||||||
@ -121,55 +123,72 @@ export default {
|
|||||||
planCheckTime: null,
|
planCheckTime: null,
|
||||||
confirmTimeLimit: null,
|
confirmTimeLimit: null,
|
||||||
groupClass: null,
|
groupClass: null,
|
||||||
remark: null
|
remark: null,
|
||||||
|
checkPeriod: null
|
||||||
},
|
},
|
||||||
groupOptions: [],
|
groupOptions: [],
|
||||||
departmentOptions: [],
|
departmentOptions: [],
|
||||||
dataRule: {
|
dataRule: {
|
||||||
confirmTimeLimit: [
|
confirmTimeLimit: [
|
||||||
{ required: true, message: '确认时限不能为空', trigger: 'blur' }
|
{ required: true, message: '确认时限不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '巡检单编码不能为空', trigger: 'blur' }
|
{ required: true, message: '巡检单编码不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '巡检单名称不能为空', trigger: 'blur' }
|
{ required: true, message: '巡检单名称不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
planCheckTime: [
|
planCheckTime: [
|
||||||
{ required: true, message: '计划巡检时间不能为空', trigger: 'blur' }
|
{ required: true, message: '计划巡检时间不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
checkPeriod: [
|
||||||
|
{ required: true, message: '巡检频率不能为空', trigger: 'blur' },
|
||||||
|
{
|
||||||
|
type: 'number',
|
||||||
|
message: '请输入正确的数字类型',
|
||||||
|
trigger: 'blur',
|
||||||
|
transform: (val) => Number(val),
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
const currenttime = new Date()
|
const currenttime = new Date();
|
||||||
this.dataForm.planCheckTime = new Date(currenttime.getFullYear(), currenttime.getMonth(), currenttime.getDate(), 8, 0, 0).getTime()
|
this.dataForm.planCheckTime = new Date(
|
||||||
console.log('11', this.dataForm.planCheckTime, currenttime)
|
currenttime.getFullYear(),
|
||||||
|
currenttime.getMonth(),
|
||||||
|
currenttime.getDate(),
|
||||||
|
8,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
).getTime();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getDict()
|
this.getDict();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init(id) {
|
init(id) {
|
||||||
this.dataForm.id = id || "";
|
this.dataForm.id = id || '';
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
if (this.urlOptions.getOption) {
|
if (this.urlOptions.getOption) {
|
||||||
this.getArr()
|
this.getArr();
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs["dataForm"].resetFields();
|
this.$refs['dataForm'].resetFields();
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
this.urlOptions.infoURL(id).then(response => {
|
this.urlOptions.infoURL(id).then((response) => {
|
||||||
this.dataForm = response.data
|
this.dataForm = response.data;
|
||||||
if (response.data.groupClass === '') {
|
if (response.data?.groupClass === '') {
|
||||||
this.dataForm.groupClass = []
|
this.dataForm.groupClass = [];
|
||||||
} else {
|
} else {
|
||||||
this.dataForm.groupClass = response.data?.groupClass.split(',') || undefined
|
this.dataForm.groupClass =
|
||||||
|
response.data?.groupClass?.split(',') || undefined;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (this.urlOptions.isGetCode) {
|
if (this.urlOptions.isGetCode) {
|
||||||
this.getCode()
|
this.getCode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -179,43 +198,49 @@ export default {
|
|||||||
const res = await getCoreDepartmentList();
|
const res = await getCoreDepartmentList();
|
||||||
this.departmentOptions = res.data || [];
|
this.departmentOptions = res.data || [];
|
||||||
const res1 = await groupClassesListAll();
|
const res1 = await groupClassesListAll();
|
||||||
this.groupOptions = res1.data.map((item) => {
|
this.groupOptions =
|
||||||
item.label = item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict)
|
res1.data.map((item) => {
|
||||||
return item
|
item.label =
|
||||||
|
item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict);
|
||||||
|
return item;
|
||||||
}) || [];
|
}) || [];
|
||||||
// const res = await getEquipmentAll()
|
// const res = await getEquipmentAll()
|
||||||
// this.eqList = res.data
|
// this.eqList = res.data
|
||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs["dataForm"].validate((valid) => {
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
this.urlOptions.updateURL({
|
this.urlOptions
|
||||||
|
.updateURL({
|
||||||
...this.dataForm,
|
...this.dataForm,
|
||||||
special: false,
|
special: false,
|
||||||
status: 0,
|
status: 0,
|
||||||
groupClass: this.dataForm.groupClass.join(',')
|
groupClass: this.dataForm.groupClass?.join(','),
|
||||||
}).then(response => {
|
})
|
||||||
this.$modal.msgSuccess("修改成功");
|
.then((response) => {
|
||||||
|
this.$modal.msgSuccess('修改成功');
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$emit("refreshDataList");
|
this.$emit('refreshDataList');
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
this.urlOptions.createURL({
|
this.urlOptions
|
||||||
|
.createURL({
|
||||||
...this.dataForm,
|
...this.dataForm,
|
||||||
special: false,
|
special: false,
|
||||||
status: 0,
|
status: 0,
|
||||||
groupClass: this.dataForm.groupClass.join(',')
|
groupClass: this.dataForm.groupClass?.join(','),
|
||||||
}).then(response => {
|
})
|
||||||
this.$modal.msgSuccess("新增成功");
|
.then((response) => {
|
||||||
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$emit("refreshDataList");
|
this.$emit('refreshDataList');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
label="操作"
|
label="操作"
|
||||||
:width="180"
|
:width="120"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleTableBtnClick" />
|
@clickBtn="handleTableBtnClick" />
|
||||||
</base-table>
|
</base-table>
|
||||||
@ -37,9 +37,7 @@
|
|||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="handleConfirm">
|
@confirm="handleConfirm">
|
||||||
<add
|
<add ref="add" @refreshDataList="successSubmit" />
|
||||||
ref="add"
|
|
||||||
@refreshDataList="successSubmit" />
|
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
<!-- 添加巡检,查看详情 -->
|
<!-- 添加巡检,查看详情 -->
|
||||||
<addOrUpdata
|
<addOrUpdata
|
||||||
@ -52,8 +50,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import addOrUpdata from './add-or-updata.vue';
|
import addOrUpdata from './add-or-updata.vue';
|
||||||
import add from './add.vue'
|
import add from './add.vue';
|
||||||
import { parseTime } from '../../../../core/mixins/code-filter';
|
import { parseTime } from '../../../../core/mixins/code-filter';
|
||||||
|
import { groupClassesListAll } from '@/api/monitoring/teamProduction';
|
||||||
// import { publicFormatter } from '@/utils/dict';
|
// import { publicFormatter } from '@/utils/dict';
|
||||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
|
|
||||||
@ -71,7 +70,7 @@ export default {
|
|||||||
? {
|
? {
|
||||||
type: 'add',
|
type: 'add',
|
||||||
btnName: '添加',
|
btnName: '添加',
|
||||||
showTip: '添加巡检'
|
showTip: '添加巡检',
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi('equipment:check-setting:update')
|
this.$auth.hasPermi('equipment:check-setting:update')
|
||||||
@ -94,16 +93,46 @@ export default {
|
|||||||
: undefined,
|
: undefined,
|
||||||
].filter((v) => v),
|
].filter((v) => v),
|
||||||
tableProps: [
|
tableProps: [
|
||||||
{ prop: 'name', label: '巡检单名称', width: 110, showOverflowtooltip: true },
|
{
|
||||||
{ prop: 'code', label: '巡检单编码', minWidth: 150, showOverflowtooltip: true },
|
prop: 'name',
|
||||||
|
label: '巡检单名称',
|
||||||
|
width: 110,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'code',
|
||||||
|
label: '巡检单编码',
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
{ prop: 'department', label: '部门', showOverflowtooltip: true },
|
{ prop: 'department', label: '部门', showOverflowtooltip: true },
|
||||||
{ prop: 'planCheckTime', label: '计划巡检时间', width: 150, filter: parseTime },
|
{
|
||||||
{ prop: 'confirmTimeLimit', label: '确认时限', showOverflowtooltip: true },
|
prop: 'planCheckTime',
|
||||||
|
label: '计划巡检时间',
|
||||||
|
width: 150,
|
||||||
|
filter: parseTime,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'checkPeriod',
|
||||||
|
label: '巡检频率(天/次)',
|
||||||
|
width: 150,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'confirmTimeLimit',
|
||||||
|
label: '确认时限',
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
{ prop: 'groupClass', label: '班次', showOverflowtooltip: true },
|
{ prop: 'groupClass', label: '班次', showOverflowtooltip: true },
|
||||||
{ prop: 'creator', label: '创建人', showOverflowtooltip: true },
|
{ prop: 'creator', label: '创建人', showOverflowtooltip: true },
|
||||||
{ prop: 'createTime', label: '创建时间', width: 150, filter: parseTime },
|
{
|
||||||
|
prop: 'createTime',
|
||||||
|
label: '创建时间',
|
||||||
|
width: 150,
|
||||||
|
filter: parseTime,
|
||||||
|
},
|
||||||
// { prop: 'responsible', label: '负责人' },
|
// { prop: 'responsible', label: '负责人' },
|
||||||
{ prop: 'remark', label: '备注' } // TODO: 操作 选项,四个,群里询问
|
{ prop: 'remark', label: '备注' }, // TODO: 操作 选项,四个,群里询问
|
||||||
],
|
],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
{
|
{
|
||||||
@ -136,7 +165,7 @@ export default {
|
|||||||
name: 'add',
|
name: 'add',
|
||||||
plain: true,
|
plain: true,
|
||||||
color: 'success',
|
color: 'success',
|
||||||
}
|
},
|
||||||
// {
|
// {
|
||||||
// type: this.$auth.hasPermi('equipment:check-setting:export')
|
// type: this.$auth.hasPermi('equipment:check-setting:export')
|
||||||
// ? 'button'
|
// ? 'button'
|
||||||
@ -177,7 +206,11 @@ export default {
|
|||||||
clearable: true,
|
clearable: true,
|
||||||
},
|
},
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '设备名称不能为空', trigger: 'change' },
|
{
|
||||||
|
required: true,
|
||||||
|
message: '设备名称不能为空',
|
||||||
|
trigger: 'change',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -196,13 +229,13 @@ export default {
|
|||||||
equipmentId: null,
|
equipmentId: null,
|
||||||
name: null,
|
name: null,
|
||||||
special: false,
|
special: false,
|
||||||
status: 0
|
status: 0,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
basePath: '/base/equipment-check-order',
|
basePath: '/base/equipment-check-order',
|
||||||
mode: null,
|
mode: null,
|
||||||
groupList: []
|
groupList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -212,11 +245,11 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleConfirm() {
|
handleConfirm() {
|
||||||
this.$refs.add.dataFormSubmit()
|
this.$refs.add.dataFormSubmit();
|
||||||
},
|
},
|
||||||
successSubmit() {
|
successSubmit() {
|
||||||
this.cancel()
|
this.cancel();
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
initSearchBar() {
|
initSearchBar() {
|
||||||
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
|
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
|
||||||
@ -231,9 +264,9 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getGroup() {
|
getGroup() {
|
||||||
groupClassesListAll().then(res => {
|
groupClassesListAll().then((res) => {
|
||||||
this.groupList = res.data || []
|
this.groupList = res.data || [];
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
getList() {
|
getList() {
|
||||||
@ -247,9 +280,9 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 取消按钮 */
|
/** 取消按钮 */
|
||||||
cancel() {
|
cancel() {
|
||||||
this.$refs.add.formClear()
|
this.$refs.add.formClear();
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.title = ''
|
this.title = '';
|
||||||
// this.reset();
|
// this.reset();
|
||||||
},
|
},
|
||||||
/** 表单重置 */
|
/** 表单重置 */
|
||||||
|
@ -73,7 +73,7 @@ const remainBox = {
|
|||||||
color() {
|
color() {
|
||||||
if (this.value) {
|
if (this.value) {
|
||||||
const v = +this.value;
|
const v = +this.value;
|
||||||
return v < 0 ? 'red' : v >= 0 && v < 2 ? 'yellow' : 'green';
|
return v <= 1 ? 'red' : v > 1 && v <= 2 ? 'yellow' : 'green';
|
||||||
}
|
}
|
||||||
return 'unset';
|
return 'unset';
|
||||||
},
|
},
|
||||||
@ -84,9 +84,10 @@ const remainBox = {
|
|||||||
style={`background: ${
|
style={`background: ${
|
||||||
this.color
|
this.color
|
||||||
}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
|
}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
|
||||||
this.color == 'red' ? '#fff' : 'unset'
|
// this.color == 'red' ? '#fff' : 'unset'
|
||||||
|
'#fff'
|
||||||
}`}>
|
}`}>
|
||||||
{this.injectData[this.injectData.prop] || ''}
|
{this.injectData[this.injectData.prop]?.toFixed(0) || ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -128,22 +129,26 @@ export default {
|
|||||||
// width: 180,
|
// width: 180,
|
||||||
// filter: parseTime(createTime),
|
// filter: parseTime(createTime),
|
||||||
// },
|
// },
|
||||||
{ prop: 'code', label: '保养计划单号' },
|
{ prop: 'code', label: '保养计划单号', minWidth: 118, showOverflowtooltip: true },
|
||||||
{ prop: 'name', label: '保养计划名称' },
|
{ prop: 'name', label: '保养计划名称', minWidth: 118, showOverflowtooltip: true },
|
||||||
{ prop: 'departmentName', label: '部门' },
|
{ prop: 'departmentName', label: '部门', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'lineName', label: '产线名' },
|
{ prop: 'lineName', label: '产线名', minWidth: 100, showOverflowtooltip: true },
|
||||||
{
|
{
|
||||||
prop: 'lastPlanMaintainTime',
|
prop: 'lastPlanMaintainTime',
|
||||||
label: '上次计划保养时间',
|
label: '上次计划保养时间',
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
|
minWidth: 160,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'lastMaintainTime',
|
prop: 'lastMaintainTime',
|
||||||
label: '上次实际保养时间',
|
label: '上次实际保养时间',
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
|
minWidth: 160,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{ prop: 'nextPlanMaintainTime', label: '下次计划保养时间', filter: parseTime },
|
{ prop: 'nextPlanMaintainTime', label: '下次计划保养时间', filter: parseTime, minWidth: 160, showOverflowtooltip: true },
|
||||||
{ prop: 'maintainer', label: '计划保养人员' },
|
{ prop: 'maintainer', label: '计划保养人员', minWidth: 160, showOverflowtooltip: true },
|
||||||
// { prop: 'equipmentName', label: '设备名称' },
|
// { prop: 'equipmentName', label: '设备名称' },
|
||||||
// { prop: 'equipmentCode', label: '设备编码' },
|
// { prop: 'equipmentCode', label: '设备编码' },
|
||||||
// { prop: 'maintenancePeriod', label: '保养频率' },
|
// { prop: 'maintenancePeriod', label: '保养频率' },
|
||||||
@ -153,11 +158,12 @@ export default {
|
|||||||
// filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE),
|
// filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE),
|
||||||
// },
|
// },
|
||||||
// { prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn },
|
// { prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn },
|
||||||
{ prop: 'opt2', label: '保养内容', name: '详情', subcomponent: btn },
|
{ prop: 'opt2', label: '保养内容', name: '详情', subcomponent: btn, width: 100 },
|
||||||
{
|
{
|
||||||
prop: 'remainDays',
|
prop: 'remainDays',
|
||||||
label: '距离下次保养剩余时间(天)',
|
label: '距离下次保养剩余时间(天)',
|
||||||
subcomponent: remainBox,
|
subcomponent: remainBox,
|
||||||
|
minWidth: 210,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
@ -232,23 +238,24 @@ export default {
|
|||||||
.catch(() => { });
|
.catch(() => { });
|
||||||
},
|
},
|
||||||
initSearchBar() {
|
initSearchBar() {
|
||||||
this.http('/base/core-equipment/page', 'get', {
|
// this.http('/base/core-equipment/page', 'get', {
|
||||||
special: false,
|
// special: false,
|
||||||
pageNo: 1,
|
// pageNo: 1,
|
||||||
pageSize: 99
|
// pageSize: 99
|
||||||
}).then(({ data }) => {
|
// }).then(({ data }) => {
|
||||||
this.$set(
|
// this.$set(
|
||||||
this.searchBarFormConfig[1],
|
// this.searchBarFormConfig[1],
|
||||||
'selectOptions',
|
// 'selectOptions',
|
||||||
(data?.list || []).map((item) => ({
|
// (data?.list || []).map((item) => ({
|
||||||
name: item.name,
|
// name: item.name,
|
||||||
id: item.id,
|
// id: item.id,
|
||||||
}))
|
// }))
|
||||||
);
|
// );
|
||||||
});
|
// });
|
||||||
this.http('/base/equipment-maintain-plan/page', 'get', {
|
this.http('/base/equipment-maintain-plan/page', 'get', {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
|
special: false
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
this.$set(
|
this.$set(
|
||||||
this.searchBarFormConfig[0],
|
this.searchBarFormConfig[0],
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-02-28 19:52:13
|
* @LastEditTime: 2024-03-13 15:55:36
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -67,7 +67,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="确认时限(h)" prop="confirmTimeLimit">
|
<el-form-item label="确认时限(h)" prop="confirmTimeLimit">
|
||||||
<el-input-number v-model="dataForm.confirmTimeLimit" :min="0" controls-position="right" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" />
|
<el-input-number v-model="dataForm.confirmTimeLimit" :min="0" controls-position="right" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入确认时限" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -64,8 +64,9 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
|||||||
import Editor from '@/components/Editor';
|
import Editor from '@/components/Editor';
|
||||||
import { deleteEqMaintainLog, exportMaintainLogExcel } from '@/api/equipment/base/maintain/record';
|
import { deleteEqMaintainLog, exportMaintainLogExcel } from '@/api/equipment/base/maintain/record';
|
||||||
import AddContent from './addContent.vue';
|
import AddContent from './addContent.vue';
|
||||||
|
import { parseTime } from '../../../../core/mixins/code-filter';
|
||||||
|
|
||||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
|
|
||||||
const btn = {
|
const btn = {
|
||||||
name: 'tableBtn',
|
name: 'tableBtn',
|
||||||
@ -128,20 +129,22 @@ export default {
|
|||||||
// width: 180,
|
// width: 180,
|
||||||
// filter: timeFilter,
|
// filter: timeFilter,
|
||||||
// },
|
// },
|
||||||
{ prop: 'maintainOrderNumber', label: '设备保养单号' },
|
{ prop: 'maintainOrderNumber', label: '设备保养单号', width: 170, showOverflowtooltip: true },
|
||||||
{ prop: 'planName', label: '保养计划名称' },
|
{ prop: 'planName', label: '保养计划名称', width: 150, showOverflowtooltip: true },
|
||||||
{ prop: 'departmentName', label: '部门' },
|
{ prop: 'departmentName', label: '部门', width: 120, showOverflowtooltip: true },
|
||||||
{ prop: 'lineName', label: '产线名' },
|
{ prop: 'lineName', label: '产线名', width: 120, showOverflowtooltip: true },
|
||||||
{ prop: 'planStartTime', label: '计划开始时间', filter: timeFilter },
|
{ prop: 'planStartTime', label: '计划开始时间', filter: parseTime, width: 150, showOverflowtooltip: true },
|
||||||
{ prop: 'planEndTime', label: '计划结束时间', filter: timeFilter },
|
{ prop: 'planEndTime', label: '计划结束时间', filter: parseTime, width: 150, showOverflowtooltip: true },
|
||||||
{ prop: 'startTime', label: '实际开始时间', filter: timeFilter },
|
{ prop: 'startTime', label: '实际开始时间', filter: parseTime, width: 150, showOverflowtooltip: true },
|
||||||
{ prop: 'endTime', label: '实际结束时间', filter: timeFilter },
|
{ prop: 'endTime', label: '实际结束时间', filter: parseTime, width: 150, showOverflowtooltip: true },
|
||||||
// { prop: 'equipmentName', label: '设备名称' },
|
// { prop: 'equipmentName', label: '设备名称' },
|
||||||
// { prop: 'maintainWorker', label: '保养人员' },
|
// { prop: 'maintainWorker', label: '保养人员' },
|
||||||
{
|
{
|
||||||
prop: 'relatePlan',
|
prop: 'relatePlan',
|
||||||
label: '保养计划类型',
|
label: '保养计划类型',
|
||||||
filter: (v) => (v != null ? ['', '计划型', '非计划型'][v] : ''),
|
filter: (v) => (v != null ? ['', '计划型', '非计划型'][v] : ''),
|
||||||
|
width: 170,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{ prop: 'opt', label: '详情', name: '详情', subcomponent: btn }
|
{ prop: 'opt', label: '详情', name: '详情', subcomponent: btn }
|
||||||
// { prop: 'maintainDuration', label: '计划保养用时(h)' },
|
// { prop: 'maintainDuration', label: '计划保养用时(h)' },
|
||||||
@ -174,6 +177,7 @@ export default {
|
|||||||
endPlaceholder: '结束日期',
|
endPlaceholder: '结束日期',
|
||||||
defaultTime: ['00:00:00', '23:59:59'],
|
defaultTime: ['00:00:00', '23:59:59'],
|
||||||
param: 'startTime',
|
param: 'startTime',
|
||||||
|
defaultSelect: []
|
||||||
// width: 350,
|
// width: 350,
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
@ -349,23 +353,28 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
let end = moment().format('YYYY-MM-DD 08:00:00')
|
||||||
|
const current = new Date()
|
||||||
|
let start = parseTime(new Date(current.getFullYear(), current.getMonth(), current.getDate() - 3, 8, 0, 0))
|
||||||
|
this.searchBarFormConfig[1].defaultSelect = [start, end]
|
||||||
|
this.queryParams.startTime = [start, end]
|
||||||
this.initSearchBar();
|
this.initSearchBar();
|
||||||
if (this.$route.query) {
|
// if (this.$route.query) {
|
||||||
// this.queryParams.equipmentId =
|
// // this.queryParams.equipmentId =
|
||||||
// this.$route.query?.equipmentId ?? undefined;
|
// // this.$route.query?.equipmentId ?? undefined;
|
||||||
this.queryParams.maintainPlanId =
|
// this.queryParams.maintainPlanId =
|
||||||
this.$route.query?.maintainPlanId ?? undefined;
|
// this.$route.query?.maintainPlanId ?? undefined;
|
||||||
// this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined;
|
// // this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined;
|
||||||
this.queryParams.startTime = this.$route.query?.createTime ?? undefined;
|
// this.queryParams.startTime = this.$route.query?.createTime ?? undefined;
|
||||||
|
// // this.searchBarFormConfig[0].defaultSelect =
|
||||||
|
// // this.$route.query.equipmentId ?? undefined;
|
||||||
// this.searchBarFormConfig[0].defaultSelect =
|
// this.searchBarFormConfig[0].defaultSelect =
|
||||||
// this.$route.query.equipmentId ?? undefined;
|
// this.$route.query.maintainPlanId ?? undefined;
|
||||||
this.searchBarFormConfig[0].defaultSelect =
|
// this.searchBarFormConfig[1].defaultSelect =
|
||||||
this.$route.query.maintainPlanId ?? undefined;
|
// this.$route.query?.createTime ?? undefined;
|
||||||
this.searchBarFormConfig[1].defaultSelect =
|
// // this.searchBarFormConfig[3].defaultSelect =
|
||||||
this.$route.query?.createTime ?? undefined;
|
// // Number(this.$route.query.relatePlan) ?? undefined;
|
||||||
// this.searchBarFormConfig[3].defaultSelect =
|
// }
|
||||||
// Number(this.$route.query.relatePlan) ?? undefined;
|
|
||||||
}
|
|
||||||
this.getList();
|
this.getList();
|
||||||
if (this.$route.query.addRecord) {
|
if (this.$route.query.addRecord) {
|
||||||
this.handleAdd()
|
this.handleAdd()
|
||||||
|
@ -6,41 +6,58 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="disabled" class="drawer"
|
<!-- <el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="disabled" class="drawer"
|
||||||
custom-class="mes-drawer" size="50%" @closed="$emit('destroy')">
|
custom-class="mes-drawer" size="50%" @closed="$emit('destroy')"> -->
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="visible"
|
||||||
|
width="50%"
|
||||||
|
:before-close="closed">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
{{ disabled ? '查看详情' : !dataForm.maintenanceStatus ? '修改' : '完成' }}
|
详情
|
||||||
|
<!-- {{ disabled ? '查看详情' : !dataForm.maintenanceStatus ? '修改' : '完成' }} -->
|
||||||
</small-title>
|
</small-title>
|
||||||
<div class="drawer-body flex">
|
<div class="drawer-body flex">
|
||||||
<div class="drawer-body__content">
|
<div class="drawer-body__content">
|
||||||
<div>
|
<div>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<div class="blodTip">故障发生时间</div>
|
<div class="blodTip">故障发生时间</div>
|
||||||
<div class="lightTip">{{ parseTime(dataForm.faultTime) }}</div>
|
<div class="lightTip">{{ parseTime(dataForm.faultTime) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<div class="blodTip">故障级别</div>
|
<div class="blodTip">故障级别</div>
|
||||||
<div class="lightTip">{{ getDictDataLabel('fault-level', dataForm.faultLevel) }}</div>
|
<div class="lightTip">{{ getDictDataLabel('fault-level', dataForm.faultLevel) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<div class="blodTip">故障类型</div>
|
<div class="blodTip">故障类型</div>
|
||||||
<div class="lightTip">{{ getDictDataLabel('fault-type', dataForm.faultType) }}</div>
|
<div class="lightTip">{{ getDictDataLabel('fault-type', dataForm.faultType) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="6">
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="blodTip">维修工</div>
|
<div class="blodTip">维修工</div>
|
||||||
<div class="lightTip">{{ dataForm.repairman }}</div>
|
<div class="lightTip">{{ dataForm.repairman }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="6">
|
||||||
<div class="blodTip">联系方式</div>
|
<div class="blodTip">联系方式</div>
|
||||||
<div class="lightTip">{{ dataForm.repairmanPhone }}</div>
|
<div class="lightTip">{{ dataForm.repairmanPhone }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<div class="blodTip">维修方式</div>
|
<div class="blodTip">维修方式</div>
|
||||||
<div class="lightTip">{{ getDictDataLabel('repair-mode', dataForm.repairMode) }}</div>
|
<div class="lightTip">{{ getDictDataLabel('repair-mode', dataForm.repairMode) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<div class="blodTip">创建时间</div>
|
||||||
|
<div class="lightTip">{{ parseTime(dataForm.createTime) }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<div class="blodTip">创建人</div>
|
||||||
|
<div class="lightTip">{{ dataForm.creator }}</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<div class="blodTip">备注</div>
|
||||||
|
<div class="lightTip">{{ dataForm.remark }}</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<div class="blodTip">维修附件</div>
|
<div class="blodTip">维修附件</div>
|
||||||
@ -55,20 +72,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<p v-else>暂无附件</p>
|
<p v-else>暂无附件</p>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="blodTip">创建时间</div>
|
|
||||||
<div class="lightTip">{{ parseTime(dataForm.createTime) }}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="blodTip">创建人</div>
|
|
||||||
<div class="lightTip">{{ dataForm.creator }}</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<div class="blodTip">备注</div>
|
|
||||||
<div class="lightTip">{{ dataForm.remark }}</div>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <el-divider style="margin-top: -10px" />
|
<!-- <el-divider style="margin-top: -10px" />
|
||||||
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
||||||
@ -143,13 +146,17 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form> -->
|
</el-form> -->
|
||||||
|
|
||||||
<div v-if="!disabled" class="drawer-body__footer">
|
<!-- <div v-if="!disabled" class="drawer-body__footer">
|
||||||
<el-button style="" @click="goback()">取消</el-button>
|
<el-button style="" @click="goback()">取消</el-button>
|
||||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<span slot="footer" class="dialog-footer">
|
||||||
</el-drawer>
|
<el-button @click="visible = false">取 消</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- </el-drawer> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -160,6 +167,7 @@ import Editor from "@/components/Editor";
|
|||||||
import { getDictDatas } from "@/utils/dict";
|
import { getDictDatas } from "@/utils/dict";
|
||||||
import { parseTime } from '@/utils/ruoyi'
|
import { parseTime } from '@/utils/ruoyi'
|
||||||
import { getDictDataLabel } from '@/utils/dict';
|
import { getDictDataLabel } from '@/utils/dict';
|
||||||
|
import tupleImg from '@/assets/images/tuple.png';
|
||||||
|
|
||||||
const uploadedFile = {
|
const uploadedFile = {
|
||||||
name: 'UploadedFile',
|
name: 'UploadedFile',
|
||||||
@ -253,6 +261,9 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() { },
|
mounted() { },
|
||||||
methods: {
|
methods: {
|
||||||
|
closed() {
|
||||||
|
this.$emit('destroy')
|
||||||
|
},
|
||||||
setFileName(val) {
|
setFileName(val) {
|
||||||
this.fileName = val
|
this.fileName = val
|
||||||
},
|
},
|
||||||
@ -372,7 +383,7 @@ export default {
|
|||||||
.drawer-body__content {
|
.drawer-body__content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
/* background: #eee; */
|
/* background: #eee; */
|
||||||
padding: 20px 30px;
|
padding: 5px 10px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<!-- 产线名 -->
|
<!-- 产线名 -->
|
||||||
<el-col :span="8">
|
<!-- <el-col :span="8">
|
||||||
<el-form-item label="产线名" prop="lineId">
|
<el-form-item label="产线名" prop="lineId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formFilters.lineId"
|
v-model="formFilters.lineId"
|
||||||
@ -45,10 +45,10 @@
|
|||||||
:value="opt.value" />
|
:value="opt.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
|
|
||||||
<!-- 工段名 -->
|
<!-- 工段名 -->
|
||||||
<el-col :span="8">
|
<!-- <el-col :span="8">
|
||||||
<el-form-item label="工段名" prop="sectionId">
|
<el-form-item label="工段名" prop="sectionId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formFilters.sectionId"
|
v-model="formFilters.sectionId"
|
||||||
@ -64,7 +64,7 @@
|
|||||||
:value="opt.value" />
|
:value="opt.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
|
|
||||||
<!-- 设备名称 -->
|
<!-- 设备名称 -->
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -220,7 +220,7 @@
|
|||||||
label="维修工"
|
label="维修工"
|
||||||
prop="repairman"
|
prop="repairman"
|
||||||
:rules="[
|
:rules="[
|
||||||
{ required: true, message: '维修工不能为空', trigger: 'blur' },
|
{ required: false, message: '维修工不能为空', trigger: 'blur' },
|
||||||
]">
|
]">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.repairman"
|
v-model="form.repairman"
|
||||||
@ -234,7 +234,7 @@
|
|||||||
v-for="opt in workerOptions"
|
v-for="opt in workerOptions"
|
||||||
:key="opt.value"
|
:key="opt.value"
|
||||||
:label="opt.label"
|
:label="opt.label"
|
||||||
:value="opt.value" />
|
:value="opt.label" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -262,7 +262,7 @@
|
|||||||
prop="repairMode"
|
prop="repairMode"
|
||||||
:rules="[
|
:rules="[
|
||||||
{
|
{
|
||||||
required: true,
|
required: false,
|
||||||
message: '维修方式不能为空',
|
message: '维修方式不能为空',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
@ -393,7 +393,7 @@
|
|||||||
:file="file"
|
:file="file"
|
||||||
:key="file.fileUrl"
|
:key="file.fileUrl"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
@delete="!disabled && handleDeleteFile(file, col.prop)" />
|
@delete="!disabled && handleDeleteFile(file)" />
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -597,9 +597,9 @@ export default {
|
|||||||
/** 设置默认维修工为用户自己 */
|
/** 设置默认维修工为用户自己 */
|
||||||
setInitWorker() {
|
setInitWorker() {
|
||||||
/** 获取用户自身id */
|
/** 获取用户自身id */
|
||||||
const userId = this.$store.getters.userId;
|
const nickname = this.$store.getters.nickname;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.repairman = [userId];
|
this.form.repairman = [nickname];
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -630,8 +630,8 @@ export default {
|
|||||||
/** 获取设备 */
|
/** 获取设备 */
|
||||||
async initEquipment() {
|
async initEquipment() {
|
||||||
const response = await this.$axios('/base/core-equipment/listAll');
|
const response = await this.$axios('/base/core-equipment/listAll');
|
||||||
this.equipmentList = response.data || [];
|
this.equipmentList = response.data.filter(item => item.special === false) || [];
|
||||||
this.equipmentOptions = response.data || [];
|
this.equipmentOptions = response.data.filter(item => item.special === false) || [];
|
||||||
// this.allSpeicalEquipments = equipmentOptions;
|
// this.allSpeicalEquipments = equipmentOptions;
|
||||||
},
|
},
|
||||||
/** 获取维修工 - 同时从用户表和员工表拉取数据 */
|
/** 获取维修工 - 同时从用户表和员工表拉取数据 */
|
||||||
@ -678,10 +678,12 @@ export default {
|
|||||||
file.type === 'image/jpeg' ||
|
file.type === 'image/jpeg' ||
|
||||||
file.type === 'image/png' ||
|
file.type === 'image/png' ||
|
||||||
file.type === 'image/jpg';
|
file.type === 'image/jpg';
|
||||||
|
if (!isJPG) {
|
||||||
|
this.$modal.msgError('只能上传jpg/png文件!');
|
||||||
|
}
|
||||||
return isJPG;
|
return isJPG;
|
||||||
};
|
};
|
||||||
return checkFileSize();
|
return checkFileSize() && checkFileType();
|
||||||
// return checkFileSize() && checkFileType();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// handlers
|
// handlers
|
||||||
|
@ -92,11 +92,21 @@ export default {
|
|||||||
});
|
});
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
this.listLine = data;
|
this.listLine = data;
|
||||||
|
} else {
|
||||||
|
this.listLine.splice(0);
|
||||||
|
}
|
||||||
|
// 获得全部设备
|
||||||
|
const res = await this.$axios({
|
||||||
|
url: '/base/core-equipment/listAll',
|
||||||
|
});
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.listEq = res.data;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.listLine.splice(0);
|
this.listEq.splice(0);
|
||||||
},
|
},
|
||||||
async getEquipmentByLineId(id) {
|
async getEquipmentByLineId(id) {
|
||||||
|
if (id) {
|
||||||
const { data, code } = await this.$axios({
|
const { data, code } = await this.$axios({
|
||||||
url: '/base/core-equipment/listByLine',
|
url: '/base/core-equipment/listByLine',
|
||||||
params: {
|
params: {
|
||||||
@ -108,6 +118,7 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.listEq.splice(0);
|
this.listEq.splice(0);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.$emit('action', {
|
this.$emit('action', {
|
||||||
|
@ -83,33 +83,41 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableProps: [
|
tableProps: [
|
||||||
{ prop: 'equipmentName', label: '设备名称' },
|
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'equipmentCode', label: '设备编码' },
|
{ prop: 'equipmentCode', label: '设备编码', minWidth: 150, showOverflowtooltip: true },
|
||||||
{ prop: 'inQuantity', label: '投入数' },
|
{ prop: 'inQuantity', label: '投入数', minWidth: 80, showOverflowtooltip: true },
|
||||||
{ prop: 'outQuantity', label: '产出数' },
|
{ prop: 'outQuantity', label: '产出数', minWidth: 80, showOverflowtooltip: true },
|
||||||
{
|
{
|
||||||
prop: 'run',
|
prop: 'run',
|
||||||
label: '是否运行',
|
label: '是否运行',
|
||||||
filter: (val) => (val != null ? (val ? '是' : '否') : ''),
|
filter: (val) => (val != null ? (val ? '是' : '否') : ''),
|
||||||
|
minWidth: 100,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
filter: (val) =>
|
filter: (val) =>
|
||||||
val != null ? ['正常', '计划停机', '故障'][val] : '',
|
val != null ? ['正常', '计划停机', '故障'][val] : '',
|
||||||
|
minWidth: 90,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'error',
|
prop: 'error',
|
||||||
label: '是否故障',
|
label: '是否故障',
|
||||||
filter: (val) => (val != null ? (val ? '是' : '否') : ''),
|
filter: (val) => (val != null ? (val ? '是' : '否') : ''),
|
||||||
|
minWidth: 100,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'quantityRecordTime',
|
prop: 'quantityRecordTime',
|
||||||
label: '生产量记录时间',
|
label: '生产量记录时间',
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{ prop: 'statusRecordTime', label: '状态记录时间', filter: parseTime },
|
{ prop: 'statusRecordTime', label: '状态记录时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true },
|
||||||
{ prop: 'opt1', label: '状态可视化', name: '查看', subcomponent: btn },
|
// { prop: 'opt1', label: '状态可视化', name: '查看', subcomponent: btn },
|
||||||
{ prop: 'opt2', label: '参数监控', name: '查看', subcomponent: btn },
|
{ prop: 'opt2', label: '参数监控', name: '查看', subcomponent: btn },
|
||||||
],
|
],
|
||||||
searchBarForm: {
|
searchBarForm: {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
padding: 16px 16px 0;
|
padding: 16px 16px 0;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
">
|
">
|
||||||
<div class="blue-title">生产节拍时序图</div>
|
<!-- <div class="blue-title">生产节拍时序图</div> -->
|
||||||
<!-- <h1>设备状态时序图</h1> -->
|
<!-- <h1>设备状态时序图</h1> -->
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<SearchBar
|
<SearchBar
|
||||||
@ -76,6 +76,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import LineChart from './components/lineChart.vue';
|
import LineChart from './components/lineChart.vue';
|
||||||
|
import moment from 'moment';
|
||||||
// import response from './response.json';
|
// import response from './response.json';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -84,6 +85,7 @@ export default {
|
|||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
moment,
|
||||||
startTime: null, // new Date(2023, 8, 26, 0, 0, 0, 0).getTime(),
|
startTime: null, // new Date(2023, 8, 26, 0, 0, 0, 0).getTime(),
|
||||||
accumulators: new Map(),
|
accumulators: new Map(),
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
@ -94,6 +96,7 @@ export default {
|
|||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'lineId',
|
param: 'lineId',
|
||||||
onchange: true,
|
onchange: true,
|
||||||
|
filterable: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -101,11 +104,12 @@ export default {
|
|||||||
placeholder: '请选择工段',
|
placeholder: '请选择工段',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'sectionId',
|
param: 'sectionId',
|
||||||
|
filterable: true
|
||||||
},
|
},
|
||||||
// 时间段
|
// 时间段
|
||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间段',
|
label: '日期',
|
||||||
dateType: 'date', // datetimerange
|
dateType: 'date', // datetimerange
|
||||||
// format: 'yyyy-MM-dd HH:mm:ss',
|
// format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
@ -263,7 +267,11 @@ export default {
|
|||||||
this.initProductline();
|
this.initProductline();
|
||||||
this.initWorksection();
|
this.initWorksection();
|
||||||
this.initEquipment();
|
this.initEquipment();
|
||||||
// this.getList();
|
let end = moment().format('YYYY-MM-DD 23:59:59')
|
||||||
|
let start = moment().format('YYYY-MM-DD 00:00:00')
|
||||||
|
this.searchBarFormConfig[2].defaultSelect = start
|
||||||
|
this.queryParams.recordTime = [start, end]
|
||||||
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSearchBarBtnClick({ btnName, ...payload }) {
|
handleSearchBarBtnClick({ btnName, ...payload }) {
|
||||||
@ -293,8 +301,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleSearchBarChanged({ param, value }) {
|
handleSearchBarChanged({ param, value }) {
|
||||||
|
this.searchBarFormConfig[1].defaultSelect = null
|
||||||
if (!value) {
|
if (!value) {
|
||||||
this.searchBarFormConfig[1].selectOptions = [];
|
this.searchBarFormConfig[1].selectOptions = [];
|
||||||
|
// this.searchBarFormConfig[1].defaultSelect = null
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (param) {
|
switch (param) {
|
||||||
@ -486,7 +496,10 @@ export default {
|
|||||||
const { code, data } = await this.$axios({
|
const { code, data } = await this.$axios({
|
||||||
url: '/monitoring/equipment-monitor/quantity-series',
|
url: '/monitoring/equipment-monitor/quantity-series',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.queryParams,
|
params: {
|
||||||
|
equipmentId: this.queryParams.equipmentId,
|
||||||
|
recordTime: this.queryParams.recordTime
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.queryParams.equipmentId = null; // 清空一下
|
this.queryParams.equipmentId = null; // 清空一下
|
||||||
|
@ -112,7 +112,7 @@ export default class GanttGraph {
|
|||||||
// top: 12 + 128 * this.gridIndex,
|
// top: 12 + 128 * this.gridIndex,
|
||||||
top: 12 + 104 * this.gridIndex,
|
top: 12 + 104 * this.gridIndex,
|
||||||
right: 48,
|
right: 48,
|
||||||
left: 88,
|
left: 183,
|
||||||
height: 56
|
height: 56
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
padding: 16px 16px 0;
|
padding: 16px 16px 0;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
">
|
">
|
||||||
<div class="blue-title">生产节拍时序图</div>
|
<!-- <div class="blue-title">生产节拍时序图</div> -->
|
||||||
<SearchBar
|
<SearchBar
|
||||||
:formConfigs="searchBarFormConfig"
|
:formConfigs="searchBarFormConfig"
|
||||||
ref="search-bar"
|
ref="search-bar"
|
||||||
@ -119,6 +119,7 @@ export default {
|
|||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'lineId',
|
param: 'lineId',
|
||||||
onchange: true,
|
onchange: true,
|
||||||
|
filterable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -126,6 +127,7 @@ export default {
|
|||||||
placeholder: '请选择工段',
|
placeholder: '请选择工段',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'sectionId',
|
param: 'sectionId',
|
||||||
|
filterable: true,
|
||||||
},
|
},
|
||||||
// 时间段
|
// 时间段
|
||||||
{
|
{
|
||||||
@ -172,20 +174,20 @@ export default {
|
|||||||
// demo: [
|
// demo: [
|
||||||
// [
|
// [
|
||||||
// {
|
// {
|
||||||
// equipmentName: '下片机',
|
// equipmentName: '一大线四区2小线清洗机',
|
||||||
// duration: 30,
|
// duration: 30,
|
||||||
// relativeDuration: 0.6,
|
// relativeDuration: 0.6,
|
||||||
// status: 0,
|
// status: 0,
|
||||||
// startPos: 0,
|
// startPos: 0,
|
||||||
// startTime: 1691568181000,
|
// startTime: 1711073203686,
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// equipmentName: '下片机',
|
// equipmentName: '一大线四区2小线清洗机',
|
||||||
// duration: 20,
|
// duration: 20,
|
||||||
// relativeDuration: 0.4,
|
// relativeDuration: 0.4,
|
||||||
// status: 2,
|
// status: 2,
|
||||||
// startPos: 30,
|
// startPos: 30,
|
||||||
// startTime: 1691569981000
|
// startTime: 1711072203686,
|
||||||
// },
|
// },
|
||||||
// ],
|
// ],
|
||||||
// ],
|
// ],
|
||||||
@ -257,6 +259,10 @@ export default {
|
|||||||
(eq) => eq[0].equipmentId
|
(eq) => eq[0].equipmentId
|
||||||
);
|
);
|
||||||
this.graphList = this.objectToArray(data);
|
this.graphList = this.objectToArray(data);
|
||||||
|
// this.graphList = this.demo.map(item => {
|
||||||
|
// item.key = item[0].equipmentName;
|
||||||
|
// return item;
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2023-12-08 13:59:20
|
* @LastEditTime: 2024-03-22 17:11:55
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="false" class="drawer" size="50%">
|
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" class="drawer" size="50%">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
@ -42,10 +42,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="当前状态" prop="enabled">
|
<el-form-item label="当前状态" prop="enabled">
|
||||||
<el-select v-model="dataForm.enabled" filterable :disabled="isdetail" style="width: 100%"
|
<el-switch v-model="dataForm.enabled" :active-value="1" :inactive-value="0">
|
||||||
placeholder="请选择当前状态">
|
</el-switch>
|
||||||
<el-option v-for="dict in enableList" :key=" dict.id" :label="dict.name" :value="dict.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -77,7 +75,7 @@
|
|||||||
:limit.sync="listQuery.pageSize" :page-sizes="[5, 10, 15]" @pagination="getList" />
|
:limit.sync="listQuery.pageSize" :page-sizes="[5, 10, 15]" @pagination="getList" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="drawer-body__footer">
|
<div v-if="!isdetail" class="drawer-body__footer">
|
||||||
<el-button style="" @click="goback()">取消</el-button>
|
<el-button style="" @click="goback()">取消</el-button>
|
||||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -200,7 +198,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
this.urlOptions.updateURL(this.dataForm).then(response => {
|
this.urlOptions.updateURL(this.dataForm).then(res => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$emit("refreshDataList");
|
this.$emit("refreshDataList");
|
||||||
@ -208,7 +206,7 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
this.urlOptions.createURL(this.dataForm).then(res => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.idAttrShow = true;
|
this.idAttrShow = true;
|
||||||
this.dataForm.id = res.data
|
this.dataForm.id = res.data
|
||||||
|
@ -93,6 +93,7 @@ export default {
|
|||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
param: 'equipmentId',
|
param: 'equipmentId',
|
||||||
|
filterable: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
@ -146,6 +147,26 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
deleteHandle(id, name, index) {
|
||||||
|
this.$confirm(`是否确认删除设备物料bom${name}`, "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.urlOptions.deleteURL(id).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
},
|
||||||
getDict() {
|
getDict() {
|
||||||
getEquipmentList().then((res) => {
|
getEquipmentList().then((res) => {
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2023-12-14 14:03:27
|
* @LastEditTime: 2024-03-22 17:12:03
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="false" class="drawer" size="50%">
|
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" class="drawer" size="50%">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
@ -43,10 +43,12 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="当前状态" prop="enabled">
|
<el-form-item label="当前状态" prop="enabled">
|
||||||
<!-- <el-switch v-model="dataForm.enabled" :active-value="1" :inactive-value="0" /> -->
|
<!-- <el-switch v-model="dataForm.enabled" :active-value="1" :inactive-value="0" /> -->
|
||||||
<el-select v-model="dataForm.enabled" filterable :disabled="isdetail" style="width: 100%"
|
<!-- <el-select v-model="dataForm.enabled" filterable :disabled="isdetail" style="width: 100%"
|
||||||
placeholder="请选择当前状态">
|
placeholder="请选择当前状态">
|
||||||
<el-option v-for="dict in enableList" :key=" dict.id" :label="dict.name" :value="dict.id" />
|
<el-option v-for="dict in enableList" :key=" dict.id" :label="dict.name" :value="dict.id" />
|
||||||
</el-select>
|
</el-select> -->
|
||||||
|
<el-switch v-model="dataForm.enabled" :active-value="1" :inactive-value="0">
|
||||||
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -224,6 +226,7 @@ export default {
|
|||||||
this.equipmentList.forEach((ele) => {
|
this.equipmentList.forEach((ele) => {
|
||||||
if (val === ele.id) {
|
if (val === ele.id) {
|
||||||
this.dataForm.equipmentCode = ele.code
|
this.dataForm.equipmentCode = ele.code
|
||||||
|
console.log(this.dataForm.equipmentCode);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -286,7 +289,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
this.urlOptions.updateURL(this.dataForm).then(response => {
|
this.urlOptions.updateURL(this.dataForm).then(res => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$emit("refreshDataList");
|
this.$emit("refreshDataList");
|
||||||
@ -294,7 +297,7 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
this.urlOptions.createURL(this.dataForm).then(res => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.idAttrShow = true;
|
this.idAttrShow = true;
|
||||||
this.dataForm.id = res.data
|
this.dataForm.id = res.data
|
||||||
@ -336,16 +339,17 @@ export default {
|
|||||||
pageSize:10
|
pageSize:10
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.dataForm = response.data
|
this.dataForm = response.data
|
||||||
|
this.getCode(response.data.equipmentId)
|
||||||
// this.dataForm.unit = String(this.dataForm.unit)
|
// this.dataForm.unit = String(this.dataForm.unit)
|
||||||
// this.dataForm.ValueType = String(this.dataForm.ValueType)
|
// this.dataForm.ValueType = String(this.dataForm.ValueType)
|
||||||
// this.dataForm.productType = String(this.dataForm.productType)
|
// this.dataForm.productType = String(this.dataForm.productType)
|
||||||
});
|
});
|
||||||
// 获取产品属性列表
|
// 获取产品属性列表
|
||||||
this.getList();
|
this.getList()
|
||||||
} else {
|
} else {
|
||||||
if (this.urlOptions.isGetCode) {
|
// if (this.urlOptions.isGetCode) {
|
||||||
this.getCode()
|
// this.getCode()
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -93,6 +93,8 @@ export default {
|
|||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
param: 'equipmentId',
|
param: 'equipmentId',
|
||||||
|
filterable: true
|
||||||
|
// filter
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
@ -158,6 +160,26 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
deleteHandle(id, name, index) {
|
||||||
|
this.$confirm(`是否确认删除设备参数bom${ name}`, "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.urlOptions.deleteURL(id).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
},
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
getDataList() {
|
getDataList() {
|
||||||
this.dataListLoading = true;
|
this.dataListLoading = true;
|
||||||
|
@ -189,7 +189,7 @@ export default {
|
|||||||
input: true,
|
input: true,
|
||||||
label: '工艺编码',
|
label: '工艺编码',
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
// url: '/base/core-equipment/getCode',
|
url: '/extend/process-flow/getCode',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
@ -2,11 +2,7 @@
|
|||||||
<el-form ref="form" :rules="rules" label-width="100px" :model="form">
|
<el-form ref="form" :rules="rules" label-width="100px" :model="form">
|
||||||
<el-form-item label="员工" prop="workerId" v-if='!isEdit'>
|
<el-form-item label="员工" prop="workerId" v-if='!isEdit'>
|
||||||
<el-select v-model="form.workerId" placeholder="请选择" filterable style="width: 100%;" @change="selectWorker()">
|
<el-select v-model="form.workerId" placeholder="请选择" filterable style="width: 100%;" @change="selectWorker()">
|
||||||
<el-option
|
<el-option v-for="item in workerList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
v-for="item in workerList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-drawer title="查看详情" :visible.sync="visible" size="70%">
|
<el-drawer title="查看详情" :visible.sync="visible" size="70%" :show-close='false'>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-row class="topBox">
|
<el-row class="topBox">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@ -9,18 +9,15 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="boldTitle">车间名称</p>
|
<p class="boldTitle">车间名称</p>
|
||||||
<p class="lightText">{{ (queryParams.roomNameDict || queryParams.roomNameDict === 0) ? getDictDataLabel('workshop',queryParams.roomNameDict) : '-' }}</p>
|
<p class="lightText">{{ (queryParams.roomNameDict || queryParams.roomNameDict === 0) ?
|
||||||
|
getDictDataLabel('workshop', queryParams.roomNameDict) : '-' }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="boldTitle">班组名称</p>
|
<p class="boldTitle">班组名称</p>
|
||||||
<p class="lightText">{{ queryParams.teamName ? queryParams.teamName : '-' }}</p>
|
<p class="lightText">{{ queryParams.teamName ? queryParams.teamName : '-' }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<base-table
|
<base-table :table-props="tableProps" :table-data="tableData" :max-height="tableH" :page="1" :limit="1000000" />
|
||||||
:table-props="tableProps"
|
|
||||||
:table-data="tableData"
|
|
||||||
:max-height="tableH"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</div>
|
</div>
|
||||||
@ -47,7 +44,7 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workTime',
|
prop: 'workTime',
|
||||||
label: '工作时长'
|
label: '工作时长(h)'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
@ -83,10 +80,12 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.box {
|
.box {
|
||||||
padding: 0 32px;
|
padding: 0 32px;
|
||||||
|
|
||||||
.topBox {
|
.topBox {
|
||||||
padding-bottom: 30px;
|
padding-bottom: 30px;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
border-bottom: 1px solid #E9E9E9;
|
border-bottom: 1px solid #E9E9E9;
|
||||||
|
|
||||||
.boldTitle {
|
.boldTitle {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@ -94,6 +93,7 @@ export default {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lightText {
|
.lightText {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
@ -2,12 +2,10 @@
|
|||||||
<el-form :inline="true" class="demo-form-inline">
|
<el-form :inline="true" class="demo-form-inline">
|
||||||
<span class="blue-block"></span>
|
<span class="blue-block"></span>
|
||||||
<el-form-item label="班次信息">
|
<el-form-item label="班次信息">
|
||||||
<el-select v-model="queryParams.classesId" placeholder="班次信息" style="width: 200px;" size="small" clearable>
|
<el-select v-model="queryParams.classesId" placeholder="班次信息" style="width: 200px;" size="small" clearable
|
||||||
<el-option
|
filterable>
|
||||||
v-for="item in classesArr"
|
<el-option v-for="item in classesArr" :key="item.id"
|
||||||
:key="item.id"
|
:label="(item.roomName ? item.roomName : '') + '-' + item.name" :value="item.id">
|
||||||
:label="(item.roomName?item.roomName:'')+'-'+item.name"
|
|
||||||
:value="item.id">
|
|
||||||
<span>{{ item.roomName }}-{{ item.name }}</span>
|
<span>{{ item.roomName }}-{{ item.name }}</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -15,15 +13,9 @@
|
|||||||
<el-form-item label="班组信息">
|
<el-form-item label="班组信息">
|
||||||
<el-input v-model="queryParams.teamName" placeholder="班组信息" style="width: 200px;" clearable></el-input>
|
<el-input v-model="queryParams.teamName" placeholder="班组信息" style="width: 200px;" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="上班时间">
|
<el-form-item label="上班日期">
|
||||||
<el-date-picker
|
<el-date-picker v-model="queryParams.tiemStr" type="daterange" format='yyyy-MM-dd' value-format='yyyy-MM-dd'
|
||||||
v-model="queryParams.tiemStr"
|
range-separator='-' style="width: 250px;" size="small">
|
||||||
type="daterange"
|
|
||||||
format='yyyy-MM-dd'
|
|
||||||
value-format='yyyy-MM-dd'
|
|
||||||
range-separator='-'
|
|
||||||
style="width: 250px;"
|
|
||||||
size="small">
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -69,6 +61,7 @@ export default {
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #0B58FF;
|
color: #0B58FF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input__prefix .el-icon-date {
|
.el-input__prefix .el-icon-date {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #0B58FF;
|
color: #0B58FF;
|
||||||
@ -83,6 +76,7 @@ export default {
|
|||||||
background: #E8E8E8;
|
background: #E8E8E8;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.demo-form-inline {
|
.demo-form-inline {
|
||||||
.blue-block {
|
.blue-block {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-drawer title="查看详情" :visible.sync="visible" size="70%" :wrapperClosable='false' @closed="closeDrawer">
|
<el-drawer title="生产情况" :visible.sync="visible" size="70%" @closed="closeDrawer" :show-close='false'>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<base-table
|
<base-table :table-props="tableProps" :table-data="tableData" :max-height="tableH" />
|
||||||
:table-props="tableProps"
|
|
||||||
:table-data="tableData"
|
|
||||||
:max-height="tableH"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</div>
|
</div>
|
||||||
|
@ -8,28 +8,13 @@
|
|||||||
@headBtnClick="buttonClick"
|
@headBtnClick="buttonClick"
|
||||||
/> -->
|
/> -->
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table
|
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
||||||
:page="queryParams.pageNo"
|
:max-height="tableH">
|
||||||
:limit="queryParams.pageSize"
|
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
||||||
:table-props="tableProps"
|
@clickBtn="handleClick" />
|
||||||
:table-data="list"
|
|
||||||
:max-height="tableH"
|
|
||||||
>
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="80"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick"
|
|
||||||
/>
|
|
||||||
</base-table>
|
</base-table>
|
||||||
<pagination
|
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
||||||
:page.sync="queryParams.pageNo"
|
@pagination="getList" />
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
:total="total"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
<!-- 查看生产情况 -->
|
<!-- 查看生产情况 -->
|
||||||
<team-production-detail v-if='paramVisible' ref='schedulingMonitoringDetail' />
|
<team-production-detail v-if='paramVisible' ref='schedulingMonitoringDetail' />
|
||||||
</div>
|
</div>
|
||||||
@ -86,38 +71,6 @@ export default {
|
|||||||
name: 'GroupTeamScheduling',
|
name: 'GroupTeamScheduling',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formConfig: [
|
|
||||||
{
|
|
||||||
type: 'select',
|
|
||||||
label: '班次信息',
|
|
||||||
selectOptions: [],
|
|
||||||
param: 'classesId'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'input',
|
|
||||||
label: '班组信息',
|
|
||||||
placeholder: '班组信息',
|
|
||||||
param: 'teamName'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'datePicker',
|
|
||||||
label: '上班日期',
|
|
||||||
dateType: 'daterange',
|
|
||||||
format: 'yyyy-MM-dd',
|
|
||||||
valueFormat: 'yyyy-MM-dd',
|
|
||||||
rangeSeparator: '-',
|
|
||||||
// valueFormat: "timestamp",
|
|
||||||
param: 'tiemStr',
|
|
||||||
defaultSelect: '',
|
|
||||||
width: 250
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
btnName: '查询',
|
|
||||||
name: 'search',
|
|
||||||
color: 'primary'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
@ -130,8 +83,9 @@ export default {
|
|||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi('base:team-production:detail')
|
this.$auth.hasPermi('base:team-production:detail')
|
||||||
? {
|
? {
|
||||||
type: 'detail',
|
type: 'productionDetail',
|
||||||
btnName: '详情'
|
btnName: '查看',
|
||||||
|
showTip: '生产情况'
|
||||||
}
|
}
|
||||||
: undefined
|
: undefined
|
||||||
].filter((v) => v),
|
].filter((v) => v),
|
||||||
|
@ -210,8 +210,8 @@ export default {
|
|||||||
mobileCodeTimer: 0,
|
mobileCodeTimer: 0,
|
||||||
loginForm: {
|
loginForm: {
|
||||||
loginType: 'uname',
|
loginType: 'uname',
|
||||||
username: 'admin',
|
username: '',
|
||||||
password: 'admin123',
|
password: '',
|
||||||
captchaVerification: '',
|
captchaVerification: '',
|
||||||
mobile: '',
|
mobile: '',
|
||||||
mobileCode: '',
|
mobileCode: '',
|
||||||
@ -297,9 +297,9 @@ export default {
|
|||||||
this.handleLogin({});
|
this.handleLogin({});
|
||||||
},
|
},
|
||||||
getCookie() {
|
getCookie() {
|
||||||
const username = getUsername();
|
// const username = getUsername();
|
||||||
const password = getPassword();
|
// const password = getPassword();
|
||||||
const rememberMe = getRememberMe();
|
// const rememberMe = getRememberMe();
|
||||||
const tenantName = getTenantName();
|
const tenantName = getTenantName();
|
||||||
this.loginForm = {
|
this.loginForm = {
|
||||||
...this.loginForm,
|
...this.loginForm,
|
||||||
|
@ -272,7 +272,7 @@ export default {
|
|||||||
{ prop: 'lineName', label: '产线' },
|
{ prop: 'lineName', label: '产线' },
|
||||||
{ prop: 'sectionName', label: '工段' },
|
{ prop: 'sectionName', label: '工段' },
|
||||||
// { prop: 'externalCode', label: '设备编码' },
|
// { prop: 'externalCode', label: '设备编码' },
|
||||||
{ prop: 'equipmentId', label: '设备编码' },
|
{ prop: 'equipmentCode', label: '设备编码' },
|
||||||
{ prop: 'equipmentName', label: '设备名称' },
|
{ prop: 'equipmentName', label: '设备名称' },
|
||||||
{ prop: 'totalQuantity', label: '加工数量' },
|
{ prop: 'totalQuantity', label: '加工数量' },
|
||||||
],
|
],
|
||||||
|
@ -60,14 +60,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="包装要求" prop="packReq">
|
<el-form-item label="包装要求" prop="packReq">
|
||||||
<el-select v-model="form.packReq" placeholder="请选择" style="width: 100%;" clearable>
|
<el-input v-model="form.packReq"></el-input>
|
||||||
<el-option
|
|
||||||
v-for="item in getDictDatas(DICT_TYPE.PACK_SPEC)"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -127,7 +120,7 @@ export default {
|
|||||||
this.form.customerId = res.data.customerId
|
this.form.customerId = res.data.customerId
|
||||||
this.form.planQuantity = res.data.planQuantity
|
this.form.planQuantity = res.data.planQuantity
|
||||||
this.form.deliveTime = res.data.deliveTime ? res.data.deliveTime : null
|
this.form.deliveTime = res.data.deliveTime ? res.data.deliveTime : null
|
||||||
this.form.packReq = res.data.packReq ? res.data.packReq+'' : ''
|
this.form.packReq = res.data.packReq
|
||||||
this.form.remark = res.data.remark
|
this.form.remark = res.data.remark
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getSpecifications(this.form.planProductId)
|
this.getSpecifications(this.form.planProductId)
|
||||||
|
@ -125,7 +125,7 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'packReq',
|
prop: 'packReq',
|
||||||
label: '包装要求',
|
label: '包装要求',
|
||||||
filter: publicFormatter('pack_spec'),
|
// filter: publicFormatter('pack_spec'),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
showOverflowtooltip: true
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
<span class="blueTitle"></span>
|
<span class="blueTitle"></span>
|
||||||
<span>集团编码: {{ orderGroupMsg.code }}</span>
|
<span>集团编码: {{ orderGroupMsg.code }}</span>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" plain size="small" style="float: right;" @click="returnOrderManage"><svg-icon icon-class="return"/> 返回</el-button>
|
<el-button type="primary" plain size="small" style="float: right;" @click="returnOrderManage"><svg-icon
|
||||||
|
icon-class="return" /> 返回</el-button>
|
||||||
<div style="padding-left: 14px;">
|
<div style="padding-left: 14px;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
@ -153,13 +154,8 @@
|
|||||||
<span class="blueTitle"></span>
|
<span class="blueTitle"></span>
|
||||||
<span>工单信息</span>
|
<span>工单信息</span>
|
||||||
</div>
|
</div>
|
||||||
<base-table
|
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps"
|
||||||
:page="queryParams.pageNo"
|
:table-data="item.coreWorkOrderRespVOS || []" :max-height="tableH" />
|
||||||
:limit="queryParams.pageSize"
|
|
||||||
:table-props="tableProps"
|
|
||||||
:table-data="item.coreWorkOrderRespVOS || []"
|
|
||||||
:max-height="tableH"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -192,14 +188,14 @@ const tableProps = [
|
|||||||
filter: publicFormatter('workshop')
|
filter: publicFormatter('workshop')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'planQuantity',
|
prop: 'planAssignmentQuantity',
|
||||||
label: '计划加工量',
|
label: '计划分配数量',
|
||||||
width: 100
|
width: 110
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'actualQuantity',
|
prop: 'actualAssignmentQuantity',
|
||||||
label: '实际加工量',
|
label: '实际分配数量',
|
||||||
width: 100
|
width: 110
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'actualArea',
|
prop: 'actualArea',
|
||||||
@ -285,9 +281,12 @@ export default {
|
|||||||
height: calc(100vh - 120px - 8px);
|
height: calc(100vh - 120px - 8px);
|
||||||
background-color: rgb(242, 244, 249);
|
background-color: rgb(242, 244, 249);
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
.box1, .box2 {
|
|
||||||
|
.box1,
|
||||||
|
.box2 {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 9px;
|
border-radius: 9px;
|
||||||
|
|
||||||
.blodTip {
|
.blodTip {
|
||||||
height: 16px;
|
height: 16px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@ -295,6 +294,7 @@ export default {
|
|||||||
color: rgba(0, 0, 0, 0.85);
|
color: rgba(0, 0, 0, 0.85);
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lightTip {
|
.lightTip {
|
||||||
height: 16px;
|
height: 16px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@ -306,15 +306,18 @@ export default {
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.box2 {
|
.box2 {
|
||||||
height: 415px;
|
height: 415px;
|
||||||
padding: 12px 16px 0;
|
padding: 12px 16px 0;
|
||||||
margin: 8px 0;
|
margin: 8px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box1 {
|
.box1 {
|
||||||
height: 215px;
|
height: 215px;
|
||||||
padding: 16px 16px 0 16px;
|
padding: 16px 16px 0 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.boxTitle {
|
.boxTitle {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@ -322,6 +325,7 @@ export default {
|
|||||||
color: #000000;
|
color: #000000;
|
||||||
margin: 0 10px 20px 0;
|
margin: 0 10px 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blueTitle {
|
.blueTitle {
|
||||||
content: '';
|
content: '';
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -6,12 +6,9 @@
|
|||||||
<el-input v-model="form.name"></el-input>
|
<el-input v-model="form.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工单名称" prop="workOrderId" v-if='isBind'>
|
<el-form-item label="工单名称" prop="workOrderId" v-if='isBind'>
|
||||||
<el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" filterable @change="getWorkOrderMsg">
|
<el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" filterable
|
||||||
<el-option
|
@change="getWorkOrderMsg">
|
||||||
v-for="item in workOrderList"
|
<el-option v-for="item in workOrderList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -24,11 +21,7 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="产品名称" prop="planProductId">
|
<el-form-item label="产品名称" prop="planProductId">
|
||||||
<el-select v-model="form.planProductId" placeholder="请选择" disabled style="width: 100%;">
|
<el-select v-model="form.planProductId" placeholder="请选择" disabled style="width: 100%;">
|
||||||
<el-option
|
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
v-for="item in productList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -42,36 +35,28 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划开始时间">
|
<el-form-item label="计划开始时间">
|
||||||
<el-date-picker
|
<el-date-picker v-model="planStartTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
v-model="planStartTime"
|
style="width: 100%;" placeholder="选择日期" :disabled="isBind">
|
||||||
type="datetime"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
style="width: 100%;"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabled="isBind">
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划完成时间">
|
<el-form-item label="计划完成时间">
|
||||||
<el-date-picker
|
<el-date-picker v-model="planFinishTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
v-model="planFinishTime"
|
style="width: 100%;" placeholder="选择日期" :disabled="isBind">
|
||||||
type="datetime"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
style="width: 100%;"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabled="isBind">
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划投入数量" prop="planAssignQuantity">
|
<el-form-item label="计划投入数量" prop="planAssignQuantity">
|
||||||
<el-input-number v-model="form.planAssignQuantity" :min="0" :max="9999999999999" :disabled="isBind" style="width: 100%;"></el-input-number>
|
<el-input-number v-model="form.planAssignQuantity" :min="0" :max="9999999999999" :disabled="isBind"
|
||||||
|
style="width: 100%;"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划生产数量" prop="planQuantity">
|
<el-form-item label="计划生产数量" prop="planQuantity">
|
||||||
<el-input-number v-model="form.planQuantity" :min="0" :max="9999999999999" :disabled="isBind" style="width: 100%;"></el-input-number>
|
<el-input-number v-model="form.planQuantity" :min="0" :max="9999999999999" :disabled="isBind"
|
||||||
|
style="width: 100%;"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -79,18 +64,15 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="关联工艺" prop="processFlowId">
|
<el-form-item label="关联工艺" prop="processFlowId">
|
||||||
<el-select v-model="form.processFlowId" placeholder="请选择" :disabled="isBind" style="width: 100%;">
|
<el-select v-model="form.processFlowId" placeholder="请选择" :disabled="isBind" style="width: 100%;">
|
||||||
<el-option
|
<el-option v-for="item in processFlowList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
v-for="item in processFlowList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="物料计算方式" prop="materialMethod">
|
<el-form-item label="物料计算方式" prop="materialMethod">
|
||||||
<el-select v-model="form.materialMethod" placeholder="请选择" style="width: 100%;" :disabled="isBind" @change='selectMethod'>
|
<el-select v-model="form.materialMethod" placeholder="请选择" style="width: 100%;" :disabled="isBind"
|
||||||
|
@change='selectMethod'>
|
||||||
<el-option label="产品基础BOM" :value="1"></el-option>
|
<el-option label="产品基础BOM" :value="1"></el-option>
|
||||||
<el-option label="工艺扩展BOM" :value="2"></el-option>
|
<el-option label="工艺扩展BOM" :value="2"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -99,10 +81,7 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="优先级" prop="priority">
|
<el-form-item label="优先级" prop="priority">
|
||||||
<el-select v-model="form.priority" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
<el-select v-model="form.priority" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
||||||
<el-option
|
<el-option v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)" :key="item.value" :label="item.label"
|
||||||
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -111,11 +90,7 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="工单类型" prop="type">
|
<el-form-item label="工单类型" prop="type">
|
||||||
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
||||||
<el-option
|
<el-option v-for="item in workOrderTypeList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
v-for="item in workOrderTypeList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -125,11 +100,7 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="关联产线" prop="productLineId">
|
<el-form-item label="关联产线" prop="productLineId">
|
||||||
<el-select v-model="form.productLineId" placeholder="请选择" multiple style="width: 100%;" :disabled="isBind">
|
<el-select v-model="form.productLineId" placeholder="请选择" multiple style="width: 100%;" :disabled="isBind">
|
||||||
<el-option
|
<el-option v-for="item in productLineList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
v-for="item in productLineList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -137,10 +108,7 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="负责车间" prop="roomNameDict">
|
<el-form-item label="负责车间" prop="roomNameDict">
|
||||||
<el-select v-model="form.roomNameDict" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
<el-select v-model="form.roomNameDict" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
||||||
<el-option
|
<el-option v-for="item in getDictDatas(DICT_TYPE.WORK_SHOP)" :key="item.value" :label="item.label"
|
||||||
v-for="item in getDictDatas(DICT_TYPE.WORK_SHOP)"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -153,7 +121,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
||||||
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999" style="width: 100%;"></el-input-number>
|
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999"
|
||||||
|
style="width: 100%;"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -161,7 +130,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getProductAll } from '@/api/base/product'
|
import { getProductAll } from '@/api/base/product'
|
||||||
import { getProcessFlowList, getWorkOrderCode, orderIssue, workOrderList, getWorkOrderById } from '@/api/base/orderManage'
|
import { getProcessFlowList, getWorkOrderCode, orderIssue, getFreeWOlist, getWorkOrderById } from '@/api/base/orderManage'
|
||||||
import { getLineAll } from '@/api/base/productionLine'
|
import { getLineAll } from '@/api/base/productionLine'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
export default {
|
export default {
|
||||||
@ -244,7 +213,7 @@ export default {
|
|||||||
this.processFlowList = res.data || []
|
this.processFlowList = res.data || []
|
||||||
})
|
})
|
||||||
// 工单list
|
// 工单list
|
||||||
workOrderList({
|
getFreeWOlist({
|
||||||
status: 1
|
status: 1
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.workOrderList = res.data || []
|
this.workOrderList = res.data || []
|
||||||
|
@ -2,14 +2,17 @@
|
|||||||
<div class="orderDetailData">
|
<div class="orderDetailData">
|
||||||
<div v-show="!isSingle" style="position: relative;padding-right: 90px;">
|
<div v-show="!isSingle" style="position: relative;padding-right: 90px;">
|
||||||
<TopTab :orderIdList='orderIdList' :orderId="orderId" @emitFun='toggleName' />
|
<TopTab :orderIdList='orderIdList' :orderId="orderId" @emitFun='toggleName' />
|
||||||
<el-button type="primary" plain size="small" style="position: absolute;right: 0; top: 0;height: 48px;font-size: 14px;" @click="returnOrderManage"><svg-icon icon-class="return"/> 返回</el-button>
|
<el-button type="primary" plain size="small"
|
||||||
|
style="position: absolute;right: 0; top: 0;height: 48px;font-size: 14px;" @click="returnOrderManage"><svg-icon
|
||||||
|
icon-class="return" /> 返回</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="box1">
|
<div class="box1">
|
||||||
<div class="boxTitle">
|
<div class="boxTitle">
|
||||||
<span class="blueTitle"></span>
|
<span class="blueTitle"></span>
|
||||||
<span>订单编码: {{ orderMsg.code }}</span>
|
<span>订单编码: {{ orderMsg.code }}</span>
|
||||||
</div>
|
</div>
|
||||||
<el-button v-show="isSingle" type="primary" plain size="small" style="float: right;" @click="returnOrderManage"><svg-icon icon-class="return"/> 返回</el-button>
|
<el-button v-show="isSingle" type="primary" plain size="small" style="float: right;"
|
||||||
|
@click="returnOrderManage"><svg-icon icon-class="return" /> 返回</el-button>
|
||||||
<div style="padding-left: 14px;">
|
<div style="padding-left: 14px;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
@ -85,13 +88,8 @@
|
|||||||
<span>工单信息</span>
|
<span>工单信息</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table
|
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps1"
|
||||||
:page="queryParams.pageNo"
|
:table-data="list1" :max-height="tableH" />
|
||||||
:limit="queryParams.pageSize"
|
|
||||||
:table-props="tableProps1"
|
|
||||||
:table-data="list1"
|
|
||||||
:max-height="tableH"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -125,14 +123,14 @@ const tableProps1 = [
|
|||||||
filter: publicFormatter('workshop')
|
filter: publicFormatter('workshop')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'planQuantity',
|
prop: 'planAssignmentQuantity',
|
||||||
label: '计划加工量',
|
label: '计划分配数量',
|
||||||
width: 100
|
width: 110
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'actualQuantity',
|
prop: 'actualAssignmentQuantity',
|
||||||
label: '实际加工量',
|
label: '实际分配数量',
|
||||||
width: 100
|
width: 110
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'actualArea',
|
prop: 'actualArea',
|
||||||
@ -253,18 +251,23 @@ export default {
|
|||||||
<style lang='scss' scoped>
|
<style lang='scss' scoped>
|
||||||
.orderDetailData {
|
.orderDetailData {
|
||||||
background-color: rgb(242, 244, 249);
|
background-color: rgb(242, 244, 249);
|
||||||
.box1, .box2{
|
|
||||||
|
.box1,
|
||||||
|
.box2 {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 9px;
|
border-radius: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box2 {
|
.box2 {
|
||||||
height: calc(100vh - 351px);
|
height: calc(100vh - 351px);
|
||||||
padding: 12px 16px 0;
|
padding: 12px 16px 0;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box1 {
|
.box1 {
|
||||||
height: 215px;
|
height: 215px;
|
||||||
padding: 16px 16px 0 16px;
|
padding: 16px 16px 0 16px;
|
||||||
|
|
||||||
.blodTip {
|
.blodTip {
|
||||||
height: 16px;
|
height: 16px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@ -272,6 +275,7 @@ export default {
|
|||||||
color: rgba(0, 0, 0, 0.85);
|
color: rgba(0, 0, 0, 0.85);
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lightTip {
|
.lightTip {
|
||||||
height: 16px;
|
height: 16px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@ -280,6 +284,7 @@ export default {
|
|||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.boxTitle {
|
.boxTitle {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@ -287,6 +292,7 @@ export default {
|
|||||||
color: #000000;
|
color: #000000;
|
||||||
margin: 0 10px 20px 0;
|
margin: 0 10px 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blueTitle {
|
.blueTitle {
|
||||||
content: '';
|
content: '';
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="产线" prop="productionLineId"
|
<el-form-item label="产线" prop="productionLineId"
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
||||||
<el-select v-model="dataForm.productionLineId" placeholder="请选择产线" filterable
|
<el-select v-model="dataForm.productionLineId" placeholder="请选择产线" filterable :disabled="disabled"
|
||||||
@change="handleProductlineChange">
|
@change="handleProductlineChange">
|
||||||
<el-option v-for="opt in productionLineList" :key="opt.value" :label="opt.label" :value="opt.value" />
|
<el-option v-for="opt in productionLineList" :key="opt.value" :label="opt.label" :value="opt.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -19,7 +19,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="工段" prop="sectionId" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
<el-form-item label="工段" prop="sectionId" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
||||||
<el-select v-model="dataForm.sectionId" placeholder="请选择工段" filterable @change="$emit('update', dataForm)">
|
<el-select :disabled="disabled" v-model="dataForm.sectionId" placeholder="请选择工段" filterable
|
||||||
|
@change="$emit('update', dataForm)">
|
||||||
<el-option v-for="opt in workshopSectionList" :key="opt.value" :label="opt.label" :value="opt.value" />
|
<el-option v-for="opt in workshopSectionList" :key="opt.value" :label="opt.label" :value="opt.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -109,15 +110,18 @@ export default {
|
|||||||
productionLineId: null,
|
productionLineId: null,
|
||||||
inspectionDetIdList:[],
|
inspectionDetIdList:[],
|
||||||
},
|
},
|
||||||
|
disabled:false,
|
||||||
formLoading: true,
|
formLoading: true,
|
||||||
productionLineList: [],
|
productionLineList: [],
|
||||||
inspectionDetList:[],
|
inspectionDetList:[],
|
||||||
workshopSectionList: [],
|
workshopSectionList: [],
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getProductionLineList()
|
|
||||||
this.getQualityInspectionDetList()
|
|
||||||
// this.getList()
|
// this.getList()
|
||||||
// this.getWorksectionList();
|
// this.getWorksectionList();
|
||||||
// this.getCode('/base/equipment-group-alarm/getCode').then((code) => {
|
// this.getCode('/base/equipment-group-alarm/getCode').then((code) => {
|
||||||
@ -139,11 +143,14 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
init(obj) {
|
init(obj) {
|
||||||
// console.log(productionLineId);
|
// console.log(productionLineId);
|
||||||
console.log(obj);
|
console.log(obj)
|
||||||
|
this.getProductionLineList()
|
||||||
|
this.getQualityInspectionDetList()
|
||||||
this.visible = true
|
this.visible = true
|
||||||
// if(obj.id)
|
// if(obj.id)
|
||||||
if (obj) {
|
if (obj) {
|
||||||
this.dataForm.id = obj.id || null;
|
this.dataForm.id = obj.id || null;
|
||||||
|
this.disabled = true
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs["dataForm"].resetFields()
|
this.$refs["dataForm"].resetFields()
|
||||||
@ -163,7 +170,6 @@ export default {
|
|||||||
console.log(1111);
|
console.log(1111);
|
||||||
this.urlOptions.infoURL(obj.id).then(response => {
|
this.urlOptions.infoURL(obj.id).then(response => {
|
||||||
this.dataForm.id = response.data.id
|
this.dataForm.id = response.data.id
|
||||||
|
|
||||||
// if (this.setData) {
|
// if (this.setData) {
|
||||||
// this.setDataForm()
|
// this.setDataForm()
|
||||||
// }
|
// }
|
||||||
|
@ -98,14 +98,17 @@ export default {
|
|||||||
{
|
{
|
||||||
prop: 'productionLineName',
|
prop: 'productionLineName',
|
||||||
label: '产线',
|
label: '产线',
|
||||||
|
width:120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'sectionName',
|
prop: 'sectionName',
|
||||||
label: '工段',
|
label: '工段',
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'inspectionInfoList',
|
prop: 'inspectionInfoList',
|
||||||
label: '检测内容',
|
label: '检测内容',
|
||||||
|
showOverflowtooltip: true,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
@ -163,13 +166,20 @@ export default {
|
|||||||
this.resetForm('form');
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
deleteHandle(id, name, index, data) {
|
deleteHandle(id, name, index, data) {
|
||||||
|
console.log(data)
|
||||||
|
// const params = new URLSearchParams();
|
||||||
|
// params.append('productionLineId', data.productionLineId)
|
||||||
|
// params.append('sectionId', data.sectionId);
|
||||||
this.$confirm(`确认要删除产线名为${data.productionLineName}的数据项?`, "提示", {
|
this.$confirm(`确认要删除产线名为${data.productionLineName}的数据项?`, "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.urlOptions.deleteURL(id).then(({ data }) => {
|
this.urlOptions.deleteURL({
|
||||||
|
'productionLineId': data.productionLineId,
|
||||||
|
'sectionId': data.sectionId,
|
||||||
|
}).then(({ data }) => {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "操作成功",
|
message: "操作成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-30 10:53:32
|
* @Date: 2024-01-30 10:53:32
|
||||||
* @LastEditTime: 2024-02-23 15:16:35
|
* @LastEditTime: 2024-03-15 14:07:15
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -31,7 +31,7 @@
|
|||||||
<el-col :span="12" style="border-left: 1px solid #ccc">
|
<el-col :span="12" style="border-left: 1px solid #ccc">
|
||||||
<div class="select-list">
|
<div class="select-list">
|
||||||
<div class="sl__header" style="background: #f3f4fb; padding: 12px">
|
<div class="sl__header" style="background: #f3f4fb; padding: 12px">
|
||||||
<span style="">选择工序</span>
|
<span style="">选择工段</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<BomSelection ref="materialsBomList" :key="materialsBomList.equipmentId + 'materialsBomList'"
|
<BomSelection ref="materialsBomList" :key="materialsBomList.equipmentId + 'materialsBomList'"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-30 10:52:01
|
* @Date: 2024-01-30 10:52:01
|
||||||
* @LastEditTime: 2024-02-01 14:43:53
|
* @LastEditTime: 2024-03-15 14:06:55
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -64,7 +64,7 @@
|
|||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList" /> -->
|
@pagination="getList" /> -->
|
||||||
|
|
||||||
<base-dialog dialogTitle="选择产线工序" :dialogVisible="open" width="45%" @close="cancel" @cancel="cancel"
|
<base-dialog dialogTitle="选择产线工段" :dialogVisible="open" width="45%" @close="cancel" @cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form ref="dataForm" :model="dataForm" label-width="120px" :inline="true" class="demo-form-inline">
|
<el-form ref="dataForm" :model="dataForm" label-width="120px" :inline="true" class="demo-form-inline">
|
||||||
|
@ -34,6 +34,7 @@ import basicPage from './basic-page';
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import addOrUpdate from './dialogForm.vue';
|
import addOrUpdate from './dialogForm.vue';
|
||||||
import ProcessBomList from './ProcessBomList.vue';
|
import ProcessBomList from './ProcessBomList.vue';
|
||||||
|
import row from './row.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'QualityInspectionBoxBtn',
|
name: 'QualityInspectionBoxBtn',
|
||||||
mixins: [basicPage],
|
mixins: [basicPage],
|
||||||
@ -51,8 +52,16 @@ export default {
|
|||||||
label: '用户名称',
|
label: '用户名称',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'name',
|
||||||
param: 'userName',
|
param: 'userName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '用户昵称',
|
||||||
|
selectOptions: [],
|
||||||
|
labelField: 'name',
|
||||||
|
valueField: 'name',
|
||||||
|
param: 'nickName',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@ -108,6 +117,7 @@ export default {
|
|||||||
{
|
{
|
||||||
prop: 'datas',
|
prop: 'datas',
|
||||||
label: '产线及工段',
|
label: '产线及工段',
|
||||||
|
subcomponent: row
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
@ -143,10 +153,16 @@ export default {
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.searchBarFormConfig[0].selectOptions = res.data.map((item) => {
|
this.searchBarFormConfig[0].selectOptions = res.data.map((item) => {
|
||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.username,
|
||||||
name:item.username
|
name:item.username
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.searchBarFormConfig[1].selectOptions = res.data.map((item) => {
|
||||||
|
return {
|
||||||
|
id: item.nickname,
|
||||||
|
name: item.nickname
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getDataList() {
|
getDataList() {
|
||||||
@ -154,7 +170,7 @@ export default {
|
|||||||
this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
||||||
this.tableData = res.data.list.map((item) => {
|
this.tableData = res.data.list.map((item) => {
|
||||||
return {
|
return {
|
||||||
datas: item.strList ? item.strList.toString() : null,
|
datas: item.strList || null,
|
||||||
nickName: item.nickName,
|
nickName: item.nickName,
|
||||||
userName: item.userName,
|
userName: item.userName,
|
||||||
userId: item.userId
|
userId: item.userId
|
||||||
@ -206,7 +222,9 @@ export default {
|
|||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 10;
|
||||||
this.listQuery.inspectionDetContent = val.inspectionDetContent ? val.inspectionDetContent : undefined;
|
this.listQuery.userName = val.userName ? val.userName : undefined;
|
||||||
|
this.listQuery.nickName = val.nickName ? val.nickName : undefined;
|
||||||
|
|
||||||
// this.listQuery.teamId = val.teamId ? val.teamId : undefined;
|
// this.listQuery.teamId = val.teamId ? val.teamId : undefined;
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
break;
|
break;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user