Compare commits

..

No commits in common. "db2cbb64c9749f843300da6769b94cccd46b72d6" and "149ec4c844d8178cff7a09203d66fed87434bd63" have entirely different histories.

69 changed files with 640 additions and 992 deletions

View File

@ -1,7 +1,7 @@
### ###
# @Author: Do not edit # @Author: Do not edit
# @Date: 2023-08-29 09:40:39 # @Date: 2023-08-29 09:40:39
# @LastEditTime: 2024-03-13 14:57:16 # @LastEditTime: 2024-03-05 09:48:49
# @LastEditors: zhp # @LastEditors: zhp
# @Description: # @Description:
### ###

View File

@ -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-03-14 19:12:31 * @LastEditTime: 2024-02-21 15:00:17
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
*/ */
@ -33,21 +33,3 @@ 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
})
}

View File

@ -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: true, fullscreen: false,
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(() => {

View File

@ -1,11 +1,17 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-01-29 16:50:26 * @Date: 2024-01-29 16:50:26
* @LastEditTime: 2024-03-13 09:07:37 * @LastEditTime: 2024-02-29 15:48:11
* @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="{
@ -13,7 +19,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:.22em" alt=""> <img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.4em" alt="">
许昌安彩冷端看板 许昌安彩冷端看板
<h3 class="unit">单位河南汇融数字科技有限公司</h3> <h3 class="unit">单位河南汇融数字科技有限公司</h3>
<h3 class="time">{{ times }}</h3> <h3 class="time">{{ times }}</h3>
@ -709,7 +715,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:#00FFF7' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div> `<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: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

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-01-29 13:45:56 * @Date: 2024-01-29 13:45:56
* @LastEditTime: 2024-03-13 08:58:01 * @LastEditTime: 2024-02-18 14:20:01
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -87,7 +87,7 @@ export default {
legend: { legend: {
bottom: '10%', bottom: '10%',
left: 'center', left: 'center',
itemWidth: 12, itemWidth: 20,
itemHeight:12, itemHeight:12,
icon: 'rect', icon: 'rect',
textStyle: { textStyle: {

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-09-21 09:06:28 * @Date: 2023-09-21 09:06:28
* @LastEditTime: 2024-03-13 08:51:12 * @LastEditTime: 2024-02-01 15:52:41
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -172,7 +172,7 @@ export default {
axisLine: { axisLine: {
lineStyle: { lineStyle: {
type: 'solid', type: 'solid',
color: '#25528f', color: '#213259', // 线
width: '1' // 线 width: '1' // 线
} }
}, },
@ -186,7 +186,7 @@ export default {
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: '#25528f' color: '#213259'
} }
}, },
data: nameList data: nameList
@ -215,7 +215,7 @@ export default {
show: true, show: true,
lineStyle: { lineStyle: {
type: 'solid', type: 'solid',
color: '#25528f', color: '#213259', // 线
width: '1' // 线 width: '1' // 线
} }
}, },
@ -228,7 +228,7 @@ export default {
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: '#25528f' color: '#213259'
} }
} }
// type: 'value' // type: 'value'
@ -260,7 +260,7 @@ export default {
show: true, show: true,
lineStyle: { lineStyle: {
type: 'solid', type: 'solid',
color: '#25528f', // 线 color: '#213259', // 线
width: '1' // 线 width: '1' // 线
} }
}, },
@ -275,7 +275,7 @@ export default {
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: '#25528f' color: '#213259'
} }
} }
// type: 'value' // type: 'value'

View File

