Lvtianfang
许宏杰 1 year ago
parent 71aeb10cbc
commit 09a187c084

@ -1,310 +0,0 @@
<!--
* @Author: your name
* @Date: 2021-06-03 10:58:48
* @LastEditTime: 2021-09-08 14:44:41
* @LastEditors: 付刚
* @Description: In User Settings Edit
* @FilePath: \MuduAPP\src\views\Leader\enterpriseInfo\gardenDataPage.vue
-->
<template>
<div class="main-page">
<!-- -->
<van-nav-bar
title="木渎金桥工业园"
left-text
left-arrow
fixed
:style="{ paddingTop: config.barHeight + 'px' }"
@click-left="onBack()"
/>
<!-- 主体 -->
<div
class="conter"
:style="{
marginTop: 'calc(0.733rem + ' + config.barHeight + 'px)',
}"
>
<van-tabs type="card" v-model="active">
<van-tab title="工业区详情">
<ul>
<li>
<div>工业园名称</div>
<div>{{ parkList.name }}</div>
</li>
<li>
<div>归属地</div>
<div>{{ parkList.locationName }}</div>
</li>
<li>
<div>园区负责人</div>
<div>{{ parkList.personInCharge }}</div>
</li>
<li>
<div>负责人电话</div>
<div>{{ parkList.personInChargePhone }}</div>
</li>
<li>
<div>园区地址</div>
<div>{{ parkList.address }}</div>
</li>
<li>
<div>建成时间</div>
<div>{{ parkList.buildDateTime }}</div>
</li>
<li>
<div>占地面积</div>
<div>{{ parkList.floorSpace }}平方米</div>
</li>
<li>
<div>厂房总面积</div>
<div>{{ parkList.factorySpace }}平方米</div>
</li>
<li>
<div>出租面积</div>
<div>{{ parkList.rentSpace }}平方米</div>
</li>
<li>
<div>自用面积</div>
<div>{{ parkList.selfUseSpace }}平方米</div>
</li>
<li>
<div>楼幢数量</div>
<div>{{ parkList.buildCount }}</div>
</li>
<li>
<div>园区总人数</div>
<div>{{ parkList.personCountSum }}</div>
</li>
<li>
<div>入驻企业数量</div>
<div>{{ parkList.enterpriseCountSum }}</div>
</li>
<li>
<div>工业园性质</div>
<div>{{ parkList.typeName }}</div>
</li>
<li>
<div>运营状态</div>
<div>{{ parkList.status | filterParkState }}</div>
</li>
</ul>
<!-- 面积图 -->
<div class="map-data">
<div class="map-titel">工业园平面图:</div>
<div class="map-poto">
<div class="poto">
<img :src="showImages[0]" alt="" @click="onShowImage()" />
</div>
</div>
</div>
<div class="map-info">
<div class="map-titel">信息介绍:</div>
<div class="info-text">
{{ parkList.description }}
</div>
</div>
</van-tab>
<!-- 入驻企业 -->
<van-tab title="入驻企业">
<van-cell
is-link
v-for="item in enterprise"
:key="item.certificateCode"
@click="onInfoClcik(item)"
>{{ item.name }}</van-cell
>
</van-tab>
</van-tabs>
</div>
</div>
</template>
<script>
import { ImagePreview } from 'vant'
import xApi from '../../../api/xApi'
export default {
data() {
return {
active: null,
parkList: {},
parkImage: '',
enterprise: [],
showImages: [],
}
},
filters: {
//
filterParkState(target) {
if (target == 1) {
return '运营中'
}
},
},
computed: {
fiterImage() {
//404
if (this.parkImage) {
return process.env.VUE_APP_FILE_HOST + this.parkImage
} else {
return 'https://img01.yzcdn.cn/vant/cat.jpeg'
}
},
},
methods: {
//id
getIdInfo(id) {
xApi.getIdParkinfo(id).then((res) => {
this.parkList = res.data
// console.log(this.parkList)
this.getShowIamges(this.parkList.attRelationMapID)
})
},
getShowIamges(images) {
//
if (images == null) {
this.showImages = 'https://img01.yzcdn.cn/vant/cat.jpeg'
return
}
xApi.getimages(images).then((res) => {
// console.log(res, 'ss')
res.data.forEach((item) => {
this.showImages.push(process.env.VUE_APP_FILE_HOST + item.src)
})
// console.log(this.showImages)
})
},
onShowImage() {
//
ImagePreview({
images: this.showImages,
closeable: true, //
})
},
//id
getEnterpriseList(data) {
xApi.enterpriselist(data).then((res) => {
this.enterprise = res.data
// console.log('', this.enterprise)
})
},
onBack() {
let HISTORY_ACTIVE = JSON.parse(localStorage.getItem('HISTORY_ACTIVE'))
if (HISTORY_ACTIVE) {
localStorage.removeItem('HISTORY_ACTIVE')
let HISTORY_ACTIVE = [0]
localStorage.setItem('HISTORY_ACTIVE', JSON.stringify(HISTORY_ACTIVE))
this.$router.back()
}
if (!HISTORY_ACTIVE) {
let HISTORY_ACTIVE = [0]
localStorage.setItem('HISTORY_ACTIVE', JSON.stringify(HISTORY_ACTIVE))
this.$router.back()
}
},
onInfoClcik(item) {
//
let HISTORY_ACTIVE = JSON.parse(localStorage.getItem('HISTORY_ACTIVE'))
if (HISTORY_ACTIVE) {
localStorage.removeItem('HISTORY_ACTIVE')
let HISTORY_ACTIVE = [0]
localStorage.setItem('HISTORY_ACTIVE', JSON.stringify(HISTORY_ACTIVE))
}
if (!HISTORY_ACTIVE) {
let HISTORY_ACTIVE = [0]
localStorage.setItem('HISTORY_ACTIVE', JSON.stringify(HISTORY_ACTIVE))
}
this.$router.push({ path: `/leader/company/${item.id}/0` })
},
},
mounted() {
let id = this.$route.params.id
this.getEnterpriseList(id)
this.getIdInfo(id)
let active = JSON.parse(localStorage.getItem('HISTORY_ACTIVE') || [])
this.active = active[0]
},
}
</script>
<style lang="scss" scoped>
ul {
margin: 0;
padding: 0;
}
ul li {
height: 0.417rem;
display: flex;
}
ul li:nth-child(1) {
padding-top: 0.308rem;
}
ul li:nth-child(n + 2) {
padding-top: 0.1rem;
}
ul li div:nth-child(1) {
width: 1.392rem;
height: 0.417rem;
line-height: 0.417rem;
color: #999999;
font-size: 0.217rem;
font-weight: 400;
margin-left: 0.167rem;
text-align: left;
/* border: 1px solid; */
}
ul li div:nth-child(2) {
width: 4.233rem;
background: #f6f6f6;
border-radius: 0rem;
height: 0.417rem;
margin-left: 0.367rem;
line-height: 0.417rem;
text-align: left;
padding-left: 0.1rem;
font-size: 0.217rem;
color: #333333;
margin-right: 0.182rem;
}
.map-data {
/* border: 1px solid; */
}
.map-titel {
height: 0.208rem;
line-height: 0.208rem;
font-size: 0.217rem;
font-weight: bold;
color: #2487ff;
text-align: left;
margin-top: 0.28rem;
margin-left: 0.167rem;
margin-bottom: 0.242rem;
}
.map-poto {
/* background: #F2F2F2; */
padding: 0 0.708rem;
}
.poto {
width: 4.833rem;
height: 3.45rem;
background: #f2f2f2;
padding: 0.083rem;
}
.poto img {
display: block;
height: 100%;
width: 100%;
}
.info-text {
padding: 0.167rem;
padding-top: 0;
font-size: 0.217rem;
font-weight: bold;
color: #999999;
text-align: left;
}
</style>

