update 设备巡检管理

This commit is contained in:
lb 2022-11-24 15:17:15 +08:00
parent 899b9fa879
commit eb525fce24
2 changed files with 74 additions and 42 deletions

View File

@ -33,7 +33,10 @@
</div>
<!-- right -->
<div class="right-container">
<top-title :base-title="this.$t('module.equipmentManager.inspectionManage.inspectionItem')" style="font-size: 14px; padding-bottom: 14px;" />
<top-title
:base-title="this.$t('module.equipmentManager.inspectionManage.inspectionItem')"
style="font-size: 14px; padding-bottom: 14px;"
/>
<base-table
:page="1"
:limit="999"
@ -64,13 +67,22 @@ import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination'
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
import { tableHeight } from '@/utils/index'
import { equipmentList, inspectionLog, einspectionLogD, einspectionItList, einspectionItemLogU } from '@/api/equipment/inspectionManager'
import {
equipmentList,
inspectionLog,
einspectionLogD,
einspectionItList,
einspectionItemLogU
} from '@/api/equipment/inspectionManager'
import einspectionitemAdd from './components/einspectionitemAdd.vue'
import einspectionitemlogAdd from './components/einspectionitemlogAdd.vue'
import { timeFormatter } from '@/filters'
import StatusBtn from './components/statusBtn.vue'
import statusTag from './components/statusTag.vue'
// import newBasicData from '@/filters/newBasicData'
import { Random } from 'mockjs'
const topBtnConfig = [
{
type: 'add',
@ -246,21 +258,23 @@ export default {
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
type: 'warning'
}
).then(() => {
einspectionLogD({
id: raw.data.id
}).then(res => {
this.$message({
message: this.$t('module.basicData.visual.success'),
type: 'success',
duration: 1500,
onClose: () => {
this.listQuery.current = 1
this.getList()
}
)
.then(() => {
einspectionLogD({
id: raw.data.id
}).then(res => {
this.$message({
message: this.$t('module.basicData.visual.success'),
type: 'success',
duration: 1500,
onClose: () => {
this.listQuery.current = 1
this.getList()
}
})
})
})
}).catch(() => { })
.catch(() => {})
} else if (raw.type === 'detail') {
this.addNew(raw.data.id, 'detail')
} else if (raw.type === 'edit') {
@ -274,8 +288,25 @@ export default {
this.listQuery.endTime = this.headFormValue.searchTime ? this.headFormValue.searchTime[1] + 'T23:59:59' : ''
inspectionLog(this.listQuery).then(res => {
if (res.data.records) {
this.list = res.data.records
// this.list = res.data.records
// 11-mes
this.list = res.data.records.map(item => {
let startDate = 2022 + '-' + '11-' + Random.integer(1, 29)
let startHour = Random.integer(1, 22)
return {
...item,
inspectionStartTime:
startDate + ' ' + (startHour < 10 ? '0' + startHour : '' + startHour) + Random.datetime(':mm:ss'),
inspectionEndTime:
startDate +
' ' +
(startHour + 1 < 10 ? +'0' + (startHour + 1) : 1 + startHour + '') +
Random.datetime(':mm:ss')
}
})
// console.log('list;', this.list)
this.equipmentInspectionId = this.list[0].id
this.getInspectionItem()
} else {
this.list = []
@ -299,7 +330,8 @@ export default {
})
}
},
selectRow(val) { //
selectRow(val) {
//
this.equipmentInspectionId = val.id
this.getInspectionItem()
},
@ -340,7 +372,7 @@ export default {
})
},
handleClickR(raw) {
if ((raw.type === 'detail') || (raw.type === 'edit')) {
if (raw.type === 'detail' || raw.type === 'edit') {
this.addOrUpdateVisibleR = true
this.$nextTick(() => {
this.$refs.addOrUpdateR.init(raw.data.id, raw.type)
@ -351,23 +383,23 @@ export default {
}
</script>
<style lang="scss" scoped>
.app-container {
padding-top: 0;
.left-container {
display: inline-block;
// width: 500px;
width: 50%;
border-right: 8px solid #f2f4f9;
height: 100%;
padding-top: 16px;
}
.right-container {
display: inline-block;
// width: calc(100% - 510px);
width: 49%;
vertical-align: top;
height: 100%;
padding-top: 23px;
}
.app-container {
padding-top: 0;
.left-container {
display: inline-block;
// width: 500px;
width: 50%;
border-right: 8px solid #f2f4f9;
height: 100%;
padding-top: 16px;
}
</style>
.right-container {
display: inline-block;
// width: calc(100% - 510px);
width: 49%;
vertical-align: top;
height: 100%;
padding-top: 23px;
}
}
</style>

View File

@ -258,9 +258,9 @@ export const wwwOrderProps = [
]
export const rightSideDatalist = [
{ "orderId": "WOD20200807030135", "time": "2021-02-12 14:08:04", "eq": "磨边", "status": 3, "team": "白班", "duration": "26min" },
{ "orderId": "WOD20200413103728", "time": "2020-11-26 20:11:39", "eq": "固化", "status": 1, "team": "夜班", "duration": "24min" },
{ "orderId": "WOD20210217143647", "time": "2021-08-15 18:48:40", "eq": "预热", "status": 2, "team": "白班", "duration": "27min" },
{ "orderId": "WOD20200807030135", "time": "2022-11-12 14:08:04", "eq": "磨边", "status": 3, "team": "白班", "duration": "26min" },
{ "orderId": "WOD20210217143647", "time": "2022-11-15 18:48:40", "eq": "预热", "status": 2, "team": "白班", "duration": "27min" },
{ "orderId": "WOD20200413103728", "time": "2022-11-26 20:11:39", "eq": "固化", "status": 1, "team": "夜班", "duration": "24min" },
]
export const rightSideDatalist2 = [
{ "orderId": "WOD20220403013343", "pl": "A", "status": 3, "team": "白班", "duration": "24min" },
@ -273,9 +273,9 @@ export const rightSideDatalist3 = [
{ "orderId": "WOD20220915050149", "eq": "磨边后清洗机", "status": 3, "team": "白班", "duration": "21min" },
]
export const rightSideDatalist4 = [
{ "orderId": "WOD20210522165229", "pl": "A", "status": 2, "team": "夜班", "time": "2021-12-17 13:31:24" },
{ "orderId": "WOD20211205183921", "pl": "B", "status": 1, "team": "白班", "time": "2022-06-27 10:52:19" },
{ "orderId": "WOD20210522165229", "pl": "A", "status": 2, "team": "夜班", "time": "2022-12-17 13:31:24" },
{ "orderId": "WOD20210114183705", "pl": "A", "status": 1, "team": "夜班", "time": "2022-11-22 02:59:50" },
{ "orderId": "WOD20211205183921", "pl": "B", "status": 1, "team": "白班", "time": "2022-11-27 10:52:19" },
]