@ -145,7 +145,7 @@ export default {
axisLine: { axisLine: {
lineStyle: { lineStyle: {
type: 'solid', type: 'solid',
color: '#25528f', // 线 color: '#213259', // 线
width: '1' // 线 width: '1' // 线
} }
}, },
@ -156,7 +156,7 @@ export default {
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: '#25528f' color: '#213259'
} }
}, },
data: this.nameList data: this.nameList
@ -172,17 +172,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: "#25528f", color: "#213259",
}, },
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: "#25528f", color: "#213259a0",
}, },
} }
}, },

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-27 13:54:52 * @Date: 2023-12-27 13:54:52
* @LastEditTime: 2024-03-13 09:04:11 * @LastEditTime: 2024-02-21 14:38:54
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -170,8 +170,8 @@ export default {
// } // }
this.chart.setOption({ this.chart.setOption({
legend: { legend: {
itemWidth: 12, // top: '2.5%',
itemHeight: 12, // right: '20px',
icon: 'rect', icon: 'rect',
textStyle: { textStyle: {
color: '#ffffff' color: '#ffffff'

View File

@ -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, publicFormatter } from "@/utils/dict"; import {DICT_TYPE, getDictDatas} from "@/utils/dict";
const tableProps = [ const tableProps = [
{ {
@ -50,8 +50,7 @@ const tableProps = [
}, },
{ {
prop: 'alarmGrade', prop: 'alarmGrade',
label: '报警级别', label: '报警级别'
filter: publicFormatter(DICT_TYPE.EQU_ALARM_LEVEL)
}, },
{ {
prop: 'alarmReason', prop: 'alarmReason',

View File

@ -7,11 +7,10 @@
<template> <template>
<el-drawer <el-drawer
:visible.sync="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapper-closable="true" :wrapper-closable="false"
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')">
@ -82,12 +81,12 @@
</section> </section>
</div> </div>
<div v-if="mode == 'edit'" class="drawer-body__footer"> <div 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 type="primary" @click="handleConfirm">保存</el-button> <el-button v-else type="primary" @click="handleConfirm">保存</el-button>
<!-- sections的第二项必须是 属性列表 --> <!-- sections的第二项必须是 属性列表 -->
<!-- <el-button <!-- <el-button
v-if="sections[1].allowAdd" v-if="sections[1].allowAdd"
@ -299,17 +298,6 @@ 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':

View File

@ -486,7 +486,6 @@ export default {
pageSize: 10, pageSize: 10,
code: '', code: '',
name: '', name: '',
special: false
}, },
// //
form: { form: {

View File

@ -298,9 +298,9 @@ export default {
// //
sort: undefined, sort: undefined,
// 线 // 线
lineDataType: 0, lineDataType: undefined,
// //
sectionDataType: 0, sectionDataType: undefined,
}; };
this.resetForm('form'); this.resetForm('form');
}, },

View File

@ -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-03-14 10:02:53 * @LastEditTime: 2023-12-14 13:52:42
* @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 => {

View File

@ -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-03-13 13:54:01 * @LastEditTime: 2024-02-29 15:01:25
* @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: false, message: "规格不能为空", trigger: "blur" }], specifications: [{ required: true, 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" }]
} }

View File

@ -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-03-13 13:54:48 * @LastEditTime: 2024-03-01 19:52:55
* @Description: * @Description:
--> -->
<template> <template>
@ -33,7 +33,6 @@
<el-select <el-select
v-model="dataForm.roomNameDict" v-model="dataForm.roomNameDict"
filterable filterable
clearable
style="width: 100%" style="width: 100%"
placeholder="请选择车间名称"> placeholder="请选择车间名称">
<el-option <el-option

View File

@ -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%;" clearable @change="materialMethodChange"> <el-select v-model="dataForm.materialMethod" placeholder="请选择物料计算方式" style="width: 100%;" @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" clearable placeholder="请选择优先级" style="width: 100%;"> <el-select v-model="dataForm.priority" 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" clearable placeholder="请选择工单类型" style="width: 100%;"> <el-select v-model="dataForm.type" 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,6 @@
<el-select <el-select
v-model="dataForm.roomNameDict" v-model="dataForm.roomNameDict"
filterable filterable
clearable
style="width: 100%" style="width: 100%"
placeholder="请选择车间名称"> placeholder="请选择车间名称">
<el-option <el-option
@ -134,7 +133,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" clearable placeholder="请选择关联产线" multiple style="width: 100%;"> <el-select v-model="dataForm.productLineIds" 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"
@ -146,7 +145,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" clearable placeholder="请输入负责人"></el-input> <el-input v-model="dataForm.workers" placeholder="请输入负责人"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -205,8 +204,7 @@ 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: [],

View File

@ -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-03-13 14:47:44 * @LastEditTime: 2024-02-29 10:01:52
* @Description: * @Description:
--> -->
<template> <template>
@ -18,28 +18,15 @@
<div class="content"> <div class="content">
<div class="formContent"> <div class="formContent">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="12">工单名称:{{ dataForm.name }}</el-col>
<div class="blodTip">工单名称</div> <el-col :span="12">工单编码:{{ dataForm.code }}</el-col>
<div class="lightTip">{{ dataForm.name }}</div>
</el-col>
<el-col :span="8">
<div class="blodTip">工单编码</div>
<div class="lightTip">{{ dataForm.code }}</div>
</el-col>
<el-col :span="8">
<div class="blodTip">产品名称</div>
<div class="lightTip">{{ dataForm.productName }}</div>
</el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="12">产品名称:{{ dataForm.productName }}</el-col>
<div class="blodTip">产品规格</div> <el-col :span="12">产品规格:{{ dataForm.specifications }}</el-col>
<div class="lightTip">{{ dataForm.specifications }}</div> </el-row>
</el-col> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="12">实际生产数量:{{ dataForm.expectedTime }}</el-col>
<div class="blodTip">实际生产数量</div>
<div class="lightTip">{{ dataForm.expectedTime }}</div>
</el-col>
</el-row> </el-row>
</div> </div>
@ -309,18 +296,4 @@ 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>

View File

@ -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-03-13 14:42:32 * @LastEditTime: 2024-02-29 15:35:02
* @Description: * @Description:
--> -->
<template> <template>
@ -274,10 +274,6 @@ const tableProps1 = [
prop: 'remaining', prop: 'remaining',
label: '剩余生产预计消耗' label: '剩余生产预计消耗'
}, },
{
prop: 'num',
label: '库存数量'
}
]; ];
export default { export default {

View File

@ -28,7 +28,7 @@
<el-form-item <el-form-item
label="报警级别" label="报警级别"
prop="grade" prop="grade"
:rules="[{ required: false, message: '报警级别不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '报警级别不能为空', trigger: 'blur' }]">
<el-select <el-select
:disabled="disabled" :disabled="disabled"
v-model="dataForm.grade" v-model="dataForm.grade"

View File

@ -7,11 +7,10 @@
<template> <template>
<el-drawer <el-drawer
:visible.sync="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapper-closable="true" :wrapper-closable="false"
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')">
@ -44,51 +43,7 @@
: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-form <el-row style="margin-bottom: 24px">
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"
@ -107,7 +62,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">
@ -173,11 +128,12 @@
</section> </section>
</div> </div>
<div v-if="!mode.includes('detail')" class="drawer-body__footer"> <div 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"
@click="handleSave"> v-if="!mode.includes('detail')"
@click="handleCancel">
确定 确定
</el-button> </el-button>
</div> </div>
@ -207,8 +163,6 @@
<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',
@ -237,21 +191,16 @@ const SmallTitle = {
export default { export default {
components: { SmallTitle, DialogForm, BaseInfoForm }, components: { SmallTitle, DialogForm, BaseInfoForm },
props: ['sections', 'defaultMode', 'dataId', 'size', 'equipmentId', 'id'], // dataId id props: ['sections', 'defaultMode', 'dataId', 'size'], // 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: '',
@ -376,34 +325,6 @@ 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':
@ -421,16 +342,6 @@ 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() {
@ -449,9 +360,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: '/base/equipment-bind-group/update', url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
method: isEdit ? 'put' : 'post', method: isEdit ? 'put' : 'post',
data: this.dataForm, data: this.form,
}); });
this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`); this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`);
this.visible = false; this.visible = false;

View File

@ -48,8 +48,6 @@
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: '基本信息',
@ -222,7 +220,7 @@ export default {
{ {
select: true, select: true,
label: '设备', label: '设备',
url: '/base/core-equipment/page?pageNo=1&pageSize=100&special=false', url: '/base/core-equipment/page?pageNo=1&pageSize=100',
prop: 'equipmentId', prop: 'equipmentId',
bind: { bind: {
filterable: true, filterable: true,
@ -268,8 +266,6 @@ export default {
equipmentGroupCode: undefined, equipmentGroupCode: undefined,
equipmentGroupName: undefined, equipmentGroupName: undefined,
}, },
equipmentId: undefined,
id: undefined,
editVisible: false, editVisible: false,
editMode: '', editMode: '',
drawerBaseInfoRows: [ drawerBaseInfoRows: [
@ -444,8 +440,6 @@ 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();

View File

@ -379,7 +379,7 @@ export default {
}); });
this.searchBarFormConfig[1].selectOptions = plcList.map((item) => { this.searchBarFormConfig[1].selectOptions = plcList.map((item) => {
return { return {
name: item.code, name: item.name,
id: item.id, id: item.id,
}; };
}); });
@ -463,8 +463,7 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = '添加设备采集配置'; this.title = '添加设备与实时采集关系表(一对多)';
this.$refs.addOrUpdate.init()
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
@ -473,7 +472,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 = '修改设备与实时采集关系表(一对多)';
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */

View File

@ -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-03-13 16:47:02 * @LastEditTime: 2024-02-22 10:08:13
* @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 } from "@/api/base/coreProductionLine"; import { createCorePL, updateCorePL, getCorePL, getCode, getCorePLList } from "@/api/base/coreProductionLine";
import { createEquipmentPlcConnect, updateEquipmentPlcConnect } from '@/api/base/equipmentPlcConnect'; import { createEquipmentPlcConnect, updateEquipmentPlcConnect } from '@/api/base/equipmentPlcConnect';
import { getplcAllList, getTree } from "@/api/equipment/base/config/config"; import { getplcAllList, listByParentId } from "@/api/equipment/base/config/config";
export default { export default {
mixins: [basicAdd], mixins: [basicAdd],
@ -95,29 +95,22 @@ 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 getTree(); const res1 = await getCorePLList();
this.plLineList = res1.data; this.plLineList = res1.data;
// const res1 = await getCorePLList(); this.plLineList.forEach(item => {
// this.plLineList = res1.data; listByParentId({ id: item.id }).then(resp => {
// this.plLineList.forEach(item => { if (resp.data.length > 0) {
// listByParentId({ id: item.id }).then(resp => { // item.children = resp.data
// if (resp.data.length > 0) { this.$set(item, 'children', resp.data)
// // item.children = resp.data // this.$forceUpdate()
// this.$set(item, 'children', resp.data) }
// // this.$forceUpdate() })
// } })
// })
// })
}, },
// //
dataFormSubmit() { dataFormSubmit() {

View File

@ -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',
@ -122,7 +122,7 @@ export default {
{ prop: 'department', label: '部门' }, { prop: 'department', label: '部门' },
{ prop: 'actualCheckTime', label: '巡检时间', filter: parseTime }, { prop: 'actualCheckTime', 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,14 +416,10 @@ export default {
.catch(() => {}); .catch(() => {});
}, },
handleDetail({ id }) { handleDetail({ id }) {
this.addContent = true; this.addOrUpdateVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addContent.init(id, true); this.$refs.addOrUpdate.init(id, true);
}); });
// this.addOrUpdateVisible = true
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(id, true);
// });
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {

View File

@ -73,7 +73,7 @@ const remainBox = {
color() { color() {
if (this.value) { if (this.value) {
const v = +this.value; const v = +this.value;
return v <= 1 ? 'red' : v > 1 && v <= 2 ? 'yellow' : 'green'; return v < 0 ? 'red' : v >= 0 && v < 2 ? 'yellow' : 'green';
} }
return 'unset'; return 'unset';
}, },
@ -84,10 +84,9 @@ 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]?.toFixed(0) || ''} {this.injectData[this.injectData.prop] || ''}
</div> </div>
); );
}, },
@ -129,26 +128,22 @@ export default {
// width: 180, // width: 180,
// filter: parseTime(createTime), // filter: parseTime(createTime),
// }, // },
{ prop: 'code', label: '保养计划单号', minWidth: 118, showOverflowtooltip: true }, { prop: 'code', label: '保养计划单号' },
{ prop: 'name', label: '保养计划名称', minWidth: 118, showOverflowtooltip: true }, { prop: 'name', label: '保养计划名称' },
{ prop: 'departmentName', label: '部门', minWidth: 100, showOverflowtooltip: true }, { prop: 'departmentName', label: '部门' },
{ prop: 'lineName', label: '产线名', minWidth: 100, showOverflowtooltip: true }, { prop: 'lineName', label: '产线名' },
{ {
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, minWidth: 160, showOverflowtooltip: true }, { prop: 'nextPlanMaintainTime', label: '下次计划保养时间', filter: parseTime },
{ prop: 'maintainer', label: '计划保养人员', minWidth: 160, showOverflowtooltip: true }, { prop: 'maintainer', label: '计划保养人员' },
// { prop: 'equipmentName', label: '' }, // { prop: 'equipmentName', label: '' },
// { prop: 'equipmentCode', label: '' }, // { prop: 'equipmentCode', label: '' },
// { prop: 'maintenancePeriod', label: '' }, // { prop: 'maintenancePeriod', label: '' },
@ -158,12 +153,11 @@ 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, width: 100 }, { prop: 'opt2', label: '保养内容', name: '详情', subcomponent: btn },
{ {
prop: 'remainDays', prop: 'remainDays',
label: '距离下次保养剩余时间(天)', label: '距离下次保养剩余时间(天)',
subcomponent: remainBox, subcomponent: remainBox,
minWidth: 210,
} }
], ],
searchBarFormConfig: [ searchBarFormConfig: [
@ -238,24 +232,23 @@ 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],

View File

@ -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-03-13 15:55:36 * @LastEditTime: 2024-02-28 19:52:13
* @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>

View File

@ -64,7 +64,6 @@ 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');
@ -175,7 +174,6 @@ 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,
}, },
// { // {
@ -351,28 +349,23 @@ 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()

View File

@ -2,7 +2,11 @@
<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 v-for="item in workerList" :key="item.id" :label="item.name" :value="item.id"> <el-option
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>
@ -44,12 +48,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
@ -68,7 +72,7 @@ export default {
this.form.majorName = item.majorName this.form.majorName = item.majorName
} }
}) })
} else { }else{
this.form.majorName = '' this.form.majorName = ''
} }
}, },

