OperateList.vue
2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!--
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-02-28 15:16:11
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-02-28 16:04:13
* @FilePath: \dj-car-life-system\src\views\goods\shelfManage\components\detailCon\OperateList.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="edit-page">
<div class="title">
<span>操作记录</span>
</div>
<div style="padding: 20px" v-if="list && list.length > 0">
<div class="wrap" v-for="(item, index) in list" :key="index">
<div class="type">
{{ item.operatorTypeText }}
</div>
<div class="operate">
{{ item.operatorTypeText }}人:{{ item.createdBy }}
</div>
<div>操作时间:{{ item.createdDate }}</div>
</div>
</div>
<div v-else class="empty">暂无记录</div>
</div>
</template>
<script>
import { deepClone ,Util} from "@/common/util"
export default {
name: "OperateList",
props: {
logList: {
type: Array,
default: () => []
}
},
watch: {
logList(val) {
this.list = val
for (var item in this.types) {
this.list.forEach((ele) => {
if (ele.operatorType == item) {
ele.operatorTypeText = this.types[item]
}
})
}
// console.log(this.list, "✈")
this.list = deepClone(this.list)
}
},
data() {
//这里存放数据
return {
list: [],
types: { 1: "创建", 2: "驳回", 3: "确认", 4: "完成" }
}
},
methods: {}
}
</script>
<style lang="scss" scoped>
@import "../../style/editdetailCon.scss";
.wrap {
display: flex;
align-items: center;
color: #333333;
font-size: 14px;
margin-bottom: 20px;
.type {
font-weight: bold;
margin-right: 60px;
}
.operate {
min-width: 160px;
margin-right: 86px;
white-space: nowrap;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
}
}
.empty {
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
</style>