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({
|
||||||
|
@ -5,4 +5,13 @@ export function getLineAll() {
|
|||||||
url: '/base/core-production-line/listAll',
|
url: '/base/core-production-line/listAll',
|
||||||
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();
|
||||||
|
@ -104,7 +104,7 @@ export const DICT_TYPE = {
|
|||||||
ORDER_PRIORITY: 'order_priority',
|
ORDER_PRIORITY: 'order_priority',
|
||||||
PACK_SPEC: 'pack_spec',
|
PACK_SPEC: 'pack_spec',
|
||||||
WORK_ORDER_STATUS: 'work_order_status',
|
WORK_ORDER_STATUS: 'work_order_status',
|
||||||
|
|
||||||
// ============== EQUIPMENT - 设备模块 =============
|
// ============== EQUIPMENT - 设备模块 =============
|
||||||
MAINTAIN_TYPE: 'maintain_type',
|
MAINTAIN_TYPE: 'maintain_type',
|
||||||
FAULT_LEVEL: 'fault-level',
|
FAULT_LEVEL: 'fault-level',
|
||||||
@ -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'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import {Message, MessageBox, Notification, Loading} from 'element-ui'
|
import { Message, MessageBox, Notification, Loading } from 'element-ui'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import {getAccessToken, getRefreshToken, getTenantId, setToken} from '@/utils/auth'
|
import { getAccessToken, getRefreshToken, getTenantId, setToken } from '@/utils/auth'
|
||||||
import errorCode from '@/utils/errorCode'
|
import errorCode from '@/utils/errorCode'
|
||||||
import {getPath, getTenantEnable} from "@/utils/ruoyi";
|
import { getPath, getTenantEnable } from "@/utils/ruoyi";
|
||||||
import {refreshToken} from "@/api/login";
|
import { refreshToken } from "@/api/login";
|
||||||
|
|
||||||
// 需要忽略的提示。忽略后,自动 Promise.reject('error')
|
// 需要忽略的提示。忽略后,自动 Promise.reject('error')
|
||||||
const ignoreMsgs = [
|
const ignoreMsgs = [
|
||||||
@ -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)'
|
||||||
})
|
})
|
||||||
@ -86,7 +86,7 @@ service.interceptors.request.use(config => {
|
|||||||
for (const propName of Object.keys(config.params)) {
|
for (const propName of Object.keys(config.params)) {
|
||||||
const value = config.params[propName];
|
const value = config.params[propName];
|
||||||
const part = encodeURIComponent(propName) + '='
|
const part = encodeURIComponent(propName) + '='
|
||||||
if (value !== null && typeof(value) !== "undefined") {
|
if (value !== null && typeof (value) !== "undefined") {
|
||||||
if (typeof value === 'object') {
|
if (typeof value === 'object') {
|
||||||
for (const key of Object.keys(value)) {
|
for (const key of Object.keys(value)) {
|
||||||
let params = propName + '[' + key + ']';
|
let params = propName + '[' + key + ']';
|
||||||
@ -104,9 +104,9 @@ service.interceptors.request.use(config => {
|
|||||||
}
|
}
|
||||||
return config
|
return config
|
||||||
}, error => {
|
}, error => {
|
||||||
tryHideFullScreenLoading()
|
tryHideFullScreenLoading()
|
||||||
console.log(error)
|
console.log(error)
|
||||||
Promise.reject(error)
|
Promise.reject(error)
|
||||||
})
|
})
|
||||||
|
|
||||||
// 响应拦截器
|
// 响应拦截器
|
||||||
@ -189,23 +189,23 @@ service.interceptors.response.use(async res => {
|
|||||||
return res.data
|
return res.data
|
||||||
}
|
}
|
||||||
}, error => {
|
}, error => {
|
||||||
tryHideFullScreenLoading()
|
tryHideFullScreenLoading()
|
||||||
console.log('err' + error)
|
console.log('err' + error)
|
||||||
let {message} = error;
|
let { message } = error;
|
||||||
if (message === "Network Error") {
|
if (message === "Network Error") {
|
||||||
message = "后端接口连接异常";
|
message = "后端接口连接异常";
|
||||||
} else if (message.includes("timeout")) {
|
} else if (message.includes("timeout")) {
|
||||||
message = "系统接口请求超时";
|
message = "系统接口请求超时";
|
||||||
} else if (message.includes("Request failed with status code")) {
|
} else if (message.includes("Request failed with status code")) {
|
||||||
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
||||||
}
|
|
||||||
Message({
|
|
||||||
message: message,
|
|
||||||
type: 'error',
|
|
||||||
duration: 5 * 1000
|
|
||||||
})
|
|
||||||
return Promise.reject(error)
|
|
||||||
}
|
}
|
||||||
|
Message({
|
||||||
|
message: message,
|
||||||
|
type: 'error',
|
||||||
|
duration: 5 * 1000
|
||||||
|
})
|
||||||
|
return Promise.reject(error)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
export function getBaseHeader() {
|
export function getBaseHeader() {
|
||||||
@ -219,10 +219,10 @@ function handleAuthorized() {
|
|||||||
if (!isRelogin.show) {
|
if (!isRelogin.show) {
|
||||||
isRelogin.show = true;
|
isRelogin.show = true;
|
||||||
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
|
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
|
||||||
confirmButtonText: '重新登录',
|
confirmButtonText: '重新登录',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}
|
}
|
||||||
).then(() => {
|
).then(() => {
|
||||||
isRelogin.show = false;
|
isRelogin.show = false;
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
|
@ -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,80 +2,100 @@
|
|||||||
* @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-row :gutter="20">
|
<el-form :model="dataForm" ref="dataForm" label-width="120px" label-position="top" class="demo-ruleForm" :rules="rules">
|
||||||
<el-col :span="12">工单名称:{{ dataForm.name }}</el-col>
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">工单编码:{{ dataForm.code }}</el-col>
|
<el-col :span="8">
|
||||||
</el-row>
|
<el-form-item label="工单名称" prop="name">
|
||||||
<el-row :gutter="20">
|
<!-- <el-input v-model="dataForm.name" autocomplete="off"></el-input> -->
|
||||||
<el-col :span="12">产品名称:{{ dataForm.productName }}</el-col>
|
<span>{{ dataForm.name }}</span>
|
||||||
<el-col :span="12">产品规格:{{ dataForm.specifications }}</el-col>
|
</el-form-item>
|
||||||
</el-row>
|
</el-col>
|
||||||
<el-row :gutter="20">
|
<el-col :span="8">
|
||||||
<el-col :span="12">实际生产数量:{{ dataForm.expectedTime }}</el-col>
|
<el-form-item label="工单编码" prop="code">
|
||||||
</el-row>
|
<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 :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="产品规格" prop="specifications">
|
||||||
|
<span>{{ dataForm.specifications }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</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-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-table
|
<el-form ref="tableForm" :model="form" style="padding: 0">
|
||||||
:data="tableData"
|
<el-table
|
||||||
style="width: 100%">
|
ref="table"
|
||||||
<el-table-column type="index" label="序号" />
|
:data="form.tableData"
|
||||||
<el-table-column prop="orderName" label="订单名称" />
|
row-key="id"
|
||||||
<el-table-column prop="orderCode" label="订单编码" />
|
style="width: 100%">
|
||||||
<el-table-column prop="priority" label="优先级" />
|
<el-table-column type="index" label="序号" />
|
||||||
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
|
<el-table-column prop="orderName" label="订单名称" />
|
||||||
<template slot-scope="scope">
|
<el-table-column prop="orderCode" label="订单编码" />
|
||||||
<el-input v-model="scope.row.planAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
|
<el-table-column prop="priority" label="优先级" />
|
||||||
</template>
|
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
|
||||||
</el-table-column>
|
<template slot-scope="scope">
|
||||||
<el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
|
<el-form-item prop="planAssignmentQuantity">
|
||||||
<template slot-scope="scope">
|
<el-input v-model.number="scope.row.planAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
|
||||||
<el-input v-model="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-form-item :prop="`tableData.${scope.$index}.actualAssignmentQuantity`" :rules="[{ required: true, message: '实际分配数量不能为空', trigger: 'blur' }]">
|
||||||
<!-- <el-tooltip v-if="!scope.row.isEdit" placement="top" content="编辑">
|
<el-input v-model.number="scope.row.actualAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
|
||||||
<el-button
|
</el-form-item>
|
||||||
type="text"
|
</template>
|
||||||
:style="{color:'#0B58FF'}"
|
</el-table-column>
|
||||||
size="mini"
|
<!-- <el-table-column label="操作">
|
||||||
@click="edit(scope.row)"
|
<template slot-scope="scope">
|
||||||
>
|
<el-button type="text" size="small" @click="saveData(scope.row)">保存</el-button>
|
||||||
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="edit" />
|
</template>
|
||||||
</el-button>
|
</el-table-column> -->
|
||||||
</el-tooltip> -->
|
</el-table>
|
||||||
|
</el-form>
|
||||||
<!-- <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>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<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({
|
updateBatchConCoreWOr(list).then((response) => {
|
||||||
// ...row
|
this.$modal.msgSuccess('分配成功');
|
||||||
// }).then((response) => {
|
// this.visible = false;
|
||||||
// this.$modal.msgSuccess('修改成功');
|
this.getList();
|
||||||
// // this.visible = false;
|
});
|
||||||
// this.getList();
|
|
||||||
// });
|
|
||||||
// return;
|
|
||||||
}
|
|
||||||
// 修改的提交
|
|
||||||
updateConCoreWOr({
|
|
||||||
...row,
|
|
||||||
workOrderId: this.dataForm.id
|
|
||||||
}).then((response) => {
|
|
||||||
this.$modal.msgSuccess('分配成功');
|
|
||||||
// this.visible = false;
|
|
||||||
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,28 +437,33 @@ export default {
|
|||||||
opration = '终止'
|
opration = '终止'
|
||||||
}
|
}
|
||||||
console.log('22',val)
|
console.log('22',val)
|
||||||
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
|
if (param.status !== 4) {
|
||||||
confirmButtonText: "确定",
|
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
|
||||||
cancelButtonText: "取消",
|
confirmButtonText: "确定",
|
||||||
type: "warning",
|
cancelButtonText: "取消",
|
||||||
})
|
type: "warning",
|
||||||
.then(() => {
|
})
|
||||||
statusChange(param).then(({ data }) => {
|
.then(() => {
|
||||||
this.$message({
|
statusChange(param).then(({ data }) => {
|
||||||
message: '操作成功!工单状态稍后将会更新!',
|
this.$message({
|
||||||
type: 'success',
|
message: '操作成功!工单状态稍后将会更新!',
|
||||||
duration: 1500,
|
type: 'success',
|
||||||
onClose: () => {
|
duration: 1500,
|
||||||
this.getDataList();
|
onClose: () => {
|
||||||
// 分配产量
|
this.searchStatus();
|
||||||
if (param.status === 4) {
|
// 分配产量
|
||||||
this.allocationOrder(param);
|
// if (param.status === 4) {
|
||||||
}
|
// this.allocationOrder(param);
|
||||||
},
|
// }
|
||||||
|
},
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
})
|
||||||
})
|
.catch(() => { });
|
||||||
.catch(() => { });
|
} else {
|
||||||
|
// 完成弹出分配框
|
||||||
|
this.allocationOrder(param);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
allocationOrder(val) {
|
allocationOrder(val) {
|
||||||
@ -460,20 +471,25 @@ 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: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
.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'
|
||||||
@ -56,11 +53,10 @@ export default {
|
|||||||
let yData = []
|
let yData = []
|
||||||
for (let j = 0; j < arr.length; j++) {
|
for (let j = 0; j < arr.length; j++) {
|
||||||
for (let k = 0; k < keys.length; k++) {
|
for (let k = 0; k < keys.length; k++) {
|
||||||
if (keys[k].indexOf(arr[j]+'_上年同期') > -1 || keys[k].indexOf(arr[j]+'_能源消耗') > -1) {
|
if (keys[k].indexOf(arr[j] + '_上年同期') > -1 || keys[k].indexOf(arr[j] + '_能源消耗') > -1) {
|
||||||
let obj = {
|
let obj = {
|
||||||
name: '',
|
name: '',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
stack: 'Total',
|
|
||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
obj.name = keys[k]
|
obj.name = keys[k]
|
||||||
@ -71,14 +67,14 @@ export default {
|
|||||||
for (let i = 0; i < this.chartData.length; i++) {
|
for (let i = 0; i < this.chartData.length; i++) {
|
||||||
xData.push(this.chartData[i].time)
|
xData.push(this.chartData[i].time)
|
||||||
for (let p = 0; p < yData.length; p++) {
|
for (let p = 0; p < yData.length; p++) {
|
||||||
yData[p].data.push(this.chartData[i][ yData[p].name])
|
yData[p].data.push(this.chartData[i][yData[p].name])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var option = {
|
var option = {
|
||||||
color:['#FFDC94','#8EF0AB','#63BDFF','#288AFF','#7164FF','#FF6860','#FF9747','#B0EB42','#D680FF','#0043D2'],
|
color: ['#FFDC94', '#8EF0AB', '#63BDFF', '#288AFF', '#7164FF', '#FF6860', '#FF9747', '#B0EB42', '#D680FF', '#0043D2'],
|
||||||
legend: {
|
legend: {
|
||||||
data: keys,
|
data: keys,
|
||||||
right:'1%'
|
right: '1%'
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis'
|
trigger: 'axis'
|
||||||
|
@ -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>
|
||||||
@ -46,17 +31,17 @@ import moment from 'moment'
|
|||||||
import InputArea from './InputArea'
|
import InputArea from './InputArea'
|
||||||
import SelectArea from './SelectArea'
|
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
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
name: 'EnergyQuantityManualAdd',
|
name: 'EnergyQuantityManualAdd',
|
||||||
props: {
|
props: {
|
||||||
@ -72,7 +57,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
tableProps,
|
tableProps,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
addButtonShow:'新增',
|
addButtonShow: '新增',
|
||||||
form: {
|
form: {
|
||||||
id: '',
|
id: '',
|
||||||
energyTypeId: '',
|
energyTypeId: '',
|
||||||
@ -98,16 +83,16 @@ export default {
|
|||||||
obj.tableName = params.tableName + ''
|
obj.tableName = params.tableName + ''
|
||||||
obj.readingQuantity = 0
|
obj.readingQuantity = 0
|
||||||
this.tableData.push(obj)
|
this.tableData.push(obj)
|
||||||
}else {
|
} else {
|
||||||
this.isEdit = true
|
this.isEdit = true
|
||||||
this.form.id = params.id
|
this.form.id = params.id
|
||||||
this.addButtonShow = ''
|
this.addButtonShow = ''
|
||||||
energyQuantityManualGet({id: this.form.id}).then(res => {
|
energyQuantityManualGet({ id: this.form.id }).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form.energyTypeId = res.data.energyTypeId
|
this.form.energyTypeId = res.data.energyTypeId
|
||||||
this.form.recordTime = res.data.recordTime ? res.data.recordTime : null
|
this.form.recordTime = res.data.recordTime ? res.data.recordTime : null
|
||||||
let obj = {}
|
let obj = {}
|
||||||
obj.tableName = res.data.tableName ? res.data.tableName+'' : ''
|
obj.tableName = res.data.tableName ? res.data.tableName + '' : ''
|
||||||
obj.readingQuantity = res.data.readingQuantity
|
obj.readingQuantity = res.data.readingQuantity
|
||||||
this.tableData.push(obj)
|
this.tableData.push(obj)
|
||||||
}
|
}
|
||||||
@ -130,10 +115,10 @@ export default {
|
|||||||
if (this.tableData.length === 0) {
|
if (this.tableData.length === 0) {
|
||||||
this.$modal.msgError("抄表数据不能为空");
|
this.$modal.msgError("抄表数据不能为空");
|
||||||
return false
|
return false
|
||||||
}else{
|
} else {
|
||||||
for (let item of this.tableData) {
|
for (let item of this.tableData) {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
if (!item.tableName || (!item.readingQuantity && item.readingQuantity!==0)) {
|
if (!item.tableName || (!item.readingQuantity && item.readingQuantity !== 0)) {
|
||||||
this.$modal.msgError("抄表数据有空值,请检查");
|
this.$modal.msgError("抄表数据有空值,请检查");
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -142,11 +127,11 @@ export default {
|
|||||||
if (this.isEdit) {
|
if (this.isEdit) {
|
||||||
// 编辑
|
// 编辑
|
||||||
energyQuantityManualUpdate({
|
energyQuantityManualUpdate({
|
||||||
id:this.form.id,
|
id: this.form.id,
|
||||||
energyTypeId:this.form.energyTypeId,
|
energyTypeId: this.form.energyTypeId,
|
||||||
recordTime:this.form.recordTime,
|
recordTime: this.form.recordTime,
|
||||||
tableName:this.tableData[0].tableName,
|
tableName: this.tableData[0].tableName,
|
||||||
readingQuantity:this.tableData[0].readingQuantity
|
readingQuantity: this.tableData[0].readingQuantity
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
@ -155,9 +140,9 @@ export default {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
energyQuantityManualCreate({
|
energyQuantityManualCreate({
|
||||||
energyTypeId:this.form.energyTypeId,
|
energyTypeId: this.form.energyTypeId,
|
||||||
recordTime:this.form.recordTime,
|
recordTime: this.form.recordTime,
|
||||||
data:this.tableData
|
data: this.tableData
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
@ -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
|
||||||
},
|
},
|
||||||
@ -142,25 +118,25 @@ export default {
|
|||||||
// 班次基础信息列表
|
// 班次基础信息列表
|
||||||
list: [],
|
list: [],
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi('base:energy-quantity-manual:create')
|
this.$auth.hasPermi('base:energy-quantity-manual:create')
|
||||||
? {
|
? {
|
||||||
type: 'meterReading',
|
type: 'meterReading',
|
||||||
btnName: '抄表'
|
btnName: '抄表'
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi('base:energy-quantity-manual:update')
|
this.$auth.hasPermi('base:energy-quantity-manual:update')
|
||||||
? {
|
? {
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '编辑'
|
btnName: '编辑'
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi('base:energy-quantity-manual:delete')
|
this.$auth.hasPermi('base:energy-quantity-manual:delete')
|
||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
btnName: '删除'
|
btnName: '删除'
|
||||||
}
|
}
|
||||||
: undefined
|
: undefined
|
||||||
].filter((v)=>v),
|
].filter((v) => v),
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
@ -209,10 +185,10 @@ 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(() => { })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
@ -281,13 +257,13 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
console.log(row.id)
|
console.log(row.id)
|
||||||
this.$modal.confirm('是否确认删除能源类型为"' + row.energyType + '"的数据项?').then(function() {
|
this.$modal.confirm('是否确认删除能源类型为"' + row.energyType + '"的数据项?').then(function () {
|
||||||
return energyQuantityManualDelete({id: row.id});
|
return energyQuantityManualDelete({ id: row.id });
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.queryParams.pageNo = 1;
|
this.queryParams.pageNo = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).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',
|
||||||
@ -129,7 +115,7 @@ export default {
|
|||||||
let arr = location.href.split('?')[1].split('&')
|
let arr = location.href.split('?')[1].split('&')
|
||||||
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
||||||
} else {
|
} else {
|
||||||
this.formConfig[1].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
|
this.formConfig[1].defaultSelect = [Date.now() - 7 * 24 * 3600000, Date.now()]
|
||||||
}
|
}
|
||||||
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
|
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
|
||||||
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
|
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
|
||||||
@ -146,7 +132,7 @@ export default {
|
|||||||
let arr = location.href.split('?')[1].split('&')
|
let arr = location.href.split('?')[1].split('&')
|
||||||
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
||||||
} else {
|
} else {
|
||||||
this.formConfig[1].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
|
this.formConfig[1].defaultSelect = [Date.now() - 7 * 24 * 3600000, Date.now()]
|
||||||
}
|
}
|
||||||
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
|
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
|
||||||
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
|
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
|
||||||
|
@ -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>
|
||||||
@ -28,9 +25,9 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="计价方式" prop="pricingMethod">
|
<el-form-item label="计价方式" prop="pricingMethod">
|
||||||
<el-select v-model="form.pricingMethod" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.pricingMethod" placeholder="请选择" style="width: 100%;">
|
||||||
<el-option label="时间段" :value= '0' ></el-option>
|
<el-option label="时间段" :value='0'></el-option>
|
||||||
<el-option label="使用量" :value= '1' ></el-option>
|
<el-option label="使用量" :value='1'></el-option>
|
||||||
<el-option label="固定价位" :value= '2' ></el-option>
|
<el-option label="固定价位" :value='2'></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -38,56 +35,33 @@
|
|||||||
<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">
|
||||||
<el-form-item label="计量维度" prop="dim">
|
<el-form-item label="计量维度" prop="dim">
|
||||||
<el-select v-model="form.dim" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.dim" placeholder="请选择" style="width: 100%;">
|
||||||
<el-option label="月" :value= '4' ></el-option>
|
<el-option label="月" :value='4'></el-option>
|
||||||
<el-option label="年" :value= '5' ></el-option>
|
<el-option label="年" :value='5'></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</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: {
|
||||||
@ -182,22 +158,24 @@ export default {
|
|||||||
if (id) {
|
if (id) {
|
||||||
this.isEdit = true
|
this.isEdit = true
|
||||||
this.form.id = id
|
this.form.id = id
|
||||||
getEnergyType( id ).then((res) => {
|
getEnergyType(id).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form.name = res.data.name
|
this.form.name = res.data.name
|
||||||
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -234,7 +212,7 @@ export default {
|
|||||||
emitButtonClick1() {
|
emitButtonClick1() {
|
||||||
let n = this.tableData1.length
|
let n = this.tableData1.length
|
||||||
let obj = {}
|
let obj = {}
|
||||||
obj.startTime = n === 0 ? '' : this.tableData1[n-1].endTime
|
obj.startTime = n === 0 ? '' : this.tableData1[n - 1].endTime
|
||||||
obj.endTime = ''
|
obj.endTime = ''
|
||||||
obj.price = 0
|
obj.price = 0
|
||||||
this.tableData1.push(obj)
|
this.tableData1.push(obj)
|
||||||
@ -242,7 +220,7 @@ export default {
|
|||||||
emitButtonClick2() {
|
emitButtonClick2() {
|
||||||
let n = this.tableData2.length
|
let n = this.tableData2.length
|
||||||
let obj = {}
|
let obj = {}
|
||||||
obj.startUsed = n === 0 ? 0 : this.tableData2[n-1].endUsed
|
obj.startUsed = n === 0 ? 0 : this.tableData2[n - 1].endUsed
|
||||||
obj.endUsed = 0
|
obj.endUsed = 0
|
||||||
obj.price = 0
|
obj.price = 0
|
||||||
this.tableData2.push(obj)
|
this.tableData2.push(obj)
|
||||||
@ -259,7 +237,7 @@ export default {
|
|||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
switch(this.form.pricingMethod) {
|
switch (this.form.pricingMethod) {
|
||||||
case 0:// 时间段
|
case 0:// 时间段
|
||||||
if (this.tableData1.length === 0) {
|
if (this.tableData1.length === 0) {
|
||||||
this.$modal.msgError('时间段表格数据不能为空')
|
this.$modal.msgError('时间段表格数据不能为空')
|
||||||
@ -289,7 +267,7 @@ export default {
|
|||||||
default:// 固定单价
|
default:// 固定单价
|
||||||
if (!this.form.singlePrice) {
|
if (!this.form.singlePrice) {
|
||||||
this.$modal.msgError('单价有误请检查,请检查')
|
this.$modal.msgError('单价有误请检查,请检查')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(this.form)
|
console.log(this.form)
|
||||||
@ -302,11 +280,11 @@ export default {
|
|||||||
unit: this.form.unit,
|
unit: this.form.unit,
|
||||||
pricingMethod: this.form.pricingMethod,
|
pricingMethod: this.form.pricingMethod,
|
||||||
description: this.form.description,
|
description: this.form.description,
|
||||||
dim: this.form.pricingMethod === 1 ? this.form.dim: '',
|
dim: this.form.pricingMethod === 1 ? this.form.dim : '',
|
||||||
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
||||||
segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [],
|
segPriceList: this.form.pricingMethod === 0 ? this.tableData1 : [],
|
||||||
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [],
|
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2 : [],
|
||||||
push:this.form.push ? 1 : 0
|
push: this.form.push ? 1 : 0
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
@ -320,11 +298,11 @@ export default {
|
|||||||
unit: this.form.unit,
|
unit: this.form.unit,
|
||||||
pricingMethod: this.form.pricingMethod,
|
pricingMethod: this.form.pricingMethod,
|
||||||
description: this.form.description,
|
description: this.form.description,
|
||||||
dim: this.form.pricingMethod === 1 ? this.form.dim: '',
|
dim: this.form.pricingMethod === 1 ? this.form.dim : '',
|
||||||
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
||||||
segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [],
|
segPriceList: this.form.pricingMethod === 0 ? this.tableData1 : [],
|
||||||
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [],
|
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2 : [],
|
||||||
push:this.form.push ? 1 : 0
|
push: this.form.push ? 1 : 0
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
@ -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>
|
||||||
|
|
||||||
@ -160,8 +142,8 @@ export default {
|
|||||||
method: '1'
|
method: '1'
|
||||||
},
|
},
|
||||||
typeList: [
|
typeList: [
|
||||||
{id: 1, name: '合并'},
|
{ id: 1, name: '合并' },
|
||||||
{id: 2, name: '详细'}
|
{ id: 2, name: '详细' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -183,7 +165,7 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
getEnergyOverlimitLogPage(this.queryParams).then(response => {
|
getEnergyOverlimitLogPage(this.queryParams).then(response => {
|
||||||
let arr = response.data.list || [];
|
let arr = response.data.list || [];
|
||||||
arr&&arr.map((item) => {
|
arr && arr.map((item) => {
|
||||||
this.typeList.map((i) => {
|
this.typeList.map((i) => {
|
||||||
if (item.type === i.id) {
|
if (item.type === i.id) {
|
||||||
item.type = i.name
|
item.type = i.name
|
||||||
@ -191,15 +173,21 @@ export default {
|
|||||||
})
|
})
|
||||||
if (item.minValue && item.maxValue) {
|
if (item.minValue && item.maxValue) {
|
||||||
item.limitValue = item.minValue + '-' + item.maxValue
|
item.limitValue = item.minValue + '-' + item.maxValue
|
||||||
} else if(item.minValue){
|
} else if (item.minValue) {
|
||||||
item.limitValue = '最小值' + item.minValue
|
item.limitValue = '最小值' + item.minValue
|
||||||
}else if(item.maxValue){
|
} else if (item.maxValue) {
|
||||||
item.limitValue = '最大值' + item.maxValue
|
item.limitValue = '最大值' + item.maxValue
|
||||||
} else {
|
} else {
|
||||||
item.limitValue = ''
|
item.limitValue = ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.list = arr
|
if (this.queryParams.method === '1') {
|
||||||
|
this.list = arr
|
||||||
|
this.list2 = []
|
||||||
|
} else {
|
||||||
|
this.list2 = arr
|
||||||
|
this.list1 = []
|
||||||
|
}
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -212,7 +200,7 @@ export default {
|
|||||||
toggleTab() {
|
toggleTab() {
|
||||||
if (this.activeName === 'auto') {
|
if (this.activeName === 'auto') {
|
||||||
this.queryParams.method = '1'
|
this.queryParams.method = '1'
|
||||||
}else{
|
} else {
|
||||||
this.queryParams.method = '2'
|
this.queryParams.method = '2'
|
||||||
}
|
}
|
||||||
this.queryParams.pageNo = 1
|
this.queryParams.pageNo = 1
|
||||||
@ -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 = [
|
|
||||||
{ name: '速度开动率', value: peEfficiency },
|
|
||||||
{ name: '', value: 100 },
|
|
||||||
// { name: '速度开动率', value: peEfficiency },
|
|
||||||
// { name: '', value: Math.ceil(peEfficiency) - peEfficiency },
|
|
||||||
];
|
];
|
||||||
|
// this.config.series[1].data = [
|
||||||
|
// { name: '速度开动率', value: 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 = '修改设备采集配置';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
@ -218,9 +218,9 @@ export default {
|
|||||||
label: '是否采集', // 是否采集 0 代表不采集, 1 代表采集
|
label: '是否采集', // 是否采集 0 代表不采集, 1 代表采集
|
||||||
prop: 'collection',
|
prop: 'collection',
|
||||||
bind: {
|
bind: {
|
||||||
'active-value': 1,
|
'active-value': 1,
|
||||||
'inactive-value': 0,
|
'inactive-value': 0,
|
||||||
value: 1,
|
value: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -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 class="action_btn"> -->
|
||||||
</div>
|
<el-button type="text" class="action_btn" @click="addNew()">
|
||||||
<!-- <template>
|
<span style="display: inline-block;">
|
||||||
<span style="display: inline-block;" @click="addNew()">
|
|
||||||
<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'
|
||||||
|
|
||||||
@ -107,118 +109,141 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
isGetCode: true,
|
isGetCode: true,
|
||||||
codeURL: getOrderCode,
|
codeURL: getOrderCode,
|
||||||
createURL: createCheckOrder,
|
createURL: createCheckOrder,
|
||||||
updateURL: updateCheckOrder,
|
updateURL: updateCheckOrder,
|
||||||
infoURL: getCheckOrder,
|
infoURL: getCheckOrder,
|
||||||
},
|
},
|
||||||
dataForm: {
|
dataForm: {
|
||||||
id: null,
|
id: null,
|
||||||
code: null,
|
code: null,
|
||||||
name: null,
|
name: null,
|
||||||
departmentId: null,
|
departmentId: null,
|
||||||
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 部门列表
|
// 部门列表
|
||||||
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,
|
||||||
|
special: false,
|
||||||
|
status: 0,
|
||||||
|
groupClass: this.dataForm.groupClass?.join(','),
|
||||||
|
})
|
||||||
|
.then((response) => {
|
||||||
|
this.$modal.msgSuccess('修改成功');
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 添加的提交
|
||||||
|
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.visible = false;
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.$emit("refreshDataList");
|
this.visible = false;
|
||||||
});
|
this.$emit('refreshDataList');
|
||||||
return;
|
});
|
||||||
}
|
});
|
||||||
// 添加的提交
|
},
|
||||||
this.urlOptions.createURL({
|
|
||||||
...this.dataForm,
|
|
||||||
special: false,
|
|
||||||
status: 0,
|
|
||||||
groupClass: this.dataForm.groupClass.join(',')
|
|
||||||
}).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.visible = false;
|
|
||||||
this.$emit("refreshDataList");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -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,14 +70,14 @@ 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')
|
||||||
? {
|
? {
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '修改',
|
btnName: '修改',
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
// this.$auth.hasPermi('equipment:check-setting:update')
|
// this.$auth.hasPermi('equipment:check-setting:update')
|
||||||
// ? {
|
// ? {
|
||||||
@ -90,20 +89,50 @@ export default {
|
|||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
btnName: '删除',
|
btnName: '删除',
|
||||||
}
|
}
|
||||||
: 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,12 +245,12 @@ 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 }) => {
|
||||||
this.$set(
|
this.$set(
|
||||||
@ -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.searchBarFormConfig[0].defaultSelect =
|
||||||
// this.$route.query.equipmentId ?? undefined;
|
// // this.$route.query.equipmentId ?? undefined;
|
||||||
this.searchBarFormConfig[0].defaultSelect =
|
// this.searchBarFormConfig[0].defaultSelect =
|
||||||
this.$route.query.maintainPlanId ?? undefined;
|
// this.$route.query.maintainPlanId ?? undefined;
|
||||||
this.searchBarFormConfig[1].defaultSelect =
|
// this.searchBarFormConfig[1].defaultSelect =
|
||||||
this.$route.query?.createTime ?? undefined;
|
// this.$route.query?.createTime ?? undefined;
|
||||||
// this.searchBarFormConfig[3].defaultSelect =
|
// // this.searchBarFormConfig[3].defaultSelect =
|
||||||
// Number(this.$route.query.relatePlan) ?? undefined;
|
// // 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>
|
||||||
</el-drawer>
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<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,23 +92,34 @@ export default {
|
|||||||
});
|
});
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
this.listLine = data;
|
this.listLine = data;
|
||||||
return;
|
} else {
|
||||||
|
this.listLine.splice(0);
|
||||||
}
|
}
|
||||||
this.listLine.splice(0);
|
// 获得全部设备
|
||||||
},
|
const res = await this.$axios({
|
||||||
async getEquipmentByLineId(id) {
|
url: '/base/core-equipment/listAll',
|
||||||
const { data, code } = await this.$axios({
|
|
||||||
url: '/base/core-equipment/listByLine',
|
|
||||||
params: {
|
|
||||||
id,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
if (code == 0) {
|
if (res.code == 0) {
|
||||||
this.listEq = data;
|
this.listEq = res.data;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.listEq.splice(0);
|
this.listEq.splice(0);
|
||||||
},
|
},
|
||||||
|
async getEquipmentByLineId(id) {
|
||||||
|
if (id) {
|
||||||
|
const { data, code } = await this.$axios({
|
||||||
|
url: '/base/core-equipment/listByLine',
|
||||||
|
params: {
|
||||||
|
id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
if (code == 0) {
|
||||||
|
this.listEq = data;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.listEq.splice(0);
|
||||||
|
}
|
||||||
|
},
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.$emit('action', {
|
this.$emit('action', {
|
||||||
action: 'search',
|
action: 'search',
|
||||||
|
@ -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,59 +2,57 @@
|
|||||||
* @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>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<!-- <div class="visual-part"> -->
|
<!-- <div class="visual-part"> -->
|
||||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||||
label-width="100px" label-position="top">
|
label-width="100px" label-position="top">
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="设备名称" prop="equipmentId">
|
<el-form-item label="设备名称" prop="equipmentId">
|
||||||
<el-select v-model="dataForm.equipmentId" filterable :disabled="isdetail" style="width: 100%"
|
<el-select v-model="dataForm.equipmentId" filterable :disabled="isdetail" style="width: 100%"
|
||||||
@change="getCode" placeholder="请选择设备名称">
|
@change="getCode" placeholder="请选择设备名称">
|
||||||
<el-option v-for="dict in equipmentList" :key=" dict.id" :label="dict.name" :value="dict.id" />
|
<el-option v-for="dict in equipmentList" :key=" dict.id" :label="dict.name" :value="dict.id" />
|
||||||
</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="equipmentCode">
|
<el-form-item label="设备编码" prop="equipmentCode">
|
||||||
<el-input v-model="dataForm.equipmentCode" clearable :disabled="isdetail" placeholder="请输入设备编码" />
|
<el-input v-model="dataForm.equipmentCode" clearable :disabled="isdetail" placeholder="请输入设备编码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="设备Bom编码" prop="code">
|
<el-form-item label="设备Bom编码" prop="code">
|
||||||
<el-input v-model="dataForm.code" clearable :disabled="isdetail" placeholder="请输入设备Bom编码" />
|
<el-input v-model="dataForm.code" clearable :disabled="isdetail" placeholder="请输入设备Bom编码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="设备物料BOM名称" prop="name">
|
<el-form-item label="设备物料BOM名称" prop="name">
|
||||||
<el-input v-model="dataForm.name" clearable :disabled="isdetail" placeholder="请输入设备物料BOM名称" />
|
<el-input v-model="dataForm.name" clearable :disabled="isdetail" placeholder="请输入设备物料BOM名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</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-form-item>
|
||||||
</el-select>
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="8">
|
||||||
</el-col>
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-col :span="8">
|
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
|
||||||
<el-form-item label="备注" prop="remark">
|
</el-form-item>
|
||||||
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
|
</el-col>
|
||||||
</el-form-item>
|
</el-row>
|
||||||
</el-col>
|
</el-form>
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
<div class="attr-list" v-if="idAttrShow">
|
<div class="attr-list" v-if="idAttrShow">
|
||||||
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
||||||
@ -77,9 +75,9 @@
|
|||||||
: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>
|
||||||
<attr-add v-if="addOrUpdateVisible" ref="addOrUpdate" :product-id="dataForm.id" @refreshDataList="getList" />
|
<attr-add v-if="addOrUpdateVisible" ref="addOrUpdate" :product-id="dataForm.id" @refreshDataList="getList" />
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
@ -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,62 +1,64 @@
|
|||||||
<!--
|
<!--
|
||||||
* @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>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<!-- <div class="visual-part"> -->
|
<!-- <div class="visual-part"> -->
|
||||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||||
label-width="100px" label-position="top">
|
label-width="100px" label-position="top">
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="设备名称" prop="equipmentId">
|
<el-form-item label="设备名称" prop="equipmentId">
|
||||||
<el-select v-model="dataForm.equipmentId" filterable :disabled="isdetail" style="width: 100%"
|
<el-select v-model="dataForm.equipmentId" filterable :disabled="isdetail" style="width: 100%"
|
||||||
@change="getCode" placeholder="请选择设备名称">
|
@change="getCode" placeholder="请选择设备名称">
|
||||||
<el-option v-for="dict in equipmentList" :key=" dict.id" :label="dict.name" :value="dict.id" />
|
<el-option v-for="dict in equipmentList" :key=" dict.id" :label="dict.name" :value="dict.id" />
|
||||||
</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="equipmentCode">
|
<el-form-item label="设备编码" prop="equipmentCode">
|
||||||
<el-input v-model="dataForm.equipmentCode" clearable :disabled="isdetail" placeholder="请输入设备编码" />
|
<el-input v-model="dataForm.equipmentCode" clearable :disabled="isdetail" placeholder="请输入设备编码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="参数Bom编码" prop="code">
|
<el-form-item label="参数Bom编码" prop="code">
|
||||||
<el-input v-model="dataForm.code" clearable :disabled="isdetail" placeholder="请输入参数Bom编码" />
|
<el-input v-model="dataForm.code" clearable :disabled="isdetail" placeholder="请输入参数Bom编码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="设备参数BOM名称" prop="name">
|
<el-form-item label="设备参数BOM名称" prop="name">
|
||||||
<el-input v-model="dataForm.name" clearable :disabled="isdetail" placeholder="请输入设备参数BOM名称" />
|
<el-input v-model="dataForm.name" clearable :disabled="isdetail" placeholder="请输入设备参数BOM名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</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-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-form-item>
|
<el-switch v-model="dataForm.enabled" :active-value="1" :inactive-value="0">
|
||||||
</el-col>
|
</el-switch>
|
||||||
<el-col :span="8">
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
</el-col>
|
||||||
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="备注" prop="remark">
|
||||||
</el-col>
|
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
|
||||||
</el-row>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
<!-- <div v-if="!isdetail" class="drawer-body__footer">
|
<!-- <div v-if="!isdetail" class="drawer-body__footer">
|
||||||
|
|
||||||
@ -83,7 +85,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 v-if="!isdetail" 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>
|
||||||
@ -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;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<!--
|
<!--
|
||||||
filename: index.vue
|
filename: index.vue
|
||||||
author: liubin
|
author: liubin
|
||||||
date: 2023-10-19 10:03:42
|
date: 2023-10-19 10:03:42
|
||||||
description:
|
description:
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -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>
|
||||||
@ -48,12 +44,12 @@ export default {
|
|||||||
this.form.teamId = param.teamId
|
this.form.teamId = param.teamId
|
||||||
this.form.majorName = param.majorName
|
this.form.majorName = param.majorName
|
||||||
this.workName = param.workName
|
this.workName = param.workName
|
||||||
otherWorkerList({teamId:this.form.teamId}).then(res => {
|
otherWorkerList({ teamId: this.form.teamId }).then(res => {
|
||||||
this.workerList = res.data || []
|
this.workerList = res.data || []
|
||||||
if (param.id) {
|
if (param.id) {
|
||||||
this.isEdit = true
|
this.isEdit = true
|
||||||
this.form.id = param.id
|
this.form.id = param.id
|
||||||
groupTeamDet({id: this.form.id}).then((res) => {
|
groupTeamDet({ id: this.form.id }).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form.workerId = res.data.workerId
|
this.form.workerId = res.data.workerId
|
||||||
this.form.remark = res.data.remark
|
this.form.remark = res.data.remark
|
||||||
@ -72,7 +68,7 @@ export default {
|
|||||||
this.form.majorName = item.majorName
|
this.form.majorName = item.majorName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
this.form.majorName = ''
|
this.form.majorName = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -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,21 +80,24 @@ 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;
|
||||||
color: rgba(0,0,0,0.85);
|
color: rgba(0, 0, 0, 0.85);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lightText {
|
.lightText {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: rgba(102,102,102,0.75);
|
color: rgba(102, 102, 102, 0.75);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,28 +2,20 @@
|
|||||||
<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"
|
<span>{{ item.roomName }}-{{ item.name }}</span>
|
||||||
:value="item.id">
|
|
||||||
<span>{{ item.roomName }}-{{item.name}}</span>
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<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>
|
||||||
@ -53,7 +49,7 @@ export default {
|
|||||||
init(params) {
|
init(params) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
// console.log(params)
|
// console.log(params)
|
||||||
getByScheduling({id:params.id}).then(res => {
|
getByScheduling({ id: params.id }).then(res => {
|
||||||
let dataList1 = []
|
let dataList1 = []
|
||||||
let dataList2 = []
|
let dataList2 = []
|
||||||
if (res.data.nameData && res.data.nameData.length > 0) {
|
if (res.data.nameData && res.data.nameData.length > 0) {
|
||||||
@ -90,11 +86,11 @@ export default {
|
|||||||
timeArr.push(this.parseTime(item.name))
|
timeArr.push(this.parseTime(item.name))
|
||||||
tablePropsObj.prop = item.name
|
tablePropsObj.prop = item.name
|
||||||
tablePropsObj.label = this.parseTime(item.name)
|
tablePropsObj.label = this.parseTime(item.name)
|
||||||
tablePropsObj.children[0].prop = item.name+'sumInput'
|
tablePropsObj.children[0].prop = item.name + 'sumInput'
|
||||||
tablePropsObj.children[1].prop = item.name+'sumOutput'
|
tablePropsObj.children[1].prop = item.name + 'sumOutput'
|
||||||
tablePropsObj.children[2].prop = item.name+'goodArea'
|
tablePropsObj.children[2].prop = item.name + 'goodArea'
|
||||||
tablePropsObj.children[3].prop = item.name+'dynamicValue'
|
tablePropsObj.children[3].prop = item.name + 'dynamicValue'
|
||||||
tablePropsObj.children[4].prop = item.name+'dynamicRatio'
|
tablePropsObj.children[4].prop = item.name + 'dynamicRatio'
|
||||||
this.tableProps.push(tablePropsObj)
|
this.tableProps.push(tablePropsObj)
|
||||||
})
|
})
|
||||||
getSchedulingMonitoringRecord({
|
getSchedulingMonitoringRecord({
|
||||||
@ -111,15 +107,15 @@ export default {
|
|||||||
obj.workOrderList = dataList1.data[i].workOrderList
|
obj.workOrderList = dataList1.data[i].workOrderList
|
||||||
let subData1 = dataList1.data[i].data
|
let subData1 = dataList1.data[i].data
|
||||||
for (let ii = 0; ii < subData1.length; ii++) {
|
for (let ii = 0; ii < subData1.length; ii++) {
|
||||||
obj[subData1[ii].dynamicName+'sumInput'] = subData1[ii].dynamicValue.sumInput
|
obj[subData1[ii].dynamicName + 'sumInput'] = subData1[ii].dynamicValue.sumInput
|
||||||
obj[subData1[ii].dynamicName+'sumOutput'] = subData1[ii].dynamicValue.sumOutput
|
obj[subData1[ii].dynamicName + 'sumOutput'] = subData1[ii].dynamicValue.sumOutput
|
||||||
obj[subData1[ii].dynamicName+'goodArea'] = subData1[ii].dynamicValue.goodArea
|
obj[subData1[ii].dynamicName + 'goodArea'] = subData1[ii].dynamicValue.goodArea
|
||||||
}
|
}
|
||||||
for (let j = 0; j < dataList2.data.length; j++) {
|
for (let j = 0; j < dataList2.data.length; j++) {
|
||||||
let subData2 = dataList2.data[j].data
|
let subData2 = dataList2.data[j].data
|
||||||
for (let jj = 0; jj < subData2.length; jj++) {
|
for (let jj = 0; jj < subData2.length; jj++) {
|
||||||
obj[subData2[jj].dynamicName+'dynamicValue'] = subData2[jj].dynamicValue
|
obj[subData2[jj].dynamicName + 'dynamicValue'] = subData2[jj].dynamicValue
|
||||||
obj[subData2[jj].dynamicName+'dynamicRatio'] = obj[subData2[jj].dynamicName+'dynamicValue'] / obj[subData2[jj].dynamicName+'sumOutput']
|
obj[subData2[jj].dynamicName + 'dynamicRatio'] = obj[subData2[jj].dynamicName + 'dynamicValue'] / obj[subData2[jj].dynamicName + 'sumOutput']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.tableData.push(obj)
|
this.tableData.push(obj)
|
||||||
|
@ -1,37 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-area @submit="buttonClick"/>
|
<search-area @submit="buttonClick" />
|
||||||
<!-- <search-bar
|
<!-- <search-bar
|
||||||
:formConfigs="formConfig"
|
:formConfigs="formConfig"
|
||||||
ref="searchBarForm"
|
ref="searchBarForm"
|
||||||
@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>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -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,
|
||||||
@ -128,11 +81,12 @@ export default {
|
|||||||
},
|
},
|
||||||
tableProps,
|
tableProps,
|
||||||
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),
|
||||||
list: [],
|
list: [],
|
||||||
@ -158,7 +112,7 @@ export default {
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
groupTeamSchedulingPage({...this.queryParams}).then(res => {
|
groupTeamSchedulingPage({ ...this.queryParams }).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.list = res.data.list || []
|
this.list = res.data.list || []
|
||||||
this.total = res.data.total || 0
|
this.total = res.data.total || 0
|
||||||
|
@ -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
|
||||||
},
|
},
|
||||||
|
@ -3,34 +3,35 @@
|
|||||||
<div class="box1">
|
<div class="box1">
|
||||||
<div class="boxTitle">
|
<div class="boxTitle">
|
||||||
<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'>
|
||||||
<div class="blodTip">订单名称</div>
|
<div class="blodTip">订单名称</div>
|
||||||
<div class="lightTip" :title='orderGroupMsg.name'>{{orderGroupMsg.name}}</div>
|
<div class="lightTip" :title='orderGroupMsg.name'>{{ orderGroupMsg.name }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">产品名称</div>
|
<div class="blodTip">产品名称</div>
|
||||||
<div class="lightTip" :title="orderGroupMsg.productName">{{orderGroupMsg.productName}}</div>
|
<div class="lightTip" :title="orderGroupMsg.productName">{{ orderGroupMsg.productName }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">产品规格</div>
|
<div class="blodTip">产品规格</div>
|
||||||
<div class="lightTip">{{orderGroupMsg.specifications}}</div>
|
<div class="lightTip">{{ orderGroupMsg.specifications }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">客户</div>
|
<div class="blodTip">客户</div>
|
||||||
<div class="lightTip">{{orderGroupMsg.customerName}}</div>
|
<div class="lightTip">{{ orderGroupMsg.customerName }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">包装要求</div>
|
<div class="blodTip">包装要求</div>
|
||||||
<div class="lightTip">{{getDictDataLabel(DICT_TYPE.PACK_SPEC, orderGroupMsg.packReq)}}</div>
|
<div class="lightTip">{{ getDictDataLabel(DICT_TYPE.PACK_SPEC, orderGroupMsg.packReq) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">交货时间</div>
|
<div class="blodTip">交货时间</div>
|
||||||
<div class="lightTip">{{ parseTime(orderGroupMsg.deliveTime)}}</div>
|
<div class="lightTip">{{ parseTime(orderGroupMsg.deliveTime) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -40,15 +41,15 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">计划加工数量</div>
|
<div class="blodTip">计划加工数量</div>
|
||||||
<div class="lightTip">{{orderGroupMsg.planQuantity}}</div>
|
<div class="lightTip">{{ orderGroupMsg.planQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">加工平方数(平方米)</div>
|
<div class="blodTip">加工平方数(平方米)</div>
|
||||||
<div class="lightTip">{{orderGroupMsg.planArea}}</div>
|
<div class="lightTip">{{ orderGroupMsg.planArea }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">状态</div>
|
<div class="blodTip">状态</div>
|
||||||
<div class="lightTip">{{getDictDataLabel(DICT_TYPE.ORDER_STATUS, orderGroupMsg.status)}}</div>
|
<div class="lightTip">{{ getDictDataLabel(DICT_TYPE.ORDER_STATUS, orderGroupMsg.status) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">实际开始时间</div>
|
<div class="blodTip">实际开始时间</div>
|
||||||
@ -62,15 +63,15 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">实际生产数量</div>
|
<div class="blodTip">实际生产数量</div>
|
||||||
<div class="lightTip">{{orderGroupMsg.actualquantity }}</div>
|
<div class="lightTip">{{ orderGroupMsg.actualquantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">完成比%</div>
|
<div class="blodTip">完成比%</div>
|
||||||
<div class="lightTip">{{orderGroupMsg.completeRate}}</div>
|
<div class="lightTip">{{ orderGroupMsg.completeRate }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">废片数量</div>
|
<div class="blodTip">废片数量</div>
|
||||||
<div class="lightTip">{{orderGroupMsg.nokQuantity}}</div>
|
<div class="lightTip">{{ orderGroupMsg.nokQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
@ -78,21 +79,21 @@
|
|||||||
<div class="box2" v-for="(item, index) in orderMsg" :key='index'>
|
<div class="box2" v-for="(item, index) in orderMsg" :key='index'>
|
||||||
<div class="boxTitle">
|
<div class="boxTitle">
|
||||||
<span class="blueTitle"></span>
|
<span class="blueTitle"></span>
|
||||||
<span>厂务订单编码: {{item.code}}</span>
|
<span>厂务订单编码: {{ item.code }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-left: 14px;">
|
<div style="padding-left: 14px;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">订单名称</div>
|
<div class="blodTip">订单名称</div>
|
||||||
<div class="lightTip" :title="item.name">{{item.name}}</div>
|
<div class="lightTip" :title="item.name">{{ item.name }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">产品名称</div>
|
<div class="blodTip">产品名称</div>
|
||||||
<div class="lightTip" :title="item.productName">{{item.productName}}</div>
|
<div class="lightTip" :title="item.productName">{{ item.productName }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">产品规格</div>
|
<div class="blodTip">产品规格</div>
|
||||||
<div class="lightTip">{{item.specifications}}</div>
|
<div class="lightTip">{{ item.specifications }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">创建时间</div>
|
<div class="blodTip">创建时间</div>
|
||||||
@ -110,19 +111,19 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">计划加工数量</div>
|
<div class="blodTip">计划加工数量</div>
|
||||||
<div class="lightTip">{{item.planQuantity}}</div>
|
<div class="lightTip">{{ item.planQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">加工平方数(平方米)</div>
|
<div class="blodTip">加工平方数(平方米)</div>
|
||||||
<div class="lightTip">{{item.planArea}}</div>
|
<div class="lightTip">{{ item.planArea }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">预计用时(时)</div>
|
<div class="blodTip">预计用时(时)</div>
|
||||||
<div class="lightTip">{{item.expectTime}}</div>
|
<div class="lightTip">{{ item.expectTime }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">状态</div>
|
<div class="blodTip">状态</div>
|
||||||
<div class="lightTip">{{getDictDataLabel(DICT_TYPE.ORDER_STATUS, item.status)}}</div>
|
<div class="lightTip">{{ getDictDataLabel(DICT_TYPE.ORDER_STATUS, item.status) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">实际开始时间</div>
|
<div class="blodTip">实际开始时间</div>
|
||||||
@ -136,15 +137,15 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">实际生产数量</div>
|
<div class="blodTip">实际生产数量</div>
|
||||||
<div class="lightTip">{{item.actualQuantity }}</div>
|
<div class="lightTip">{{ item.actualQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">完成比%</div>
|
<div class="blodTip">完成比%</div>
|
||||||
<div class="lightTip">{{item.completeProp}}</div>
|
<div class="lightTip">{{ item.completeProp }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">废片数量</div>
|
<div class="blodTip">废片数量</div>
|
||||||
<div class="lightTip">{{item.nokQuantity}}</div>
|
<div class="lightTip">{{ item.nokQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
@ -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',
|
||||||
@ -266,16 +262,16 @@ export default {
|
|||||||
id: this.orderGroupId
|
id: this.orderGroupId
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.orderGroupMsg = res.data
|
this.orderGroupMsg = res.data
|
||||||
if ( res.data.orderIdNum && res.data.orderIdNum > 0) {
|
if (res.data.orderIdNum && res.data.orderIdNum > 0) {
|
||||||
this.orderMsg = res.data.orderDetailVOS
|
this.orderMsg = res.data.orderDetailVOS
|
||||||
}else{
|
} else {
|
||||||
this.orderMsg = []
|
this.orderMsg = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 返回
|
// 返回
|
||||||
returnOrderManage() {
|
returnOrderManage() {
|
||||||
this.$router.push({path: '/order/base/order-group'})
|
this.$router.push({ path: '/order/base/order-group' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -285,43 +281,51 @@ 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;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
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;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: rgba(102,102,102,0.75);
|
color: rgba(102, 102, 102, 0.75);
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
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;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
margin:0 10px 20px 0;
|
margin: 0 10px 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blueTitle {
|
.blueTitle {
|
||||||
content: '';
|
content: '';
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -5,13 +5,10 @@
|
|||||||
<el-form-item label="工单名称" prop="name" v-if='!isBind'>
|
<el-form-item label="工单名称" prop="name" v-if='!isBind'>
|
||||||
<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>
|
||||||
@ -23,12 +20,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<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>
|
||||||
@ -123,45 +98,39 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<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"
|
</el-option>
|
||||||
:key="item.id"
|
</el-select>
|
||||||
:label="item.name"
|
</el-form-item>
|
||||||
:value="item.id">
|
</el-col>
|
||||||
</el-option>
|
<el-col :span='6'>
|
||||||
</el-select>
|
<el-form-item label="负责车间" prop="roomNameDict">
|
||||||
</el-form-item>
|
<el-select v-model="form.roomNameDict" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
||||||
</el-col>
|
<el-option v-for="item in getDictDatas(DICT_TYPE.WORK_SHOP)" :key="item.value" :label="item.label"
|
||||||
<el-col :span='6'>
|
:value="item.value">
|
||||||
<el-form-item label="负责车间" prop="roomNameDict">
|
</el-option>
|
||||||
<el-select v-model="form.roomNameDict" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
</el-select>
|
||||||
<el-option
|
</el-form-item>
|
||||||
v-for="item in getDictDatas(DICT_TYPE.WORK_SHOP)"
|
</el-col>
|
||||||
:key="item.value"
|
<el-col :span='6'>
|
||||||
:label="item.label"
|
<el-form-item label="负责人" prop="workers">
|
||||||
:value="item.value">
|
<el-input v-model="form.workers" :disabled="isBind"></el-input>
|
||||||
</el-option>
|
</el-form-item>
|
||||||
</el-select>
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span='6'>
|
||||||
</el-col>
|
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
||||||
<el-col :span='6'>
|
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999"
|
||||||
<el-form-item label="负责人" prop="workers">
|
style="width: 100%;"></el-input-number>
|
||||||
<el-input v-model="form.workers" :disabled="isBind"></el-input>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
|
||||||
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999" style="width: 100%;"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</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 {
|
||||||
@ -202,8 +171,8 @@ export default {
|
|||||||
processFlowList: [],
|
processFlowList: [],
|
||||||
productLineList: [],
|
productLineList: [],
|
||||||
workOrderTypeList: [
|
workOrderTypeList: [
|
||||||
{id: 1,name:'普通'},
|
{ id: 1, name: '普通' },
|
||||||
{id: 2, name:'特殊'}
|
{ id: 2, name: '特殊' }
|
||||||
],
|
],
|
||||||
planStartTime: '',
|
planStartTime: '',
|
||||||
planFinishTime: '',
|
planFinishTime: '',
|
||||||
@ -223,7 +192,7 @@ export default {
|
|||||||
this.form.planProductId = data.planProductId
|
this.form.planProductId = data.planProductId
|
||||||
// this.form.processFlowId = data.processFlowId
|
// this.form.processFlowId = data.processFlowId
|
||||||
// this.form.materialMethod = data.materialMethod
|
// this.form.materialMethod = data.materialMethod
|
||||||
}else{//绑定
|
} else {//绑定
|
||||||
this.isBind = true
|
this.isBind = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -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 || []
|
||||||
@ -252,10 +221,10 @@ export default {
|
|||||||
},
|
},
|
||||||
// 物料变动
|
// 物料变动
|
||||||
selectMethod(val) {
|
selectMethod(val) {
|
||||||
if (val === 2 && !this.form.processFlowId ) {
|
if (val === 2 && !this.form.processFlowId) {
|
||||||
this.form.materialMethod = 1
|
this.form.materialMethod = 1
|
||||||
this.$modal.msgError("请先选择关联工艺");
|
this.$modal.msgError("请先选择关联工艺");
|
||||||
}else if (val === 1) {
|
} else if (val === 1) {
|
||||||
this.form.processFlowId = ''
|
this.form.processFlowId = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -273,32 +242,32 @@ export default {
|
|||||||
workOrderId: this.form.workOrderId,
|
workOrderId: this.form.workOrderId,
|
||||||
orderId: this.form.orderId,
|
orderId: this.form.orderId,
|
||||||
planAssignmentQuantity: this.form.planAssignmentQuantity
|
planAssignmentQuantity: this.form.planAssignmentQuantity
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功")
|
this.$modal.msgSuccess("操作成功")
|
||||||
this.$emit('addWorkOrderSubmit')
|
this.$emit('addWorkOrderSubmit')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{// 新增工单
|
} else {// 新增工单
|
||||||
this.$refs['addWorkOrder'].validate((valid) => {
|
this.$refs['addWorkOrder'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// 新增工单
|
// 新增工单
|
||||||
let _this = this
|
let _this = this
|
||||||
_this.form.planStartTime = _this.planStartTime ? new Date(_this.planStartTime).valueOf() : ''
|
_this.form.planStartTime = _this.planStartTime ? new Date(_this.planStartTime).valueOf() : ''
|
||||||
_this.form.planFinishTime = _this.planFinishTime ? new Date(_this.planFinishTime).valueOf() : ''
|
_this.form.planFinishTime = _this.planFinishTime ? new Date(_this.planFinishTime).valueOf() : ''
|
||||||
orderIssue({ ..._this.form }).then(res => {
|
orderIssue({ ..._this.form }).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
_this.$modal.msgSuccess("操作成功")
|
_this.$modal.msgSuccess("操作成功")
|
||||||
let name = this.form.name
|
let name = this.form.name
|
||||||
_this.$emit('addWorkOrderSubmit')
|
_this.$emit('addWorkOrderSubmit')
|
||||||
// // 询问是否添加预使用主原料
|
// // 询问是否添加预使用主原料
|
||||||
// _this.$modal.confirm('是否添加预使用主原料信息?').then(function() {
|
// _this.$modal.confirm('是否添加预使用主原料信息?').then(function() {
|
||||||
// _this.$router.push({
|
// _this.$router.push({
|
||||||
// path: '/core/core-work-order?workOrderName='+encodeURI(name)
|
// path: '/core/core-work-order?workOrderName='+encodeURI(name)
|
||||||
// })
|
// })
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -319,7 +288,7 @@ export default {
|
|||||||
// 绑定工单,选择工单时获取工单信息
|
// 绑定工单,选择工单时获取工单信息
|
||||||
getWorkOrderMsg() {
|
getWorkOrderMsg() {
|
||||||
if (this.form.workOrderId) {
|
if (this.form.workOrderId) {
|
||||||
getWorkOrderById({id:this.form.workOrderId}).then(res => {
|
getWorkOrderById({ id: this.form.workOrderId }).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form.code = res.data.code
|
this.form.code = res.data.code
|
||||||
this.form.planProductId = res.data.planProductId
|
this.form.planProductId = res.data.planProductId
|
||||||
@ -345,7 +314,7 @@ export default {
|
|||||||
getSpecifications(val) {
|
getSpecifications(val) {
|
||||||
for (let i of this.productList) {
|
for (let i of this.productList) {
|
||||||
if (i.id === val) {
|
if (i.id === val) {
|
||||||
this.form.specifications = i.specifications
|
this.form.specifications = i.specifications
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,28 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<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'>
|
||||||
<div class="blodTip">订单名</div>
|
<div class="blodTip">订单名</div>
|
||||||
<div class="lightTip">{{orderMsg.name}}</div>
|
<div class="lightTip">{{ orderMsg.name }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">产品名称</div>
|
<div class="blodTip">产品名称</div>
|
||||||
<div class="lightTip">{{orderMsg.productName}}</div>
|
<div class="lightTip">{{ orderMsg.productName }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">产品规格</div>
|
<div class="blodTip">产品规格</div>
|
||||||
<div class="lightTip">{{orderMsg.specifications}}</div>
|
<div class="lightTip">{{ orderMsg.specifications }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">创建时间</div>
|
<div class="blodTip">创建时间</div>
|
||||||
@ -40,11 +43,11 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">计划加工数量</div>
|
<div class="blodTip">计划加工数量</div>
|
||||||
<div class="lightTip">{{orderMsg.planQuantity}}</div>
|
<div class="lightTip">{{ orderMsg.planQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">加工平方数(平方米)</div>
|
<div class="blodTip">加工平方数(平方米)</div>
|
||||||
<div class="lightTip">{{orderMsg.planArea}}</div>
|
<div class="lightTip">{{ orderMsg.planArea }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">预计用时(时)</div>
|
<div class="blodTip">预计用时(时)</div>
|
||||||
@ -52,7 +55,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">状态</div>
|
<div class="blodTip">状态</div>
|
||||||
<div class="lightTip">{{getDictDataLabel(DICT_TYPE.ORDER_STATUS, orderMsg.status)}}</div>
|
<div class="lightTip">{{ getDictDataLabel(DICT_TYPE.ORDER_STATUS, orderMsg.status) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">实际开始时间</div>
|
<div class="blodTip">实际开始时间</div>
|
||||||
@ -66,15 +69,15 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">实际生产数量</div>
|
<div class="blodTip">实际生产数量</div>
|
||||||
<div class="lightTip">{{orderMsg.actualQuantity }}</div>
|
<div class="lightTip">{{ orderMsg.actualQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">完成比%</div>
|
<div class="blodTip">完成比%</div>
|
||||||
<div class="lightTip">{{orderMsg.completeProp}}</div>
|
<div class="lightTip">{{ orderMsg.completeProp }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">废片数量</div>
|
<div class="blodTip">废片数量</div>
|
||||||
<div class="lightTip">{{orderMsg.nokQuantity}}</div>
|
<div class="lightTip">{{ orderMsg.nokQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
@ -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',
|
||||||
@ -193,13 +191,13 @@ export default {
|
|||||||
processFlowName: ''
|
processFlowName: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components:{ TopTab },
|
components: { TopTab },
|
||||||
mounted() {
|
mounted() {
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
this.tableH = this.tableHeight(510) / 2
|
this.tableH = this.tableHeight(510) / 2
|
||||||
})
|
})
|
||||||
if (this.$route.query.orderIdString && this.$route.query.orderIdString!=='undefined') {
|
if (this.$route.query.orderIdString && this.$route.query.orderIdString !== 'undefined') {
|
||||||
getOrderList({ids:this.$route.query.orderIdString}).then(res => {
|
getOrderList({ ids: this.$route.query.orderIdString }).then(res => {
|
||||||
this.orderIdList = res.data.map(item => {
|
this.orderIdList = res.data.map(item => {
|
||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
@ -211,7 +209,7 @@ export default {
|
|||||||
})
|
})
|
||||||
this.isSingle = false
|
this.isSingle = false
|
||||||
console.log('aaaaa')
|
console.log('aaaaa')
|
||||||
}else{
|
} else {
|
||||||
this.orderId = this.$route.query.orderId
|
this.orderId = this.$route.query.orderId
|
||||||
this.isSingle = true
|
this.isSingle = true
|
||||||
this.getMsg()
|
this.getMsg()
|
||||||
@ -253,40 +251,48 @@ 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;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
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;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: rgba(102,102,102,0.75);
|
color: rgba(102, 102, 102, 0.75);
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.boxTitle {
|
.boxTitle {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
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: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
created () {
|
||||||
this.getProductionLineList()
|
|
||||||
this.getQualityInspectionDetList()
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
// 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()
|
||||||
// }
|
// }
|
||||||
|
@ -97,15 +97,18 @@ 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',
|
||||||
@ -107,7 +116,8 @@ 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