View File

@ -9,15 +9,18 @@
</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) ? <p class="lightText">{{ (queryParams.roomNameDict || queryParams.roomNameDict === 0) ? getDictDataLabel('workshop',queryParams.roomNameDict) : '-' }}</p>
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 :table-props="tableProps" :table-data="tableData" :max-height="tableH" :page="1" :limit="1000000" /> <base-table
:table-props="tableProps"
:table-data="tableData"
:max-height="tableH"
/>
</div> </div>
</el-drawer> </el-drawer>
</div> </div>
@ -44,7 +47,7 @@ const tableProps = [
}, },
{ {
prop: 'workTime', prop: 'workTime',
label: '工作时长(h)' label: '工作时长'
} }
] ]
export default { export default {
@ -80,24 +83,21 @@ 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;
} }
} }

View File

@ -2,20 +2,28 @@
<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>
filterable> <el-option
<el-option v-for="item in classesArr" :key="item.id" v-for="item in classesArr"
:label="(item.roomName ? item.roomName : '') + '-' + item.name" :value="item.id"> :key="item.id"
<span>{{ item.roomName }}-{{ item.name }}</span> :label="(item.roomName?item.roomName:'')+'-'+item.name"
: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 v-model="queryParams.tiemStr" type="daterange" format='yyyy-MM-dd' value-format='yyyy-MM-dd' <el-date-picker
range-separator='-' style="width: 250px;" size="small"> v-model="queryParams.tiemStr"
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>
@ -61,7 +69,6 @@ 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;
@ -76,7 +83,6 @@ 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;

View File

