JNBusiness/ruoyi-ui/src/views/storageLocation/operlog.vue

143 lines
3.5 KiB
Vue
Raw Normal View History

2024-03-18 16:21:52 +08:00
<template>
2024-03-18 20:02:23 +08:00
<div>
2024-03-19 13:35:59 +08:00
<el-form :inline="true" :model="queryParams" class="demo-form-inline">
<el-form-item label="库位">
<span style="font-size: 20px;color: #1682e6">{{ materialBhProp }}</span>
<el-input v-model="queryParams.operlog_kw" v-if="false"></el-input>
</el-form-item>
<el-form-item label="操作时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
></el-date-picker>
</el-form-item>
<el-form-item label="操作人">
<el-input v-model="queryParams.operlog_user_name" placeholder="操作人"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="search()">查询</el-button>
</el-form-item>
</el-form>
2024-03-18 16:21:52 +08:00
<el-table
2024-03-18 20:02:23 +08:00
:data="operlogData"
2024-03-19 13:35:59 +08:00
v-loading="loading"
2024-03-18 16:21:52 +08:00
height="500"
style="width: 100%">
<el-table-column
2024-03-18 20:02:23 +08:00
prop="operlog_date"
2024-03-19 13:35:59 +08:00
label="操作时间"
2024-03-18 16:21:52 +08:00
width="200"
fixed>
</el-table-column>
<el-table-column
2024-03-18 20:02:23 +08:00
prop="operlog_user_name"
2024-03-18 16:21:52 +08:00
label="操作人"
width="100"
fixed>
</el-table-column>
<el-table-column
2024-03-18 20:02:23 +08:00
prop="operlog_event"
2024-03-18 16:21:52 +08:00
label="事件"
2024-03-19 10:05:33 +08:00
width="200"
2024-03-18 16:21:52 +08:00
fixed>
</el-table-column>
<el-table-column label="录入信息">
<el-table-column
2024-03-18 20:02:23 +08:00
prop="operlog_zlh"
2024-03-18 16:21:52 +08:00
label="指令号"
width="150">
</el-table-column>
<el-table-column
2024-03-18 20:02:23 +08:00
prop="operlog_xingh"
2024-03-18 16:21:52 +08:00
label="型号"
width="150">
</el-table-column>
<el-table-column
2024-03-18 20:02:23 +08:00
prop="operlog_guig"
2024-03-18 16:21:52 +08:00
label="规格"
width="150">
</el-table-column>
<el-table-column
2024-03-18 20:02:23 +08:00
prop="operlog_diany"
2024-03-18 16:21:52 +08:00
label="电压等级"
width="100">
</el-table-column>
<el-table-column
2024-03-18 20:02:23 +08:00
prop="operlog_ms"
2024-03-18 16:21:52 +08:00
label="米数"
width="100">
</el-table-column>
</el-table-column>
</el-table>
2024-03-19 13:35:59 +08:00
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getOperlogData"
/>
2024-03-18 20:02:23 +08:00
</div>
2024-03-18 16:21:52 +08:00
</template>
<script>
2024-03-18 20:02:23 +08:00
import { listOperlog } from "@/api/storageLocation/operlog";
2024-03-18 16:21:52 +08:00
export default {
name: 'Operlog',
2024-03-18 20:02:23 +08:00
props: {
materialBhProp: String
},
2024-03-18 16:21:52 +08:00
data() {
return {
2024-03-18 20:02:23 +08:00
queryParams: {
2024-03-19 13:35:59 +08:00
pageNum: 1,
pageSize: 10,
2024-03-18 20:02:23 +08:00
operlog_kw: null,
2024-03-19 13:35:59 +08:00
operlog_date: null,
operlog_user_name: null
2024-03-18 20:02:23 +08:00
},
2024-03-19 13:35:59 +08:00
// 遮罩层
loading: true,
// 总条数
total: 0,
// 日期范围
dateRange: [],
2024-03-18 20:02:23 +08:00
operlogData: [],
}
},
watch: {
materialBhProp(value,oldvalue){
this.getOperlogData();
}
},
created() {
/*获取库位信息*/
this.getOperlogData();
},
methods: {
/*获取操作记录*/
getOperlogData() {
2024-03-19 13:35:59 +08:00
this.loading = true;
2024-03-18 20:02:23 +08:00
this.queryParams.operlog_kw = this._props.materialBhProp;
this.operlogData = [];
2024-03-19 13:35:59 +08:00
listOperlog(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.operlogData = response.rows;
this.total = response.total;
this.loading = false;
2024-03-18 20:02:23 +08:00
});
2024-03-19 13:35:59 +08:00
},
//查询
search(){
this.queryParams.pageNum = 1;
this.getOperlogData();
2024-03-18 16:21:52 +08:00
}
}
}
</script>