update 设备巡检管理
This commit is contained in:
parent
899b9fa879
commit
eb525fce24
@ -33,7 +33,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- right -->
|
<!-- right -->
|
||||||
<div class="right-container">
|
<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
|
<base-table
|
||||||
:page="1"
|
:page="1"
|
||||||
:limit="999"
|
:limit="999"
|
||||||
@ -64,13 +67,22 @@ import BaseTable from '@/components/BaseTable'
|
|||||||
import Pagination from '@/components/Pagination'
|
import Pagination from '@/components/Pagination'
|
||||||
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
|
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
|
||||||
import { tableHeight } from '@/utils/index'
|
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 einspectionitemAdd from './components/einspectionitemAdd.vue'
|
||||||
import einspectionitemlogAdd from './components/einspectionitemlogAdd.vue'
|
import einspectionitemlogAdd from './components/einspectionitemlogAdd.vue'
|
||||||
import { timeFormatter } from '@/filters'
|
import { timeFormatter } from '@/filters'
|
||||||
import StatusBtn from './components/statusBtn.vue'
|
import StatusBtn from './components/statusBtn.vue'
|
||||||
import statusTag from './components/statusTag.vue'
|
import statusTag from './components/statusTag.vue'
|
||||||
// import newBasicData from '@/filters/newBasicData'
|
// import newBasicData from '@/filters/newBasicData'
|
||||||
|
|
||||||
|
import { Random } from 'mockjs'
|
||||||
|
|
||||||
const topBtnConfig = [
|
const topBtnConfig = [
|
||||||
{
|
{
|
||||||
type: 'add',
|
type: 'add',
|
||||||
@ -246,21 +258,23 @@ export default {
|
|||||||
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
|
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}
|
}
|
||||||
).then(() => {
|
)
|
||||||
einspectionLogD({
|
.then(() => {
|
||||||
id: raw.data.id
|
einspectionLogD({
|
||||||
}).then(res => {
|
id: raw.data.id
|
||||||
this.$message({
|
}).then(res => {
|
||||||
message: this.$t('module.basicData.visual.success'),
|
this.$message({
|
||||||
type: 'success',
|
message: this.$t('module.basicData.visual.success'),
|
||||||
duration: 1500,
|
type: 'success',
|
||||||
onClose: () => {
|
duration: 1500,
|
||||||
this.listQuery.current = 1
|
onClose: () => {
|
||||||
this.getList()
|
this.listQuery.current = 1
|
||||||
}
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}).catch(() => { })
|
.catch(() => {})
|
||||||
} else if (raw.type === 'detail') {
|
} else if (raw.type === 'detail') {
|
||||||
this.addNew(raw.data.id, 'detail')
|
this.addNew(raw.data.id, 'detail')
|
||||||
} else if (raw.type === 'edit') {
|
} else if (raw.type === 'edit') {
|
||||||
@ -274,8 +288,25 @@ export default {
|
|||||||
this.listQuery.endTime = this.headFormValue.searchTime ? this.headFormValue.searchTime[1] + 'T23:59:59' : ''
|
this.listQuery.endTime = this.headFormValue.searchTime ? this.headFormValue.searchTime[1] + 'T23:59:59' : ''
|
||||||
inspectionLog(this.listQuery).then(res => {
|
inspectionLog(this.listQuery).then(res => {
|
||||||
if (res.data.records) {
|
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.equipmentInspectionId = this.list[0].id
|
||||||
|
|
||||||
this.getInspectionItem()
|
this.getInspectionItem()
|
||||||
} else {
|
} else {
|
||||||
this.list = []
|
this.list = []
|
||||||
@ -299,7 +330,8 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectRow(val) { // 点击左侧列表
|
selectRow(val) {
|
||||||
|
// 点击左侧列表
|
||||||
this.equipmentInspectionId = val.id
|
this.equipmentInspectionId = val.id
|
||||||
this.getInspectionItem()
|
this.getInspectionItem()
|
||||||
},
|
},
|
||||||
@ -340,7 +372,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleClickR(raw) {
|
handleClickR(raw) {
|
||||||
if ((raw.type === 'detail') || (raw.type === 'edit')) {
|
if (raw.type === 'detail' || raw.type === 'edit') {
|
||||||
this.addOrUpdateVisibleR = true
|
this.addOrUpdateVisibleR = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addOrUpdateR.init(raw.data.id, raw.type)
|
this.$refs.addOrUpdateR.init(raw.data.id, raw.type)
|
||||||
@ -351,23 +383,23 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.app-container {
|
.app-container {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
.left-container {
|
.left-container {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
// width: 500px;
|
// width: 500px;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
border-right: 8px solid #f2f4f9;
|
border-right: 8px solid #f2f4f9;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding-top: 16px;
|
padding-top: 16px;
|
||||||
}
|
|
||||||
.right-container {
|
|
||||||
display: inline-block;
|
|
||||||
// width: calc(100% - 510px);
|
|
||||||
width: 49%;
|
|
||||||
vertical-align: top;
|
|
||||||
height: 100%;
|
|
||||||
padding-top: 23px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
.right-container {
|
||||||
|
display: inline-block;
|
||||||
|
// width: calc(100% - 510px);
|
||||||
|
width: 49%;
|
||||||
|
vertical-align: top;
|
||||||
|
height: 100%;
|
||||||
|
padding-top: 23px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -258,9 +258,9 @@ export const wwwOrderProps = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
export const rightSideDatalist = [
|
export const rightSideDatalist = [
|
||||||
{ "orderId": "WOD20200807030135", "time": "2021-02-12 14:08:04", "eq": "磨边", "status": 3, "team": "白班", "duration": "26min" },
|
{ "orderId": "WOD20200807030135", "time": "2022-11-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": "2022-11-15 18:48:40", "eq": "预热", "status": 2, "team": "白班", "duration": "27min" },
|
||||||
{ "orderId": "WOD20210217143647", "time": "2021-08-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 = [
|
export const rightSideDatalist2 = [
|
||||||
{ "orderId": "WOD20220403013343", "pl": "A", "status": 3, "team": "白班", "duration": "24min" },
|
{ "orderId": "WOD20220403013343", "pl": "A", "status": 3, "team": "白班", "duration": "24min" },
|
||||||
@ -273,9 +273,9 @@ export const rightSideDatalist3 = [
|
|||||||
{ "orderId": "WOD20220915050149", "eq": "磨边后清洗机", "status": 3, "team": "白班", "duration": "21min" },
|
{ "orderId": "WOD20220915050149", "eq": "磨边后清洗机", "status": 3, "team": "白班", "duration": "21min" },
|
||||||
]
|
]
|
||||||
export const rightSideDatalist4 = [
|
export const rightSideDatalist4 = [
|
||||||
{ "orderId": "WOD20210522165229", "pl": "A", "status": 2, "team": "夜班", "time": "2021-12-17 13:31:24" },
|
{ "orderId": "WOD20210522165229", "pl": "A", "status": 2, "team": "夜班", "time": "2022-12-17 13:31:24" },
|
||||||
{ "orderId": "WOD20211205183921", "pl": "B", "status": 1, "team": "白班", "time": "2022-06-27 10:52:19" },
|
|
||||||
{ "orderId": "WOD20210114183705", "pl": "A", "status": 1, "team": "夜班", "time": "2022-11-22 02:59:50" },
|
{ "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" },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user