@ -1,8 +1,12 @@
<template> <template>
<div> <div>
<el-drawer title="生产情况" :visible.sync="visible" size="70%" @closed="closeDrawer" :show-close='false'> <el-drawer title="查看详情" :visible.sync="visible" size="70%" :wrapperClosable='false' @closed="closeDrawer">
<div class="box"> <div class="box">
<base-table :table-props="tableProps" :table-data="tableData" :max-height="tableH" /> <base-table
:table-props="tableProps"
:table-data="tableData"
:max-height="tableH"
/>
</div> </div>
</el-drawer> </el-drawer>
</div> </div>
@ -49,7 +53,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) {
@ -86,11 +90,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({
@ -107,15 +111,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)

View File

@ -1,22 +1,37 @@
<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 :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list" <base-table
:max-height="tableH"> :page="queryParams.pageNo"
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn" :limit="queryParams.pageSize"
@clickBtn="handleClick" /> :table-props="tableProps"
: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 :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total" <pagination
@pagination="getList" /> :page.sync="queryParams.pageNo"
: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>
@ -71,6 +86,38 @@ 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,
@ -81,12 +128,11 @@ export default {
}, },
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi('base:team-production:detail') this.$auth.hasPermi('base:team-production:detail')
? { ? {
type: 'productionDetail', type: 'detail',
btnName: '查看', btnName: '详情'
showTip: '生产情况' }
}
: undefined : undefined
].filter((v) => v), ].filter((v) => v),
list: [], list: [],
@ -112,7 +158,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

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-08 13:46:17 * @Date: 2023-12-08 13:46:17
* @LastEditTime: 2024-03-12 14:54:05 * @LastEditTime: 2024-03-01 15:22:06
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -58,8 +58,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="检测时间" prop="checkTime" <el-form-item label="检测时间" prop="checkTime"
:rules="[{ required: true, message: '检测时间不能为空', trigger: 'change' }]"> :rules="[{ required: true, message: '检测时间不能为空', trigger: 'change' }]">
<el-date-picker value-format="timestamp" v-model="dataForm.checkTime" type="datetime" <el-date-picker v-model="dataForm.checkTime" type="datetime" placeholder="选择检测时间">
placeholder="选择检测时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -81,7 +80,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item :prop="'checkValueList.' + index + '.checkValue'" label="成分含量" <el-form-item :prop="'checkValueList.' + index + '.checkValue'" label="成分含量"
:rules="[{ required: true, message: '成分含量不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '成分含量不能为空', trigger: 'blur' }]">
<el-input oninput="value=value.replace(/[^\d]/g,'')" :disabled="isdetail" <el-input oninput="value=value.replace(/[^\d]/g,'')" :disabled="isdetail"
style="width: 90%;margin-right: 10px;" :max="item.maxValue" :min='item.minValue' style="width: 90%;margin-right: 10px;" :max="item.maxValue" :min='item.minValue'
v-model.number="dataForm.checkValueList[index].checkValue" v-model.number="dataForm.checkValueList[index].checkValue"
@change="judgeValue(arguments[0],item.minValue,item.maxValue,index)"></el-input> @change="judgeValue(arguments[0],item.minValue,item.maxValue,index)"></el-input>

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-01-24 15:15:24 * @Date: 2024-01-24 15:15:24
* @LastEditTime: 2024-03-13 15:21:30 * @LastEditTime: 2024-03-11 15:51:20
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -100,13 +100,11 @@ export default {
await this.urlOptions.getDataListURL(this.listQuery).then(response => { await this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.filter(item => { this.tableData = response.data.filter(item => {
this.proLineList.forEach(it => { this.proLineList.forEach(it => {
if (item.lineId === it.id) { if (item.lineId === it.id) {
item.lineName = it.name item.lineName = it.name
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? item.originalGlassStatisticsTrend + '%' : null
item.dailyOutputTrend = item.dailyOutputTrend ? parseFloat((item.dailyOutputTrend * 100).toFixed(2)) + '%' : null item.actualProductTrend = item.actualProductTrend ? item.actualProductTrend + '%' : null
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null item.originalGlassPassTrend = item.originalGlassPassTrend ? item.originalGlassPassTrend * 100 + '%' : null
item.actualProductTrend = item.actualProductTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
item.originalGlassPassTrend = item.originalGlassPassTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
} }
}) })
if (item.det === false) { if (item.det === false) {

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: Do not edit * @Author: Do not edit
* @Date: 2023-12-13 14:10:04 * @Date: 2023-12-13 14:10:04
* @LastEditTime: 2024-03-13 15:27:43 * @LastEditTime: 2024-03-11 16:10:25
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -197,12 +197,6 @@ const cols = [
}, },
methods: { methods: {
updateData() { updateData() {
this.data.forEach((ele, index) => {
delete ele.dailyOutputTrend
delete ele.originalGlassStatisticsTrend
delete ele.actualProductTrend
delete ele.originalGlassPassTrend
});
updateGlass(this.data).then(response => { updateGlass(this.data).then(response => {
updateGlassRemark(this.sum).then(res => { updateGlassRemark(this.sum).then(res => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

View File

@ -81,10 +81,9 @@ export default {
this.proLineList.forEach(it => { this.proLineList.forEach(it => {
if (item.lineId === it.id) { if (item.lineId === it.id) {
item.lineName = it.name item.lineName = it.name
item.dailyOutputTrend = item.dailyOutputTrend ? parseFloat((item.dailyOutputTrend * 100).toFixed(2)) + '%' : null item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? item.originalGlassStatisticsTrend + '%' : null
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null item.actualProductTrend = item.actualProductTrend ? item.actualProductTrend + '%' : null
item.actualProductTrend = item.actualProductTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null item.originalGlassPassTrend = item.originalGlassPassTrend ? item.originalGlassPassTrend * 100 + '%' : null
item.originalGlassPassTrend = item.originalGlassPassTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
} }
}) })
if (item.det === false) { if (item.det === false) {

View File

@ -172,10 +172,9 @@ export default {
this.proLineList.forEach(it => { this.proLineList.forEach(it => {
if (item.lineId === it.id) { if (item.lineId === it.id) {
item.lineName = it.name item.lineName = it.name
item.dailyOutputTrend = item.dailyOutputTrend ? parseFloat((item.dailyOutputTrend * 100).toFixed(2)) + '%' : null item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? item.originalGlassStatisticsTrend + '%' : null
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null item.actualProductTrend = item.actualProductTrend ? item.actualProductTrend + '%' : null
item.actualProductTrend = item.actualProductTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null item.originalGlassPassTrend = item.originalGlassPassTrend ? item.originalGlassPassTrend * 100 + '%' : null
item.originalGlassPassTrend = item.originalGlassPassTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
} }
}) })
if (item.det === false) { if (item.det === false) {

View File

@ -82,10 +82,9 @@ export default {
this.tableData = response.data.filter(item => { this.tableData = response.data.filter(item => {
this.proLineList.forEach(it => { this.proLineList.forEach(it => {
if (item.lineId === it.id) { if (item.lineId === it.id) {
item.dailyOutputTrend = item.dailyOutputTrend ? parseFloat((item.dailyOutputTrend * 100).toFixed(2)) + '%' : null item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? item.originalGlassStatisticsTrend + '%' : null
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null item.actualProductTrend = item.actualProductTrend ? item.actualProductTrend + '%' : null
item.actualProductTrend = item.actualProductTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null item.originalGlassPassTrend = item.originalGlassPassTrend ? item.originalGlassPassTrend * 100 + '%' : null
item.originalGlassPassTrend = item.originalGlassPassTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
item.lineName = it.name item.lineName = it.name
} }
}) })

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-12 13:45:25 * @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-13 15:28:18 * @LastEditTime: 2024-03-12 11:17:53
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -47,8 +47,7 @@
<el-table-column prop="inputTrend" label="增减" align="center"> <el-table-column prop="inputTrend" label="增减" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input> <el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend * 100).toFixed(2)) + '%' : <span v-else>{{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined}} </span>
undefined}} </span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -71,8 +70,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled"> <el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
</el-input> </el-input>
<span v-else>{{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend * 100).toFixed(2)) + <span v-else>{{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }} </span>
'%' : undefined }} </span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -93,8 +91,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled"> <el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
</el-input> </el-input>
<span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend * 100).toFixed(2)) + '%' : <span v-else>{{ scope.row.missCheckTrend ? scope.row.missCheckTrend + '%' : undefined }} </span>
undefined }} </span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -117,9 +114,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled"> <el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
</el-input> </el-input>
<span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend * <span v-else>{{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' : undefined }}
100).toFixed(2)) +
'%' : undefined }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -532,16 +527,10 @@ export default {
} }
}) })
let updateArr = this.list let updateArr = this.list
updateArr.forEach((ele, index) => {
delete ele.inputTrend
delete ele.goodProductTrend
delete ele.missCheckTrend
delete ele.goodProductPassTrend
});
// console.log(JSON.stringify(updateArr[1])) // console.log(JSON.stringify(updateArr[1]))
const result = await Promise.all([ const result = await Promise.all([
await updateSumProductionDataList(obj), await updateSumProductionDataList(obj),
await updateProductionDataList(updateArr) await updateProductionDataList(updateArr),
]) ])
console.log(result); console.log(result);
if (result[0].data == true && result[1].data == true) { if (result[0].data == true && result[1].data == true) {

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-12 13:45:25 * @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-13 15:29:17 * @LastEditTime: 2024-03-12 11:14:04
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -49,8 +49,7 @@
<el-table-column prop="inputTrend" label="增减" align="center"> <el-table-column prop="inputTrend" label="增减" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input> <el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend * <span v-else>{{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined }} </span>
100).toFixed(2)) + '%' : undefined }} </span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -73,8 +72,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled"> <el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
</el-input> </el-input>
<span v-else>{{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend * <span v-else>{{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }} </span>
100).toFixed(2)) + '%' : undefined }} </span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -95,8 +93,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled"> <el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
</el-input> </el-input>
<span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend * <span v-else>{{ scope.row.missCheckTrend ? scope.row.missCheckTrend +'%' : undefined }} </span>
100).toFixed(2)) +'%' : undefined }} </span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -119,8 +116,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled"> <el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
</el-input> </el-input>
<span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend * <span v-else>{{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' :undefined }}
100).toFixed(2))+ '%' :undefined }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -535,12 +531,6 @@ export default {
} }
}) })
let updateArr = this.list let updateArr = this.list
updateArr.forEach((ele, index) => {
delete ele.inputTrend
delete ele.goodProductTrend
delete ele.missCheckTrend
delete ele.goodProductPassTrend
});
// console.log(JSON.stringify(updateArr[1])) // console.log(JSON.stringify(updateArr[1]))
const result = await Promise.all([ const result = await Promise.all([
await updateSumProductionDataList(obj), await updateSumProductionDataList(obj),

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-12 13:45:25 * @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-14 13:46:39 * @LastEditTime: 2024-03-12 11:17:14
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -9,7 +9,9 @@
<div class="app-container"> <div class="app-container">
<el-form :inline="true" :model="dataForm" class="demo-form-inline"> <el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item> <el-form-item>
<el-date-picker clearable v-model="reportTime" @change="changeTime" type="date" placeholder="选择日期"> <el-date-picker clearable v-model="monthValue" type="monthrange" range-separator="" start-placeholder="开始日期"
end-placeholder="结束日期" value-format="timestamp" :clearable="false" :picker-options="pickerOptions"
size="small" style='width:350px;' @change="timeSelect">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-button type="primary" @click="getDataList()">查询</el-button> <el-button type="primary" @click="getDataList()">查询</el-button>
@ -429,8 +431,7 @@ export default {
// explainText: undefined, // explainText: undefined,
// remark: undefined, // remark: undefined,
// }, // },
// //
reportTime:'',
dataForm: { dataForm: {
// pageSize: 100, // pageSize: 100,
// pageNo:1, // pageNo:1,
@ -448,41 +449,10 @@ export default {
// this.getProductLineList(); // this.getProductLineList();
}, },
mounted() { mounted() {
this.getTodayStartTimeAndEndTime()
this.getDataList() this.getDataList()
this.getDict() this.getDict()
}, },
methods: { methods: {
format(shijianchuo) {
//shijianchuoparseInt
var time = moment(new Date(shijianchuo)).format('YYYY-MM-DD HH:mm:ss')
// console.log(time)
// var y = time.getFullYear();
// var m = time.getMonth() + 1;
// var d = time.getDate();
// var h = time.getHours();
// var mm = time.getMinutes();
// var s = time.getSeconds();
return time
},
getTodayStartTimeAndEndTime() {
this.reportTime = new Date()
this.changeTime(this.reportTime)
},
changeTime(val) {
console.log(val)
if (val) {
// console.log(val)
// console.log(val.setHours(7, 0, 0))
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
// let time = this.format(val.setHours(7, 0, 0))
this.dataForm.reportTime[0] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.dataForm.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
console.log(this.dataForm.reportTime);
} else {
this.dataForm.reportTime = []
}
},
async getDict() { async getDict() {
// 线 // 线
const res = await getCorePLList() const res = await getCorePLList()
@ -560,7 +530,18 @@ export default {
} }
}, },
async getDataList() { async getDataList() {
this.timeTips = moment(new Date()).format('YYYY-MM-DD') + ' - ' + moment(new Date().setHours(7, 0, 0) + 24 * 60 * 60 * 1000).format('YYYY-MM-DD') if (this.monthValue.length > 0) {
console.log(this.monthValue)
this.dataForm.reportTime[0] = this.transformTime(this.monthValue[0])
// this.queryParams.startTime = this.monthValue[0]
this.dataForm.reportTime[1] = this.transformTime(this.monthValue[1])
this.timeTips = moment(this.monthValue[0]).format('YYYY-MM-DD') + ' - ' + moment(this.monthValue[1]).format('YYYY-MM-DD')
console.log(this.timeTips);
} else {
// this.$modal.msgError('')
// return false
}
console.log(this.dataForm); console.log(this.dataForm);
const res = await this.$axios({ const res = await this.$axios({
url: 'base/report-auto-delive/listPlus', url: 'base/report-auto-delive/listPlus',

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-12 13:45:25 * @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-13 15:29:26 * @LastEditTime: 2024-03-12 11:14:55
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -10,7 +10,7 @@
<el-form :inline="true" :model="dataForm" class="demo-form-inline"> <el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item> <el-form-item>
<el-date-picker v-model="reportTime" type="week" size="small" @change="changeTime" <el-date-picker v-model="reportTime" type="week" size="small" @change="changeTime"
:picker-options="{firstDayOfWeek: 4}" :format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp" :picker-options="{firstDayOfWeek: 5}" :format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
style="width: 350px" placeholder="选择周"> style="width: 350px" placeholder="选择周">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -50,8 +50,7 @@
<el-table-column prop="inputTrend" label="增减" align="center"> <el-table-column prop="inputTrend" label="增减" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input> <el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend * <span v-else>{{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined }} </span>
100).toFixed(2)) + '%' : undefined }} </span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -74,8 +73,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled"> <el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
</el-input> </el-input>
<span v-else>{{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend * <span v-else>{{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }} </span>
100).toFixed(2)) + '%' : undefined }} </span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -96,8 +94,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled"> <el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
</el-input> </el-input>
<span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend * <span v-else>{{ scope.row.missCheckTrend ? scope.row.missCheckTrend + '%' : undefined }} </span>
100).toFixed(2)) + '%' : undefined }} </span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -120,8 +117,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled"> <el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
</el-input> </el-input>
<span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend * <span v-else>{{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' : undefined }}
100).toFixed(2)) + '%' :undefined }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -505,12 +501,6 @@ export default {
} }
}) })
let updateArr = this.list let updateArr = this.list
updateArr.forEach((ele, index) => {
delete ele.inputTrend
delete ele.goodProductTrend
delete ele.missCheckTrend
delete ele.goodProductPassTrend
});
// console.log(JSON.stringify(updateArr[1])) // console.log(JSON.stringify(updateArr[1]))
const result = await Promise.all([ const result = await Promise.all([
await updateSumProductionDataList(obj), await updateSumProductionDataList(obj),

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-12 13:45:25 * @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-13 15:29:35 * @LastEditTime: 2024-03-12 11:15:05
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -52,8 +52,7 @@
<el-table-column prop="inputTrend" label="增减" align="center"> <el-table-column prop="inputTrend" label="增减" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input> <el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend * <span v-else>{{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined }} </span>
100).toFixed(2)) + '%' : undefined }} </span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -76,8 +75,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled"> <el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
</el-input> </el-input>
<span v-else>{{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend * <span v-else>{{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }} </span>
100).toFixed(2)) + '%' : undefined }} </span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -98,8 +96,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled"> <el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
</el-input> </el-input>
<span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend * <span v-else>{{ scope.row.missCheckTrend ? scope.row.missCheckTrend + '%' : undefined }}
100).toFixed(2)) + '%' : undefined }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -123,8 +120,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled"> <el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
</el-input> </el-input>
<span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend * <span v-else>{{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' : undefined }}
100).toFixed(2)) + '%' : undefined }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -449,12 +445,6 @@ export default {
} }
}) })
let updateArr = this.list let updateArr = this.list
updateArr.forEach((ele, index) => {
delete ele.inputTrend
delete ele.goodProductTrend
delete ele.missCheckTrend
delete ele.goodProductPassTrend
});
// console.log(JSON.stringify(updateArr[1])) // console.log(JSON.stringify(updateArr[1]))
const result = await Promise.all([ const result = await Promise.all([
await updateSumProductionDataList(obj), await updateSumProductionDataList(obj),

View File

@ -117,12 +117,12 @@
import moment from 'moment'; import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import EquipmentDrawer from '../components/firefightingDrawer'; import EquipmentDrawer from '../components/firefightingDrawer';
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
import { import {
createEquipment, createEquipment,
updateEquipment, updateEquipment,
deleteEquipment, deleteEquipment,
getEquipment,
getEquipmentPage, getEquipmentPage,
exportEquipmentExcel, exportEquipmentExcel,
} from '@/api/base/equipment'; } from '@/api/base/equipment';
@ -134,7 +134,6 @@ export default {
components: { components: {
Editor, Editor,
EquipmentDrawer, EquipmentDrawer,
BaseDialog: BaseDialogWrapper
}, },
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {

View File

@ -116,12 +116,12 @@
import moment from 'moment'; import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import EquipmentDrawer from '../components/manageDrawer'; import EquipmentDrawer from '../components/manageDrawer';
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
import { import {
createEquipment, createEquipment,
updateEquipment, updateEquipment,
deleteEquipment, deleteEquipment,
getEquipment,
getEquipmentPage, getEquipmentPage,
exportEquipmentExcel, exportEquipmentExcel,
} from '@/api/base/equipment'; } from '@/api/base/equipment';
@ -133,7 +133,6 @@ export default {
components: { components: {
Editor, Editor,
EquipmentDrawer, EquipmentDrawer,
BaseDialog: BaseDialogWrapper
}, },
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {

View File

@ -126,14 +126,12 @@ import {
} from '@/api/base/equipment'; } from '@/api/base/equipment';
import Editor from '@/components/Editor'; import Editor from '@/components/Editor';
import AssetsUpload from '../components/AssetsUpload.vue'; import AssetsUpload from '../components/AssetsUpload.vue';
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
export default { export default {
name: 'SpecialEquipmentForSafety', name: 'SpecialEquipmentForSafety',
components: { components: {
Editor, Editor,
EquipmentDrawer, EquipmentDrawer,
BaseDialog: BaseDialogWrapper,
}, },
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {

View File

@ -51,8 +51,7 @@
<addOrUpdata <addOrUpdata
v-if="addOrUpdateVisible" v-if="addOrUpdateVisible"
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="getList" @refreshDataList="getList" />
@destroy="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -61,11 +60,10 @@ 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 BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
export default { export default {
name: 'SpecialEquipmentCheckConfig', name: 'SpecialEquipmentCheckConfig',
components: { addOrUpdata, add, BaseDialog: BaseDialogWrapperVue }, components: { addOrUpdata, add },
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
@ -190,7 +188,6 @@ export default {
pageSize: 10, pageSize: 10,
name: null, name: null,
status: 0, status: 0,
special: true,
}, },
// //
form: {}, form: {},

View File

@ -9,9 +9,7 @@
<el-drawer <el-drawer
:visible="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapperClosable="true" :wrapper-closable="false"
:close-on-click-modal="true"
:before-close="handleConfirmClose"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
size="60%" size="60%"
@ -173,7 +171,7 @@
</div> </div>
<div class="drawer-body__footer"> <div class="drawer-body__footer">
<el-button v-if="!disableEdit" @click="handleCancel"> <el-button style="" @click="handleCancel">
{{ disableEdit ? '返回' : '取消' }} {{ disableEdit ? '返回' : '取消' }}
</el-button> </el-button>
<el-button <el-button
@ -208,11 +206,35 @@
<script> <script>
import DialogForm from '../../../components/DialogForm/index.vue'; import DialogForm from '../../../components/DialogForm/index.vue';
import { groupConnectWorkshop } from '@/utils/equipment-module'; import { groupConnectWorkshop } from '@/utils/equipment-module';
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
import SmallTitle from '../components/SmallTitle.js'; const SmallTitle = {
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};
export default { export default {
components: { SmallTitle, DialogForm, BaseDialog: BaseDialogWrapperVue }, components: { SmallTitle, DialogForm },
props: ['dataId'], // dataId id props: ['dataId'], // dataId id
data() { data() {
return { return {
@ -389,35 +411,6 @@ export default {
this.getList('inspector'); this.getList('inspector');
}, },
methods: { methods: {
/** 确认是否关闭 */
async handleConfirmClose() {
if (this.disableEdit) return this.handleCancel();
try {
if (
await this.$confirm(
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
确认要关闭页面吗?
</h1>
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
确定关闭将不保留编辑内容
</p>
</div>,
{
confirmButtonText: '确 定',
cancelButtonText: '取 消',
type: 'warning',
}
)
) {
this.handleCancel();
}
} catch (err) {
return false;
}
},
handleSearchBarBtnClick(btn) { handleSearchBarBtnClick(btn) {
switch (btn.btnName) { switch (btn.btnName) {
case 'search': case 'search':

View File

@ -64,18 +64,10 @@ import { parseTime } from '../../core/mixins/code-filter';
import CheckOrderListTable from './CheckOrderListTable.vue'; import CheckOrderListTable from './CheckOrderListTable.vue';
import edit from './Content-edit.vue'; import edit from './Content-edit.vue';
import AddCheckDet from './Content-add_detail.vue'; import AddCheckDet from './Content-add_detail.vue';
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
export default { export default {
name: 'SpecialEquipmentCheckConfig', name: 'SpecialEquipmentCheckConfig',
components: { components: { addOrUpdata, add, edit, AddCheckDet, CheckOrderListTable },
addOrUpdata,
add,
edit,
AddCheckDet,
BaseDialog: BaseDialogWrapperVue,
CheckOrderListTable,
},
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
@ -94,7 +86,7 @@ export default {
? { ? {
type: 'edit', type: 'edit',
btnName: '修改', btnName: '修改',
} }
: undefined, : undefined,
{ {
type: 'detail', type: 'detail',
@ -104,7 +96,7 @@ export default {
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
} }
: undefined, : undefined,
].filter((v) => v), ].filter((v) => v),
tableProps: [ tableProps: [
@ -342,8 +334,9 @@ export default {
} }
return this.$axios({ return this.$axios({
url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`, url:
// + checkPersonParam, `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
// + checkPersonParam,
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''), // '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
method: 'put', method: 'put',
data: [id], data: [id],

View File

@ -7,10 +7,9 @@
<template> <template>
<el-drawer <el-drawer
:visible.sync="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapper-closable="true" :wrapper-closable="false"
:close-on-click-modal="true"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
size="60%" size="60%"
@ -31,13 +30,13 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="巡检单名称" prop="name"> <el-form-item label="巡检单名称" prop="name">
<div style="">{{ form.name || '---' }}</div> <div style="">{{ form.name }}</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="部门" prop="department"> <el-form-item label="部门" prop="department">
<div style="">{{ form.department || '---' }}</div> <div style="">{{ form.department }}</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -112,7 +111,7 @@
</div> </div>
<div class="drawer-body__footer"> <div class="drawer-body__footer">
<el-button v-if="!disableEdit" @click="handleCancel"> <el-button style="" @click="handleCancel">
{{ disableEdit ? '返回' : '取消' }} {{ disableEdit ? '返回' : '取消' }}
</el-button> </el-button>
<el-button <el-button
@ -147,11 +146,35 @@
<script> <script>
import { parseTime } from '../../core/mixins/code-filter'; import { parseTime } from '../../core/mixins/code-filter';
import DialogForm from '../../../components/DialogForm/index.vue'; import DialogForm from '../../../components/DialogForm/index.vue';
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
import SmallTitle from '../components/SmallTitle.js'; const SmallTitle = {
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};
export default { export default {
components: { SmallTitle, DialogForm, BaseDialog: BaseDialogWrapperVue }, components: { SmallTitle, DialogForm },
props: ['dataId'], // dataId id props: ['dataId'], // dataId id
filters: { parseTime }, filters: { parseTime },
data() { data() {

View File

@ -49,21 +49,12 @@
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { parseTime } from '../../core/mixins/code-filter'; import { parseTime } from '../../core/mixins/code-filter';
import RecordDetail from './Record-detail.vue'; import RecordDetail from './Record-detail.vue';
import moment from 'moment';
export default { export default {
name: 'SpecialEquipmentCheckRecord', name: 'SpecialEquipmentCheckRecord',
components: { RecordDetail }, components: { RecordDetail },
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {
const today = new Date();
const twoDaysAgo = new Date(today.getTime() - 2 * 24 * 60 * 60 * 1000);
twoDaysAgo.setHours(0, 0, 0, 0);
const t = [
moment(twoDaysAgo).format('yyyy-MM-DD HH:mm:ss'),
moment(today).format('yyyy-MM-DD HH:mm:ss'),
];
return { return {
detailOpen: false, detailOpen: false,
addOrUpdateVisible: false, addOrUpdateVisible: false,
@ -160,7 +151,6 @@ export default {
endPlaceholder: '结束日期', endPlaceholder: '结束日期',
defaultTime: ['00:00:00', '23:59:59'], defaultTime: ['00:00:00', '23:59:59'],
param: 'actualCheckTime', param: 'actualCheckTime',
defaultSelect: t,
// width: 350, // width: 350,
}, },
{ {
@ -199,7 +189,6 @@ export default {
pageSize: 10, pageSize: 10,
special: true, special: true,
status: 2, status: 2,
actualCheckTime: t,
}, },
// //
form: {}, form: {},
@ -215,7 +204,7 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
// //
this.recv({ ...this.queryParams }).then((response) => { this.recv(this.queryParams).then((response) => {
this.list = response.data.list; this.list = response.data.list;
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;

View File

@ -9,9 +9,7 @@
<el-drawer <el-drawer
:visible.sync="visible" :visible.sync="visible"
:show-close="false" :show-close="false"
:wrapperClosable="true" :wrapper-closable="true"
:close-on-click-modal="true"
@closed="$emit('destroy')"
class="drawer" class="drawer"
size="50%"> size="50%">
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
@ -39,12 +37,12 @@
</el-col> --> </el-col> -->
<el-col :span="8"> <el-col :span="8">
<el-form-item label="巡检单名称" prop="name"> <el-form-item label="巡检单名称" prop="name">
{{ dataForm.name || '---' }} {{ dataForm.name }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="部门" prop="department"> <el-form-item label="部门" prop="department">
{{ dataForm.department || '---' }} {{ dataForm.department }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -96,7 +94,7 @@
@pagination="getList" /> @pagination="getList" />
<!-- <div class="drawer-body__footer"> <!-- <div class="drawer-body__footer">
<el-button type="primary" @click="goback()">返回</el-button> <el-button type="primary" @click="goback()">关闭</el-button>
</div> --> </div> -->
</div> </div>
</div> </div>
@ -113,7 +111,7 @@
<script> <script>
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import attrAdd from './attr-add'; import attrAdd from './attr-add';
// import { DICT_TYPE, getDictDatas } from '@/utils/dict'; import { DICT_TYPE, getDictDatas } from '@/utils/dict';
import { parseTime } from '../../core/mixins/code-filter'; import { parseTime } from '../../core/mixins/code-filter';
const tableBtn = [ const tableBtn = [
@ -185,33 +183,6 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
/** 确认是否关闭 */
async handleConfirmClose() {
try {
if (
await this.$confirm(
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
确认要关闭页面吗?
</h1>
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
确定关闭将不保留编辑内容
</p>
</div>,
{
confirmButtonText: '确 定',
cancelButtonText: '取 消',
type: 'warning',
}
)
) {
this.visible = false;
}
} catch (err) {
return false;
}
},
initData() { initData() {
this.checkDetList.splice(0); this.checkDetList.splice(0);
this.checkDetList.total = 0; this.checkDetList.total = 0;
@ -274,7 +245,7 @@ export default {
}); });
}, },
goback() { goback() {
// this.$emit('refreshDataList'); this.$emit('refreshDataList');
this.visible = false; this.visible = false;
// this.initData(); // this.initData();
}, },

View File

@ -51,7 +51,7 @@
<el-row style="text-align: right"> <el-row style="text-align: right">
<el-button @click="visible = false">取消</el-button> <el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">保存</el-button> <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</el-row> </el-row>
</el-dialog> </el-dialog>
</template> </template>

View File

@ -1,59 +0,0 @@
<!--
filename: BaseDialogWrapper.vue
author: liubin
date: 2024-03-13 13:51:14
description: 对BaseDialog的封装自定义保存取消按钮
-->
<template>
<base-dialog
:dialogTitle="dialogTitle"
:dialogVisible="dialogVisible"
:width="width"
:custom-class="customClass"
:append-to-body="appendToBody"
@close="$emit('close')">
<slot />
<template #footer>
<el-row slot="footer" type="flex" justify="end">
<el-col :span="24">
<el-button size="small" class="btnTextStyle" @click="$emit('cancel')">
取消
</el-button>
<el-button
type="primary"
class="btnTextStyle"
size="small"
@click="$emit('confirm')">
保存
</el-button>
</el-col>
</el-row>
</template>
</base-dialog>
</template>
<script>
export default {
name: 'BaseDialogWrapper',
components: {},
props: [
'dialogTitle',
'dialogVisible',
'appendToBody',
'width',
'customClass',
],
data() {
return {};
},
};
</script>
<style scoped lang="scss">
.baseDialog .btnTextStyle {
letter-spacing: 6px;
padding: 9px 10px 9px 16px;
font-size: 14px;
}
</style>

View File

@ -1,32 +0,0 @@
// <!--
// filename: SmallTitle.js
// author: liubin
// date: 2024-03-13 14:21:01
// description:
// -->
export default {
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};

View File

@ -121,16 +121,35 @@
<script> <script>
import DialogForm from './DialogForm'; import DialogForm from './DialogForm';
import EquipmentInfoForm from './EquipmentInfoForm.vue'; import EquipmentInfoForm from './EquipmentInfoForm.vue';
import BaseDialogWrapper from './BaseDialogWrapper.vue';
import SmallTitle from './SmallTitle.js'; const SmallTitle = {
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};
export default { export default {
components: { components: { SmallTitle, DialogForm, EquipmentInfoForm },
SmallTitle,
DialogForm,
EquipmentInfoForm,
BaseDialog: BaseDialogWrapper,
},
props: ['sections', 'mode', 'dataId', 'isFireEquipment'], // dataId id props: ['sections', 'mode', 'dataId', 'isFireEquipment'], // dataId id
data() { data() {
return { return {

View File

@ -5,6 +5,7 @@
description: description:
--> -->
<template> <template>
<el-drawer <el-drawer
:visible="visible" :visible="visible"
@ -121,16 +122,35 @@
<script> <script>
import DialogForm from './DialogForm'; import DialogForm from './DialogForm';
import EquipmentInfoForm from './manageDrawerForm.vue'; import EquipmentInfoForm from './manageDrawerForm.vue';
import BaseDialogWrapper from './BaseDialogWrapper.vue';
import SmallTitle from './SmallTitle.js'; const SmallTitle = {
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};
export default { export default {
components: { components: { SmallTitle, DialogForm, EquipmentInfoForm },
SmallTitle,
DialogForm,
EquipmentInfoForm,
BaseDialog: BaseDialogWrapper,
},
props: ['sections', 'mode', 'dataId', 'isFireEquipment'], // dataId id props: ['sections', 'mode', 'dataId', 'isFireEquipment'], // dataId id
data() { data() {
return { return {

View File

@ -5,6 +5,7 @@
description: description:
--> -->
<template> <template>
<el-drawer <el-drawer
:visible="visible" :visible="visible"
@ -121,16 +122,35 @@
<script> <script>
import DialogForm from './DialogForm'; import DialogForm from './DialogForm';
import EquipmentInfoForm from './EquipmentInfoForm.vue'; import EquipmentInfoForm from './EquipmentInfoForm.vue';
import BaseDialogWrapper from './BaseDialogWrapper.vue';
import SmallTitle from './SmallTitle.js'; const SmallTitle = {
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};
export default { export default {
components: { components: { SmallTitle, DialogForm, EquipmentInfoForm },
SmallTitle,
DialogForm,
EquipmentInfoForm,
BaseDialog: BaseDialogWrapper,
},
props: ['sections', 'mode', 'dataId', 'isFireEquipment'], // dataId id props: ['sections', 'mode', 'dataId', 'isFireEquipment'], // dataId id
data() { data() {
return { return {

View File

@ -9,9 +9,7 @@
<el-drawer <el-drawer
:visible="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapperClosable="true" :wrapper-closable="false"
:close-on-click-modal="true"
:before-close="handleConfirmClose"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
size="60%" size="60%"
@ -117,7 +115,7 @@
</div> </div>
<div class="drawer-body__footer"> <div class="drawer-body__footer">
<!-- <el-button style="" @click="cancel">返回</el-button> --> <el-button style="" @click="cancel">返回</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>
@ -145,7 +143,32 @@
<script> <script>
import DialogForm from '@/components/DialogForm'; import DialogForm from '@/components/DialogForm';
import SmallTitle from '../components/SmallTitle.js';
const SmallTitle = {
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};
export default { export default {
name: 'PlanConfig--addContent', name: 'PlanConfig--addContent',
@ -240,35 +263,6 @@ export default {
this.loadEquipments(); this.loadEquipments();
}, },
methods: { methods: {
/** 确认是否关闭 */
async handleConfirmClose() {
if (this.mode.includes('detail')) return this.cancel();
try {
if (
await this.$confirm(
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
确认要关闭页面吗?
</h1>
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
确定关闭将不保留编辑内容
</p>
</div>,
{
confirmButtonText: '确 定',
cancelButtonText: '取 消',
type: 'warning',
}
)
) {
this.cancel();
}
} catch (err) {
return false;
}
},
show({ show({
departmentName, departmentName,
id, id,

View File

@ -61,7 +61,7 @@
</template> </template>
<script> <script>
// import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
// import moment from 'moment'; // import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record'; import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record';

View File

@ -123,8 +123,7 @@
type: 'number', type: 'number',
message: '请输入正确的数字', message: '请输入正确的数字',
trigger: 'blur', trigger: 'blur',
transform: (val) => transform: (val) => Number(val) && parseInt(val) === Number(val),
Number(val) && parseInt(val) === Number(val) && Number(val),
}, },
{ required: true, message: '保养频率不能为空', trigger: 'blur' }, { required: true, message: '保养频率不能为空', trigger: 'blur' },
]"> ]">

View File

@ -2,16 +2,14 @@
filename: PlanConfig--addContent.vue filename: PlanConfig--addContent.vue
author: liubin author: liubin
date: 2024-02-04 09:40:04 date: 2024-02-04 09:40:04
description: 计划配置-添加内容 description:
--> -->
<template> <template>
<el-drawer <el-drawer
:visible.sync="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapperClosable="true" :wrapper-closable="false"
:close-on-click-modal="true"
:before-close="handleConfirmClose"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
size="60%" size="60%"
@ -21,7 +19,7 @@
mode.includes('detail') mode.includes('detail')
? '详情' ? '详情'
: mode.includes('edit') : mode.includes('edit')
? '添加内容' ? '编辑'
: '新增' : '新增'
}} }}
</SmallTitle> </SmallTitle>
@ -40,37 +38,37 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="保养计划名称" prop="name"> <el-form-item label="保养计划名称" prop="name">
<span>{{ form.name || '---' }}</span> <span>{{ form.name }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="部门" prop="departmentName"> <el-form-item label="部门" prop="departmentName">
<span>{{ form.departmentName || '---' }}</span> <span>{{ form.departmentName }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="产线名" prop="lineName"> <el-form-item label="产线名" prop="lineName">
<span>{{ form.lineName || '---' }}</span> <span>{{ form.lineName }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="保养频率" prop="maintenancePeriod"> <el-form-item label="保养频率" prop="maintenancePeriod">
<span>{{ form.maintenancePeriod || '---' }}</span> <span>{{ form.maintenancePeriod }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="保养时长" prop="maintainDuration"> <el-form-item label="保养时长" prop="maintainDuration">
<span>{{ form.maintainDuration || '---' }}</span> <span>{{ form.maintainDuration }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="计划保养人员" prop="maintainer"> <el-form-item label="计划保养人员" prop="maintainer">
<span>{{ form.maintainer || '---' }}</span> <span>{{ form.maintainer }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -145,12 +143,36 @@
<script> <script>
import DialogForm from '@/components/DialogForm'; import DialogForm from '@/components/DialogForm';
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
import SmallTitle from '../components/SmallTitle.js'; const SmallTitle = {
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};
export default { export default {
name: 'PlanConfig--addContent', name: 'PlanConfig--addContent',
components: { SmallTitle, DialogForm, BaseDialog: BaseDialogWrapper }, components: { SmallTitle, DialogForm },
props: ['maintainData'], props: ['maintainData'],
data() { data() {
return { return {
@ -241,35 +263,6 @@ export default {
this.loadEquipments(); this.loadEquipments();
}, },
methods: { methods: {
/** 确认是否关闭 */
async handleConfirmClose() {
if (this.mode.includes('detail')) return this.cancel();
if (document.querySelector('.small-title').innerText.includes('添加内容')) return this.cancel();
try {
if (
await this.$confirm(
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
确认要关闭页面吗?
</h1>
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
确定关闭将不保留编辑内容
</p>
</div>,
{
confirmButtonText: '确 定',
cancelButtonText: '取 消',
type: 'warning',
}
)
) {
this.cancel();
}
} catch (err) {
return false;
}
},
show({ show({
departmentName, departmentName,
id, id,

View File

@ -65,15 +65,10 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { deleteEqMaintainPlan } from '@/api/equipment/base/maintain/record'; import { deleteEqMaintainPlan } from '@/api/equipment/base/maintain/record';
import PlanConfigAdd from './PlanConfig--add.vue'; import PlanConfigAdd from './PlanConfig--add.vue';
import PlanConfigAddContent from './PlanConfig--addContent.vue'; import PlanConfigAddContent from './PlanConfig--addContent.vue';
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
export default { export default {
name: 'SpecialEquipmentPlanConfig', name: 'SpecialEquipmentPlanConfig',
components: { components: { DialogForm: PlanConfigAdd, PlanConfigAddContent },
BaseDialog: BaseDialogWrapper,
DialogForm: PlanConfigAdd,
PlanConfigAddContent,
},
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {
const t = new Date(); const t = new Date();
@ -103,7 +98,7 @@ export default {
: undefined, : undefined,
].filter((v) => v), ].filter((v) => v),
tableProps: [ tableProps: [
{ prop: 'name', label: '保养计划名称' }, { prop: 'name', label: '计划名称' },
{ prop: 'departmentName', label: '部门' }, { prop: 'departmentName', label: '部门' },
{ width: 144, prop: 'lineName', label: '产线名' }, { width: 144, prop: 'lineName', label: '产线名' },
{ width: 132, prop: 'maintenancePeriod', label: '保养频率(天/次)' }, { width: 132, prop: 'maintenancePeriod', label: '保养频率(天/次)' },

View File

@ -9,9 +9,7 @@
<el-drawer <el-drawer
:visible="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapperClosable="true" :wrapper-closable="false"
:close-on-click-modal="true"
:before-close="handleConfirmClose"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
size="60%" size="60%"
@ -86,7 +84,7 @@
</div> </div>
<div class="drawer-body__footer"> <div class="drawer-body__footer">
<!-- <el-button style="" @click="cancel">返回</el-button> --> <el-button style="" @click="cancel">返回</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>
@ -114,12 +112,36 @@
<script> <script>
import DialogForm from '@/components/DialogForm'; import DialogForm from '@/components/DialogForm';
import SmallTitle from '../components/SmallTitle.js';
import BaseDialogWrapper from '../components/BaseDialogWrapper'; const SmallTitle = {
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};
export default { export default {
name: 'PlanConfig--addContent', name: 'PlanConfig--addContent',
components: { SmallTitle, DialogForm, BaseDialog: BaseDialogWrapper }, components: { SmallTitle, DialogForm },
props: ['maintainData'], props: ['maintainData'],
data() { data() {
return { return {
@ -207,35 +229,6 @@ export default {
this.loadEquipments(); this.loadEquipments();
}, },
methods: { methods: {
/** 确认是否关闭 */
async handleConfirmClose() {
if (this.mode.includes('detail')) return this.cancel();
try {
if (
await this.$confirm(
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
确认要关闭页面吗?
</h1>
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
确定关闭将不保留编辑内容
</p>
</div>,
{
confirmButtonText: '确 定',
cancelButtonText: '取 消',
type: 'warning',
}
)
) {
this.cancel();
}
} catch (err) {
return false;
}
},
show({ planMaintainWorker, id, maintainWorker }) { show({ planMaintainWorker, id, maintainWorker }) {
this.form = Object.assign( this.form = Object.assign(
{}, {},
@ -312,14 +305,17 @@ export default {
} }
try { try {
const res = await this.$axios('/base/equipment-maintain-log-det/page', { const res = await this.$axios(
params: { '/base/equipment-maintain-log-det/page',
pageNo: this.detailTableQuery.pageNo, {
pageSize: this.detailTableQuery.pageSize, params: {
// planId: this.form.id, pageNo: this.detailTableQuery.pageNo,
logId: this.form.id, pageSize: this.detailTableQuery.pageSize,
}, // planId: this.form.id,
}); logId: this.form.id,
},
}
);
this.detailList = res.data?.list || []; this.detailList = res.data?.list || [];
this.detailTotal = res.data?.total || 0; this.detailTotal = res.data?.total || 0;
this.detailLoading = false; this.detailLoading = false;

View File

@ -108,14 +108,6 @@ export default {
components: { DialogForm, RecordDetail }, components: { DialogForm, RecordDetail },
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {
const today = new Date();
const twoDaysAgo = new Date(today.getTime() - 2 * 24 * 60 * 60 * 1000);
twoDaysAgo.setHours(0, 0, 0, 0);
const t = [
moment(twoDaysAgo).format('yyyy-MM-DD HH:mm:ss'),
moment(today).format('yyyy-MM-DD HH:mm:ss'),
];
return { return {
recordDetailVisible: false, recordDetailVisible: false,
searchBarKeys: [ searchBarKeys: [
@ -309,7 +301,7 @@ export default {
endPlaceholder: '结束日期', endPlaceholder: '结束日期',
defaultTime: ['00:00:00', '23:59:59'], defaultTime: ['00:00:00', '23:59:59'],
param: 'startTime', param: 'startTime',
defaultSelect: t, defaultSelect: null,
// width: 350, // width: 350,
}, },
// { // {
@ -508,7 +500,7 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
maintainPlanId: null, maintainPlanId: null,
startTime: t, startTime: null,
// relatePlan: null, // relatePlan: null,
// equipmentId: null, // equipmentId: null,
special: true, special: true,

View File

@ -70,11 +70,10 @@ import {
import { parseTime } from '@/utils/ruoyi'; import { parseTime } from '@/utils/ruoyi';
import htmls from './htmls.vue'; import htmls from './htmls.vue';
import DialogForm from './Repair--add.vue'; import DialogForm from './Repair--add.vue';
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
export default { export default {
name: 'SpecialEquipmentRepair', name: 'SpecialEquipmentRepair',
components: { DetailDrawer, DialogForm, BaseDialog: BaseDialogWrapperVue }, components: { DetailDrawer, DialogForm },
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {
return { return {

View File

@ -97,39 +97,42 @@
</template> </template>
<script> <script>
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import DialogFormUnplanned from './WaitingList--add--unplanned.vue'; import DialogFormUnplanned from './WaitingList--add--unplanned.vue';
import UnplannedEditDrawer from './WaitingListUnplanned--edit.vue'; import UnplannedEditDrawer from './WaitingListUnplanned--edit.vue';
import PlannedEditDrawer from './WaitingListPlanned--edit.vue'; import PlannedEditDrawer from './WaitingListPlanned--edit.vue';
import UnplannedAddDet from './WaitingListUnplanned--add_detail.vue'; import UnplannedAddDet from './WaitingListUnplanned--add_detail.vue';
import { exportMaintainLogExcel } from '@/api/equipment/base/maintain/record'; import {
exportMaintainLogExcel,
} from '@/api/equipment/base/maintain/record';
import WaitingListTable from './WaitingListTable.vue'; import WaitingListTable from './WaitingListTable.vue';
import RecordDetail from './Record--detail.vue'; import RecordDetail from './Record--detail.vue';
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
// 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 = {
// name: 'tableBtn', const btn = {
// props: ['injectData'], name: 'tableBtn',
// data() { props: ['injectData'],
// return {}; data() {
// }, return {};
// methods: { },
// handleClick() { methods: {
// this.$emit('emitData', { handleClick() {
// action: this.injectData.label, this.$emit('emitData', {
// value: this.injectData, action: this.injectData.label,
// }); value: this.injectData,
// }, });
// }, },
// render: function (h) { },
// return ( render: function (h) {
// <el-button type="text" onClick={this.handleClick}> return (
// {this.injectData.name} <el-button type="text" onClick={this.handleClick}>
// </el-button> {this.injectData.name}
// ); </el-button>
// }, );
// }; },
};
export default { export default {
name: 'SpecialEquipmentMaintainRecord', name: 'SpecialEquipmentMaintainRecord',
@ -140,7 +143,6 @@ export default {
UnplannedEditDrawer, UnplannedEditDrawer,
UnplannedAddDet, UnplannedAddDet,
PlannedEditDrawer, PlannedEditDrawer,
BaseDialog: BaseDialogWrapper,
}, },
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {

View File

@ -9,9 +9,7 @@
<el-drawer <el-drawer
:visible="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapperClosable="true" :wrapper-closable="false"
:close-on-click-modal="true"
:before-close="handleConfirmClose"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
size="60%" size="60%"
@ -484,33 +482,6 @@ export default {
this.getList('line'); this.getList('line');
}, },
methods: { methods: {
/** 确认是否关闭 */
async handleConfirmClose() {
try {
if (
await this.$confirm(
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
确认要关闭页面吗?
</h1>
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
确定关闭将不保留编辑内容
</p>
</div>,
{
confirmButtonText: '确 定',
cancelButtonText: '取 消',
type: 'warning',
}
)
) {
this.handleCancel();
}
} catch (err) {
return false;
}
},
handleSearchBarBtnClick(btn) { handleSearchBarBtnClick(btn) {
switch (btn.btnName) { switch (btn.btnName) {
case 'search': case 'search':

View File

@ -9,9 +9,7 @@
<el-drawer <el-drawer
:visible="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapperClosable="true" :wrapper-closable="false"
:close-on-click-modal="true"
:before-close="handleConfirmClose"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
size="60%" size="60%"
@ -421,34 +419,6 @@ export default {
this.getList('line'); this.getList('line');
}, },
methods: { methods: {
/** 确认是否关闭 */
async handleConfirmClose() {
try {
if (
await this.$confirm(
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
确认要关闭页面吗?
</h1>
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
确定关闭将不保留编辑内容
</p>
</div>,
{
confirmButtonText: '确 定',
cancelButtonText: '取 消',
type: 'warning',
}
)
) {
this.handleCancel();
}
} catch (err) {
return false;
}
},
handleSearchBarBtnClick(btn) { handleSearchBarBtnClick(btn) {
console.log('btn', btn); console.log('btn', btn);
switch (btn.btnName) { switch (btn.btnName) {