<template>
|
<el-dialog
|
append-to-body
|
title="操作记录"
|
@close="$emit('update:currshowlist', false)"
|
:visible.sync="innerVisible"
|
:show="currshowlist">
|
<el-row>
|
<el-col :span="24" style="height: 400px">
|
<el-table stripe ref="operatingRecordList" :data="operatingRecordList"
|
height="100%"
|
:row-style="{height: '26px'}" :cell-style="{padding: '0'}">
|
<el-table-column label="操作者" prop="operator" align="center" min-width="75px"
|
:show-overflow-tooltip="true"/>
|
<el-table-column label="操作者名称" prop="operatorName" align="center" min-width="75px"
|
:show-overflow-tooltip="true"/>
|
<el-table-column label="操作时间" prop="operatingTime" align="center" min-width="75px"
|
:show-overflow-tooltip="true"/>
|
<el-table-column label="操作类型" prop="operationType" align="center" min-width="75px"
|
:show-overflow-tooltip="true"/>
|
</el-table>
|
</el-col>
|
</el-row>
|
<span slot="footer" class="dialog-footer">
|
<el-button @click="innerVisible = false">取消</el-button>
|
</span>
|
</el-dialog>
|
</template>
|
|
<script>
|
import {getOperatingRecord} from '@/api/product/dutyrecord'
|
|
export default {
|
props: {
|
currshowlist: {
|
type: Boolean,
|
default: false
|
},
|
currentDutyRecord: {
|
type: Object,
|
default: null
|
},
|
},
|
data() {
|
return {
|
innerVisible: false,
|
operatingRecordList: [],
|
}
|
},
|
methods: {
|
selectDutyDate(dutyDate) {
|
let shift = this.shifts.find(item => item.id === this.dataForm.shiftId)
|
if (shift) {
|
this.autoValue(shift, dutyDate)
|
}
|
}
|
},
|
watch: {
|
currshowlist() {
|
this.innerVisible = this.currshowlist
|
if (this.currshowlist) {
|
this.$nextTick(() => {
|
if (this.currentDutyRecord && this.currentDutyRecord.id) {
|
getOperatingRecord(this.currentDutyRecord.id).then((response) => {
|
this.operatingRecordList = response.data.data
|
})
|
} else {
|
this.operatingRecordList = []
|
}
|
})
|
}
|
},
|
},
|
}
|
</script>
|