详情优化
							parent
							
								
									245208584c
								
							
						
					
					
						commit
						7bf7b2878e
					
				| 
		 Before Width: | Height: | Size: 308 KiB After Width: | Height: | Size: 308 KiB  | 
| 
						 | 
				
			
			@ -11,15 +11,12 @@
 | 
			
		|||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="right-div">
 | 
			
		||||
            <img :src="licang" alt="" width="400" v-if="infoList.imgUrl == 'licang'">
 | 
			
		||||
            <img :src="guolvcao" alt="" width="400" v-if="infoList.imgUrl == 'guolvcao'">
 | 
			
		||||
            <img :src="getAssetsFile(infoList.imgUrl)" alt="" width="400">
 | 
			
		||||
            <span>设备图片</span>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup>
 | 
			
		||||
import licang from '@/assets/images/licang.jpg';
 | 
			
		||||
import guolvcao from '@/assets/images/cao.jpg';
 | 
			
		||||
const props = defineProps({
 | 
			
		||||
    infoList: {
 | 
			
		||||
        default: {},
 | 
			
		||||
| 
						 | 
				
			
			@ -28,6 +25,11 @@ const props = defineProps({
 | 
			
		|||
})
 | 
			
		||||
 | 
			
		||||
const listData = props.infoList.detail;
 | 
			
		||||
 | 
			
		||||
const getAssetsFile = (imgUrl) => {
 | 
			
		||||
    console.log(123, imgUrl);
 | 
			
		||||
    return new URL('../../../../assets/images/'+ imgUrl + '.jpg', import.meta.url).href
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.baseInfo-div {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,7 +17,7 @@ import RealInfo from './RealInfo.vue';
 | 
			
		|||
import HistoryInfo from './HistoryInfo.vue';
 | 
			
		||||
import { ElMessage } from 'element-plus';
 | 
			
		||||
const deviceData = {
 | 
			
		||||
    'set1': {
 | 
			
		||||
    'guan2': {
 | 
			
		||||
        name: '立仓',
 | 
			
		||||
        imgUrl: 'licang',
 | 
			
		||||
        detail: [
 | 
			
		||||
| 
						 | 
				
			
			@ -75,7 +75,7 @@ const deviceData = {
 | 
			
		|||
            },
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    'set6': {
 | 
			
		||||
    'guan1': {
 | 
			
		||||
        name: '过滤槽',
 | 
			
		||||
        imgUrl: 'guolvcao',
 | 
			
		||||
        detail: [
 | 
			
		||||
| 
						 | 
				
			
			@ -149,7 +149,65 @@ const data = reactive({
 | 
			
		|||
});
 | 
			
		||||
const { detailData } = toRefs(data);
 | 
			
		||||
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) => {
 | 
			
		||||
    // if(activeName !== '0' && activeName !== '1' && activeName !=='2') {
 | 
			
		||||
    //     ElMessage.warning('暂未开发');
 | 
			
		||||
| 
						 | 
				
			
			@ -163,13 +221,14 @@ const handleClick = (tab, event) => {
 | 
			
		|||
.detail-div {
 | 
			
		||||
    height: 700px;
 | 
			
		||||
    color: #fff;
 | 
			
		||||
 | 
			
		||||
    .title-div {
 | 
			
		||||
        height: 50px;
 | 
			
		||||
        line-height: 50px;
 | 
			
		||||
        width: 100%;
 | 
			
		||||
        border: 1px solid #2E6099;
 | 
			
		||||
        padding: 0 10px;
 | 
			
		||||
        margin-bottom:5px;
 | 
			
		||||
        margin-bottom: 5px;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
| 
						 | 
				
			
			@ -59,7 +59,7 @@ const data = reactive({
 | 
			
		|||
                {
 | 
			
		||||
                    type: '生产设备',
 | 
			
		||||
                    name: '立仓',
 | 
			
		||||
                    num: 'set1',
 | 
			
		||||
                    num: 'guan2',
 | 
			
		||||
                    value: 45,
 | 
			
		||||
                    id: "echartDiv0"
 | 
			
		||||
                },
 | 
			
		||||
| 
						 | 
				
			
			@ -73,14 +73,14 @@ const data = reactive({
 | 
			
		|||
                {
 | 
			
		||||
                    type: '安防设备',
 | 
			
		||||
                    name: '摄像头',
 | 
			
		||||
                    num: 'set1',
 | 
			
		||||
                    num: 'guan2',
 | 
			
		||||
                    value: 180,
 | 
			
		||||
                    id: "echartDiv2"
 | 
			
		||||
                },
 | 
			
		||||
                {
 | 
			
		||||
                    type: '消防设备',
 | 
			
		||||
                    name: '烟感',
 | 
			
		||||
                    num: 'set1',
 | 
			
		||||
                    num: 'guan2',
 | 
			
		||||
                    value: 100,
 | 
			
		||||
                    id: "echartDiv3"
 | 
			
		||||
                }
 | 
			
		||||
| 
						 | 
				
			
			@ -101,7 +101,7 @@ const data = reactive({
 | 
			
		|||
                        {
 | 
			
		||||
                            type: '生产设备',
 | 
			
		||||
                            name: '立仓',
 | 
			
		||||
                            num: 'set1',
 | 
			
		||||
                            num: 'guan2',
 | 
			
		||||
                            value: 15,
 | 
			
		||||
                            id: "echartDiv0"
 | 
			
		||||
                        },
 | 
			
		||||
| 
						 | 
				
			
			@ -115,14 +115,14 @@ const data = reactive({
 | 
			
		|||
                        {
 | 
			
		||||
                            type: '安防设备',
 | 
			
		||||
                            name: '摄像头',
 | 
			
		||||
                            num: 'set1',
 | 
			
		||||
                            num: 'guan2',
 | 
			
		||||
                            value: 80,
 | 
			
		||||
                            id: "echartDiv2"
 | 
			
		||||
                        },
 | 
			
		||||
                        {
 | 
			
		||||
                            type: '消防设备',
 | 
			
		||||
                            name: '烟感',
 | 
			
		||||
                            num: 'set1',
 | 
			
		||||
                            num: 'guan2',
 | 
			
		||||
                            value: 50,
 | 
			
		||||
                            id: "echartDiv3"
 | 
			
		||||
                        }
 | 
			
		||||
| 
						 | 
				
			
			@ -144,7 +144,7 @@ const data = reactive({
 | 
			
		|||
                        {
 | 
			
		||||
                            type: '生产设备',
 | 
			
		||||
                            name: '立仓',
 | 
			
		||||
                            num: 'set1',
 | 
			
		||||
                            num: 'guan2',
 | 
			
		||||
                            value: 30,
 | 
			
		||||
                            id: "echartDiv0"
 | 
			
		||||
                        },
 | 
			
		||||
| 
						 | 
				
			
			@ -158,14 +158,14 @@ const data = reactive({
 | 
			
		|||
                        {
 | 
			
		||||
                            type: '安防设备',
 | 
			
		||||
                            name: '摄像头',
 | 
			
		||||
                            num: 'set1',
 | 
			
		||||
                            num: 'guan2',
 | 
			
		||||
                            value: 100,
 | 
			
		||||
                            id: "echartDiv2"
 | 
			
		||||
                        },
 | 
			
		||||
                        {
 | 
			
		||||
                            type: '消防设备',
 | 
			
		||||
                            name: '烟感',
 | 
			
		||||
                            num: 'set1',
 | 
			
		||||
                            num: 'guan2',
 | 
			
		||||
                            value: 50,
 | 
			
		||||
                            id: "echartDiv3"
 | 
			
		||||
                        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -45,7 +45,7 @@ const data = reactive({
 | 
			
		|||
                {
 | 
			
		||||
                    label: '立仓',
 | 
			
		||||
                    id: '0-1',
 | 
			
		||||
                    clickName: 'set1',
 | 
			
		||||
                    clickName: 'guan2',
 | 
			
		||||
                    info: {
 | 
			
		||||
                        name: '立仓',
 | 
			
		||||
                        type: '生产设备',
 | 
			
		||||
| 
						 | 
				
			
			@ -61,7 +61,7 @@ const data = reactive({
 | 
			
		|||
                {
 | 
			
		||||
                    label: '过滤槽',
 | 
			
		||||
                    id: '0-2',
 | 
			
		||||
                    clickName: 'set6',
 | 
			
		||||
                    clickName: 'guan1',
 | 
			
		||||
                    info: {
 | 
			
		||||
                        name: '过滤槽',
 | 
			
		||||
                        type: '生产设备',
 | 
			
		||||
| 
						 | 
				
			
			@ -76,7 +76,7 @@ const data = reactive({
 | 
			
		|||
                {
 | 
			
		||||
                    label: '设备二',
 | 
			
		||||
                    id: '0-3',
 | 
			
		||||
                    clickName: 'set2',
 | 
			
		||||
                    clickName: 'guan3',
 | 
			
		||||
                    info: {
 | 
			
		||||
                        name: '设备二',
 | 
			
		||||
                        type: '生产设备',
 | 
			
		||||
| 
						 | 
				
			
			@ -90,7 +90,7 @@ const data = reactive({
 | 
			
		|||
                {
 | 
			
		||||
                    label: '设备三',
 | 
			
		||||
                    id: '0-4',
 | 
			
		||||
                    clickName: 'set3',
 | 
			
		||||
                    clickName: 'guan4',
 | 
			
		||||
                    info: {
 | 
			
		||||
                        name: '设备三',
 | 
			
		||||
                        type: '空调设备',
 | 
			
		||||
| 
						 | 
				
			
			@ -104,7 +104,7 @@ const data = reactive({
 | 
			
		|||
                {
 | 
			
		||||
                    label: '设备四',
 | 
			
		||||
                    id: '0-5',
 | 
			
		||||
                    clickName: 'set4',
 | 
			
		||||
                    clickName: 'guan5',
 | 
			
		||||
                    info: {
 | 
			
		||||
                        name: '设备四',
 | 
			
		||||
                        type: '安防设备',
 | 
			
		||||
| 
						 | 
				
			
			@ -118,7 +118,7 @@ const data = reactive({
 | 
			
		|||
                {
 | 
			
		||||
                    label: '设备五',
 | 
			
		||||
                    id: '0-6',
 | 
			
		||||
                    clickName: 'set5',
 | 
			
		||||
                    clickName: 'guan6',
 | 
			
		||||
                    info: {
 | 
			
		||||
                        name: '设备五',
 | 
			
		||||
                        type: '安防设备',
 | 
			
		||||
| 
						 | 
				
			
			@ -132,7 +132,7 @@ const data = reactive({
 | 
			
		|||
                {
 | 
			
		||||
                    label: '设备七',
 | 
			
		||||
                    id: '0-7',
 | 
			
		||||
                    clickName: 'set7',
 | 
			
		||||
                    clickName: 'guan7',
 | 
			
		||||
                    info: {
 | 
			
		||||
                        name: '设备七',
 | 
			
		||||
                        type: '安防设备',
 | 
			
		||||
| 
						 | 
				
			
			@ -146,7 +146,7 @@ const data = reactive({
 | 
			
		|||
                {
 | 
			
		||||
                    label: '设备八',
 | 
			
		||||
                    id: '0-8',
 | 
			
		||||
                    clickName: 'set8',
 | 
			
		||||
                    clickName: 'guan8',
 | 
			
		||||
                    info: {
 | 
			
		||||
                        name: '设备八',
 | 
			
		||||
                        type: '安防设备',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -239,7 +239,7 @@ let selectedObject = null;
 | 
			
		|||
let selectedMaterial = null;
 | 
			
		||||
// 能选中的组
 | 
			
		||||
const enableGroup = [
 | 
			
		||||
    'set1',
 | 
			
		||||
    'guan2',
 | 
			
		||||
    'set2',
 | 
			
		||||
    'set3',
 | 
			
		||||
    'set4',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -219,19 +219,11 @@ window.addEventListener("resize", onWindowResize, false);
 | 
			
		|||
 | 
			
		||||
// 能选中的组
 | 
			
		||||
const enableGroup = [
 | 
			
		||||
    'set1',
 | 
			
		||||
    'set2',
 | 
			
		||||
    'set3',
 | 
			
		||||
    'set4',
 | 
			
		||||
    'set5',
 | 
			
		||||
    'set6',
 | 
			
		||||
    'set7',
 | 
			
		||||
    'set8',
 | 
			
		||||
    'yuanliao_room',
 | 
			
		||||
    'tanghua_room',
 | 
			
		||||
    'touliao_room',
 | 
			
		||||
    'guan1',
 | 
			
		||||
    'guan2',
 | 
			
		||||
    'guan2',// 立仓
 | 
			
		||||
    'guan3',
 | 
			
		||||
    'guan4',
 | 
			
		||||
    'guan5',
 | 
			
		||||
| 
						 | 
				
			
			@ -685,7 +677,7 @@ const check = () => {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.laber_name1 {
 | 
			
		||||
.laber_details {
 | 
			
		||||
    width: 100px;
 | 
			
		||||
    height: 50px;
 | 
			
		||||
    border-radius: 5px;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -97,10 +97,8 @@ const onProgress = () => {
 | 
			
		|||
 | 
			
		||||
const handleRightClick = (obj) => {
 | 
			
		||||
  console.log(1,obj.name);
 | 
			
		||||
  if(obj.name == 'set1' || obj.name == 'set6') {
 | 
			
		||||
    bimStore().setDeviceNum(obj.name);
 | 
			
		||||
    dialogVisible2.value = true;
 | 
			
		||||
  }
 | 
			
		||||
  bimStore().setDeviceNum(obj.name);
 | 
			
		||||
  dialogVisible2.value = true;
 | 
			
		||||
  
 | 
			
		||||
  // viewDetail();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue