22 changed files with 576 additions and 56 deletions
@ -0,0 +1,26 @@
|
||||
import { |
||||
getAccessToken |
||||
} from '@/utils/auth' |
||||
import { |
||||
toast |
||||
} from '@/utils/common.js' |
||||
|
||||
export function getQrcode(data) { |
||||
return new Promise((resolve, reject) => { |
||||
uni.request({ |
||||
url: `https://api.weixin.qq.com/wxa/getwxacode?access_token=${getAccessToken()}`, |
||||
header: { |
||||
'content-type': 'application/x-www-form-urlencoded' |
||||
}, |
||||
data, |
||||
method: 'POST', |
||||
dataType: 'json', |
||||
success: (res) => { |
||||
resolve(res.data) |
||||
}, |
||||
fail: (err) => { |
||||
reject(toast(err.errMsg)) |
||||
} |
||||
}) |
||||
}) |
||||
} |
@ -1,13 +1,18 @@
|
||||
<template> |
||||
<cs-page :selected="2" isTab></cs-page> |
||||
<cs-page :selected="2" isTab title="智慧生态"></cs-page> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
data() { |
||||
return {} |
||||
} |
||||
data() { |
||||
return {} |
||||
}, |
||||
onShow() { |
||||
uni.navigateTo({ |
||||
url: '/sub/chat/index' |
||||
}) |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss"></style> |
||||
<style lang="scss"></style> |
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.6 KiB |
@ -0,0 +1,29 @@
|
||||
<template> |
||||
<view class="chat-container"> |
||||
<web-view :webview-styles="webviewStyles" src="http://192.168.2.5:28180/ui/chat/aa39d6777becd0e1"></web-view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
data() { |
||||
return {} |
||||
}, |
||||
onLoad() { |
||||
uni.authorize({ |
||||
scope: 'scope.record', |
||||
success() { |
||||
uni.getRecorderManager() |
||||
} |
||||
}) |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.chat-container { |
||||
height: 100vh; |
||||
width: 100vw; |
||||
background: linear-gradient(180deg, #02815b 0%, #114636 100%); |
||||
} |
||||
</style> |
@ -0,0 +1,142 @@
|
||||
<template> |
||||
<cs-page isCustom> |
||||
<template #header> |
||||
<view class="wd-flex wd-flex-row wd-flex-center" style="position: relative" @click="goBack"> |
||||
<view class="icon-box"> |
||||
<u-icon name="arrow-left" size="12"></u-icon> |
||||
</view> |
||||
<view class="wd-font-800 wd-text-16">企业档案</view> |
||||
</view> |
||||
</template> |
||||
<view class="detail-container"> |
||||
<view class="box detail"> |
||||
<view> |
||||
<text class="wd-font-800">{{ detail.enterprisesName }}</text> |
||||
</view> |
||||
<view class="address">企业地址 {{ detail.address }}</view> |
||||
<text>{{ detail.introduction }}</text> |
||||
<view class="images-box"> |
||||
<image v-for="(src, index) in detail.files" :key="index" :src="src" mode="widthFix" class="image"></image> |
||||
</view> |
||||
<view> |
||||
<text class="address" style="margin-right: 8px">环保负责人</text> |
||||
<text style="margin-right: 8px">{{ detail.enterprisesName }}</text> |
||||
<text style="text-decoration: underline">{{ detail.environmentalContactPhone }}</text> |
||||
</view> |
||||
<view> |
||||
<text class="address" style="margin-right: 8px">成立时间</text> |
||||
<text>{{ $util.formatDate(detail.establishmentDate, 'YYYY年M月D日') }}</text> |
||||
</view> |
||||
<view class="prove-list"> |
||||
<view class="prove" v-for="prove in detail.qualificationList" :key="prove.id"> |
||||
<view> |
||||
{{ $dict.echoDicValue(dictMap.enterprise_qua, prove.qualificationName.toString()) }} |
||||
</view> |
||||
<view class=""> |
||||
{{ $util.formatDate(prove.handleDate, 'YYYY年M月D日') }}- |
||||
{{ $util.formatDate(prove.expiryDate, 'YYYY年M月D日') }} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<!-- |
||||
<view class="box"> |
||||
<view class="wd-font-800">资质许可</view> |
||||
|
||||
</view> --> |
||||
|
||||
<view class="box"> |
||||
<view class="wd-font-800">实时监控</view> |
||||
</view> |
||||
|
||||
<view class="box"> |
||||
<view class="wd-font-800">检查记录</view> |
||||
</view> |
||||
</view> |
||||
</cs-page> |
||||
</template> |
||||
|
||||
<script> |
||||
import { getEnterPrise } from '@/api/enterprise/index.js' |
||||
import { getDictBatchByType } from '@/api/system/dict.js' |
||||
export default { |
||||
data() { |
||||
return { |
||||
detail: { |
||||
id: '' |
||||
}, |
||||
dictMap: {} |
||||
} |
||||
}, |
||||
onLoad(res) { |
||||
if (res.id) { |
||||
this.detail.id = res.id |
||||
} |
||||
this.getDict() |
||||
this.init() |
||||
}, |
||||
methods: { |
||||
/** |
||||
* 获取字典 |
||||
*/ |
||||
async getDict() { |
||||
const dict = await getDictBatchByType({ type: ['enterprises_type', 'enterprise_qua'].join(',') }) |
||||
this.dictMap = { |
||||
...dict.data |
||||
} |
||||
}, |
||||
async init() { |
||||
const res = await getEnterPrise(this.detail.id) |
||||
this.detail = res.data |
||||
}, |
||||
goBack() { |
||||
uni.navigateBack() |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.detail-container { |
||||
padding: 12px; |
||||
.box { |
||||
margin-bottom: 12px; |
||||
background-color: #fff; |
||||
border-radius: $cs-border-radius; |
||||
padding: 16px; |
||||
} |
||||
.detail { |
||||
display: flex; |
||||
flex-flow: column nowrap; |
||||
gap: 16px; |
||||
.address { |
||||
color: $uni-text-color-grey; |
||||
} |
||||
} |
||||
|
||||
.images-box { |
||||
display: flex; |
||||
flex-flow: row nowrap; |
||||
gap: 12px; |
||||
.image { |
||||
border-radius: $cs-border-radius; |
||||
} |
||||
} |
||||
.prove-list { |
||||
display: flex; |
||||
flex-flow: column nowrap; |
||||
gap: 5px; |
||||
.prove { |
||||
border: 1px solid $uni-color-primary; |
||||
padding: 5px 10px; |
||||
border-radius: 6px; |
||||
color: $uni-color-primary; |
||||
background-color: #ecf5ff; |
||||
} |
||||
} |
||||
} |
||||
.icon-box { |
||||
position: absolute; |
||||
left: 0; |
||||
} |
||||
</style> |
Loading…
Reference in new issue