详情优化

main
wangqiujuan0808 2024-01-05 22:21:34 +08:00
parent 245208584c
commit 7bf7b2878e
8 changed files with 91 additions and 40 deletions

View File

Before

Width:  |  Height:  |  Size: 308 KiB

After

Width:  |  Height:  |  Size: 308 KiB

View File

@ -11,15 +11,12 @@
</div> </div>
</div> </div>
<div class="right-div"> <div class="right-div">
<img :src="licang" alt="" width="400" v-if="infoList.imgUrl == 'licang'"> <img :src="getAssetsFile(infoList.imgUrl)" alt="" width="400">
<img :src="guolvcao" alt="" width="400" v-if="infoList.imgUrl == 'guolvcao'">
<span>设备图片</span> <span>设备图片</span>
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import licang from '@/assets/images/licang.jpg';
import guolvcao from '@/assets/images/cao.jpg';
const props = defineProps({ const props = defineProps({
infoList: { infoList: {
default: {}, default: {},
@ -28,6 +25,11 @@ const props = defineProps({
}) })
const listData = props.infoList.detail; const listData = props.infoList.detail;
const getAssetsFile = (imgUrl) => {
console.log(123, imgUrl);
return new URL('../../../../assets/images/'+ imgUrl + '.jpg', import.meta.url).href
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.baseInfo-div { .baseInfo-div {

View File

@ -17,7 +17,7 @@ import RealInfo from './RealInfo.vue';
import HistoryInfo from './HistoryInfo.vue'; import HistoryInfo from './HistoryInfo.vue';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
const deviceData = { const deviceData = {
'set1': { 'guan2': {
name: '立仓', name: '立仓',
imgUrl: 'licang', imgUrl: 'licang',
detail: [ detail: [
@ -75,7 +75,7 @@ const deviceData = {
}, },
] ]
}, },
'set6': { 'guan1': {
name: '过滤槽', name: '过滤槽',
imgUrl: 'guolvcao', imgUrl: 'guolvcao',
detail: [ detail: [
@ -149,7 +149,65 @@ const data = reactive({
}); });
const { detailData } = toRefs(data); const { detailData } = toRefs(data);
const deviceNum = computed(() => bimStore().deviceNum); const deviceNum = computed(() => bimStore().deviceNum);
detailData.value = deviceData[deviceNum.value]; const defaultData = {
name: '其他设备',
imgUrl: 'device',
detail: [
{
name: '资产名称',
value: '过滤槽'
},
{
name: '资产类型',
value: '糖化设备'
},
{
name: '资产位置',
value: '漳州厂区糖化间'
},
{
name: '采购日期',
value: '2012-11-15'
},
{
name: '使用日期',
value: '2012-11-15'
},
{
name: '过保截至日期',
value: '2018-11-15'
},
{
name: '所属厂区',
value: '漳州厂区'
},
{
name: '资产编码',
value: 'TH-2304187001'
},
{
name: '资产状态',
value: '在用'
},
{
name: '累计采购天数',
value: '234天'
},
{
name: '投入使用天数',
value: '234天'
},
{
name: '距离过保天数',
value: '-34天'
},
{
name: '设备二维码',
value: '2018-11-15'
},
]
};
detailData.value = deviceData[deviceNum.value] || defaultData;
const handleClick = (tab, event) => { const handleClick = (tab, event) => {
// if(activeName !== '0' && activeName !== '1' && activeName !=='2') { // if(activeName !== '0' && activeName !== '1' && activeName !=='2') {
// ElMessage.warning(''); // ElMessage.warning('');
@ -163,13 +221,14 @@ const handleClick = (tab, event) => {
.detail-div { .detail-div {
height: 700px; height: 700px;
color: #fff; color: #fff;
.title-div { .title-div {
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
width: 100%; width: 100%;
border: 1px solid #2E6099; border: 1px solid #2E6099;
padding: 0 10px; padding: 0 10px;
margin-bottom:5px; margin-bottom: 5px;
} }
} }
</style> </style>

View File

@ -59,7 +59,7 @@ const data = reactive({
{ {
type: '生产设备', type: '生产设备',
name: '立仓', name: '立仓',
num: 'set1', num: 'guan2',
value: 45, value: 45,
id: "echartDiv0" id: "echartDiv0"
}, },
@ -73,14 +73,14 @@ const data = reactive({
{ {
type: '安防设备', type: '安防设备',
name: '摄像头', name: '摄像头',
num: 'set1', num: 'guan2',
value: 180, value: 180,
id: "echartDiv2" id: "echartDiv2"
}, },
{ {
type: '消防设备', type: '消防设备',
name: '烟感', name: '烟感',
num: 'set1', num: 'guan2',
value: 100, value: 100,
id: "echartDiv3" id: "echartDiv3"
} }
@ -101,7 +101,7 @@ const data = reactive({
{ {
type: '生产设备', type: '生产设备',
name: '立仓', name: '立仓',
num: 'set1', num: 'guan2',
value: 15, value: 15,
id: "echartDiv0" id: "echartDiv0"
}, },
@ -115,14 +115,14 @@ const data = reactive({
{ {
type: '安防设备', type: '安防设备',
name: '摄像头', name: '摄像头',
num: 'set1', num: 'guan2',
value: 80, value: 80,
id: "echartDiv2" id: "echartDiv2"
}, },
{ {
type: '消防设备', type: '消防设备',
name: '烟感', name: '烟感',
num: 'set1', num: 'guan2',
value: 50, value: 50,
id: "echartDiv3" id: "echartDiv3"
} }
@ -144,7 +144,7 @@ const data = reactive({
{ {
type: '生产设备', type: '生产设备',
name: '立仓', name: '立仓',
num: 'set1', num: 'guan2',
value: 30, value: 30,
id: "echartDiv0" id: "echartDiv0"
}, },
@ -158,14 +158,14 @@ const data = reactive({
{ {
type: '安防设备', type: '安防设备',
name: '摄像头', name: '摄像头',
num: 'set1', num: 'guan2',
value: 100, value: 100,
id: "echartDiv2" id: "echartDiv2"
}, },
{ {
type: '消防设备', type: '消防设备',
name: '烟感', name: '烟感',
num: 'set1', num: 'guan2',
value: 50, value: 50,
id: "echartDiv3" id: "echartDiv3"
} }

View File

@ -45,7 +45,7 @@ const data = reactive({
{ {
label: '立仓', label: '立仓',
id: '0-1', id: '0-1',
clickName: 'set1', clickName: 'guan2',
info: { info: {
name: '立仓', name: '立仓',
type: '生产设备', type: '生产设备',
@ -61,7 +61,7 @@ const data = reactive({
{ {
label: '过滤槽', label: '过滤槽',
id: '0-2', id: '0-2',
clickName: 'set6', clickName: 'guan1',
info: { info: {
name: '过滤槽', name: '过滤槽',
type: '生产设备', type: '生产设备',
@ -76,7 +76,7 @@ const data = reactive({
{ {
label: '设备二', label: '设备二',
id: '0-3', id: '0-3',
clickName: 'set2', clickName: 'guan3',
info: { info: {
name: '设备二', name: '设备二',
type: '生产设备', type: '生产设备',
@ -90,7 +90,7 @@ const data = reactive({
{ {
label: '设备三', label: '设备三',
id: '0-4', id: '0-4',
clickName: 'set3', clickName: 'guan4',
info: { info: {
name: '设备三', name: '设备三',
type: '空调设备', type: '空调设备',
@ -104,7 +104,7 @@ const data = reactive({
{ {
label: '设备四', label: '设备四',
id: '0-5', id: '0-5',
clickName: 'set4', clickName: 'guan5',
info: { info: {
name: '设备四', name: '设备四',
type: '安防设备', type: '安防设备',
@ -118,7 +118,7 @@ const data = reactive({
{ {
label: '设备五', label: '设备五',
id: '0-6', id: '0-6',
clickName: 'set5', clickName: 'guan6',
info: { info: {
name: '设备五', name: '设备五',
type: '安防设备', type: '安防设备',
@ -132,7 +132,7 @@ const data = reactive({
{ {
label: '设备七', label: '设备七',
id: '0-7', id: '0-7',
clickName: 'set7', clickName: 'guan7',
info: { info: {
name: '设备七', name: '设备七',
type: '安防设备', type: '安防设备',
@ -146,7 +146,7 @@ const data = reactive({
{ {
label: '设备八', label: '设备八',
id: '0-8', id: '0-8',
clickName: 'set8', clickName: 'guan8',
info: { info: {
name: '设备八', name: '设备八',
type: '安防设备', type: '安防设备',

View File

@ -239,7 +239,7 @@ let selectedObject = null;
let selectedMaterial = null; let selectedMaterial = null;
// //
const enableGroup = [ const enableGroup = [
'set1', 'guan2',
'set2', 'set2',
'set3', 'set3',
'set4', 'set4',

View File

@ -219,19 +219,11 @@ window.addEventListener("resize", onWindowResize, false);
// //
const enableGroup = [ const enableGroup = [
'set1',
'set2',
'set3',
'set4',
'set5',
'set6',
'set7',
'set8',
'yuanliao_room', 'yuanliao_room',
'tanghua_room', 'tanghua_room',
'touliao_room', 'touliao_room',
'guan1', 'guan1',
'guan2', 'guan2',//
'guan3', 'guan3',
'guan4', 'guan4',
'guan5', 'guan5',
@ -685,7 +677,7 @@ const check = () => {
} }
} }
.laber_name1 { .laber_details {
width: 100px; width: 100px;
height: 50px; height: 50px;
border-radius: 5px; border-radius: 5px;

View File

@ -97,10 +97,8 @@ const onProgress = () => {
const handleRightClick = (obj) => { const handleRightClick = (obj) => {
console.log(1,obj.name); console.log(1,obj.name);
if(obj.name == 'set1' || obj.name == 'set6') {
bimStore().setDeviceNum(obj.name); bimStore().setDeviceNum(obj.name);
dialogVisible2.value = true; dialogVisible2.value = true;
}
// viewDetail(); // viewDetail();
} }