Compare commits

..

No commits in common. "2a07a7de2f80804b5c1df860cb944f8378c89f1a" and "300a33dca4aebee1bcf03c9e0d4e358677ddf014" have entirely different histories.

59 changed files with 521 additions and 936 deletions

View File

@ -1,8 +1,8 @@
### ###
# @Author: Do not edit # @Author: Do not edit
# @Date: 2023-08-29 09:40:39 # @Date: 2023-08-29 09:40:39
# @LastEditTime: 2024-03-22 10:28:37 # @LastEditTime: 2024-03-13 14:57:16
# @LastEditors: DY # @LastEditors: zhp
# @Description: # @Description:
### ###
# 开发环境配置 # 开发环境配置
@ -25,7 +25,7 @@ VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082' # VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# VUE_APP_BASE_API = 'http://192.168.1.47:48082' # VUE_APP_BASE_API = 'http://192.168.1.47:48082'
# socket地址 # socket地址
VUE_APP_Socket_API = 'ws://192.168.0.33:48082' VUE_APP_Socket_API = 'ws://192.168.0.30:8888'
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081' VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
# 积木报表指向地址 # 积木报表指向地址

View File

@ -1,7 +1,7 @@
/* /*
* @Author: Do not edit * @Author: Do not edit
* @Date: 2023-10-21 11:50:46 * @Date: 2023-10-21 11:50:46
* @LastEditTime: 2024-03-21 10:49:24 * @LastEditTime: 2023-11-15 17:19:19
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
*/ */
@ -118,24 +118,6 @@ export function getCoreWOMaPage(query) {
}) })
} }
// 获得工单预使用原料分页----根据产品id
export function getlistByProductId(query) {
return request({
url: '/base/material-product-bom-det/listByProductId',
method: 'get',
params: query
})
}
// 获得工单预使用原料分页----根据工艺流程
export function getlistByFlowId(query) {
return request({
url: '/extend/process-equ-material-bom-det/listByFlowId',
method: 'get',
params: query
})
}
// 获得预计用料信息分页 // 获得预计用料信息分页
export function getMaterialBomPage(query) { export function getMaterialBomPage(query) {
return request({ return request({
@ -180,12 +162,3 @@ export function updateConCoreWOr(data) {
data: data data: data
}) })
} }
// 修改分配产量----批量
export function updateBatchConCoreWOr(data) {
return request({
url: '/base/core-order-con-work-order/updateBatch',
method: 'put',
data: data
})
}

View File

@ -94,7 +94,7 @@
:show-file-list="false" :show-file-list="false"
icon="el-icon-upload2" icon="el-icon-upload2"
:disabled="disabled" :disabled="disabled"
:before-upload="col.uploadTips ? beforeUploadPic : beforeUpload" :before-upload="beforeUpload"
:on-success=" :on-success="
(response, file, fileList) => { (response, file, fileList) => {
handleUploadSuccess(response, file, col.prop); handleUploadSuccess(response, file, col.prop);
@ -110,7 +110,7 @@
上传文件 上传文件
</el-button> </el-button>
<div class="el-upload__tip" slot="tip" v-if="col.uploadTips"> <div class="el-upload__tip" slot="tip" v-if="col.uploadTips">
{{ '只能上传jpg/png文件, 大小不超过2MB' }} {{ col.uploadTips || '只能上传jpg/png文件, 大小不超过2MB' }}
</div> </div>
</el-upload> </el-upload>
@ -416,26 +416,6 @@ export default {
// //
beforeUpload(file) { beforeUpload(file) {
const checkFileSize = () => {
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.$modal.msgError('上传文件大小不能超过 2MB!');
}
return isLt2M;
};
// const checkFileType = () => {
// const isJPG =
// file.type === 'image/jpeg' ||
// file.type === 'image/png' ||
// file.type === 'image/jpg';
// return isJPG;
// };
// return checkFileSize() && checkFileType();
return checkFileSize();
},
// ----
beforeUploadPic(file) {
const checkFileSize = () => { const checkFileSize = () => {
const isLt2M = file.size / 1024 / 1024 < 2; const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) { if (!isLt2M) {
@ -448,9 +428,6 @@ export default {
file.type === 'image/jpeg' || file.type === 'image/jpeg' ||
file.type === 'image/png' || file.type === 'image/png' ||
file.type === 'image/jpg'; file.type === 'image/jpg';
if (!isJPG) {
this.$modal.msgError('只能上传jpg/png文件!');
}
return isJPG; return isJPG;
}; };
return checkFileSize() && checkFileType(); return checkFileSize() && checkFileType();

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-03-21 16:07:39 * @LastEditTime: 2024-03-12 09:34:06
* @Description: * @Description:
--> -->
<template> <template>
@ -633,7 +633,7 @@ export default {
this.eqConfig.data = eqArr this.eqConfig.data = eqArr
this.$refs['eqScrollBoard'].updateRows(eqArr) this.$refs['eqScrollBoard'].updateRows(eqArr)
this.$refs.productLineChart.initChart(['D61', 'D62', 'D63', 'D64', 'D65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321]) this.$refs.productLineChart.initChart(['D61', 'D62', 'D63', 'D64', 'D65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
// this.getList() this.getList()
this.initWebSocket() this.initWebSocket()
this.SJGInitWebSocket() this.SJGInitWebSocket()
this.getTimes() this.getTimes()
@ -671,21 +671,36 @@ export default {
// removeEventListener('resize', resizeFun) // removeEventListener('resize', resizeFun)
// }, // },
methods: { methods: {
// getList() { getList() {
// // this.$axios.get( this.$axios.get(
// // 'base/core-production-line/listAll', 'base/core-production-line/listAll',
// // 'get', 'get',
// // this.queryParams this.queryParams
// // ).then((res) => { ).then((res) => {
// // // console.log('11111', res); // console.log('11111', res);
// // this.productLineList = res.data this.productLineList = res.data
// // }) })
// this.$axios.get( this.$axios.get(
// 'base/quality-inspection-record/dayStatistics', 'base/quality-inspection-record/dayStatistics',
// 'get', 'get',
// ).then((res) => { ).then((res) => {
// // console.log('11111', res); // console.log('11111', res);
// let processArr = qualityMonthList.map((item, index) => [ let processArr = qualityMonthList.map((item, index) => [
// console.log(item)
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
</span>`,
// formatDate(item.planStartTime) || '',
`
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
])
this.processConfig.data = processArr
this.$refs['processScrollBoard'].updateRows(processArr)
// if (res.data.length !==0) {
// let processArr = res.data.map((item, index) => [
// // console.log(item) // // console.log(item)
// `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''} // `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
// </span>`, // </span>`,
@ -699,24 +714,9 @@ export default {
// ]) // ])
// this.processConfig.data = processArr // this.processConfig.data = processArr
// this.$refs['processScrollBoard'].updateRows(processArr) // this.$refs['processScrollBoard'].updateRows(processArr)
// // if (res.data.length !==0) { // }
// // let processArr = res.data.map((item, index) => [ })
// // // console.log(item) },
// // `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
// // </span>`,
// // // formatDate(item.planStartTime) || '',
// // `
// // <span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
// // </span>`,
// // `<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
// // `<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
// // `<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
// // ])
// // this.processConfig.data = processArr
// // this.$refs['processScrollBoard'].updateRows(processArr)
// // }
// })
// },
getTimes() { getTimes() {
setInterval(this.getTimesInterval, 1000); setInterval(this.getTimesInterval, 1000);
}, },
@ -837,25 +837,24 @@ export default {
this.$refs['eqScrollBoard'].updateRows(eqArr) this.$refs['eqScrollBoard'].updateRows(eqArr)
// console.log(SJGWsData.orderList) // console.log(SJGWsData.orderList)
} else if (this.SJGWsData.type === 'productline') { } else if (this.SJGWsData.type === 'productline') {
console.log('aaaaaaaaaaaaaaaaaaa', this.SJGWsData);
// console.log(this.wsData.detData); // console.log(this.wsData.detData);
let nameList = [] let nameList = []
let passRateList = [] let passRateList = []
let outputNumList = [] let outputNumList = []
// console.log('2222222222', this.productLineList); // console.log('2222222222', this.productLineList);
// this.productLineList.forEach((item) => { this.productLineList.forEach((item) => {
this.SJGWsData.detData.forEach((ele) => { this.SJGWsData.detData.forEach((ele) => {
// if (item.id == ele.productionLineId) { if (item.id == ele.productionLineId) {
// if (item.name.substr(0, 1) == "D") { if (item.name.substr(0, 1) == "D") {
// console.log(ele) console.log(ele)
nameList.push(ele.lineName) nameList.push(item.name)
outputNumList.push(ele.outputNum) outputNumList.push(ele.outputNum)
passRateList.push(ele.passRate) passRateList.push(ele.passRate)
// } }
// } }
})
}) })
// })
// progressRateList = EnergyNameList // progressRateList = EnergyNameList
// let EnergyDataList = [] // let EnergyDataList = []
// this.SJGWsData.detData.forEach((ele) => { // this.SJGWsData.detData.forEach((ele) => {
@ -865,22 +864,7 @@ export default {
// console.log(this.EnergyMonitoringNameList) // console.log(this.EnergyMonitoringNameList)
// console.log(this.EnergyMonitoringList) // console.log(this.EnergyMonitoringList)
// this.$nextTick(() => { // this.$nextTick(() => {
this.$refs.productLineChart.initChart(nameList, passRateList, outputNumList) this.$refs.productLineChart.initChart(Array.from(new Set(nameList)), passRateList, outputNumList)
} else if (this.SJGInitWebSocket === 'inspection') {
let processArr = qualityMonthList.map((item, index) => [
// console.log(item)
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
</span>`,
// formatDate(item.planStartTime) || '',
`
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
])
this.processConfig.data = processArr
this.$refs['processScrollBoard'].updateRows(processArr)
} }
}, },
// //

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-20 16:20:39 * @LastEditTime: 2023-12-12 16:04:44
* @Description: * @Description:
--> -->
<template> <template>
@ -130,11 +130,6 @@ export default {
if (this.dataForm.id) { if (this.dataForm.id) {
this.urlOptions.infoURL(id).then(response => { this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data; this.dataForm = response.data;
const tempPic = []
this.dataForm.files?.forEach(item => {
tempPic.push(item.fileUrl)
})
this.files = tempPic.join(',')
if (this.setData) { if (this.setData) {
this.setDataForm() this.setDataForm()
} }
@ -155,8 +150,8 @@ export default {
} }
this.dataForm.files = [] this.dataForm.files = []
if (this.files.split(',').length > 0) { if (this.files.length > 0) {
this.files.split(',').forEach(item => { this.files.forEach(item => {
const temp = { const temp = {
fileType: 1, fileType: 1,
fileUrl: item fileUrl: item

View File

@ -387,7 +387,6 @@ export default {
label: '设备图片', label: '设备图片',
prop: 'files2', prop: 'files2',
fileType: 1, fileType: 1,
uploadTips: true
}, },
], ],
[{ input: true, label: '备注', prop: 'remark' }], [{ input: true, label: '备注', prop: 'remark' }],

View File

@ -161,7 +161,7 @@ export default {
{ {
upload: true, upload: true,
label: '上传资料', label: '上传资料',
prop: 'files' prop: 'files',
}, },
], ],
[{ input: true, label: '备注', prop: 'remark' }], [{ input: true, label: '备注', prop: 'remark' }],

View File

@ -186,8 +186,8 @@ export default {
code: '', code: '',
planProductId: '', planProductId: '',
specifications: '', specifications: '',
planStartTime: undefined, planStartTime: '',
planFinishTime: undefined, planFinishTime: '',
planAssignQuantity: 0, planAssignQuantity: 0,
planQuantity: 0, planQuantity: 0,
processFlowId: '', processFlowId: '',
@ -248,31 +248,7 @@ export default {
this.dataForm.materialMethod = 1 this.dataForm.materialMethod = 1
} }
}, },
reset() {
this.dataForm = {
id: undefined,
workOrderId: '',
name: '',
code: '',
planProductId: '',
specifications: '',
planStartTime: undefined,
planFinishTime: undefined,
planAssignQuantity: 0,
planQuantity: 0,
processFlowId: '',
materialMethod: 1,
triggerOrigin: 1,
priority: '',
productLineIds: [],
type: '',
workers: '',
roomNameDict: '',
status: 1
}
},
init(id) { init(id) {
this.reset();
this.dataForm.id = id || ""; this.dataForm.id = id || "";
this.visible = true; this.visible = true;
if (this.urlOptions.getOption) { if (this.urlOptions.getOption) {
@ -280,7 +256,6 @@ export default {
} }
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["dataForm"].resetFields(); this.$refs["dataForm"].resetFields();
console.log('222', this.dataForm)
this.planStartTime = '' this.planStartTime = ''
this.planFinishTime = '' this.planFinishTime = ''
if (this.dataForm.id) { if (this.dataForm.id) {
@ -289,12 +264,6 @@ export default {
if (this.dataForm.priority !== undefined) { if (this.dataForm.priority !== undefined) {
this.dataForm.priority = String(this.dataForm.priority) this.dataForm.priority = String(this.dataForm.priority)
} }
if (this.dataForm.planStartTime === 0) {
this.dataForm.planStartTime = undefined
}
if (this.dataForm.planFinishTime === 0) {
this.dataForm.planFinishTime = undefined
}
if (this.dataForm.roomNameDict !== undefined) { if (this.dataForm.roomNameDict !== undefined) {
this.dataForm.roomNameDict = String(this.dataForm.roomNameDict) this.dataForm.roomNameDict = String(this.dataForm.roomNameDict)
} }

View File

@ -2,19 +2,16 @@
* @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-22 08:53:20 * @LastEditTime: 2024-03-15 15:34:58
* @Description: * @Description:
--> -->
<template> <template>
<el-drawer <el-drawer
:visible.sync="visible" :visible.sync="visible"
:show-close="false" :show-close="false"
:wrapper-closable="true" :wrapper-closable="false"
class="drawer" class="drawer"
size="55%" size="55%">
:before-close="beforeClose"
@closed="$emit('destroy')"
>
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
{{ '分配产量' }} {{ '分配产量' }}
</small-title> </small-title>
@ -55,21 +52,18 @@
<el-date-picker <el-date-picker
v-model="dataForm.finishProduceTime" v-model="dataForm.finishProduceTime"
type="datetime" type="datetime"
value-format="timestamp" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择实际生产完成时间" /> placeholder="选择日期时间" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<div v-show="!isdetail" class="attr-list"> <div class="attr-list">
<!-- <el-button v-show="!isdetail" type="success" size="small" style="float: right" @click="addRow()">添加一行</el-button> --> <!-- <el-button v-show="!isdetail" type="success" size="small" style="float: right" @click="addRow()">添加一行</el-button> -->
<el-form ref="tableForm" :model="form" style="padding: 0">
<el-table <el-table
ref="table" :data="tableData"
:data="form.tableData"
row-key="id"
style="width: 100%"> style="width: 100%">
<el-table-column type="index" label="序号" /> <el-table-column type="index" label="序号" />
<el-table-column prop="orderName" label="订单名称" /> <el-table-column prop="orderName" label="订单名称" />
@ -77,25 +71,41 @@
<el-table-column prop="priority" label="优先级" /> <el-table-column prop="priority" label="优先级" />
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" > <el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item prop="planAssignmentQuantity"> <el-input v-model="scope.row.planAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
<el-input v-model.number="scope.row.planAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="*实际分配数量"> <el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item :prop="`tableData.${scope.$index}.actualAssignmentQuantity`" :rules="[{ required: true, message: '实际分配数量不能为空', trigger: 'blur' }]"> <el-input v-model="scope.row.actualAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
<el-input v-model.number="scope.row.actualAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="saveData(scope.row)">保存</el-button> <el-button type="text" size="small" @click="saveData(scope.row)">保存</el-button>
<!-- <el-tooltip v-if="!scope.row.isEdit" placement="top" content="编辑">
<el-button
type="text"
:style="{color:'#0B58FF'}"
size="mini"
@click="edit(scope.row)"
>
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="edit" />
</el-button>
</el-tooltip> -->
<!-- <el-tooltip placement="top" content="删除">
<el-button
type="text"
:style="{color:'#FF5454'}"
size="mini"
@click="deleteDetail(scope.row)"
>
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="table_delete" />
</el-button>
</el-tooltip> -->
</template> </template>
</el-table-column> --> </el-table-column>
</el-table> </el-table>
</el-form>
<pagination <pagination
v-show="listQuery.total > 0" v-show="listQuery.total > 0"
:total="listQuery.total" :total="listQuery.total"
@ -124,7 +134,7 @@
<script> <script>
import basicAdd from '../../core/mixins/basic-add'; import basicAdd from '../../core/mixins/basic-add';
import { getConOrderList, updateConCoreWOr, updateBatchConCoreWOr, getCoreWO, statusChange } from '@/api/base/coreWorkOrder'; import { getConOrderList, updateConCoreWOr, getCoreWO, statusChange } from '@/api/base/coreWorkOrder';
import SmallTitle from '../material/SmallTitle'; import SmallTitle from '../material/SmallTitle';
// import { parseTime } from '../../core/mixins/code-filter'; // import { parseTime } from '../../core/mixins/code-filter';
// import attrAdd from './attr-add'; // import attrAdd from './attr-add';
@ -148,10 +158,6 @@ export default {
code: undefined, code: undefined,
productId: '', productId: '',
remark: undefined, remark: undefined,
},
form: {
tableData: []
}, },
productList: [], productList: [],
materialAttrList: [], materialAttrList: [],
@ -168,44 +174,13 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
beforeClose(done) {
// if (this.mode.includes('edit')) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
},
// //
dataFormSubmit() { dataFormSubmit() {
// console.log('', this.$refs['table'])
console.log('nihc ', this.form.tableData)
// this.$refs['tableForm'].validate((valid) => {
// if (valid) {
// alert('!');
// } else {
// alert('!');
// return false;
// }
// });
this.$refs["dataForm"].validate((valid) => { this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$refs['tableForm'].validate((valid) => {
if (!valid) { if (!valid) {
return false; return false;
} }
// //
console.log('aaaaaaa', this.form.tableData)
//
let num = 0
const tempList = this.form.tableData.map((item) => {
item.workOrderId = this.dataForm.id
num += item.actualAssignmentQuantity
return item
})
if (num <= this.dataForm.actualQuantity) {
if (this.dataForm.id) { if (this.dataForm.id) {
statusChange({ statusChange({
id: this.dataForm.id, id: this.dataForm.id,
@ -214,31 +189,11 @@ export default {
actualQuantity: this.dataForm.actualQuantity actualQuantity: this.dataForm.actualQuantity
}).then(response => { }).then(response => {
this.$modal.msgSuccess("操作成功!工单状态稍后将会更新!"); this.$modal.msgSuccess("操作成功!工单状态稍后将会更新!");
this.saveData(tempList)
this.visible = false; this.visible = false;
this.$emit("refreshDataList"); this.$emit("refreshDataList");
}); });
return; return;
} }
} else {
this.$message.error('实际分配数量超过实际生产数量!')
}
console.log('2111', num, tempList)
});
//
// if (this.dataForm.id) {
// statusChange({
// id: this.dataForm.id,
// status: 4,
// finishProduceTime: this.dataForm.finishProduceTime,
// actualQuantity: this.dataForm.actualQuantity
// }).then(response => {
// this.$modal.msgSuccess("");
// this.visible = false;
// this.$emit("refreshDataList");
// });
// return;
// }
// //
// this.urlOptions.createURL(this.dataForm).then(response => { // this.urlOptions.createURL(this.dataForm).then(response => {
// this.$modal.msgSuccess(""); // this.$modal.msgSuccess("");
@ -254,14 +209,30 @@ export default {
edit(row) { edit(row) {
row.isEdit = true row.isEdit = true
}, },
saveData(list) { saveData(row) {
console.log('你好', list) if (row.actualAssignmentQuantity) {
if (row.id) {
// updateMaterialPBDet({
// ...row
// }).then((response) => {
// this.$modal.msgSuccess('');
// // this.visible = false;
// this.getList();
// });
// return;
}
// //
updateBatchConCoreWOr(list).then((response) => { updateConCoreWOr({
...row,
workOrderId: this.dataForm.id
}).then((response) => {
this.$modal.msgSuccess('分配成功'); this.$modal.msgSuccess('分配成功');
// this.visible = false; // this.visible = false;
this.getList(); this.getList();
}); });
} else {
this.$message.warning('请填写实际分配数量');
}
}, },
getList() { getList() {
// //
@ -274,7 +245,6 @@ export default {
item.isallocation = item.actualAssignmentQuantity ? true : false item.isallocation = item.actualAssignmentQuantity ? true : false
return item return item
}); });
this.$set(this.form, 'tableData', this.tableData)
this.listQuery.total = response.data.length; this.listQuery.total = response.data.length;
}); });
}, },

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-21 16:52:46 * @LastEditTime: 2024-03-15 15:40:24
* @Description: * @Description:
--> -->
<template> <template>
@ -16,13 +16,7 @@
<!-- <small-title slot="title" :no-padding="true"> <!-- <small-title slot="title" :no-padding="true">
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }} {{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
</small-title> --> </small-title> -->
<div v-show="workOrderButton.length" style="position: relative;padding-right: 90px;"> <div v-show="workOrderButton.length" class="buttonDiv">
<topTabVue :orderIdList='workOrderButton' :orderId="workorderId" @emitFun='toggleName' />
<el-button type="primary" plain size="small"
style="position: absolute;right: 0; top: 0;height: 48px;font-size: 14px;" @click="goback"><svg-icon
icon-class="return" /> 返回</el-button>
</div>
<!-- <div v-show="workOrderButton.length" class="buttonDiv">
<div style="display: flex; width: 100%;"> <div style="display: flex; width: 100%;">
<el-button v-show="showScroll" type="text" style="width: 30px; background: white; margin-right: 8px" @click="scrollLeft" icon="el-icon-caret-left"></el-button> <el-button v-show="showScroll" type="text" style="width: 30px; background: white; margin-right: 8px" @click="scrollLeft" icon="el-icon-caret-left"></el-button>
<div ref="content" class="scrollDiv"> <div ref="content" class="scrollDiv">
@ -33,7 +27,7 @@
<svg-icon icon-class="return"/>返回 <svg-icon icon-class="return"/>返回
</el-button> </el-button>
</div> </div>
</div> --> </div>
<div class="content"> <div class="content">
<div class="card"> <div class="card">
<div class="boxTitle"> <div class="boxTitle">
@ -163,7 +157,7 @@
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<div class="blodTip">废片数量</div> <div class="blodTip">废片数量</div>
<div class="lightTip">{{ dataForm.nokNum }}</div> <div class="lightTip">{{ dataForm.nokQuantity }}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<div class="blodTip">检测瑕疵数</div> <div class="blodTip">检测瑕疵数</div>
@ -228,13 +222,12 @@
<script> <script>
// import basicAdd from '../../core/mixins/basic-add'; // import basicAdd from '../../core/mixins/basic-add';
import { getCoreWO, getCoreWOMaPage, getlistByProductId, getlistByFlowId, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder"; import { getCoreWO, getCoreWOMaPage, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
// import { orderList } from "@/api/base/orderManage"; // import { orderList } from "@/api/base/orderManage";
import { getProcessFlowList } from '@/api/base/orderManage' import { getProcessFlowList } from '@/api/base/orderManage'
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import { publicFormatter } from "@/utils/dict"; import { publicFormatter } from "@/utils/dict";
import { parseTime } from '@/utils/ruoyi' import { parseTime } from '@/utils/ruoyi'
import topTabVue from '../../order/base/orderManage/components/topTab.vue';
const tableBtn = [ const tableBtn = [
{ {
@ -272,9 +265,9 @@ const tableProps = [
const tableProps1 = [ const tableProps1 = [
{ {
prop: 'materialName', prop: 'material',
label: '物料名称' label: '物料名称',
// filter: publicFormatter('material') filter: publicFormatter('material')
}, },
{ {
prop: 'unit', prop: 'unit',
@ -292,7 +285,7 @@ const tableProps1 = [
]; ];
export default { export default {
components: { SmallTitle, topTabVue }, components: { SmallTitle },
data() { data() {
return { return {
tableBtn, tableBtn,
@ -315,7 +308,6 @@ export default {
dataForm: {}, dataForm: {},
orderList: [], orderList: [],
materialList: [], materialList: [],
workorderId: '',
// orderArray: [], // orderArray: [],
visible: false, visible: false,
isdetail: false, isdetail: false,
@ -339,15 +331,13 @@ export default {
name: work.name name: work.name
} }
}) })
this.workorderId = this.workOrderButton[0].id const contentRef = this.$refs.content
console.log('wawa ew', this.workorderId, this.workOrderButton) if (contentRef.scrollWidth > contentRef.clientWidth) {
// const contentRef = this.$refs.content this.showScroll = true
// if (contentRef.scrollWidth > contentRef.clientWidth) { } else {
// this.showScroll = true this.showScroll = false
// } else { }
// this.showScroll = false console.log(contentRef.scrollWidth, contentRef.clientWidth)
// }
// console.log(contentRef.scrollWidth, contentRef.clientWidth)
this.init(this.workOrderButton[0].id, true) this.init(this.workOrderButton[0].id, true)
}) })
} else { } else {
@ -355,11 +345,6 @@ export default {
} }
}, },
methods: { methods: {
// tab
toggleName(val) {
this.workorderId = val
this.init(val, true)
},
scrolRight() { scrolRight() {
// let contentRef = this.$refs.content // let contentRef = this.$refs.content
// console.log('', contentRef.scrollWidth, contentRef.clientWidth) // console.log('', contentRef.scrollWidth, contentRef.clientWidth)
@ -457,38 +442,17 @@ export default {
// 使 // 使
console.log() console.log()
if (this.dataForm.id) { if (this.dataForm.id) {
if (this.dataForm.materialMethod === 1) { getCoreWOMaPage({
// workOrderId: this.dataForm.id,
getlistByProductId({ pageNo: 1,
id: this.dataForm.planProductId pageSize: 100
}).then((response) => { }).then((response) => {
this.materialList = response.data.map((item) => { this.materialList = response.data.records.map((item) => {
item.remaining = item?.num * this.dataForm.remainingQuantity || 0 item.remaining = item?.num * this.dataForm.remainingQuantity || 0
return item return item
}); });
// this.listQuery.total = response.data.length;
}); });
} else {
//
getlistByFlowId({
id: this.dataForm.processFlowId
}).then((response) => {
this.materialList = response.data.map((item) => {
item.remaining = item?.num * this.dataForm.remainingQuantity || 0
return item
});
});
}
// getCoreWOMaPage({
// workOrderId: this.dataForm.id,
// pageNo: 1,
// pageSize: 100
// }).then((response) => {
// this.materialList = response.data.records.map((item) => {
// item.remaining = item?.num * this.dataForm.remainingQuantity || 0
// return item
// });
// // this.listQuery.total = response.data.length;
// });
} }
// //
// orderList({ // orderList({

View File

@ -43,8 +43,7 @@
<allocation <allocation
v-if="allocationVisible" v-if="allocationVisible"
ref="allocation" ref="allocation"
@refreshDataList="searchStatus" @refreshDataList="getDataList" />
@destroy="allocationVisible = false" />
</div> </div>
</template> </template>
@ -354,11 +353,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
searchStatus() {
setTimeout(() => {
this.getDataList()
}, 20000)
},
getWorkOrder() { getWorkOrder() {
getCoreWOList().then(res => { getCoreWOList().then(res => {
this.formConfig[0].selectOptions = res.data.map(item => { this.formConfig[0].selectOptions = res.data.map(item => {
@ -450,7 +444,7 @@ export default {
type: 'success', type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.searchStatus(); this.getDataList();
// //
// if (param.status === 4) { // if (param.status === 4) {
// this.allocationOrder(param); // this.allocationOrder(param);
@ -484,7 +478,7 @@ export default {
// id // id
this.$refs.allocation.init(val.id); this.$refs.allocation.init(val.id);
} else { } else {
this.$refs.allocation.init(val.id, true); this.$refs.allocation.init();
} }
}); });
}) })

View File

@ -2,15 +2,14 @@
* @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-21 15:21:32 * @LastEditTime: 2024-02-21 09:41:39
* @Description: * @Description:
--> -->
<template> <template>
<el-drawer <el-drawer
:visible.sync="visible" :visible.sync="visible"
:show-close="false" :show-close="false"
:wrapper-closable="true" :wrapper-closable="isdetail"
:before-close="beforeClose"
class="drawer" class="drawer"
size="60%"> size="60%">
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
@ -257,17 +256,6 @@ export default {
this.getDict() this.getDict()
}, },
methods: { methods: {
beforeClose(done) {
if (!this.isdetail) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
} else {
done()
}
},
async getDict() { async getDict() {
// //
// const res = await listData({ // const res = await listData({

View File

@ -2,15 +2,14 @@
* @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-21 14:39:52 * @LastEditTime: 2023-11-27 19:50:36
* @Description: * @Description:
--> -->
<template> <template>
<el-drawer <el-drawer
:visible.sync="visible" :visible.sync="visible"
:show-close="false" :show-close="false"
:wrapper-closable="true" :wrapper-closable="isdetail"
:before-close="beforeClose"
class="drawer" class="drawer"
size="70%"> size="70%">
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
@ -197,17 +196,6 @@ export default {
this.getDict() this.getDict()
}, },
methods: { methods: {
beforeClose(done) {
if (!this.isdetail) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
} else {
done()
}
},
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.deleteDetail(raw.data); this.deleteDetail(raw.data);
@ -258,7 +246,7 @@ export default {
}); });
}, },
initData() { initData() {
this.tableData.splice(0); // this.materialAttrList.splice(0);
this.listQuery.total = 0; this.listQuery.total = 0;
}, },
deleteDetail(raw) { deleteDetail(raw) {
@ -296,18 +284,18 @@ export default {
}); });
}, },
// //
// addRow() { addRow() {
// const row = { const row = {
// bomId: this.dataForm.id, bomId: this.dataForm.id,
// materialId: '', materialId: '',
// num: 0, num: 0,
// materialCode: undefined, materialCode: undefined,
// unit: undefined, unit: undefined,
// remark: '', remark: '',
// isEdit: true isEdit: true
// } }
// this.tableData.push(row) this.tableData.push(row)
// }, },
init(id, isdetail) { init(id, isdetail) {
this.initData(); this.initData();
this.isdetail = isdetail || false; this.isdetail = isdetail || false;

View File

@ -17,7 +17,6 @@
:table-props="tableProps" :table-props="tableProps"
:table-data="tableData" :table-data="tableData"
@emitFun="handleEmitFun" @emitFun="handleEmitFun"
:max-height="tableH"
/> />
</div> </div>
</div> </div>
@ -46,7 +45,6 @@ export default {
arr: [], arr: [],
spanArr: [], spanArr: [],
timeList: [], timeList: [],
tableH: this.tableHeight(240),
tableData: [], tableData: [],
tableProps: [], tableProps: [],
spanInfo: {}, spanInfo: {},
@ -56,9 +54,6 @@ export default {
}, },
computed: {}, computed: {},
mounted() { mounted() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(240)
})
this.getList(); this.getList();
}, },
methods: { methods: {
@ -153,9 +148,6 @@ export default {
lineData['spec'] = Array.from(new Set(specs)).join(',') lineData['spec'] = Array.from(new Set(specs)).join(',')
this.tableData.push(lineData) this.tableData.push(lineData)
}) })
this.tableData.forEach((item, index) => {
item._index = index + 1
})
console.log('打印', this.tableData) console.log('打印', this.tableData)
// this.setRowSpan(sectionArr) // this.setRowSpan(sectionArr)
// console.log('', sectionArr) // console.log('', sectionArr)
@ -184,26 +176,22 @@ export default {
console.log('看看数据', res) console.log('看看数据', res)
this.ResData = res.data this.ResData = res.data
this.arr = [ this.arr = [
{
prop: '_index',
label: '序号'
},
{ {
prop: 'proLineName', prop: 'proLineName',
label: '生产线', label: '生产线',
// fixed: 'left', fixed: 'left',
'show-overflow-tooltip': true 'show-overflow-tooltip': true
}, },
{ {
prop: 'workOrderName', prop: 'workOrderName',
label: '当前工单', label: '当前工单',
// fixed: 'left', fixed: 'left',
'show-overflow-tooltip': true 'show-overflow-tooltip': true
}, },
{ {
prop: 'spec', prop: 'spec',
label: '产品规格', label: '产品规格',
// fixed: 'left', fixed: 'left',
'show-overflow-tooltip': true 'show-overflow-tooltip': true
} }
] ]

View File

@ -30,7 +30,6 @@ import {
} from '@/api/cost/costEneryAutoReport'; } from '@/api/cost/costEneryAutoReport';
import { getEnergyTypeListAll } from '@/api/base/energyType'; import { getEnergyTypeListAll } from '@/api/base/energyType';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import moment from 'moment';
const tableProps = [ const tableProps = [
{ {
@ -136,23 +135,15 @@ export default {
this.listQuery.pageSize = 10; this.listQuery.pageSize = 10;
this.listQuery.energyTypeId = val.energyTypeId; this.listQuery.energyTypeId = val.energyTypeId;
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null; this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.startTime = val.searchTime this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
? moment(val.searchTime[0]).startOf('day').format('x') this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
: null;
this.listQuery.endTime = val.searchTime
? moment(val.searchTime[1]).endOf('day').format('x')
: null;
this.getDataList(); this.getDataList();
break; break;
case 'export': case 'export':
const data = { const data = {
energyTypeId:val.energyTypeId, energyTypeId:val.energyTypeId,
startTime : val.searchTime startTime : val.searchTime ? val.searchTime[0] : null,
? moment(val.searchTime[0]).startOf('day').format('x') endTime : val.searchTime ? val.searchTime[1] : null,
: null,
endTime : val.searchTime
? moment(val.searchTime[1]).endOf('day').format('x')
: null,
} }
this.handleExport(data); this.handleExport(data);
break; break;

View File

@ -111,7 +111,6 @@ export default {
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
param: 'searchTime', param: 'searchTime',
defaultSelect: [],
}, },
{ {
type: 'button', type: 'button',
@ -133,14 +132,6 @@ export default {
}, },
components: {}, components: {},
created() { created() {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
this.formConfig[2].defaultSelect = [start, end];
this.listQuery.reportTime = [
moment(start).startOf('day').format('x'),
moment(end).endOf('day').format('x'),
];
getEnergyTypeListAll().then((response) => { getEnergyTypeListAll().then((response) => {
this.formConfig[1].selectOptions = response.data; this.formConfig[1].selectOptions = response.data;
}); });

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2024-03-21 15:59:26 * @LastEditTime: 2024-02-19 09:36:50
* @Description: * @Description:
--> -->
<template> <template>
@ -44,7 +44,7 @@
v-for="item in urlOptions.dictList.dict0" v-for="item in urlOptions.dictList.dict0"
:key="item.id" :key="item.id"
:label="item.label" :label="item.label"
:value="parseInt(item.value)"></el-option> :value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -152,12 +152,8 @@ export default {
case 'export': case 'export':
this.listQuery.materialId = val.materialId; this.listQuery.materialId = val.materialId;
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null; this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.startTime = val.searchTime this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
? moment(val.searchTime[0]).startOf('day').format('x') this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
: null;
this.listQuery.endTime = val.searchTime
? moment(val.searchTime[1]).endOf('day').format('x')
: null;
this.handleExport(); this.handleExport();
break; break;
default: default:

View File

@ -110,7 +110,6 @@ export default {
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
param: 'searchTime', param: 'searchTime',
defaultSelect: [],
}, },
{ {
type: 'button', type: 'button',
@ -132,14 +131,6 @@ export default {
}, },
components: {}, components: {},
created() { created() {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
this.formConfig[2].defaultSelect = [start, end];
this.listQuery.times = [
moment(start).startOf('day').format('x'),
moment(end).endOf('day').format('x'),
];
getHotMaterialList().then((response) => { getHotMaterialList().then((response) => {
this.formConfig[1].selectOptions = response.data; this.formConfig[1].selectOptions = response.data;
}); });

View File

@ -26,8 +26,7 @@
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
@emitFun="handleEmitFun" @emitFun="handleEmitFun"></base-table>
:max-height="tableH"></base-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="'\u3000柱状图\u3000'" name="graph"> <el-tab-pane :label="'\u3000柱状图\u3000'" name="graph">
<div <div
@ -58,7 +57,6 @@ export default {
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()]; const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
return { return {
dialogVisible: false, dialogVisible: false,
tableH: this.tableHeight(260),
urls: { urls: {
page: '/analysis/equipment-analysis/quality', page: '/analysis/equipment-analysis/quality',
}, },
@ -157,12 +155,12 @@ export default {
}, },
{ {
// width: 160, // width: 160,
prop: 'totalQuantity', prop: 'inQuantity',
label: '加工数量', label: '加工数量',
}, },
{ {
// width: 160, // width: 160,
prop: 'okQuantity', prop: 'outQuantity',
label: '合格数量', label: '合格数量',
}, },
{ {
@ -254,9 +252,6 @@ export default {
this.fillProductOptions(); this.fillProductOptions();
}, },
mounted() { mounted() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
this.$refs['search-bar'].headBtnClick('search'); this.$refs['search-bar'].headBtnClick('search');
}, },
methods: { methods: {

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-20 17:58:29 * @LastEditTime: 2024-03-18 15:47:20
* @Description: * @Description:
--> -->
<template> <template>
@ -36,8 +36,7 @@
<el-select <el-select
v-model="dataForm.departmentId" v-model="dataForm.departmentId"
:disabled="isdetail" :disabled="isdetail"
:placeholder="`请选择部门`" :placeholder="`请选择部门`">
style="width: 100%">
<el-option <el-option
v-for="opt in departmentOptions" v-for="opt in departmentOptions"
:key="opt.id" :key="opt.id"
@ -91,32 +90,33 @@
type="datetime" type="datetime"
:disabled="isdetail" :disabled="isdetail"
placeholder="请选择巡检时间" placeholder="请选择巡检时间"
value-format="timestamp" value-format="timestamp"></el-date-picker>
style="width: 100%" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<div v-if="idAttrShow"> <div class="attr-list" v-if="idAttrShow">
<small-title> <small-title
style="margin: 16px 0; padding-left: 8px"
:no-padding="true">
巡检内容 巡检内容
</small-title> </small-title>
<div v-if="!isdetail" style="display: flex"> <div v-if="!isdetail">
<div>
<SearchBar <SearchBar
:formConfigs="searchBarFormConfig" :formConfigs="searchBarFormConfig"
ref="attr-search-bar" ref="attr-search-bar"
@headBtnClick="handleSearchBarBtnClick" /> @headBtnClick="handleSearchBarBtnClick" />
<!-- <div class="action_btn"> --> </div>
<el-button type="text" class="action_btn" @click="addNew()"> <!-- <template>
<span style="display: inline-block;"> <span style="display: inline-block;" @click="addNew()">
<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" /> <svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" />
<span class="add">添加内容</span> <span class="add">添加</span>
</span> </span>
</el-button> </template> -->
<!-- </div> -->
</div> </div>
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
@ -229,14 +229,14 @@ export default {
btnName: '查询', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
},
{
type: 'button',
btnName: '新增',
name: 'add',
color: 'success',
plain: true
} }
// {
// type: 'button',
// btnName: '',
// name: 'add',
// color: 'success',
// plain: true
// }
], ],
listQuery: { listQuery: {
pageSize: 10, pageSize: 10,
@ -519,6 +519,10 @@ export default {
flex-direction: column; flex-direction: column;
} }
.drawer >>> .el-form-item__label {
padding: 0;
}
.drawer >>> .el-drawer__header { .drawer >>> .el-drawer__header {
margin: 0; margin: 0;
padding: 32px 32px 24px; padding: 32px 32px 24px;
@ -547,6 +551,11 @@ export default {
padding-right: 10px; /* 调整滚动条样式 */ padding-right: 10px; /* 调整滚动条样式 */
} }
.drawer >>> .el-form,
.drawer >>> .attr-list {
padding: 0 16px;
}
.drawer-body__footer { .drawer-body__footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
@ -554,7 +563,7 @@ export default {
} }
.action_btn { .action_btn {
float: right; float: right;
/* margin: 0 15px 0; */ margin: -32px 15px 0;
font-size: 14px; font-size: 14px;
} }
.add { .add {

View File

@ -120,7 +120,7 @@ export default {
tableProps: [ tableProps: [
{ prop: 'name', label: '巡检单名称' }, { prop: 'name', label: '巡检单名称' },
{ prop: 'department', label: '部门' }, { prop: 'department', label: '部门' },
{ prop: 'planCheckTime', 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: '备注' }

View File

@ -66,7 +66,7 @@ import { deleteEqMaintainLog, exportMaintainLogExcel } from '@/api/equipment/bas
import AddContent from './addContent.vue'; import AddContent from './addContent.vue';
import { parseTime } from '../../../../core/mixins/code-filter'; import { parseTime } from '../../../../core/mixins/code-filter';
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'); const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
const btn = { const btn = {
name: 'tableBtn', name: 'tableBtn',
@ -129,22 +129,20 @@ export default {
// width: 180, // width: 180,
// filter: timeFilter, // filter: timeFilter,
// }, // },
{ prop: 'maintainOrderNumber', label: '设备保养单号', width: 170, showOverflowtooltip: true }, { prop: 'maintainOrderNumber', label: '设备保养单号' },
{ prop: 'planName', label: '保养计划名称', width: 150, showOverflowtooltip: true }, { prop: 'planName', label: '保养计划名称' },
{ prop: 'departmentName', label: '部门', width: 120, showOverflowtooltip: true }, { prop: 'departmentName', label: '部门' },
{ prop: 'lineName', label: '产线名', width: 120, showOverflowtooltip: true }, { prop: 'lineName', label: '产线名' },
{ prop: 'planStartTime', label: '计划开始时间', filter: parseTime, width: 150, showOverflowtooltip: true }, { prop: 'planStartTime', label: '计划开始时间', filter: timeFilter },
{ prop: 'planEndTime', label: '计划结束时间', filter: parseTime, width: 150, showOverflowtooltip: true }, { prop: 'planEndTime', label: '计划结束时间', filter: timeFilter },
{ prop: 'startTime', label: '实际开始时间', filter: parseTime, width: 150, showOverflowtooltip: true }, { prop: 'startTime', label: '实际开始时间', filter: timeFilter },
{ prop: 'endTime', label: '实际结束时间', filter: parseTime, width: 150, showOverflowtooltip: true }, { prop: 'endTime', label: '实际结束时间', filter: timeFilter },
// { prop: 'equipmentName', label: '' }, // { prop: 'equipmentName', label: '' },
// { prop: 'maintainWorker', label: '' }, // { prop: 'maintainWorker', label: '' },
{ {
prop: 'relatePlan', prop: 'relatePlan',
label: '保养计划类型', label: '保养计划类型',
filter: (v) => (v != null ? ['', '计划型', '非计划型'][v] : ''), filter: (v) => (v != null ? ['', '计划型', '非计划型'][v] : ''),
width: 170,
showOverflowtooltip: true
}, },
{ prop: 'opt', label: '详情', name: '详情', subcomponent: btn } { prop: 'opt', label: '详情', name: '详情', subcomponent: btn }
// { prop: 'maintainDuration', label: '(h)' }, // { prop: 'maintainDuration', label: '(h)' },

View File

@ -393,7 +393,7 @@
:file="file" :file="file"
:key="file.fileUrl" :key="file.fileUrl"
:disabled="disabled" :disabled="disabled"
@delete="!disabled && handleDeleteFile(file)" /> @delete="!disabled && handleDeleteFile(file, col.prop)" />
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -678,12 +678,10 @@ export default {
file.type === 'image/jpeg' || file.type === 'image/jpeg' ||
file.type === 'image/png' || file.type === 'image/png' ||
file.type === 'image/jpg'; file.type === 'image/jpg';
if (!isJPG) {
this.$modal.msgError('只能上传jpg/png文件!');
}
return isJPG; return isJPG;
}; };
return checkFileSize() && checkFileType(); return checkFileSize();
// return checkFileSize() && checkFileType();
}, },
// handlers // handlers
@ -739,6 +737,7 @@ export default {
fileType: prop == 'files' ? 2 : 1, fileType: prop == 'files' ? 2 : 1,
}); });
this.$modal.msgSuccess('上传成功'); this.$modal.msgSuccess('上传成功');
console.log('为我', this.form.files)
this.$emit('update', this.form); this.$emit('update', this.form);
}, },

View File

@ -92,21 +92,11 @@ export default {
}); });
if (code == 0) { if (code == 0) {
this.listLine = data; this.listLine = data;
} else {
this.listLine.splice(0);
}
//
const res = await this.$axios({
url: '/base/core-equipment/listAll',
});
if (res.code == 0) {
this.listEq = res.data;
return; return;
} }
this.listEq.splice(0); this.listLine.splice(0);
}, },
async getEquipmentByLineId(id) { async getEquipmentByLineId(id) {
if (id) {
const { data, code } = await this.$axios({ const { data, code } = await this.$axios({
url: '/base/core-equipment/listByLine', url: '/base/core-equipment/listByLine',
params: { params: {
@ -118,7 +108,6 @@ export default {
return; return;
} }
this.listEq.splice(0); this.listEq.splice(0);
}
}, },
handleSearch() { handleSearch() {
this.$emit('action', { this.$emit('action', {

View File

@ -112,7 +112,7 @@ export default class GanttGraph {
// top: 12 + 128 * this.gridIndex, // top: 12 + 128 * this.gridIndex,
top: 12 + 104 * this.gridIndex, top: 12 + 104 * this.gridIndex,
right: 48, right: 48,
left: 183, left: 88,
height: 56 height: 56
} }
} }

View File

@ -119,7 +119,7 @@ export default {
selectOptions: [], selectOptions: [],
param: 'lineId', param: 'lineId',
onchange: true, onchange: true,
filterable: true, filterable: true
}, },
{ {
type: 'select', type: 'select',
@ -127,7 +127,7 @@ export default {
placeholder: '请选择工段', placeholder: '请选择工段',
selectOptions: [], selectOptions: [],
param: 'sectionId', param: 'sectionId',
filterable: true, filterable: true
}, },
// //
{ {
@ -174,20 +174,20 @@ export default {
// demo: [ // demo: [
// [ // [
// { // {
// equipmentName: '线2线', // equipmentName: '',
// duration: 30, // duration: 30,
// relativeDuration: 0.6, // relativeDuration: 0.6,
// status: 0, // status: 0,
// startPos: 0, // startPos: 0,
// startTime: 1711073203686, // startTime: 1691568181000,
// }, // },
// { // {
// equipmentName: '线2线', // equipmentName: '',
// duration: 20, // duration: 20,
// relativeDuration: 0.4, // relativeDuration: 0.4,
// status: 2, // status: 2,
// startPos: 30, // startPos: 30,
// startTime: 1711072203686, // startTime: 1691569981000
// }, // },
// ], // ],
// ], // ],
@ -259,10 +259,6 @@ export default {
(eq) => eq[0].equipmentId (eq) => eq[0].equipmentId
); );
this.graphList = this.objectToArray(data); this.graphList = this.objectToArray(data);
// this.graphList = this.demo.map(item => {
// item.key = item[0].equipmentName;
// return item;
// });
} }
}, },

View File

@ -2,11 +2,11 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-03-22 09:01:30 * @LastEditTime: 2024-03-20 09:17:11
* @Description: * @Description:
--> -->
<template> <template>
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" class="drawer" size="50%"> <el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="false" class="drawer" size="50%">
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }} {{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
</small-title> </small-title>

View File

@ -1,12 +1,12 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-08 13:46:17 * @Date: 2023-12-08 13:46:17
* @LastEditTime: 2024-03-21 10:40:52 * @LastEditTime: 2024-03-15 14:54:38
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-drawer :visible.sync="visible" :show-close="true" :wrapper-closable="true" class="drawer" size="50%"> <el-drawer :visible.sync="visible" :show-close="true" :wrapper-closable="false" class="drawer" size="50%">
<small-title slot="title" :no-padding="true" @close="handleClose"> <small-title slot="title" :no-padding="true" @close="handleClose">
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }} {{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
</small-title> </small-title>
@ -114,7 +114,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="原料等级" prop="materialGrade"> <el-form-item label="原料等级" prop="materialGrade">
<el-select :disabled="isdetail" v-model="dataForm.materialGrade" placeholder="请选择"> <el-select :disabled="isdetail" v-model="dataForm.materialGrade" placeholder="请选择" style="width: 100%;">
<el-option v-for="item in gradeList" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in gradeList" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@ -122,13 +122,13 @@
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input @input="onInput" :disabled="isdetail" v-model="dataForm.remark" placeholder="请填写备注"> <el-input :disabled="isdetail" v-model="dataForm.remark" placeholder="请填写备注" style="width: 100%;">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- </div> --> <!-- </div> -->
<!-- <div class="attr-list" v-if="idAttrShow"> --> <div class="attr-list" v-if="idAttrShow">
<!-- <small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true"> <!-- <small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
设备物料明细 设备物料明细
</small-title> </small-title>
@ -147,9 +147,9 @@
</base-table> </base-table>
<pagination v-show="listQuery.total > 0" :total="listQuery.total" :page.sync="listQuery.pageNo" <pagination v-show="listQuery.total > 0" :total="listQuery.total" :page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize" :page-sizes="[5, 10, 15]" @pagination="getList" /> --> :limit.sync="listQuery.pageSize" :page-sizes="[5, 10, 15]" @pagination="getList" /> -->
<!-- </div> -->
</div> </div>
<div v-if="!isdetail" class="drawer-body__footer"> </div>
<div class="drawer-body__footer">
<el-button style="" @click="goback()">取消</el-button> <el-button style="" @click="goback()">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button> <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</div> </div>
@ -237,7 +237,7 @@ export default {
checkValueList: [], checkValueList: [],
checkResult: '', checkResult: '',
materialGrade: undefined, materialGrade: undefined,
remark:undefined, remark:null,
}, },
productAttrList: [], productAttrList: [],
visible: false, visible: false,
@ -257,9 +257,6 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
onInput() {
this.$forceUpdate();
},
judgeValue(val, minValue, maxValue, index) { judgeValue(val, minValue, maxValue, index) {
if (val >= minValue && val <= maxValue) { if (val >= minValue && val <= maxValue) {
console.log(val) console.log(val)
@ -271,7 +268,7 @@ export default {
} }
}, },
handleClose() { handleClose() {
this.ingredientList = [] this.ingredientList = undefined
console.log(222222222); console.log(222222222);
}, },
dataFormSubmit() { dataFormSubmit() {
@ -457,17 +454,17 @@ export default {
// }); // });
// }, // },
init(id, isdetail) { init(id, isdetail) {
// this.initData() this.initData()
this.getDict() this.getDict()
this.ingredientList = [] this.ingredientList = []
this.isdetail = isdetail || false; this.isdetail = isdetail || false;
this.dataForm.id = id || undefined; this.dataForm.id = id || undefined;
this.visible = true; this.visible = true;
// if (id) { if (id) {
// this.idAttrShow = true this.idAttrShow = true
// } else { } else {
// this.idAttrShow = false this.idAttrShow = false
// } }
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields(); this.$refs['dataForm'].resetFields();
@ -540,9 +537,9 @@ export default {
// //
// this.getList(); // this.getList();
} else { } else {
// if (this.urlOptions.isGetCode) { if (this.urlOptions.isGetCode) {
// this.getCode() this.getCode()
// } }
} }
}); });
}, },
@ -556,12 +553,12 @@ export default {
this.isdetail = false; this.isdetail = false;
}, },
// / // /
// addNew(id) { addNew(id) {
// this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
// this.$nextTick(() => { this.$nextTick(() => {
// this.$refs.addOrUpdate.init(id,this.dataForm.id); this.$refs.addOrUpdate.init(id,this.dataForm.id);
// }); });
// } }
} }
}; };
</script> </script>

View File

@ -118,7 +118,6 @@ export default {
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
param: 'materialId', param: 'materialId',
filterable: true
}, },
{ {
type: 'datePicker', type: 'datePicker',

View File

@ -32,7 +32,7 @@
<!-- </span> --> <!-- </span> -->
<el-tabs style="margin-top: 10px;" v-model="activeName" type="card" @tab-click="handleClick"> <el-tabs style="margin-top: 10px;" v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane label="天" name="day"> <el-tab-pane label="天" name="day">
<div id="mapDayMain" style="margin-bottom: 30px;height: 500px;width: 1000px;"></div> <div id="mapDayMain" style="height: 500px;width: 1000px;"></div>
<div id="listDayMain" style="height: 500px;width: 1000px;"></div> <div id="listDayMain" style="height: 500px;width: 1000px;"></div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="周" name="week"> <el-tab-pane label="周" name="week">
@ -232,23 +232,18 @@ export default {
var option; var option;
option = { option = {
title: { title: {
text: '各类型缺陷对比图', text: '各类型缺陷对比图'
// top:'5px'
}, },
tooltip: { tooltip: {
trigger: 'axis' trigger: 'axis'
}, },
legend: { legend: {
data: mapLegendData, data: mapLegendData
top: "10%",
y: 'top',
x:'left'
}, },
grid: { grid: {
left: '3%', left: '3%',
right: '4%', right: '4%',
bottom: '3%', bottom: '3%',
top:'20%',
containLabel: true containLabel: true
}, },
// toolbox: { // toolbox: {
@ -304,7 +299,7 @@ export default {
trigger: 'axis' trigger: 'axis'
}, },
legend: { legend: {
data: ['缺陷数量', '缺陷率'], data: ['缺陷数量', '缺陷率']
}, },
grid: { grid: {
left: '3%', left: '3%',
@ -350,15 +345,15 @@ export default {
type: 'bar', type: 'bar',
barWidth: '3%', barWidth: '3%',
data: listNumArr, data: listNumArr,
// label: { label: {
// show: true, // show: true, //
// position: 'top', // position: 'top', //
// // formatter: '{c}%',// // formatter: '{c}%',//
// textStyle: { // textStyle: { //
// color: 'black',// color: 'black',//
// fontSize: 12// fontSize: 20//
// } }
// } }
}, },
{ {
name: '缺陷率', name: '缺陷率',
@ -469,7 +464,6 @@ export default {
this.queryParams.endTime = val.checkTime ? val.checkTime[1] : undefined this.queryParams.endTime = val.checkTime ? val.checkTime[1] : undefined
this.getList() this.getList()
this.getData()
} }
console.log(val); console.log(val);
} }

View File

@ -101,7 +101,6 @@ export default {
label: '报废原因', label: '报废原因',
placeholder: '报废原因', placeholder: '报废原因',
param: 'content', param: 'content',
// filterable: true
}, },
{ {
type: 'select', type: 'select',
@ -110,7 +109,6 @@ export default {
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
param: 'typeId', param: 'typeId',
filterable: true
}, },
{ {
type: 'button', type: 'button',

View File

@ -107,17 +107,15 @@ export default {
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
param: 'workOrderId', param: 'workOrderId',
filterable: true
}, },
// { {
// type: 'select', type: 'select',
// label: '', label: '班组',
// selectOptions: [], selectOptions: [],
// labelField: 'name', labelField: 'name',
// valueField: 'id', valueField: 'id',
// param: 'teamId', param: 'teamId',
// filterable: true },
// },
{ {
type: 'button', type: 'button',
btnName: '查询', btnName: '查询',
@ -216,7 +214,7 @@ export default {
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10; this.listQuery.pageSize = 10;
this.listQuery.workOrderId = val.workOrderId ? val.workOrderId : undefined; this.listQuery.workOrderId = val.workOrderId ? val.workOrderId : undefined;
// this.listQuery.teamId = val.teamId ? val.teamId : undefined; this.listQuery.teamId = val.teamId ? val.teamId : undefined;
this.getDataList(); this.getDataList();
break; break;
case 'reset': case 'reset':

View File

@ -17,10 +17,10 @@
@mouseleave="factoryListOpen = false"> @mouseleave="factoryListOpen = false">
{{ currentFactory?.label || '点我选择设备' }} {{ currentFactory?.label || '点我选择设备' }}
<div class="factory-list__wrapper" :class="{ open: factoryListOpen }"> <div class="factory-list__wrapper" :class="{ open: factoryListOpen }">
<ul class="factory-list" v-if="sidebarContent.length" @click.capture="factoryChangeHandler"> <ul class="factory-list" v-if="sidebarContent.length" @click.prevent="factoryChangeHandler">
<li v-for="fc in sidebarContent" :key="fc.id" class="factory-list__item" <li v-for="fc in sidebarContent" :key="fc.id" :data-value="fc.id" class="factory-list__item"
:class="{ 'is-current': fc.id == currentFactory?.id }"> :class="{ 'is-current': fc.id == currentFactory?.id }">
<span :data-value="fc.id"> <span>
{{ fc.label }} {{ fc.label }}
</span> </span>
<svg-icon v-if="fc.id == currentFactory?.id" icon-class="Confirm" style="height: 14px; width: 14px" /> <svg-icon v-if="fc.id == currentFactory?.id" icon-class="Confirm" style="height: 14px; width: 14px" />
@ -95,12 +95,12 @@ export default {
factoryListOpen: false, factoryListOpen: false,
currentFactory: null, currentFactory: null,
factoryList: [ factoryList: [
// { name: '1', value: 1 }, { name: '1', value: 1 },
// { name: '2', value: 2 }, { name: '2', value: 2 },
// { name: '3', value: 3 }, { name: '3', value: 3 },
// { name: '4', value: 4 }, { name: '4', value: 4 },
// { name: '5', value: 5 }, { name: '5', value: 5 },
// { name: '6', value: 6 }, { name: '6', value: 6 },
], ],
sidebarContent: [ sidebarContent: [
// { // {
@ -486,12 +486,14 @@ export default {
}, },
async getTree(id) { async getTree(id) {
const res = await getTreeData({ id: id }) getTreeData({id:id}).then((res) => {
console.log(res.data) console.log(res.data);
this.buildTree(res.data);
this.sidebarContent = res.data; this.sidebarContent = res.data;
console.log('tree', this.sidebarContent) this.buildTree(res.data);
console.log(this.sidebarContent); console.log('tree', this.sidebarContent);
// console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total;
})
// const { data } = await this.$axios('/base/core-factory/getTreeByWorkOrder'); // const { data } = await this.$axios('/base/core-factory/getTreeByWorkOrder');
// console.log(data) // console.log(data)
@ -502,13 +504,10 @@ export default {
}, },
factoryChangeHandler(event) { factoryChangeHandler(event) {
this.currentFactory =undefined this.factoryListOpen = false;
this.factoryListOpen = false
console.log(event.target.dataset);
const fcId = event.target.dataset.value; const fcId = event.target.dataset.value;
this.handleSidebarItemClick({ id: fcId, type: '工厂' }); this.handleSidebarItemClick({ id: fcId, type: '工厂' });
this.currentFactory = this.sidebarContent.find((item) => item.id == fcId) this.currentFactory = this.sidebarContent.find((item) => item.id == fcId);
console.log(this.currentFactory);
}, },
handleSidebarItemClick({ label, id, type }) { handleSidebarItemClick({ label, id, type }) {

View File

@ -8,18 +8,35 @@
<template> <template>
<div class="app-container allow-overflow"> <div class="app-container allow-overflow">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> <SearchBar
:formConfigs="searchBarFormConfig"
ref="search-bar"
@headBtnClick="handleSearchBarBtnClick" />
<el-row> <el-row>
<el-col class="custom-tabs"> <el-col class="custom-tabs">
<el-tabs v-model="activeName" :stretch="true" @tab-click="handleTabClick"> <el-tabs
v-model="activeName"
:stretch="true"
@tab-click="handleTabClick">
<el-tab-pane :label="'\u2002数据列表\u2002'" name="table"> <el-tab-pane :label="'\u2002数据列表\u2002'" name="table">
<!-- 列表 --> <!-- 列表 -->
<base-table class="base-table__margin" :table-props="tableProps" :page="1" :limit="10" :max-height="tableH" <base-table
:table-data="list" @emitFun="handleEmitFun"></base-table> class="base-table__margin"
:table-props="tableProps"
:page="1"
:limit="10"
:table-data="list"
@emitFun="handleEmitFun"></base-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="'\u3000可视化\u3000'" name="graph" style="overflow: inherit"> <el-tab-pane
<div v-if="activeName == 'graph'" class="graph" style=" :label="'\u3000可视化\u3000'"
name="graph"
style="overflow: inherit">
<div
v-if="activeName == 'graph'"
class="graph"
style="
overflow: inherit; overflow: inherit;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -46,11 +63,17 @@
</div> </div>
<div class="graph-grid"> <div class="graph-grid">
<div class="bg-grid grid-line"> <div class="bg-grid grid-line">
<div class="grid-item" v-for="item in list.length" :key="item"></div> <div
class="grid-item"
v-for="item in list.length"
:key="item"></div>
</div> </div>
<div class="bg-grid grid-charts"> <div class="bg-grid grid-charts">
<pie-chart v-for="item in list" :key="item.id" :value="item" /> <pie-chart
v-for="item in list"
:key="item.id"
:value="item" />
<!-- <pie-chart v-for="item in 5" :key="item" :value="item" /> --> <!-- <pie-chart v-for="item in 5" :key="item" :value="item" /> -->
</div> </div>
</div> </div>
@ -94,7 +117,6 @@ export default {
// } // }
// : undefined, // : undefined,
// ].filter((v) => v), // ].filter((v) => v),
tableH: this.tableHeight(260),
tableProps: [ tableProps: [
{ prop: 'factoryName', label: '工厂' }, { prop: 'factoryName', label: '工厂' },
{ prop: 'lineName', label: '产线' }, { prop: 'lineName', label: '产线' },
@ -310,9 +332,6 @@ export default {
}; };
}, },
created() { created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
this.getWorkOrder() this.getWorkOrder()
// this.getLine(); // this.getLine();
this.getList(); this.getList();

View File

@ -2,14 +2,13 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 14:55:51 * @Date: 2023-08-01 14:55:51
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-03-21 15:14:04 * @LastEditTime: 2023-12-01 16:41:40
* @Description: * @Description:
--> -->
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" <base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" :table-data="list">
:table-data="list">
<!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn" <!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> --> @clickBtn="handleClick" /> -->
</base-table> </base-table>
@ -82,7 +81,6 @@ export default {
// // exportURL: exportPackingExcel, // // exportURL: exportPackingExcel,
// }, // },
tableProps, tableProps,
tableH: this.tableHeight(260),
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`base:packaging-print-log:update`) this.$auth.hasPermi(`base:packaging-print-log:update`)
? { ? {
@ -174,9 +172,6 @@ export default {
// AddOrUpdate, // AddOrUpdate,
}, },
created() { created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
this.getList() this.getList()
this.getDict() this.getDict()
}, },

View File

@ -2,14 +2,13 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 14:55:51 * @Date: 2023-08-01 14:55:51
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-03-21 15:17:05 * @LastEditTime: 2024-03-01 10:27:29
* @Description: * @Description:
--> -->
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" <base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" :table-data="list">
:table-data="list">
<!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn" <!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> --> @clickBtn="handleClick" /> -->
</base-table> </base-table>
@ -119,7 +118,6 @@ export default {
startTime: undefined, startTime: undefined,
endTime:undefined, endTime:undefined,
}, },
tableH: this.tableHeight(260),
formConfig: [ formConfig: [
{ {
type: 'select', type: 'select',
@ -127,8 +125,7 @@ export default {
selectOptions: [], selectOptions: [],
labelField: 'name', labelField: 'name',
valueField: 'name', valueField: 'name',
param: 'workOrderName', param: 'workOrderName'
filterable: true
}, },
// { // {
// type: 'datePicker', // type: 'datePicker',
@ -184,9 +181,6 @@ export default {
// AddOrUpdate, // AddOrUpdate,
}, },
created() { created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
this.getList() this.getList()
this.getDict() this.getDict()
}, },

View File

@ -74,8 +74,7 @@ export default {
multiple: true, multiple: true,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
defaultSelect: [], defaultSelect: []
filterable: true
}, },
{ {
type: 'select', type: 'select',
@ -83,7 +82,6 @@ export default {
placeholder: '请选择产品', placeholder: '请选择产品',
param: 'productionId', param: 'productionId',
selectOptions: [], selectOptions: [],
filterable: true
}, },
// { // {
// type: 'input', // type: '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-22 10:14:23 * @LastEditTime: 2024-03-18 16:00:41
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -82,7 +82,6 @@ export default {
}, },
// //
multipliedByHundred(str) { multipliedByHundred(str) {
console.log(str);
// console.log(str) // console.log(str)
if (str != 0) { if (str != 0) {
let floatVal = parseFloat(str); let floatVal = parseFloat(str);
@ -117,10 +116,10 @@ export default {
if (ele.det === false) { if (ele.det === false) {
res.data[index].lineName = '合计' res.data[index].lineName = '合计'
this.remark = res.data[index].remark this.remark = res.data[index].remark
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend && res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : null res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : undefined
res.data[index].originalGlassStatisticsTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : null res.data[index].originalGlassStatisticsTrend = res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : undefined
res.data[index].actualProductTrend = res.data[index].dailyOutputTrend && res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : null res.data[index].actualProductTrend = res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : undefined
res.data[index].originalGlassPassTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : null res.data[index].originalGlassPassTrend = res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : undefined
} }
}) })
res.data.forEach(item => { res.data.forEach(item => {
@ -128,16 +127,10 @@ export default {
if (item.lineId === it.id) { if (item.lineId === it.id) {
console.log(item) console.log(item)
item.lineName = it.name item.lineName = it.name
console.log(item.originalGlassStatisticsTrend); item.dailyOutputTrend = item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : undefined
// if (!item.dailyOutputTrend) { item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : undefined
// item.dailyOutputTrend = this.multipliedByHundred(item.dailyOutputTrend) + '%' item.actualProductTrend = item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : undefined
// } else { item.originalGlassPassTrend = item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : undefined
// item.dailyOutputTrend = null
// }
item.dailyOutputTrend = item.dailyOutputTrend && item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : null
item.originalGlassStatisticsTrend = item.dailyOutputTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
item.actualProductTrend = item.dailyOutputTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
item.originalGlassPassTrend = item.dailyOutputTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
} }
}) })
}) })
@ -182,11 +175,11 @@ export default {
// console.log(val.setHours(7, 0, 0)) // console.log(val.setHours(7, 0, 0))
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) // console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
// let time = this.format(val.setHours(7, 0, 0)) // let time = this.format(val.setHours(7, 0, 0))
this.endTimeStamp = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000 this.startTimeStamp = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.startTimeStamp = this.format(val.setHours(7, 0, 1) - 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000 this.endTimeStamp = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
// console.log(this.listQuery.reportTime); // console.log(this.listQuery.reportTime);
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000 this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000 this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
console.log(this.listQuery.reportTime); console.log(this.listQuery.reportTime);
} else { } else {
this.listQuery.reportTime = [] this.listQuery.reportTime = []

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-22 09:45:23 * @LastEditTime: 2024-03-18 09:57:30
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -198,8 +198,6 @@ const cols = [
this.cols[0].children[2].children[1].label = text2 this.cols[0].children[2].children[1].label = text2
this.cols[0].children[3].children[0].label = text1 this.cols[0].children[3].children[0].label = text1
this.cols[0].children[3].children[1].label = text2 this.cols[0].children[3].children[1].label = text2
this.cols[0].children[4].children[0].label = text1
this.cols[0].children[4].children[1].label = text2
this.cols[0].children[2].label = text3 this.cols[0].children[2].label = text3
} }
} }

View File

@ -91,8 +91,6 @@ export default {
strVal += '0'; strVal += '0';
} }
return parseFloat(strVal); return parseFloat(strVal);
} else {
return null
} }
}, },
@ -111,10 +109,10 @@ export default {
if (ele.det === false) { if (ele.det === false) {
res.data[index].lineName = '合计' res.data[index].lineName = '合计'
this.remark = res.data[index].remark this.remark = res.data[index].remark
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend && res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : null res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : undefined
res.data[index].originalGlassStatisticsTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : null res.data[index].originalGlassStatisticsTrend = res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : undefined
res.data[index].actualProductTrend = res.data[index].dailyOutputTrend && res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : null res.data[index].actualProductTrend = res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : undefined
res.data[index].originalGlassPassTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : null res.data[index].originalGlassPassTrend = res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : undefined
} }
}) })
res.data.forEach(item => { res.data.forEach(item => {
@ -122,36 +120,15 @@ export default {
if (item.lineId === it.id) { if (item.lineId === it.id) {
console.log(item) console.log(item)
item.lineName = it.name item.lineName = it.name
console.log(item.originalGlassStatisticsTrend); item.dailyOutputTrend = item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : undefined
// if (!item.dailyOutputTrend) { item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : undefined
// item.dailyOutputTrend = this.multipliedByHundred(item.dailyOutputTrend) + '%' item.actualProductTrend = item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : undefined
// } else { item.originalGlassPassTrend = item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : undefined
// item.dailyOutputTrend = null
// }
item.dailyOutputTrend = item.dailyOutputTrend && item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : null
item.originalGlassStatisticsTrend = item.dailyOutputTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
item.actualProductTrend = item.dailyOutputTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
item.originalGlassPassTrend = item.dailyOutputTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
} }
}) })
}) })
this.tableData = res.data this.tableData = res.data
// this.tableData = response.data.filter(item => { this.listQuery.total = response.data.length;
// this.proLineList.forEach(it => {
// if (item.lineId === it.id) {
// item.lineName = it.name
// }
// })
// if (item.det === false) {
// this.all = {
// id: item.id,
// remark: item.remark
// }
// }
// return item.det === true
// });
this.listQuery.total = res.data.length;
this.dataListLoading = false; this.dataListLoading = false;
}); });
}, },

View File

@ -200,10 +200,10 @@ export default {
if (ele.det === false) { if (ele.det === false) {
res.data[index].lineName = '合计' res.data[index].lineName = '合计'
this.remark = res.data[index].remark this.remark = res.data[index].remark
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend && res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : null res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : undefined
res.data[index].originalGlassStatisticsTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : null res.data[index].originalGlassStatisticsTrend = res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : undefined
res.data[index].actualProductTrend = res.data[index].dailyOutputTrend && res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : null res.data[index].actualProductTrend = res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : undefined
res.data[index].originalGlassPassTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : null res.data[index].originalGlassPassTrend = res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : undefined
} }
}) })
res.data.forEach(item => { res.data.forEach(item => {
@ -211,36 +211,15 @@ export default {
if (item.lineId === it.id) { if (item.lineId === it.id) {
console.log(item) console.log(item)
item.lineName = it.name item.lineName = it.name
console.log(item.originalGlassStatisticsTrend); item.dailyOutputTrend = item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : undefined
// if (!item.dailyOutputTrend) { item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : undefined
// item.dailyOutputTrend = this.multipliedByHundred(item.dailyOutputTrend) + '%' item.actualProductTrend = item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : undefined
// } else { item.originalGlassPassTrend = item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : undefined
// item.dailyOutputTrend = null
// }
item.dailyOutputTrend = item.dailyOutputTrend && item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : null
item.originalGlassStatisticsTrend = item.dailyOutputTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
item.actualProductTrend = item.dailyOutputTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
item.originalGlassPassTrend = item.dailyOutputTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
} }
}) })
}) })
this.tableData = res.data this.tableData = res.data
// this.tableData = response.data.filter(item => { this.listQuery.total = response.data.length;
// this.proLineList.forEach(it => {
// if (item.lineId === it.id) {
// item.lineName = it.name
// }
// })
// if (item.det === false) {
// this.all = {
// id: item.id,
// remark: item.remark
// }
// }
// return item.det === true
// });
this.listQuery.total = res.data.length;
this.dataListLoading = false; this.dataListLoading = false;
}); });
}, },

View File

@ -111,10 +111,10 @@ export default {
if (ele.det === false) { if (ele.det === false) {
res.data[index].lineName = '合计' res.data[index].lineName = '合计'
this.remark = res.data[index].remark this.remark = res.data[index].remark
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend && res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : null res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : undefined
res.data[index].originalGlassStatisticsTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : null res.data[index].originalGlassStatisticsTrend = res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : undefined
res.data[index].actualProductTrend = res.data[index].dailyOutputTrend && res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : null res.data[index].actualProductTrend = res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : undefined
res.data[index].originalGlassPassTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : null res.data[index].originalGlassPassTrend = res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : undefined
} }
}) })
res.data.forEach(item => { res.data.forEach(item => {
@ -122,36 +122,15 @@ export default {
if (item.lineId === it.id) { if (item.lineId === it.id) {
console.log(item) console.log(item)
item.lineName = it.name item.lineName = it.name
console.log(item.originalGlassStatisticsTrend); item.dailyOutputTrend = item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : undefined
// if (!item.dailyOutputTrend) { item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : undefined
// item.dailyOutputTrend = this.multipliedByHundred(item.dailyOutputTrend) + '%' item.actualProductTrend = item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : undefined
// } else { item.originalGlassPassTrend = item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : undefined
// item.dailyOutputTrend = null
// }
item.dailyOutputTrend = item.dailyOutputTrend && item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : null
item.originalGlassStatisticsTrend = item.dailyOutputTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
item.actualProductTrend = item.dailyOutputTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
item.originalGlassPassTrend = item.dailyOutputTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
} }
}) })
}) })
this.tableData = res.data this.tableData = res.data
// this.tableData = response.data.filter(item => { this.listQuery.total = response.data.length;
// this.proLineList.forEach(it => {
// if (item.lineId === it.id) {
// item.lineName = it.name
// }
// })
// if (item.det === false) {
// this.all = {
// id: item.id,
// remark: item.remark
// }
// }
// return item.det === true
// });
this.listQuery.total = res.data.length;
this.dataListLoading = false; this.dataListLoading = false;
}); });
}, },

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-22 09:36:12 * @LastEditTime: 2024-03-18 15:24:10
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -49,7 +49,7 @@
<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 ? parseFloat((scope.row.inputTrend * 100).toFixed(2)) + '%' :
null}} </span> undefined}} </span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -73,7 +73,7 @@
<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 ? parseFloat((scope.row.goodProductTrend * 100).toFixed(2)) +
'%' : null }} </span> '%' : undefined }} </span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -83,7 +83,7 @@
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input> <el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow * <span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow *
100).toFixed(2)) + 100).toFixed(2)) +
'%' : null }} '%' : undefined }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -92,7 +92,7 @@
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input> <el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis * <span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis *
100).toFixed(2)) + 100).toFixed(2)) +
'%' : null }} '%' : undefined }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -102,7 +102,7 @@
</el-input> </el-input>
<span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend * <span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend *
100).toFixed(2)) + 100).toFixed(2)) +
'%' : null }} '%' : undefined }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -114,7 +114,7 @@
</el-input> </el-input>
<span v-else>{{ scope.row.goodProductPassNow ? parseFloat((scope.row.goodProductPassNow * <span v-else>{{ scope.row.goodProductPassNow ? parseFloat((scope.row.goodProductPassNow *
100).toFixed(2)) + 100).toFixed(2)) +
'%' : null }} '%' : undefined }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -124,7 +124,7 @@
</el-input> </el-input>
<span v-else>{{ scope.row.goodProductPassHis ? parseFloat((scope.row.goodProductPassHis * <span v-else>{{ scope.row.goodProductPassHis ? parseFloat((scope.row.goodProductPassHis *
100).toFixed(2)) + 100).toFixed(2)) +
'%' : null }} '%' : undefined }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -134,7 +134,7 @@
</el-input> </el-input>
<span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend * <span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend *
100).toFixed(2)) + 100).toFixed(2)) +
'%' : null }} '%' : undefined }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -480,8 +480,8 @@ export default {
// console.log(val.setHours(7, 0, 0)) // console.log(val.setHours(7, 0, 0))
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) // console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
// let time = this.format(val.setHours(7, 0, 0)) // let time = this.format(val.setHours(7, 0, 0))
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000 this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1) - 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000 this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
this.timeTips = this.listQuery.reportTime[0] + ' - ' + this.listQuery.reportTime[1] this.timeTips = this.listQuery.reportTime[0] + ' - ' + this.listQuery.reportTime[1]
// console.log(this.listQuery.reportTime); // console.log(this.listQuery.reportTime);
} else { } else {
@ -510,7 +510,7 @@ export default {
// Blob // Blob
new Blob([wbout], { type: "application/octet-stream" }), new Blob([wbout], { type: "application/octet-stream" }),
// //
"许昌安彩成品生产汇总.xlsx" "许昌安彩成品生产汇总.xlsx"
); );
} catch (e) { } catch (e) {
if (typeof console !== "undefined") console.log(e, wbout); if (typeof console !== "undefined") console.log(e, wbout);

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-22 09:56:14 * @LastEditTime: 2024-03-18 15:27:53
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -78,7 +78,7 @@
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="原片漏检率" align="center"> <el-table-column label="原片漏检率" align="center">
<el-table-column prop="missCheckNow" label="本月" align="center"> <el-table-column prop="missCheckNow" label="今日" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input> <el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow * <span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow *
@ -87,7 +87,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="missCheckHis" label="上月" align="center"> <el-table-column prop="missCheckHis" label="昨日" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input> <el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis * <span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis *
@ -108,7 +108,7 @@
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="综合良品率" align="center"> <el-table-column label="综合良品率" align="center">
<el-table-column prop="goodProductPassNow" label="本月" align="center"> <el-table-column prop="goodProductPassNow" label="今日" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled"> <el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled">
</el-input> </el-input>
@ -118,7 +118,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="goodProductPassHis" label="上月" align="center"> <el-table-column prop="goodProductPassHis" label="昨日" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled"> <el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled">
</el-input> </el-input>

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-22 09:47:20 * @LastEditTime: 2024-03-18 15:25:48
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -81,7 +81,7 @@
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="原片漏检率" align="center"> <el-table-column label="原片漏检率" align="center">
<el-table-column prop="missCheckNow" label="本周" align="center"> <el-table-column prop="missCheckNow" label="今日" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input> <el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow * <span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow *
@ -90,7 +90,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="missCheckHis" label="上周" align="center"> <el-table-column prop="missCheckHis" label="昨日" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input> <el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis * <span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis *
@ -111,7 +111,7 @@
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="综合良品率" align="center"> <el-table-column label="综合良品率" align="center">
<el-table-column prop="goodProductPassNow" label="本周" align="center"> <el-table-column prop="goodProductPassNow" label="今日" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled"> <el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled">
</el-input> </el-input>
@ -121,7 +121,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="goodProductPassHis" label="上周" align="center"> <el-table-column prop="goodProductPassHis" label="昨日" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled"> <el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled">
</el-input> </el-input>

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-22 09:47:09 * @LastEditTime: 2024-03-18 15:25:54
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -83,7 +83,7 @@
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="原片漏检率" align="center"> <el-table-column label="原片漏检率" align="center">
<el-table-column prop="missCheckNow" label="今" align="center"> <el-table-column prop="missCheckNow" label="今" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input> <el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow * <span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow *
@ -92,7 +92,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="missCheckHis" label="去年" align="center"> <el-table-column prop="missCheckHis" label="昨日" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input> <el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis * <span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis *
@ -113,7 +113,7 @@
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="综合良品率" align="center"> <el-table-column label="综合良品率" align="center">
<el-table-column prop="goodProductPassNow" label="今" align="center"> <el-table-column prop="goodProductPassNow" label="今" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled"> <el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled">
</el-input> </el-input>
@ -123,7 +123,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="goodProductPassHis" label="去年" align="center"> <el-table-column prop="goodProductPassHis" label="昨日" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled"> <el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled">
</el-input> </el-input>

View File

@ -24,8 +24,6 @@
<el-form-item label="部门" prop="departmentId"> <el-form-item label="部门" prop="departmentId">
<el-select <el-select
v-model="dataForm.departmentId" v-model="dataForm.departmentId"
filterable
clearable
:placeholder="`请选择部门`"> :placeholder="`请选择部门`">
<el-option <el-option
v-for="opt in departmentOptions" v-for="opt in departmentOptions"

View File

@ -155,18 +155,6 @@ export default {
rules: [ rules: [
{ required: true, message: '设备不能为空', trigger: 'blur' }, { required: true, message: '设备不能为空', trigger: 'blur' },
], ],
bind: {
clearable: true,
filterable: true
}
},
{
input: true,
label: '巡检项目',
prop: 'program',
rules: [
{ required: true, message: '巡检项目不能为空', trigger: 'blur' },
],
}, },
], ],
[ [

View File

@ -251,10 +251,6 @@ export default {
rules: [ rules: [
{ required: true, message: '设备不能为空', trigger: 'blur' }, { required: true, message: '设备不能为空', trigger: 'blur' },
], ],
bind: {
filterable: true,
clearable: true,
}
}, },
], ],
[ [

View File

@ -91,7 +91,7 @@ export default {
tableProps: [ tableProps: [
{ prop: 'name', label: '巡检单名称' }, { prop: 'name', label: '巡检单名称' },
{ prop: 'department', label: '部门' }, { prop: 'department', label: '部门' },
{ prop: 'planCheckTime', label: '巡检时间', filter: parseTime }, { prop: 'actualCheckTime', label: '巡检时间', filter: parseTime },
{ prop: 'groupClass', label: '班次' }, { prop: 'groupClass', label: '班次' },
// { // {
// prop: '_detail', // prop: '_detail',

View File

@ -109,7 +109,6 @@ export default {
departmentId: null, departmentId: null,
planCheckTime: null, planCheckTime: null,
confirmTimeLimit: null, confirmTimeLimit: null,
checkPeriod: null,
groupClass: null, groupClass: null,
remark: null, remark: null,
// special: true, // special: true,

View File

@ -40,37 +40,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>

View File

@ -119,7 +119,7 @@ const btn = {
render: function (h) { render: function (h) {
return ( return (
<el-button type="text" onClick={this.handleClick}> <el-button type="text" onClick={this.handleClick}>
{this.injectData.entryText} {this.injectData.name}
</el-button> </el-button>
); );
}, },
@ -188,7 +188,7 @@ export default {
{ {
prop: 'opt2', prop: 'opt2',
label: '保养内容', label: '保养内容',
entryText: '详情', name: '详情',
subcomponent: btn, subcomponent: btn,
width: 100, width: 100,
}, },
@ -386,7 +386,6 @@ export default {
case '保养内容': case '保养内容':
this.monitorDetailVisible = true; this.monitorDetailVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
console.log('value', value);
this.$refs.monitorDetailDrawer.show(value); this.$refs.monitorDetailDrawer.show(value);
}); });
break; break;

View File

@ -188,10 +188,6 @@ export default {
rules: [ rules: [
{ required: true, message: '设备不能为空', trigger: 'blur' }, { required: true, message: '设备不能为空', trigger: 'blur' },
], ],
bind: {
filterable: true,
clearable: true,
}
}, },
], ],
[ [

View File

@ -296,8 +296,6 @@ export default {
placeholder: '请选择保养计划名称', placeholder: '请选择保养计划名称',
param: 'maintainPlanId', param: 'maintainPlanId',
defaultSelect: null, defaultSelect: null,
filterable: true,
clearable: true
}, },
// //
{ {

View File

@ -269,7 +269,6 @@ export default {
}, },
mounted() { mounted() {
// !this.edit && this.getCode('/base/equipment-maintain-plan/getCode'); // !this.edit && this.getCode('/base/equipment-maintain-plan/getCode');
// this.getList('code');
this.getList('maintainer'); this.getList('maintainer');
this.getList('department'); this.getList('department');
this.getList('line'); this.getList('line');
@ -329,7 +328,6 @@ export default {
'/base/core-department/listAll', '/base/core-department/listAll',
'/base/core-worker/workerList', '/base/core-worker/workerList',
// '/base/core-worker/listAll', // '/base/core-worker/listAll',
'/base/equipment-maintain-log/getCode',
]; ];
let res; let res;
switch (source) { switch (source) {

View File

@ -381,8 +381,6 @@ export default {
placeholder: '请选择保养计划名称', placeholder: '请选择保养计划名称',
param: 'maintainPlanId', param: 'maintainPlanId',
defaultSelect: null, defaultSelect: null,
clearable: true,
filterable: true,
}, },
// //
{ {
@ -671,21 +669,8 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.$axios({
url: '/base/equipment-maintain-log/getCode',
})
.then((res) => {
if (res.code == 0) {
this.form.maintainOrderNumber = res.data;
this.open = true; this.open = true;
this.title = '添加待确认保养记录'; this.title = '添加待确认保养记录';
}
})
.catch((err) => {
this.$message.error('获取保养单号出错');
this.open = true;
this.title = '添加待确认保养记录';
});
}, },
getConfirmed() { getConfirmed() {

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%"
@ -174,10 +172,6 @@ export default {
rules: [ rules: [
{ required: true, message: '设备不能为空', trigger: 'blur' }, { required: true, message: '设备不能为空', trigger: 'blur' },
], ],
bind: {
filterable: true,
clearable: true,
},
}, },
], ],
[ [
@ -259,33 +253,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>
</div>,
// <p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
//
// </p>
{
confirmButtonText: '确 定',
cancelButtonText: '取 消',
type: 'warning',
}
)
) {
this.handleConfirm();
}
} catch (err) {
return false;
}
},
handleSearchBarBtnClick(btn) { handleSearchBarBtnClick(btn) {
switch (btn.btnName) { switch (btn.btnName) {
case 'search': case 'search':