<template>
|
<el-descriptions :column="2" size="default" border>
|
<el-descriptions-item label="区域">
|
{{ locationStr }}
|
</el-descriptions-item>
|
<el-descriptions-item label="时间"> {{ time }} </el-descriptions-item>
|
<el-descriptions-item label="描述">
|
<span class="description"> {{ description }} </span>
|
</el-descriptions-item>
|
</el-descriptions>
|
</template>
|
<script>
|
import dayjs from 'dayjs';
|
export default {
|
computed: {
|
description() {
|
let result = ''
|
return result
|
},
|
locationStr() {
|
let result = '';
|
if (this.location.pName) {
|
// result += this.location.pName;
|
if (this.location.cName) {
|
result += this.location.cName;
|
if (this.location.dName) {
|
result += this.location.dName;
|
if (this.location.tName) {
|
result += this.location.tName;
|
}
|
}
|
}
|
}
|
if (result == '') {
|
if (this.location.pName) {
|
result += this.location.pName;
|
}
|
}
|
return result;
|
},
|
time() {
|
if (!this.tableData || this.tableData.length == 0) {
|
return '';
|
} else {
|
return dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
|
}
|
}
|
},
|
props: {
|
location: {},
|
tableData: []
|
},
|
data() {
|
return {
|
description: ''
|
};
|
}
|
};
|
</script>
|
<style scoped></style>
|
|