@ -1,343 +0,0 @@
<!--
* @Author: your name
* @Date: 2021-07-06 14:34:03
* @LastEditTime: 2021-09-07 17:47:27
* @LastEditors: 许宏杰
* @Description: In User Settings Edit
* @FilePath: \MuduAPP\src\views\Leader\enterpriseInfo\message.vue
-->
<template>
<div id="page">
<van-nav-bar title="消息" fixed :style="{ paddingTop: config.barHeight + 'px' }">
</van-nav-bar>
<div
class="form-center"
:style="{
marginTop: 'calc(0.733rem + ' + config.barHeight + 'px)',
}"
>
<!-- 消息列表 -->
<div class="msg_list">
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<div
class="list-text"
v-for="item in list"
:key="item.id"
@click="msgInfo(item)"
>
<!-- -->
<div class="top-text">
<div class="biaoji" v-show="item.isNew == 0 ? false : true"></div>
<div
class="biaoji2"
v-show="item.isNew == 0 ? true : false"
></div>
<div class="img_bg"></div>
<div class="enterName">
{{ item.enterpriseName ? item.enterpriseName : '暂无' }}
</div>
</div>
<!-- -->
<div class="conter-text">
<div class="conter-main">{{ item.message }}</div>
<div class="conter-data">{{ item.postDateTime }}</div>
</div>
<!-- -->
<div class="botton-text">
<div
class="state"
:style="{ color: item.isNew == 0 ? '#CCCCCC' : '#EE1221' }"
>
{{ item.isNew == 0 ? '已读' : '未读' }}
</div>
<div class="info">
<div class="btn">查看详情</div>
</div>
</div>
</div>
</van-list>
</div>
<!-- 底边导航 -->
<van-tabbar route active-color="#2487FF">
<van-tabbar-item replace to="/leader/LeaderIndex">
<span>首页</span>
<template #icon="props">
<div :class="props.active ? 'icon11' : 'icon12'" />
</template>
</van-tabbar-item>
<van-tabbar-item replace to="/leader/SafeHome">
<span>安全之家</span>
<template #icon="props">
<div :class="props.active ? 'icon21' : 'icon22'" />
</template>
</van-tabbar-item>
<van-tabbar-item
replace
to="/leader/enterpriseInfo/message"
:badge="weiNum"
>
<span>消息</span>
<template #icon="props">
<div :class="props.active ? 'icon31' : 'icon32'" />
</template>
</van-tabbar-item>
<van-tabbar-item replace to="/leader/my">
<span>我的</span>
<template #icon="props">
<div :class="props.active ? 'icon41' : 'icon42'" />
</template>
</van-tabbar-item>
</van-tabbar>
</div>
</div>
</template>
<script>
import xApi from '../../../api/xApi'
export default {
data() {
return {
colors: false,
list: [],
loading: false,
finished: false,
page: 1,
limit: 10,
total: 0,
weiNum: null,
}
},
mounted() {
// this.getList()
},
methods: {
shows() {
let params = {
limit: this.limit,
page: this.page,
isNew: 1,
orderBy: 'isNew desc,postdatetime desc',
}
xApi.getmsgreceivelist(params).then((res) => {
this.list.push(...res.data)
this.getconter()
this.total = res.count
this.loading = false
//
if (this.list.length >= this.total) {
this.finished = true
}
this.page++
this.weiNum = res.count
if (this.weiNum == 0) {
this.weiNum = null
}
})
},
//
onLoad() {
// debugger
setTimeout(() => {
this.shows()
}, 500)
},
msgInfo(item) {
//
//
if (item.isNew == 1) {
this.postState(item)
} else {
this.$router.push({ path: `/safety/ordinfo/${item.relationID}` })
}
},
//
getconter() {
let params = {
keyvalue: 'msgtype',
}
xApi.getdictionarydetaillist(params).then((res) => {
this.list.filter((item) => {
//
for (var i = 0; i < res.data.length; i++) {
if (item.sentType.toString() == res.data[i].detailValue) {
item.message = res.data[i].description
}
}
})
})
},
//
postState(item) {
xApi.readmsgreceive(item.id).then((res) => {
if (res.code == 200) {
this.$router.push({ path: `/safety/ordinfo/${item.relationID}` })
}
})
},
},
}
</script>
<style lang="scss" scoped>
.msg_list {
padding-top: 0.3rem;
}
.icon11 {
height: 0.3rem;
width: 0.3rem;
background: url('../../../assets/image/tow-mudu/icon_1_s@2x.png');
background-size: 100% 100%;
}
.icon12 {
height: 0.3rem;
width: 0.3rem;
background: url('../../../assets/image/tow-mudu/icon_1_n@2x.png');
background-size: 100% 100%;
}
.icon21 {
height: 0.3rem;
width: 0.3rem;
background: url('../../../assets/image/tow-mudu/icon_2_s@2x.png');
background-size: 100% 100%;
}
.icon22 {
height: 0.3rem;
width: 0.3rem;
background: url('../../../assets/image/tow-mudu/icon_2_n@2x.png');
background-size: 100% 100%;
}
.icon31 {
height: 0.3rem;
width: 0.3rem;
background: url('../../../assets/image/tow-mudu/icon_3_s@2x.png');
background-size: 100% 100%;
}
.icon32 {
height: 0.3rem;
width: 0.3rem;
background: url('../../../assets/image/tow-mudu/icon_3_n@2x.png');
background-size: 100% 100%;
}
.icon41 {
height: 0.3rem;
width: 0.3rem;
background: url('../../../assets/image/tow-mudu/icon_4_s@2x.png');
background-size: 100% 100%;
}
.icon42 {
height: 0.3rem;
width: 0.3rem;
background: url('../../../assets/image/tow-mudu/icon_4_n@2x.png');
background-size: 100% 100%;
}
.list-text {
margin: auto;
width: 5.617rem;
background: #ffffff;
box-shadow: 0rem 0.1rem 0.2rem 0rem rgba(138, 152, 191, 0.08);
border-radius: 0.2rem;
margin-bottom: 0.242rem;
}
.top-text {
padding-top: 0.383rem;
display: flex;
align-items: center;
}
.biaoji {
margin-left: 0.125rem;
width: 0.125rem;
height: 0.125rem;
background: #f15b62;
border-radius: 50%;
}
.biaoji2 {
margin-left: 0.125rem;
width: 0.125rem;
height: 0.125rem;
}
.img_bg {
margin-left: 0.108rem;
margin-right: 0.167rem;
height: 0.375rem;
width: 0.375rem;
background: url('../../../assets/image/msg1.png');
background-size: 100% 100%;
}
.enterName {
font-size: 0.283rem;
font-family: FZLanTingHei-DB-GBK;
font-weight: 400;
color: #31324e;
}
.conter-text {
padding-left: 0.383rem;
text-align: left;
margin-top: 0.342rem;
}
.conter-main {
font-size: 0.253rem;
font-weight: 400;
color: #333333;
margin-bottom: 0.167rem;
// display: -webkit-box;//...
// -webkit-box-orient: vertical;
// -webkit-line-clamp: 1;
// overflow: hidden;
}
.conter-data {
font-size: 0.2rem;
font-weight: 400;
color: #808080;
}
.botton-text {
margin-top: 0.258rem;
border-top: 1px solid #e6e6e6;
display: flex;
}
.botton-text > div {
flex: 1;
}
.state {
color: #ee1221;
text-align: left;
font-size: 0.233rem;
font-weight: 400;
padding-left: 0.367rem;
padding-top: 0.208rem;
padding-bottom: 0.208rem;
}
.state2 {
color: #cccccc;
text-align: left;
font-size: 0.233rem;
font-weight: 400;
padding-left: 0.367rem;
padding-top: 0.208rem;
padding-bottom: 0.208rem;
}
.info {
padding-top: 0.208rem;
padding-bottom: 0.208rem;
display: flex;
flex-direction: row-reverse;
}
.btn {
width: 1.308rem;
height: 0.458rem;
background: #e5f5fb;
border: 0px solid #5ec0e9;
border-radius: 0.2rem;
line-height: 0.458rem;
font-size: 0.2rem;
font-weight: 400;
color: #009cde;
margin-right: 0.258rem;
}
</style>
Loading…
Cancel
Save