单兵和无人机:列表增加详情

This commit is contained in:
guoyue 2022-09-21 23:31:56 +08:00
parent e906d9adc5
commit c55eedc5b4
1 changed files with 36 additions and 37 deletions

View File

@ -344,6 +344,7 @@
<a @click="goToApply(record)" style="margin-right: 10px">
申请
</a>
<a @click="showWrj(record)">详情</a>
</template>
</template>
</a-table>
@ -405,22 +406,6 @@
</a-modal>
<a-modal wrapClassName="wrj" v-model:visible="wrjVisible" :width="1000" :title="wrjName + '详情'"
@ok="wrjVisible = false">
<template v-if="dataSource2[0].type !== '单兵设备'">
<div v-for="wrj in wrjData" :key="wrj.name">
<div style="
font-size: 20px;
font-weight: 600;
margin: 10px 0;
text-align: center;
">
{{ wrj.name }}
</div>
<div style="padding: 0 30px" v-for="(value, key) in wrj.attribute" :key="value">
{{ key + '' + value }}
</div>
</div>
</template>
<template v-else>
<div v-for="(db, key) in wrjData" :key="key">
<template v-if="typeof db == 'object'">
<div style="
@ -429,19 +414,15 @@
margin: 10px 0;
text-align: center;
">
{{ key }}
{{ db.attrType || '--' }}
</div>
<div style="padding: 0 30px" v-for="(value, key2) in db" :key="value">
<template v-if="db.attrValue">
<div style="padding: 0 30px" v-for="(value, key2) in JSON.parse(db.attrValue)" :key="value">
{{ key2 + '' + value }}
</div>
</template>
<template v-else>
<div style="padding: 0 30px">
{{ key + '' + db }}
</div>
</template>
</div>
</template>
</a-modal>
</div>
</div>
@ -670,8 +651,26 @@ const wrjVisible = ref(false)
const wrjName = ref('')
const wrjData = ref([])
const showWrj = (data) => {
console.log('data---dddd--------->', data);
wrjName.value = data.wrjName
wrjData.value = data.details
// wrjData.value = data.details
wrjData.value = data.deviceAttrDTOList
// wrjData.value = []
// data.deviceAttrDTOList.map(v => {
// console.log('v.attrType------------>', v.attrType);
// console.log('v.attrValue------------>', v.attrValue);
// try {
// let obj = {
// name: v.attrType,
// list: v.attrValue && JSON.parse(v.attrValue)
// }
// wrjData.value.push(obj)
// } catch (error) {
// console.log('error------------>', error);
// }
// })
// console.log('wrjData.value------------>', wrjData.value);
wrjVisible.value = true
}
const goToWrj = (data) => {
@ -1977,6 +1976,7 @@ const showMsg = () => {
.wrj {
.ant-modal-body {
height: 700px !important;
overflow-y: auto;
}
}
@ -2087,5 +2087,4 @@ const showMsg = () => {
video::-webkit-media-controls {
display: none !important;
}
</style>