企业端抽离

Lvtianfang
许宏杰 1 year ago
parent 817398701f
commit 71aeb10cbc

@ -18,9 +18,6 @@
</template> </template>
<script> <script>
import axios from 'axios'
import { Toast, Dialog } from 'vant'
import { phoneIf } from '@/util/sbIf.js'
export default { export default {
data() { data() {
return { return {
@ -30,105 +27,8 @@ export default {
ios_version: process.env.VUE_APP_VERSION2, ios_version: process.env.VUE_APP_VERSION2,
} }
}, },
created() { created() {},
let _this = this watch: {},
//
if (window.plus) {
let h = window.plus.navigator.getStatusbarHeight() //
this.config.setBarHeight(h)
localStorage.setItem('mudu_bar', h)
var first = null
window.plus.key.addEventListener(
'backbutton',
function () {
history.go(-1) // 退
// if (!first) {
// first = new Date().getTime() // 退
// // _this.$toast({ message: '退', position: 'bottom' }) //
// history.go(-1) // 退
// setTimeout(function() {
// // 1s
// first = null
// }, 1000)
// } else {
// if (new Date().getTime() - first < 1000) {
// // 1s
// window.plus.runtime.quit() // 退app
// }
// }
},
false
)
}
let route = this.$route
// console.log(route)
//
// if (
// route.name === '' ||
// route.name === '' ||
// route.name === '' ||
// route.name === '' ||
// route.name === ''
// ) {
// this.bac = 'transparent'
// } else {
// this.bac = '#2487FF'
// }
},
watch: {
$route(val) {
let _this = this
// console.log(val)
//
window.scroll(0, 0)
// console.log(val)
// IOSbug
if (window.history.scrollRestoration) {
window.history.scrollRestoration = 'manual'
}
// if (
// val.name === '' ||
// val.name === '' ||
// val.name === '' ||
// val.name === '' ||
// val.name === ''
// ) {
// this.bac = 'transparent'
// } else {
// this.bac = '#2487FF'
// }
if (val.name === '领导新首页')
document.body.style.backgroundColor = '#ffffff'
else if (val.name === '首页')
document.body.style.backgroundColor = '#ffffff'
else document.body.style.backgroundColor = '#ebeef5'
if (val.fullPath === '/') {
return
} else {
//
let userInfo = JSON.parse(localStorage.getItem('mudu_userInfo'))
// console.log(userInfo)
if (
userInfo.profile.userName === 'test' ||
userInfo.profile.userName === '安全员'
) {
// test
console.log(userInfo.profile.userName)
} else {
if (window.plus) {
_this.updateVersion()
document.addEventListener(
'visibilitychange',
this.handleVisibilityChange
)
}
}
}
},
},
mounted() { mounted() {
var designWidth = 750 // var designWidth = 750 //
var baseFontsize = 120 // cssrempx var baseFontsize = 120 // cssrempx
@ -142,86 +42,7 @@ export default {
if (window.plus) window.plus.navigator.closeSplashscreen() // if (window.plus) window.plus.navigator.closeSplashscreen() //
}) })
}, },
methods: { methods: {},
handleVisibilityChange() {
if (!document.hidden) {
//
console.warn('应用从后台切换到前台')
let userInfo = JSON.parse(localStorage.getItem('mudu_userInfo'))
// console.log(userInfo)
if (
userInfo.profile.userName === 'test' ||
userInfo.profile.userName === '安全员'
) {
// test
console.log(userInfo.profile.userName)
} else {
this.updateVersion()
}
}
},
updateVersion() {
let param = {
time: new Date().getTime(),
}
axios({
method: 'get',
url: 'http://www.jichuanglanhai.com/demo/appVersion.json',
params: param,
}).then((res) => {
let urlAndorid = 'https://www.pgyer.com/6TpZ'
let urliOS =
'https://apps.apple.com/cn/app/%E6%9C%A8%E6%B8%8E%E6%99%BA%E6%85%A7%E5%AE%89%E7%9B%91/id1597682147'
let shebei = phoneIf()
if (shebei == 'IOS') {
// console.log(res, shebei, this.ios_version != res.data.ios_mudu)
if (this.ios_version != res.data.ios_mudu) {
Dialog.alert({
title: '发现新版本',
message: '新版本V ' + res.data.ios_mudu + '<br>大小20.9MB',
confirmButtonText: '立即更新',
// cancelButtonText: '',
theme: 'round-button',
})
.then(() => {
if (window.plus) window.plus.runtime.openURL(urliOS)
//
else window.open(urliOS)
})
.catch(() => {})
}
}
if (shebei == 'Android') {
// console.log(res, shebei, this.version != res.data.mudu)
if (this.version != res.data.mudu) {
Dialog.alert({
title: '发现新版本',
message: '新版本V ' + res.data.mudu + '<br>大小20.9MB',
confirmButtonText: '立即更新',
// cancelButtonText: '',
theme: 'round-button',
})
.then(() => {
if (window.plus) window.plus.runtime.openURL(urlAndorid)
//
else window.open(urlAndorid)
})
.catch(() => {
// on cancel
})
}
}
})
},
},
beforeDestroy() {
if (window.plus) {
document.removeEventListener(
'visibilitychange',
this.handleVisibilityChange
)
}
},
} }
</script> </script>
<style lang="scss"> <style lang="scss">

@ -9,19 +9,27 @@ let routes = [
name: '工业园', name: '工业园',
component: () => import('@/views/vxEwm/garden/park/index.vue'), component: () => import('@/views/vxEwm/garden/park/index.vue'),
}, },
],
},
{
path: '/enterpriseData',
name: '企业信息',
component: () => import('@/views/vxEwm/enterprise/index.vue'),
redirect: '/enterpriseData/info',
children: [
{ {
path: '/enterpriseData', path: '/enterpriseData/info',
name: '企业信息', name: '企业详情',
component: () => import('@/views/vxEwm/enterprise/index.vue'), component: () => import('@/views/vxEwm/enterprise/info.vue'),
},
{
path: '/enterpriseData/check/info/:id',
name: '巡检详情',
component: () =>
import('@/views/vxEwm/enterprise/components/check/info.vue'),
}, },
], ],
}, },
] ]
// {
// path: '/enterpriseData/check/info/:id',
// name: '巡检详情',
// component: () =>
// import('@/views/vxEwm/enterprise/components/check/info.vue'),
// },
export default routes export default routes

@ -1,301 +0,0 @@
<template>
<div id="page">
<div class="search-value">
<div class="search-valueSon">
<van-search
v-model="EnterpriseName"
show-action
placeholder="请输入搜索关键词"
>
<template #action>
<div
@click="onSearch"
style="color: #377af6; font-family: 'AlibabaPuHuiTi-Medium'"
>
搜索
</div>
</template>
</van-search>
</div>
</div>
<div class="main-center">
<div>
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
:immediate-check="true"
>
<van-cell-group>
<van-cell
center
:title="
item.leaderJoin
? '【领导检查】' + item.enterpriseName
: '【日常巡查】' + item.enterpriseName
"
is-link
:to="'/enterpriseData/check/info/' + item.id"
v-for="item in checkslist"
:key="item.id"
>
<template #label>
<div class="svan-label">
<span>{{ item.checkDate }}</span>
<span style="white-space: nowrap">
打卡人{{ item.reportPersonName }}
<van-tag
type="primary"
v-show="item.isTrouble == 1"
style="margin-left: 10px; font-size: 14px"
>检查</van-tag
>
</span>
</div>
</template>
</van-cell>
</van-cell-group>
</van-list>
</van-pull-refresh>
</div>
</div>
</div>
</template>
<script>
import * as api from '@/api/api2.js'
import { Toast } from 'vant'
export default {
props: {
EnterpriseID: {
type: [String, Number],
},
},
data() {
return {
EnterpriseName: '',
title: '巡查打卡',
checkslist: [],
isShow: true, //
query: [
{
id: '',
},
],
loading: false,
finished: false,
refreshing: false,
pageIndex: 1,
}
},
created() {},
mounted() {
this.$nextTick(() => {
this.ifUser()
})
},
methods: {
//
onSearch() {
this.onRefresh()
},
//
ifUser() {
/**
* 判断携带参数企业ID
* 判断Token登录者信息
* 做不同的操作1数据重新加载2组件显示隐藏
* */
//id
this.query.id = this.$route.query.id
if (this.$route.query.num) {
if (this.$route.query.num == 0) {
this.title = '日常巡查'
}
if (this.$route.query.num == 1) {
this.isShow = false
this.title = '领导检查'
}
this.query.number = this.$route.query.num
}
let userType = localStorage.getItem('mudu_type')
let userInfo = JSON.parse(localStorage.getItem('mudu_userInfo'))
if (this.query.id) {
//
if (this.query.id == 0) {
//
this.isShow = false
return
}
if (userType === 'system') {
if (
userInfo.profile.roleName === '综合执法局' ||
userInfo.profile.roleName === '管理员' ||
userInfo.profile.roleName === '镇领导' ||
userInfo.profile.roleName === '村领导' ||
userInfo.profile.roleName === '综合执法局工作人员' ||
userInfo.profile.roleName === '安全员(只读)'
) {
//
this.isShow = false
} else if (userInfo.profile.roleName === '安全员') {
//
// this.isShow = false
}
} else if (userType === 'enterprise') {
//
this.isShow = false
}
} else {
//
if (userInfo.profile.roleName !== '安全员') {
//
this.isShow = false
}
}
},
// reqGetCheckslist(params) {
// Toast.loading({
// message: '...',
// forbidClick: true
// })
// api.getCheckslist(params).then(res => {
// // console.log(res)
// this.checkslist = res.data
// Toast.clear()
// })
// },
onLoad() {
let initLimit = 10
let params = {}
setTimeout(() => {
//
if (this.refreshing) {
this.checkslist = []
this.refreshing = false
}
params = {
ReportPersonName: this.$route.query.ReportPersonName,
enterpriseID: this.EnterpriseID,
limit: initLimit,
leaderJoin: this.$route.query.num,
page: this.pageIndex,
locationID: this.$route.query.locationID,
EnterpriseName: this.EnterpriseName,
IsTrouble: this.$route.query.IsTrouble,
StartCheckDate: this.$route.query.StartCheckDate,
EndCheckDate: this.$route.query.EndCheckDate,
}
api.getCheckslist(params).then((res) => {
this.checkslist = this.checkslist.concat(res.data)
if (res.data.length < initLimit) {
// console.log(this.pageIndex++, '' + res.data.length)
this.finished = true
return
}
this.loading = false
this.pageIndex++
})
}, 1000)
},
onRefresh() {
//
this.finished = false
//
this.pageIndex = 1
//
this.checkslist = []
//
// loading true
this.loading = true
this.onLoad()
},
},
}
</script>
<style lang="scss" scoped>
// TODO:
.search-value {
width: 100%;
// position: fixed;
// top: 0;
// z-index: 11;
// height: 1.05rem;
.search-valueSon {
width: 100%;
/deep/ .van-cell {
border-bottom: none;
padding-left: 0;
height: 0.7rem;
.van-field__left-icon {
.van-icon-search {
font-size: 0.3667rem;
}
}
}
}
}
// .searchF{
// height: 1rem;
// position: fixed;
// z-index: 1;
// width: 100%;
// }
.icon-regulation {
width: 0.433rem;
height: 0.433rem;
background-size: cover;
background-repeat: no-repeat;
background-image: url('~@/assets/image/safety/icon-regulation@2x.png');
}
.cell-group-form {
margin-top: 1.2rem; //navbar
}
/deep/.van-cell {
-webkit-box-shadow: 0rem 0rem 0rem 0rem;
box-shadow: 0rem 0rem 0rem 0rem;
border-bottom: 1px solid #cccc;
border-radius: 0rem;
height: auto;
text-align: left;
padding-left: 0.3rem;
padding-right: 0.3rem;
}
/deep/.van-cell__title {
margin-top: 0.167rem;
text-align: left;
padding-left: 0.15rem;
font-size: 0.267rem;
& > span {
font-family: 'AlibabaPuHuiTi-Medium';
font-weight: 400;
color: #34373b;
}
}
.svan-label {
font-size: 0.25rem;
margin-bottom: 0.167rem;
display: flex;
font-family: 'AlibabaPuHuiTi-Regular';
font-weight: 400;
color: #868d98;
}
.svan-label span {
flex: 1;
}
</style>

@ -1,422 +0,0 @@
<template>
<div id="page">
<div class="main-center">
<div class="cell-group-form">
<div class="cell-group">
<!-- <div class="cell-left-icon">&nbsp;&nbsp;</div> -->
<div class="cell-title changeA">巡查单位</div>
<div class="cell-subtitle changeA">
{{ checksinfo.enterpriseName }}
</div>
</div>
<div class="cell-group">
<!-- <div class="cell-left-icon">&nbsp;&nbsp;</div> -->
<div class="cell-title changeA">巡查类别</div>
<div class="cell-subtitle changeA">
{{ checksinfo.typeName }}
</div>
</div>
<div class="cell-groups">
<div class="cell-group">
<!-- <div class="cell-left-icon">&nbsp;&nbsp;</div> -->
<div class="cell-title">巡查内容</div>
<div class="cell-content">
{{ checksinfo.content }}
</div>
</div>
</div>
<div class="cell-groups" v-if="ishowaddUserName">
<div class="cell-group">
<!-- <div class="cell-left-icon">&nbsp;&nbsp;</div> -->
<div class="cell-title changeA">打卡人</div>
<div class="cell-subtitle changeA">
{{ checksinfo.addUserName }}
</div>
</div>
</div>
<div class="cell-groups">
<div class="cell-group">
<!-- <div class="cell-left-icon">&nbsp;&nbsp;</div> -->
<div class="cell-title">打卡位置</div>
<div class="cell-content">
{{ checksinfo.inAddress }}
</div>
</div>
</div>
<div class="cell-map" id="show-maps">
<div class="cell-map-point" v-if="showPosition"></div>
</div>
<div class="cell-group">
<!-- <div class="cell-left-icon">&nbsp;&nbsp;</div> -->
<div class="cell-title changeA">打卡时间</div>
<div class="cell-subtitle changeA">
{{ checksinfo.checkDate }}
</div>
</div>
<div class="cell-group-photo" v-show="isShow2">
<div class="cell-title">现场图片</div>
<div class="cell-group-imgs">
<van-image
fit="cover"
:src="filePath + item.src"
v-for="(item, index) in attachmentImgList"
:key="index"
@click="pic(index)"
/>
</div>
</div>
<div class="cell-group-photo">
<div
class="cell-title"
style="width: 30%; margin-bottom: 0.15rem"
v-show="isShow1"
>
隐患上报记录
</div>
<!-- 展示从隐患上报返回数据遍历 -->
<div
class="cell-item"
v-for="(item, index) in troublelist"
:key="index"
>
<div class="cell-item-content">
<div class="">
{{ item.description }}
</div>
</div>
<div class="cell-item-foot">
<van-button
class="cell-item-btn"
type="info"
:to="'/safety/riskinfo/' + item.id"
size="mini"
>详情</van-button
>
<!-- <van-button class="cell-item-btn" type="warning" to="" size="mini"
>编辑</van-button
>
<van-button class="cell-item-btn" type="danger" to="" size="mini">
删除
</van-button> -->
</div>
</div>
<!-- <van-cell title="隐患上报记录" /> -->
</div>
</div>
<!-- <ger-image-pre title="现场图片:" :imgId="checksinfo.inImgRelationID" /> -->
</div>
</div>
</template>
<script>
import L from 'leaflet'
import 'proj4'
import 'proj4leaflet'
import '@/util/leaflet.ChineseTmsProviders.js'
import '@/util/leaflet.mapCorrection.min.js'
// import GerImagePre from '@/components/GerImagePre'
import * as api from '@/api/api2.js'
import { ImagePreview, Toast } from 'vant'
export default {
data() {
return {
filePath: process.env.VUE_APP_FILE_HOST,
//
isShow1: true,
isShow2: true,
checksinfo: [],
attachmentImgList: [],
imagesPre: [],
troublelist: [],
globalMap: null,
showPosition: false,
ishowaddUserName: false,
}
},
mounted() {
this.$nextTick(() => {
let userType = localStorage.getItem('mudu_type')
if (userType === 'system') {
let userInfo = JSON.parse(localStorage.getItem('mudu_userInfo'))
if (
userInfo.profile.roleName === '综合执法局' ||
userInfo.profile.roleName === '管理员' ||
userInfo.profile.roleName === '镇领导' ||
userInfo.profile.roleName === '村领导' ||
userInfo.profile.roleName === '综合执法局工作人员' ||
userInfo.profile.roleName === '安全员(只读)'
) {
//
this.ishowaddUserName = true
} else if (userInfo.profile.roleName === '安全员') {
//
this.ishowaddUserName = false
}
} else if (userType === 'enterprise') {
//
this.ishowaddUserName = false
}
this.initMap()
this.initData()
})
},
components: {
// 'ger-image-pre': GerImagePre
},
methods: {
initMap() {
//
this.globalMap = L.map('show-maps', {
crs: L.CRS.Baidu,
center: [31.2672, 120.491], // []
zoom: 16, //
maxZoom: 19,
minZoom: 12,
zoomControl: false, //
attributionControl: false, // leaflet
doubleClickZoom: false, //
dragging: false, //
scrollWheelZoom: false, //
tap: false,
touchZoom: false,
})
L.tileLayer
.chinaProvider('Baidu.Normal.Map', {
maxZoom: 19,
minZoom: 5,
})
.addTo(this.globalMap)
// //
// L.tileLayer(
// 'https://t{s}.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=40a9f830e2cba324771cd6bca2489434',
// {
// maxZoom: 18,
// minZoom: 9,
// subdomains: ['0', '1', '2', '3', '4', '5', '6', '7']
// }
// ).addTo(this.globalMap)
// //
// L.tileLayer(
// 'https://t{s}.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=40a9f830e2cba324771cd6bca2489434',
// {
// maxZoom: 18,
// minZoom: 9,
// subdomains: ['0', '1', '2', '3', '4', '5', '6', '7']
// }
// ).addTo(this.globalMap)
},
onClickLeft() {
this.$router.go(-1)
},
//
initData() {
let id = this.$route.params.id
Toast.loading({
message: '加载中...',
duration: 0,
forbidClick: true,
})
api.getChecksinfo(id).then((res) => {
// console.log(res)
this.checksinfo = res.data
//
var longitude = Number(res.data.longitude)
var latitude = Number(res.data.latitude)
this.showPosition = true
this.globalMap.setView([latitude, longitude], 16)
if (!res.data.inImgRelationID) {
this.isShow2 = false
} else {
this.getImageIdData(res.data.inImgRelationID)
}
Toast.clear()
})
//
let params = {
checksID: id,
}
api
.getTroublelist(params)
.then((res) => {
if (res.count == 0) {
this.isShow1 = false
return
}
// console.log('checksID', res)
this.troublelist = res.data
})
.catch((err) => {
this.isShow1 = false
})
},
// ID
getImageIdData(id) {
api.getAttachment(id).then((res) => {
// console.log('imgList', res)
if (res.code == 400) {
this.isShow2 = false
return
}
this.attachmentImgList = res.data
if (res.data != undefined) {
res.data.map((d) => {
this.imagesPre.push(process.env.VUE_APP_FILE_HOST + d.src)
})
}
})
},
//
pic(index) {
ImagePreview({
images: this.imagesPre,
startPosition: index,
})
},
},
}
</script>
<style lang="scss" scoped>
.cell-group-form {
// margin-top: 1.2rem; //navbar
background: white;
padding: 0 0.34rem 0.3rem;
}
.cell-groups {
background: #ffffff;
}
.cell-group {
// margin-top: 0.2rem;
background: #ffffff;
padding: 0.22rem 0;
overflow: hidden;
border-bottom: 0.02rem solid #e6e6e6;
}
.cell-left-icon {
float: left;
margin-left: 0.2rem;
margin-top: 0.23rem;
font-size: 0.267rem;
font-weight: 400;
color: #999999;
color: red;
}
.changeA {
float: left;
}
.cell-title {
width: 26%;
text-align: left;
font-size: 0.267rem;
// margin-left: 0.14rem;
font-weight: 400;
color: #161719;
// line-height: 0.95rem;
font-family: 'AlibabaPuHuiTi-Regular';
}
.cell-subtitle {
width: 74%;
// margin-left: 0.075rem;
font-size: 0.267rem;
font-weight: 400;
text-align: left;
// line-height: 0.75rem;
border: none;
outline: none;
background: none;
font-family: 'AlibabaPuHuiTi-Regular';
color: #888f9a;
}
.cell-content {
font-size: 0.267rem;
padding-top: 0.22rem;
font-weight: 400;
word-wrap: break-word;
text-align: left;
font-family: 'AlibabaPuHuiTi-Regular';
color: #888f9a;
}
.cell-group-photo {
margin-top: 0.2rem;
overflow: hidden;
}
.cell-group-title {
text-align: left;
margin-left: 0.4rem;
font-size: 0.267rem;
font-weight: 400;
color: #999999;
}
.cell-group-imgs {
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
margin-left: 0.14rem;
// margin-right: 0.2rem;
}
.cell-group-imgs .van-image {
width: 1.7rem;
height: 1.7rem;
margin-top: 0.14rem;
text-align: center;
margin-right: 2%;
// margin-left: 2.5%;
}
//
.cell-item {
background-color: #ffffff;
border-bottom: 0.00678rem solid #d3d5db;
display: flex;
justify-content: space-between;
}
.cell-item-content {
width: 70%;
display: flex;
align-items: center;
// padding: 0.2rem 0.35rem 0 0.4rem;
text-align: left;
word-wrap: break-word;
}
.cell-item-content-title {
width: 100%;
font-size: 0.217rem;
font-family: Source Han Sans CN-Medium;
font-weight: 400;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
padding-right: 0.05rem;
}
.cell-item-foot {
width: 30%;
display: flex;
flex-direction: row-reverse;
}
.cell-item-btn {
width: 1.167rem;
height: 0.5rem;
border-radius: 0.1rem;
margin-left: 0.1rem;
margin-right: 0.1rem;
margin-top: 0.117rem;
margin-bottom: 0.2rem;
font-size: 0.25rem;
font-family: Source Han Sans CN-Regular;
font-weight: 400;
color: #ffffff;
}
</style>

@ -1,253 +0,0 @@
<!--
* @Author: your name
* @Date: 2021-06-03 14:17:03
* @LastEditTime: 2021-08-13 14:09:04
* @LastEditors: 许宏杰
* @Description: In User Settings Edit
* @FilePath: \MuduAPP\src\views\Leader\enterpriseInfo\components\infoFour.vue
-->
<template>
<div class="cell-gdptax-list">
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<div class="cell-group" v-for="item in yearList" :key="item.id">
<div class="cell-title">{{ item.year }}年度产值及税收</div>
<div class="cell-item">
<div class="bott">
<div class="cell-icon"></div>
<div class="icon-te">
<div>产值(万元)</div>
<div>{{ item.outputValue }}</div>
</div>
</div>
<div class="bott">
<div class="cell-icon"></div>
<div class="icon-te">
<div>税收(万元)</div>
<div>{{ item.taxValue }}</div>
</div>
</div>
</div>
</div>
</van-list>
<div class="btn-foot" v-show="isboole">
<van-button
class="login-field-btn"
round
block
type="info"
native-type="submit"
@click="onCzsClcik()"
>{{ timer }}年产值税收录入</van-button
>
</div>
</div>
</template>
<script>
import xApi from '../../../../api/xApi'
import { Toast } from 'vant'
export default {
data() {
return {
isboole: null,
yearList: [],
enterId: '',
timer: '',
loading: false,
finished: false,
page: 1,
limit: 10,
total: 0,
}
},
methods: {
shows() {
let params = {
limit: this.limit,
page: this.page,
enterpriseid: this.enterId,
}
xApi.getNianList(params).then((res) => {
this.yearList.push(...res.data)
this.yearList.forEach((item) => {
if (item.year == this.timer) {
this.isboole = false
}
})
this.total = res.count
this.loading = false
//
if (this.yearList.length >= this.total) {
this.finished = true
}
this.page++
})
},
//
onLoad() {
// debugger
setTimeout(() => {
this.shows()
}, 500)
},
//
getYearList(id) {
xApi.getNianList(id).then((res) => {
this.yearList = res.data
this.yearList.forEach((item) => {
if (item.year == this.timer) {
this.isboole = false
}
})
})
},
onCzsClcik() {
//
this.$router.push({
path: `/safety/czsData/${this.enterId}`,
})
},
},
mounted() {
//
let date = new Date()
let year = date.getFullYear()
this.timer = year
//
let item = this.$route.params.id
let name = this.$route.params.num
this.enterId = item
// this.getYearList(item)
if (name == 1 || name == 2) {
this.isboole = true
} else if (name) {
this.isboole = false
}
let userType = localStorage.getItem('mudu_type')
let userInfo = JSON.parse(localStorage.getItem('mudu_userInfo'))
//
if (
userInfo.profile.roleName !== '安全员' &&
userInfo.profile.roleName !== '综合执法局工作人员'
) {
//
this.isboole = false
}
},
}
</script>
<style lang="scss" scoped>
/* // 产值税收 */
.cell-gdptax-list {
padding-left: 0.158rem;
padding-right: 0.158rem;
padding-top: 0.126rem;
padding-bottom: 0.126rem;
background-color: #ffffff;
}
.cell-group {
margin-top: 0.079rem;
margin-bottom: 0.13rem;
height: 1.908rem;
box-shadow: 0rem 0rem 0.1rem 0rem rgba(0, 0, 0, 0.09);
border-radius: 0.1rem;
}
.cell-title {
height: 0.25rem;
/* // border: 1px solid; */
line-height: 0.25rem;
font-size: 0.267rem;
font-weight: 400;
color: #333333;
padding-top: 0.267rem;
}
.cell-item {
margin-top: 0.337rem;
display: flex;
}
.cell-item .bott {
flex: 1;
height: 0.75rem;
}
.bott:nth-child(2) {
/* // border: 1px solid; */
display: flex;
}
.bott:nth-child(2) .cell-icon {
background: url('../../../../assets/image/safety/icon-gdp@2x.png');
background-size: 100% 100%;
}
.cell-item .bott:nth-child(1) {
border-right: 1px dashed #ccc;
padding-right: 0.258rem;
display: flex;
}
.cell-item .bott:nth-child(2) {
padding-right: 0.258rem;
}
.cell-icon {
width: 0.75rem;
height: 0.75rem;
/* // border: 1px solid; */
background: url('../../../../assets/image/safety/icon-tax@2x.png');
background-size: 100% 100%;
margin-left: 0.35rem;
}
.icon-te {
height: 0.75rem;
/* // border: 1px solid; */
margin-left: 0.283rem;
}
.icon-te > div {
margin-top: 0.14rem;
}
.icon-te div:nth-child(1) {
/* width: 0.94rem; */
height: 0.217rem;
line-height: 0.217rem;
font-size: 0.2rem;
font-weight: 400;
color: #333333;
}
.icon-te div:nth-child(2) {
width: 1.217rem;
height: 0.208rem;
line-height: 0.208rem;
font-size: 0.267rem;
font-weight: bold;
color: #2487ff;
}
/deep/ .van-button--round {
border-radius: 0.1rem;
}
.login-field-btn-group {
position: fixed;
bottom: 0;
margin-top: 0.7rem;
margin-left: 0.533rem;
margin-right: 0.533rem;
/* margin-bottom: .2rem; */
padding-bottom: 0.2rem;
}
.login-field-btn {
width: 85%;
height: 0.833rem;
margin: 0 auto;
background-color: #2487ff;
font-size: 0.3rem;
color: #ffffff;
font-family: 'AlibabaPuHuiTi-Medium';
}
</style>

@ -1,608 +0,0 @@
<!--
* @Author: your name
* @Date: 2021-06-03 14:08:16
* @LastEditTime: 2021-09-07 10:37:20
* @LastEditors: 许宏杰
* @Description: In User Settings Edit
* @FilePath: \MuduAPP\src\views\Leader\enterpriseInfo\components\infoOne.vue
-->
<template>
<div class="info-one">
<div class="cell-group-form">
<div class="cell-group">
<div class="cell-title changeWZ">企业名称</div>
<div class="cell-tag changeWZ">{{ info.name }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">社会信用代码</div>
<div class="cell-tag changeWZ">{{ info.certificateCode }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">规上企业</div>
<div class="cell-tag changeWZ">
{{ info.standardSized == 0 ? '否' : '是' }}
</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">上亿企业</div>
<div class="cell-tag changeWZ">
{{ info.oneHundredMillion == 0 ? '否' : '是' }}
</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">企业类型</div>
<div class="cell-tag changeWZ">{{ info.typeName }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">所属行业</div>
<div class="cell-tag changeWZ">{{ info.industryName }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">所属地</div>
<div class="cell-tag changeWZ">{{ info.locationName }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">所属工业园</div>
<div class="cell-tag changeWZ">{{ info.parkName }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">法定代表人</div>
<div class="cell-tag changeWZ">{{ info.legalPerson }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">法人联系方式</div>
<div class="cell-tag changeWZ">{{ info.legalPersonPhone }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">住所注册地</div>
<div class="cell-tag changeWZ">{{ info.registerAddress }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">实际经营地址</div>
<div class="cell-tag changeWZ">{{ info.businessAddress }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">企业人数</div>
<div class="cell-tag changeWZ">{{ info.person }}()</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">面积</div>
<div class="cell-tag changeWZ">{{ info.rentSpace }}()</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">企业状态</div>
<div class="cell-tag changeWZ">{{ info.status | fiterStatus }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">入驻园区</div>
<div class="cell-tag changeWZ">{{ info.parkName }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">主要产品</div>
<div class="cell-tag changeWZ">{{ info.businessScope }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">入驻楼层</div>
<div class="cell-tag changeWZ">{{ info.floor }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">风险源等级</div>
<div class="cell-tag changeWZ">{{ info.riskLevel }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">危险源类型</div>
<div class="cell-tag changeWZ">{{ info.riskSourceType }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">危险源等级</div>
<div class="cell-tag changeWZ">{{ info.riskSourceLevel }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">入驻日期</div>
<div class="cell-tag changeWZ">{{ info.inDateTime }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">合同截止日期</div>
<div class="cell-tag changeWZ">{{ info.endDateTime }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">搬离日期</div>
<div class="cell-tag changeWZ">
{{ info.leaveDateTime | filterNull }}
</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">是否重点监管</div>
<div class="cell-tag changeWZ">
{{ info.isKeySupervision | filterisKeySupervision }}
</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">标准化等级</div>
<div class="cell-tag changeWZ">{{ info.standardLevel }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">安全员</div>
<div class="cell-tag changeWZ">{{ info.networkUserName }}</div>
</div>
<div class="cell-group">
<div class="cell-title changeWZ">分管领导</div>
<div class="cell-tag changeWZ">{{ info.masterUserName }}</div>
</div>
<div class="map-data">
<div class="map-titel" v-show="showImages.length > 0">:</div>
<div class="map-poto" v-show="showImages.length > 0">
<div class="poto">
<img
v-for="(item, index) in showImages"
:key="index"
:src="item"
alt=""
@click="onShowImage(index)"
/>
</div>
</div>
<div class="map-info" v-show="info.description">
<div class="map-titel">信息介绍:</div>
<div class="info-text">
{{ info.description }}
</div>
</div>
</div>
</div>
<!-- <ul>
<li>
<div>企业名称</div>
<div>{{ info.name }}</div>
</li>
<li>
<div>社会信用代码</div>
<div>{{ info.certificateCode }}</div>
</li>
<li>
<div>企业类型</div>
<div>{{ info.typeName }}</div>
</li>
<li>
<div>所属行业</div>
<div>{{ info.industryName }}</div>
</li>
<li>
<div>所属地</div>
<div>{{ info.locationName }}</div>
</li>
<li>
<div>所属工业园</div>
<div>{{ info.parkName }}</div>
</li>
<li>
<div>法定代表人</div>
<div>{{ info.legalPerson }}</div>
</li>
<li>
<div>法人联系方式</div>
<div>{{ info.legalPersonPhone }}</div>
</li>
<li>
<div>住所注册地</div>
<div>{{ info.registerAddress }}</div>
</li>
<li>
<div>实际经营地址</div>
<div>{{ info.businessAddress }}</div>
</li>
<li>
<div>企业人数</div>
<div>{{ info.person }}()</div>
</li>
<li>
<div>面积</div>
<div>{{ info.rentSpace }}()</div>
</li>
<li>
<div>企业状态</div>
<div>{{ info.status | fiterStatus }}</div>
</li>
<li>
<div>入驻园区</div>
<div>{{ info.parkName }}</div>
</li> -->
<!-- <li>
<div>安全证书数量</div>
<div></div>
</li> -->
<!-- <li>
<div>主要产品</div>
<div>{{ info.businessScope }}</div>
</li>
<li>
<div>入驻楼层</div>
<div>{{ info.floor }}</div>
</li>
<li>
<div>风险源等级</div>
<div>{{ info.riskLevel }}</div>
</li>
<li>
<div>危险源类型</div>
<div>{{ info.riskSourceType }}</div>
</li>
<li>
<div>危险源等级</div>
<div>{{ info.riskSourceLevel }}</div>
</li>
<li>
<div>入驻日期</div>
<div>{{ info.inDateTime }}</div>
</li>
<li>
<div>合同截止日期</div>
<div>{{ info.endDateTime }}</div>
</li>
<li>
<div>搬离日期</div>
<div>{{ info.leaveDateTime | filterNull }}</div>
</li>
<li>
<div>是否重点监管</div>
<div>{{ info.isKeySupervision | filterisKeySupervision }}</div>
</li>
<li>
<div>标准化等级</div>
<div>{{ info.standardLevel }}</div>
</li>
<li>
<div>安全员</div>
<div>{{ info.networkUserName }}</div>
</li>
<li>
<div>分管领导</div>
<div>{{ info.masterUserName }}</div>
</li>
</ul> -->
<div class="btn-foot" v-show="isboole">
<van-button
class="login-field-btn"
round
block
type="info"
native-type="submit"
@click="dataWh()"
>信息维护</van-button
>
<van-button
id="removes"
class="login-field-btn"
round
block
type="info"
native-type="submit"
@click="removes()"
>删除</van-button
>
</div>
</div>
</template>
<script>
import xApi from '../../../../api/xApi'
import { CollapseItem, ImagePreview } from 'vant'
import { Toast } from 'vant'
import { Dialog } from 'vant'
import Axios from 'axios'
export default {
data() {
return {
isboole: null,
info: {},
showImages: [],
}
},
filters: {
fiterStatus(target) {
if (target == 1) {
return '正常'
}
if (target == 2) {
return '注销'
}
if (target == 3) {
return '搬离'
}
},
filterNull(target) {
if (!target) {
return '暂空'
}
},
filterisKeySupervision(target) {
//
if (target == 0) {
return '否'
} else {
return '是'
}
},
},
// computed: {},
methods: {
//
getParkInfo(id) {
if (JSON.stringify(this.info) == '{}') {
Toast.loading({
duration: 0,
message: '加载中...',
forbidClick: true,
})
}
//
xApi.getEnterInfo(id).then((res) => {
this.info = res.data
if (JSON.stringify(this.info) != '{}') {
//
Toast.clear()
}
this.onYingYe(this.info.imageBusinessLicenseID)
this.$emit('enter-name', this.info)
})
},
//
onYingYe(id) {
if (!id) {
// this.showImages =['https://img01.yzcdn.cn/vant/cat.jpeg']
return
}
this.showImages = []
xApi.yingYe(id).then((res) => {
if (res.code == 400) {
return
}
res.data.forEach((item) => {
this.showImages.push(process.env.VUE_APP_FILE_HOST + item.src)
})
})
},
onShowImage(index) {
//
ImagePreview({
images: this.showImages,
closeable: true,
startPosition: index,
})
},
removes() {
//
Dialog.confirm({
title: '删除企业',
message: `您确定要删除"${this.info.name}"吗?`,
})
.then(() => {
let id = {
id: this.info.id,
}
xApi.enterprisedelete(id).then((res) => {
Toast.success('删除成功')
this.$router.back()
})
})
.catch(() => {
// on cancel
})
},
dataWh() {
//
this.$router.push({ path: `/safety/addTar/${this.info.id}/${1}` })
},
onBanLiClcik() {
//
this.$router.push({ path: '/safety/banLi' })
},
},
mounted() {
//
let item = this.$route.params.id
this.getParkInfo(item)
//
let name = this.$route.params.num
if (name == 1 || name == 2) {
this.isboole = true
} else {
this.isboole = false
}
let userType = localStorage.getItem('mudu_type')
let userInfo = JSON.parse(localStorage.getItem('mudu_userInfo'))
//
if (
userInfo.profile.roleName !== '安全员' &&
userInfo.profile.roleName !== '综合执法局工作人员'
) {
//
this.isboole = false
}
},
}
</script>
<style lang="scss" scoped>
.cell-group-form {
background: white;
padding: 0 0.34rem 0.3rem;
}
.cell-group {
// margin-top: 0.2rem;
// background: #ffffff;
padding: 0.15rem 0;
overflow: hidden;
border-bottom: 0.02rem solid #e6e6e6;
&:after {
content: '';
clear: both;
display: block;
}
}
.changeWZ {
float: left;
}
.cell-title {
width: 32%;
text-align: left;
font-size: 0.217rem;
// margin-left: 0.14rem;
font-weight: 400;
color: #161719;
// line-height: 0.95rem;
font-family: 'AlibabaPuHuiTi-Regular';
}
.cell-tag {
width: 68%;
text-align: left;
// margin-left: 0.14rem;
// line-height: 0.95rem;
font-size: 0.217rem;
font-family: 'AlibabaPuHuiTi-Regular';
color: #4f5660;
}
/* .info-one{
padding: .2rem;
} */
ul {
margin: 0;
padding: 0;
}
ul li {
min-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.825rem;
height: 0.417rem;
line-height: 0.417rem;
color: #999999;
font-size: 0.217rem;
font-weight: 400;
margin-left: 0.167rem;
text-align: left;
}
ul li div:nth-child(2) {
width: 4.033rem;
background: #f6f6f6;
border-radius: 0rem;
min-height: 0.417rem;
margin-left: 0.167rem;
line-height: 0.417rem;
text-align: left;
padding-left: 0.1rem;
font-size: 0.217rem;
color: #333333;
margin-right: 0.182rem;
}
ul li:nth-child(9),
ul li:nth-child(10) {
height: 0.82rem;
}
ul li:nth-child(9) div:nth-child(2),
ul li:nth-child(10) div:nth-child(2) {
height: 0.82rem;
}
// .map-data {
// border: 1px solid;
// }
.map-titel {
height: 0.208rem;
line-height: 0.208rem;
font-size: 0.217rem;
font-family: 'AlibabaPuHuiTi-Regular';
font-weight: bold;
color: #2487ff;
text-align: left;
margin-top: 0.28rem;
margin-bottom: 0.242rem;
}
.map-poto {
/* background: #F2F2F2; */
padding: 0 0.1rem;
}
.poto {
width: 100%;
display: flex;
flex-wrap: wrap;
}
.poto img {
height: 1.55rem;
width: 1.55rem;
margin-bottom: 0.1rem;
margin-left: 0.05rem;
border: 0.1rem solid #f2f2f2;
}
.bottom-btn {
position: fixed;
bottom: 0;
height: 0.7rem;
/* border: 1px solid; */
width: 100%;
display: flex;
padding-bottom: 0.1rem;
justify-content: space-between;
}
.bottom-btn > div {
line-height: 0.7rem;
font-size: 0.225rem;
font-weight: 400;
color: white;
border-radius: 0.3rem;
width: 3rem;
}
.bottom-btn > div:nth-child(1) {
margin-left: 0.05rem;
background: rgba(163, 0, 20, 1);
}
.bottom-btn > div:nth-child(2) {
margin-right: 0.05rem;
background: #2487ff;
}
.btn-foot {
display: flex;
justify-content: center;
}
#removes {
background: red;
margin-left: 0.05rem;
}
.login-field-btn {
width: 45%;
height: 0.833rem;
background-color: #2487ff;
font-size: 0.3rem;
font-family: 'AlibabaPuHuiTi-Medium';
border-radius: 0.1rem;
color: #ffffff;
}
// .btn-foot .login-field-btn:nth-child(1) {
// background: rgba(163, 0, 20, 1);
// }
/deep/ .van-button--info {
border: 0px;
}
.info-text {
padding: 0.167rem;
padding-top: 0;
font-size: 0.217rem;
font-weight: bold;
color: #999999;
text-align: left;
}
</style>

@ -1,482 +0,0 @@
<!--
* @Author: your name
* @Date: 2021-06-03 14:16:33
* @LastEditTime: 2021-08-13 14:08:51
* @LastEditors: 许宏杰
* @Description: In User Settings Edit
* @FilePath: \MuduAPP\src\views\Leader\enterpriseInfo\components\infoThree.vue
-->
<template>
<div class="cell-contact-list">
<!-- 主体 -->
<div class="cell-contact-group" v-for="item in linkman" :key="item.id">
<div class="cell-contact-header">
<div class="cell-contact-title">{{ item.name }}</div>
<div class="cell-contact-subtitle">{{ item.typeName }}</div>
<div class="cell-contact-number">
<a :href="'tel:' + item.phone">{{ item.phone }}</a>
</div>
</div>
<!-- 备注 -->
<div class="sheBei-info">
<div class="btn-text">
备注&nbsp;:&nbsp;{{
item.remark == ''
? filterHasSafeCertificate(item.hasSafeCertificate)
: item.remark
}}
</div>
<div class="btn-text" v-if="item.remark != ''">
{{ filterHasSafeCertificate(item.hasSafeCertificate) }}
</div>
</div>
<div class="cell-contact-content">
<!-- <van-button
class="cell-contact-btn4"
plain
type="primary"
:class="{ wu: item.hasSafeCertificate == 1 }"
>{{ filterHasSafeCertificate(item.hasSafeCertificate) }}</van-button
> -->
<van-button
v-show="item.hasSafeCertificate == 1"
class="cell-contact-btn1"
type="info"
@click="getAnQuan(item)"
>查看证书</van-button
>
<div class="cell-contact-des" v-show="item.hasSafeCertificate == 1">
{{ item.safeCertificateExpiry }}
</div>
<!-- <van-button plain type="compinfo">无安全证书</van-button> -->
</div>
<div class="cell-contact-foot">
<!-- <van-button
v-show="item.hasSafeCertificate == 1"
class="cell-contact-btn1"
type="info"
@click="getAnQuan(item)"
>查看证书</van-button
> -->
<!-- 判断 -->
<div v-show="isboole" class="footerBox">
<div @click="onRemove(item)" class="item-btn" style="color: #f76359">
<span>删除</span>
</div>
<div @click="onxiuGai(item)" class="item-btn" style="color: #3976f1">
修改
</div>
<!-- <van-button class="cell-contact-btn3" type="info">修改</van-button> -->
<!-- <van-button class="cell-contact-btn2" type="danger">删除</van-button> -->
</div>
<!-- -->
</div>
</div>
<div class="btn-foot" v-show="isboole">
<van-button
class="login-field-btn"
round
block
type="info"
native-type="submit"
@click="onLinkMan()"
>新增联系人</van-button
>
</div>
</div>
</template>
<script>
import xApi from '../../../../api/xApi'
import { ImagePreview } from 'vant'
import { Dialog } from 'vant'
import { Toast } from 'vant'
export default {
data() {
return {
isboole: null,
linkman: [],
showImages: [],
textId: '',
}
},
// filters: {
// },
methods: {
filterHasSafeCertificate(target) {
//
if (target == 0) {
return '无安全证书'
} else {
return '有安全证书'
}
},
getLinkman(id) {
if (this.linkman.length == 0) {
Toast.loading({
duration: 0,
message: '加载中...',
forbidClick: true,
})
}
//ID
xApi.linkman(id).then((res) => {
this.linkman = res.data
//
Toast.clear()
})
},
//
getAnQuan(id) {
// console.log(id.imgRelationID)
if (!id.imgRelationID) {
//
Toast.fail('暂无图片')
return
}
this.showImages = []
xApi.yingYe(id.imgRelationID).then((res) => {
// console.log(res)
res.data.forEach((item) => {
this.showImages.push(process.env.VUE_APP_FILE_HOST + item.src)
})
ImagePreview({
images: this.showImages,
closeable: true,
})
})
},
onLinkMan() {
//
this.$router.push({
path: `/safety/linkman/${this.textId}/1`,
})
},
onxiuGai(item) {
//
this.$router.push({ path: `/safety/linkman/${item.id}/2` })
},
onRemove(item) {
//
Dialog.confirm({
title: '标题',
message: '确认也要删除吗?',
})
.then(() => {
let data = {
id: item.id,
}
xApi.removeLinkMan(data).then((res) => {
let index = this.linkman.findIndex((it) => it.id == data.id)
if (index > -1) {
this.linkman.splice(index, 1)
}
Toast.success('删除成功')
})
})
.catch(() => {
// on cancel
})
},
},
mounted() {
//
let item = this.$route.params.id
let name = this.$route.params.num
this.textId = item
if (name == 1 || name == 2) {
this.isboole = true
} else {
this.isboole = false
}
//
this.getLinkman(item)
let userType = localStorage.getItem('mudu_type')
let userInfo = JSON.parse(localStorage.getItem('mudu_userInfo'))
//
if (
userInfo.profile.roleName !== '安全员' &&
userInfo.profile.roleName !== '综合执法局工作人员'
) {
//
this.isboole = false
}
},
}
</script>
<style lang="scss" scoped>
.footerBox {
width: 100%;
height: 0.7rem;
display: flex;
}
.item-btn {
width: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.24rem;
letter-spacing: 0.04rem;
font-family: 'AlibabaPuHuiTi-Regular';
}
.cell-contact-list {
// border: 1px solid;
// padding: 0.1rem;
// background: white;
}
// .cell-contact-group {
// width: 95%;
// // margin: 0.167rem;
// /* background: #ffffff; */
// /* // box-shadow: 0.0678rem 0 0 0 rgba(0, 0, 0, 0.1); */
// border-radius: 0.1rem;
// border: 1px solid rgba(0, 0, 0, 0.1);
// }
.cell-contact-group {
width: 100%;
margin: 0.13rem 0;
// margin: 0.167rem;
background: #ffffff;
/* // box-shadow: 0.0678rem 0 0 0 rgba(0, 0, 0, 0.1); */
// border-radius: 0.1rem;
border: 1px solid rgba(0, 0, 0, 0.1);
}
.cell-contact-header {
height: 0.617rem;
overflow: hidden;
// border-bottom: 1px solid rgba(0, 0, 0, 0.1);
padding-left: 0.2rem;
padding-right: 0.2rem;
}
.cell-contact-title {
font-size: 0.25rem;
font-family: 'AlibabaPuHuiTi-Medium';
color: #333333;
float: left;
line-height: 0.617rem;
}
.cell-contact-subtitle {
font-size: 0.2rem;
font-family: 'AlibabaPuHuiTi-Regular';
font-weight: 400;
color: #9da2ab;
float: left;
line-height: 0.617rem;
margin-left: 0.2rem;
}
.cell-contact-number {
font-size: 0.2rem;
font-family: 'AlibabaPuHuiTi-Regular';
font-weight: 400;
float: right;
line-height: 0.617rem;
a {
color: #9da2ab;
}
}
.cell-contact-content {
padding-left: 0.2rem;
padding-right: 0.2rem;
overflow: hidden;
margin: 0.2rem 0;
}
.cell-contact-btn4 {
height: 0.5rem;
font-size: 0.217rem;
font-family: 'AlibabaPuHuiTi-Regular';
font-weight: 400;
/* // color: #038310; */
border-radius: 0.1rem;
float: left;
margin: 0.2rem 0;
}
.cell-contact-des {
font-size: 0.2rem;
font-family: 'AlibabaPuHuiTi-Regular';
font-weight: 400;
color: #999999;
float: right;
// margin-top: 0.2rem;
line-height: 0.5rem;
}
.cell-contact-foot {
// padding-left: 0.2rem;
// padding-right: 0.2rem;
margin-top: 0.3rem;
overflow: hidden;
// padding-bottom: 0.2rem;
}
.cell-contact-btn1 {
font-size: 0.25rem;
font-family: 'AlibabaPuHuiTi-Regular';
font-weight: 400;
color: #ffffff;
height: 0.5rem;
float: left;
}
.cell-contact-btn2 {
font-size: 0.25rem;
font-family: 'AlibabaPuHuiTi-Regular';
font-weight: 400;
color: #ffffff;
height: 0.5rem;
float: right;
}
.cell-contact-btn3 {
font-size: 0.25rem;
font-family: 'AlibabaPuHuiTi-Regular';
font-weight: 400;
color: #ffffff;
height: 0.5rem;
float: right;
margin-left: 0.1rem;
}
/* // 产值税收 */
.cell-gdptax-list {
margin-left: 0.158rem;
margin-right: 0.158rem;
margin-top: 0.126rem;
background-color: #ffffff;
}
.cell-group {
margin-top: 0.079rem;
margin-bottom: 0.079rem;
height: 1.908rem;
box-shadow: 0rem 0rem 0.1rem 0rem rgba(0, 0, 0, 0.09);
border-radius: 0.1rem;
}
.cell-title {
height: 0.25rem;
/* // border: 1px solid; */
line-height: 0.25rem;
font-size: 0.267rem;
font-weight: 400;
color: #333333;
padding-top: 0.267rem;
}
.cell-item {
margin-top: 0.337rem;
display: flex;
}
.cell-item .bott {
flex: 1;
height: 0.75rem;
}
.bott:nth-child(2) {
/* // border: 1px solid; */
display: flex;
}
.bott:nth-child(2) .cell-icon {
background: url('../../../../assets/image/safety/icon-gdp@2x.png');
background-size: 100% 100%;
}
.cell-item .bott:nth-child(1) {
border-right: 1px dashed #ccc;
padding-right: 0.258rem;
display: flex;
}
.cell-item .bott:nth-child(2) {
padding-right: 0.258rem;
}
.cell-icon {
width: 0.75rem;
height: 0.75rem;
/* // border: 1px solid; */
background: url('../../../../assets/image/safety/icon-tax@2x.png');
background-size: 100% 100%;
margin-left: 0.35rem;
}
.icon-te {
height: 0.75rem;
/* // border: 1px solid; */
margin-left: 0.283rem;
}
.icon-te > div {
margin-top: 0.14rem;
}
.icon-te div:nth-child(1) {
width: 0.94rem;
height: 0.217rem;
line-height: 0.217rem;
font-size: 0.2rem;
font-weight: 400;
color: #333333;
}
.icon-te div:nth-child(2) {
width: 1.217rem;
height: 0.208rem;
line-height: 0.208rem;
font-size: 0.267rem;
font-weight: bold;
color: #2487ff;
}
// .cell-contact-group:nth-child(2) .cell-contact-btn3{
// margin-top: .2rem;
// }
// .cell-contact-group:nth-child(2) .cell-contact-btn2{
// margin-top: .2rem;
// }
// /deep/ .btn-foot {
// padding: 0.25rem 0 0.55rem 0;
// }
/deep/ .van-button--round {
border-radius: 0.1rem;
}
.login-field-btn-group {
position: fixed;
bottom: 0;
margin-top: 0.7rem;
margin-left: 0.533rem;
margin-right: 0.533rem;
/* margin-bottom: .2rem; */
padding-bottom: 0.2rem;
}
.login-field-btn {
width: 85%;
height: 0.833rem;
margin: 0 auto;
background-color: #2487ff;
font-size: 0.3rem;
color: #ffffff;
font-family: 'AlibabaPuHuiTi-Medium';
}
.wu {
color: red;
border: 1px solid red;
}
.sheBei-info {
width: 94%;
margin: 0 auto;
// margin-top: 0.1rem;
padding: 0.1rem;
// border: 1px solid;
text-align: left;
background: #f9f9f9;
}
.btn-text {
font-size: 0.23rem;
font-family: 'AlibabaPuHuiTi-Regular';
font-weight: 400;
color: #999999;
}
.btn-subText {
font-size: 0.15rem;
font-family: 'AlibabaPuHuiTi-Regular';
font-weight: 400;
color: #ccc;
}
</style>

@ -1,419 +0,0 @@
<!--
* @Author: your name
* @Date: 2021-06-03 14:15:48
* @LastEditTime: 2021-08-18 09:56:06
* @LastEditors: 付刚
* @Description: In User Settings Edit
* @FilePath: \MuduAPP\src\views\Leader\enterpriseInfo\components\infoTwo.vue
-->
<template>
<div class="info-two">
<div>
<div v-if="sheBeiList.length > 0">
<div
class="cell-contact-group"
v-for="item in sheBeiList"
:key="item.id"
>
<div class="cell-contact-header">
<div class="cell-contact-title">{{ item.equipmentName }}</div>
<div class="cell-contact-number">
数量:<span id="spans">{{ item.quantity }} </span>
</div>
</div>
<div class="cell-contact-foot">
<div class="sheBei-info">
<!-- <div class="btn-text">数量: <span class="btn-subText">2{{item.quantity}}</span></div> -->
<div class="btn-text">备注:</div>
<div class="btn-subText">{{ item.remark }}</div>
</div>
<!-- 判断 -->
<div class="btn-boot" v-show="isboole">
<van-button
class="cell-contact-btn2"
type="danger"
plain
color="red"
@click="onRemove(item)"
>删除</van-button
>
<van-button
class="cell-contact-btn3"
type="info"
plain
color="#2487ff"
@click="onxiuGai(item)"
>修改</van-button
>
</div>
</div>
</div>
</div>
<!-- <div v-else><van-empty description="暂无设备" /></div> -->
</div>
<div class="btn-foot" v-show="isboole">
<van-button
class="login-field-btn"
round
block
type="info"
native-type="submit"
@click="onGkDataClick()"
>新增特种设备</van-button
>
</div>
</div>
</template>
<script>
import xApi from '../../../../api/xApi'
import { CouponList, Dialog } from 'vant'
import { Toast } from 'vant'
import { Empty } from 'vant'
export default {
data() {
return {
isboole: null,
sheBeiList: [],
textId: '',
}
},
methods: {
//
onxiuGai(item) {
this.$router.push({ path: `/safety/gkData/${item.id}/2` })
},
//
onRemove(item) {
Dialog.confirm({
title: '删除操作',
message: '确认也要删除吗?',
})
.then(() => {
let data = {
id: item.id,
}
xApi.postDelete(data).then((res) => {
//
let index = this.sheBeiList.findIndex((it) => it.id == data.id)
if (index > -1) {
this.sheBeiList.splice(index, 1)
}
})
Toast.success('删除成功')
})
.catch(() => {
// on cancel
})
},
//
onGkDataClick() {
this.$router.push({ path: `/safety/gkData/${this.textId}/1` })
},
getSheBei(id) {
if (this.sheBeiList.length == 0) {
Toast.loading({
duration: 0,
message: '加载中...',
forbidClick: true,
})
}
//id}
xApi.sheBei(id).then((res) => {
this.sheBeiList = res.data
//
Toast.clear()
})
},
},
mounted() {
//
let item = this.$route.params.id
this.textId = item
let name = this.$route.params.num
this.getSheBei(item)
//
if (name == 1 || name == 2) {
this.isboole = true
} else {
this.isboole = false
}
let userType = localStorage.getItem('mudu_type')
let userInfo = JSON.parse(localStorage.getItem('mudu_userInfo'))
//
if (
userInfo.profile.roleName !== '安全员' &&
userInfo.profile.roleName !== '综合执法局工作人员'
) {
//
this.isboole = false
}
},
}
</script>
<style lang="scss" scoped>
#spans {
margin-left: 0.1rem;
color: #999999;
}
.info-two {
/* border: 1px solid; */
padding: 0.1rem;
}
.cell-contact-list {
/* // border: 1px solid; */
padding: 0.1rem;
background: white;
}
.cell-contact-group {
width: 95%;
/* // margin: 0.167rem; */
/* background: #ffffff; */
/* // box-shadow: 0.0678rem 0 0 0 rgba(0, 0, 0, 0.1); */
border-radius: 0.1rem;
border: 1px solid rgba(0, 0, 0, 0.1);
}
.cell-contact-group {
width: 95%;
margin: 0.13rem;
/* // margin: 0.167rem; */
background: #ffffff;
/* // box-shadow: 0.0678rem 0 0 0 rgba(0, 0, 0, 0.1); */
border-radius: 0.1rem;
border: 1px solid rgba(0, 0, 0, 0.1);
}
.cell-contact-header {
height: 0.617rem;
overflow: hidden;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
padding-left: 0.2rem;
padding-right: 0.2rem;
}
.cell-contact-title {
font-size: 0.25rem;
font-family: Source Han Sans CN-Medium;
color: #333333;
float: left;
line-height: 0.617rem;
}
.cell-contact-subtitle {
font-size: 0.2rem;
font-family: Source Han Sans CN-Regular;
font-weight: 400;
color: #999999;
float: left;
line-height: 0.617rem;
margin-left: 0.2rem;
}
.cell-contact-number {
font-size: 0.2rem;
font-family: Source Han Sans CN-Regular;
font-weight: 400;
color: #333333;
float: right;
line-height: 0.617rem;
}
.cell-contact-content {
padding-left: 0.2rem;
padding-right: 0.2rem;
overflow: hidden;
}
.cell-contact-btn4 {
height: 0.5rem;
font-size: 0.217rem;
font-family: Source Han Sans CN-Regular;
font-weight: 400;
/* // color: #038310; */
border-radius: 0.1rem;
float: left;
margin: 0.2rem 0;
}
.cell-contact-des {
font-size: 0.2rem;
font-family: Source Han Sans CN-Regular;
font-weight: 400;
color: #999999;
float: right;
margin-top: 0.2rem;
line-height: 0.5rem;
}
.cell-contact-foot {
padding-left: 0.2rem;
padding-right: 0.2rem;
margin-top: 0.2rem;
overflow: hidden;
padding-bottom: 0.2rem;
display: flex;
}
.cell-contact-btn1 {
font-size: 0.25rem;
font-family: Source Han Sans CN-Regular;
font-weight: 400;
color: #ffffff;
height: 0.5rem;
float: left;
}
.cell-contact-btn2 {
font-size: 0.25rem;
font-family: Source Han Sans CN-Regular;
font-weight: 400;
color: #ffffff;
height: 0.5rem;
float: right;
margin-left: 0.2rem;
}
.cell-contact-btn3 {
font-size: 0.25rem;
font-family: Source Han Sans CN-Regular;
font-weight: 400;
color: #ffffff;
height: 0.5rem;
float: right;
margin-left: 0.1rem;
}
/* // 产值税收 */
.cell-gdptax-list {
margin-left: 0.158rem;
margin-right: 0.158rem;
margin-top: 0.126rem;
background-color: #ffffff;
}
.cell-group {
margin-top: 0.079rem;
margin-bottom: 0.079rem;
height: 1.908rem;
box-shadow: 0rem 0rem 0.1rem 0rem rgba(0, 0, 0, 0.09);
border-radius: 0.1rem;
}
.cell-title {
height: 0.25rem;
/* // border: 1px solid; */
line-height: 0.25rem;
font-size: 0.267rem;
font-weight: 400;
color: #333333;
padding-top: 0.267rem;
}
.cell-item {
margin-top: 0.337rem;
display: flex;
}
.cell-item .bott {
flex: 1;
height: 0.75rem;
}
.bott:nth-child(2) {
/* // border: 1px solid; */
display: flex;
}
.bott:nth-child(2) .cell-icon {
background: url('../../../../assets/image/safety/icon-gdp@2x.png');
background-size: 100% 100%;
}
.cell-item .bott:nth-child(1) {
border-right: 1px dashed #ccc;
padding-right: 0.258rem;
display: flex;
}
.cell-item .bott:nth-child(2) {
padding-right: 0.258rem;
}
.cell-icon {
width: 0.75rem;
height: 0.75rem;
/* // border: 1px solid; */
background: url('../../../../assets/image/safety/icon-tax@2x.png');
background-size: 100% 100%;
margin-left: 0.35rem;
}
.icon-te {
height: 0.75rem;
/* // border: 1px solid; */
margin-left: 0.283rem;
}
.icon-te > div {
margin-top: 0.14rem;
}
.icon-te div:nth-child(1) {
width: 0.94rem;
height: 0.217rem;
line-height: 0.217rem;
font-size: 0.2rem;
font-weight: 400;
color: #333333;
}
.icon-te div:nth-child(2) {
width: 1.217rem;
height: 0.208rem;
line-height: 0.208rem;
font-size: 0.267rem;
font-weight: bold;
color: #2487ff;
}
/* // .cell-contact-group:nth-child(2) .cell-contact-btn3{
// margin-top: .2rem;
// }
// .cell-contact-group:nth-child(2) .cell-contact-btn2{
// margin-top: .2rem;
// } */
/deep/ .van-button--round {
border-radius: 0.1rem;
}
.login-field-btn-group {
position: fixed;
bottom: 0;
margin-top: 0.7rem;
margin-left: 0.533rem;
margin-right: 0.533rem;
/* margin-bottom: .2rem; */
padding-bottom: 0.2rem;
}
.login-field-btn {
width: 85%;
height: 0.833rem;
margin: 0 auto;
background-color: #2487ff;
font-size: 0.3rem;
color: #ffffff;
font-family: 'AlibabaPuHuiTi-Medium';
}
#wu {
color: red;
border: 1px solid red;
}
.sheBei-info {
/* height: .5rem; */
/* border: 1px solid; */
flex: 1;
text-align: left;
}
.btn-boot {
/* border: 1px solid; */
display: flex;
justify-content: center;
align-items: center;
}
.btn-text {
font-size: 0.2rem;
font-family: Source Han Sans CN-Medium;
font-weight: 400;
color: #999999;
}
.btn-subText {
font-size: 0.15rem;
font-family: Source Han Sans CN-Medium;
font-weight: 400;
color: #ccc;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
}
</style>

@ -1,456 +1,126 @@
<template> <template>
<div class="enterprise-container"> <div class="vx-container">
<div class="tab-main"> <div class="general-header"></div>
<div <div class="general-view">
class="tab-item" <router-view />
:class="active == index ? 'activeTab' : ''"
v-for="(item, index) in tabList"
:key="item.value"
@click="changeTab(item.name, index)"
>
{{ item.name }}
<div class="tab-line" v-show="active == index"></div>
</div>
</div> </div>
<div class="container-box" ref="targetElement"> <div class="general-footnote">
<div class="timer-shaft" v-if="active == 0"> <div class="back-home" v-show="isShow" @click="backHome"></div>
<div class="timer-item"> <div class="app-download-hint"></div>
<div class="circle" style="top: 0.08rem"> <div class="download-btn" @click="handlerDownload()">
<img src="@/assets/image/vxEwm/big-circle2.png" alt="" /> <span>></span>
</div> <a>点击下载</a>
<div class="circle-line" style="top: 0.08rem; height: 135%"></div> <span><</span>
<div class="data-mian">
<div class="timer-line-title enterprise-name">
{{ enterpriseName }}
</div>
</div>
</div>
<div class="timer-item">
<div class="circle">
<img src="@/assets/image/vxEwm/circle.png" alt="" />
</div>
<div class="circle-line"></div>
<div class="row-cell">
<div class="cell-box">
<div class="left-icon-name">
<div class="left-icon">
<img src="@/assets/image/vxEwm/row-cell-1.png" alt="" />
</div>
<div class="left-name">日常巡查</div>
</div>
<div class="right-data-unit">
<div class="right-data">
{{ zhengchang.countValue ? zhengchang.countValue : 0 }}
</div>
<div class="right-unit"></div>
</div>
</div>
</div>
</div>
<div class="timer-item">
<div class="circle">
<img src="@/assets/image/vxEwm/circle.png" alt="" />
</div>
<div class="circle-line"></div>
<div class="row-cell">
<div class="two-rows">
<div class="top-row">
<div class="left-icon-name">
<div class="left-icon">
<img src="@/assets/image/vxEwm/row-cell-3.png" alt="" />
</div>
<div class="left-name">风险隐患</div>
</div>
<div class="right-data-unit">
<div class="right-data">{{ yinhuanSum }}</div>
<div class="right-unit"></div>
</div>
</div>
<div class="line"></div>
<div class="bottom-row">
<div>
<span class="unit">未派单</span>
<span class="unit-num" style="color: #f563cd">
{{ weipandan.countValue || 0 }}
</span>
<span class="unit"> </span>
</div>
<div>
<span class="unit">已派单</span>
<span class="unit-num" style="color: #ff9600">
{{ yipaidan.countValue || 0 }}
</span>
<span class="unit"> </span>
</div>
<div>
<span class="unit">已整改</span>
<span class="unit-num" style="color: #4cbaf3">
{{ yizhenggai.countValue || 0 }}
</span>
<span class="unit"> </span>
</div>
</div>
</div>
</div>
</div>
<div class="timer-item">
<div class="circle">
<img src="@/assets/image/vxEwm/circle.png" alt="" />
</div>
<div class="circle-line"></div>
<div class="row-cell">
<div class="two-rows">
<div class="top-row">
<div class="left-icon-name">
<div class="left-icon">
<img src="@/assets/image/vxEwm/row-cell-3.png" alt="" />
</div>
<div class="left-name">整改工单</div>
</div>
<div class="right-data-unit">
<div class="right-data">
{{ gongdanSum ? gongdanSum : 0 }}
</div>
<div class="right-unit"></div>
</div>
</div>
<div class="line"></div>
<div class="bottom-row">
<div></div>
<div>
<span class="unit">未处理</span>
<span class="unit-num" style="color: #f563cd">
{{ weigongdan ? weigongdan : 0 }}
</span>
<span class="unit"> </span>
</div>
<div>
<span class="unit">已处理</span>
<span class="unit-num" style="color: #4cbaf3">
{{ yigongdan ? yigongdan : 0 }}</span
>
<span class="unit"> </span>
</div>
</div>
</div>
</div>
</div>
<div class="timer-item">
<div class="circle">
<img src="@/assets/image/vxEwm/circle.png" alt="" />
</div>
<!-- <div class="circle-line"></div> -->
<div class="row-cell">
<div class="cell-box">
<div class="left-icon-name">
<div class="left-icon">
<img src="@/assets/image/vxEwm/row-cell-3.png" alt="" />
</div>
<div class="left-name">企业提交整改</div>
</div>
<div class="right-data-unit">
<div class="right-data">
{{ zhenggaiInfo ? zhenggaiInfo : 0 }}
</div>
<div class="right-unit"></div>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import xApi from '../../../api/xApi' import { phoneIf } from '@/util/sbIf.js'
import { Toast } from 'vant'
export default { export default {
data() { data() {
return { return {
enterpriseName: '', isShow: true,
active: 0, urlAndorid: 'https://www.pgyer.com/6TpZ',
tabList: [ urliOS:
{ name: '企业动态', value: 0 }, 'https://apps.apple.com/cn/app/%E6%9C%A8%E6%B8%8E%E6%99%BA%E6%85%A7%E5%AE%89%E7%9B%91/id1597682147',
{ name: '企业详情', value: 1 },
{ name: '检查记录', value: 2 },
],
zhengchang: {}, //
weipandan: {},
yipaidan: {}, //
yizhenggai: {}, //
zhenggaiInfo: null, //
yinhuanSum: 0,
gongdanSum: null, //
weigongdan: 0,
yigongdan: 0,
} }
}, },
mounted() { created() {
let enterpriseId = this.$route.query.id let windowBar = document.getElementById('statusBar')
this.enterpriseName = this.$route.query.name windowBar.style.height = 0 + 'px'
let isShow = this.$route.query.isShow
if (isShow) {
this.$store.commit('SET_IS_SHOW', isShow)
} else {
this.$store.commit('SET_IS_SHOW', false)
}
this.getYinHuan(enterpriseId)
this.getJianChaNum(enterpriseId)
this.getGongDan(enterpriseId)
this.getZhengGaiInfo(enterpriseId)
}, },
methods: { methods: {
changeTab(name, index) { backHome() {
if (this.active == index) return this.$router.back()
this.active = index
//
this.$refs.targetElement.scrollTo({
top: 0,
behavior: 'smooth', // 使
})
}, },
// /**
getYinHuan(id) { * 下载APP
let params = { */
EnterpriseID: id, handlerDownload() {
const equipment = phoneIf()
if (equipment == 'IOS') {
if (window.plus) window.plus.runtime.openURL(this.urliOS)
} else if (equipment == 'Android') {
if (window.plus) window.plus.runtime.openURL(this.urlAndorid)
} else {
Toast(`暂未开发${equipment}版本app`)
} }
xApi.getenterprisetroublecount(params).then((res) => {
res.data.forEach((item) => {
if (item.status == 0) {
this.weipandan = item
} else if (item.status == 1) {
this.yipaidan = item
} else if (item.status == 2) {
this.yizhenggai = item
}
})
if (JSON.stringify(this.weipandan) == '{}') {
//state
this.weipandan.countValue = 0
}
if (JSON.stringify(this.yipaidan) == '{}') {
this.yipaidan.countValue = 0
}
if (JSON.stringify(this.yizhenggai) == '{}') {
this.yizhenggai.countValue = 0
}
this.yinhuanSum =
this.weipandan.countValue +
this.yipaidan.countValue +
this.yizhenggai.countValue
// console.log('',JSON.stringify(this.weipandan) == '{}')
// console.log('',this.weipandan,'',this.yipaidan,'',this.yizhenggai,'',this.yinhuanSum)
})
},
//
getJianChaNum(id) {
let params = {
EnterpriseID: id,
}
xApi.getenterprisecheckscount(params).then((res) => {
res.data.forEach((it) => {
if (it.leaderJoin == 0) {
//
this.zhengchang = it
}
if (it.leaderJoin == 1) {
//
this.linDao = it
}
})
})
},
//
getGongDan(id) {
let params = {
EnterpriseID: id,
}
xApi.getenterpriseimprovingcount(params).then((res) => {
// console.log(res.data)
for (var i = 0; i < res.data.length; i++) {
this.gongdanSum += res.data[i].countValue
if (res.data[i].isFinal == 0) {
this.weigongdan += res.data[i].countValue
} else if (res.data[i].isFinal == 1) {
this.yigongdan += res.data[i].countValue
}
}
})
},
//
getZhengGaiInfo(id) {
let params = {
EnterpriseID: id,
}
xApi.getimprovingreviewcount(params).then((res) => {
for (var i = 0; i < res.data.length; i++) {
this.zhenggaiInfo += res.data[i].countValue
}
})
}, },
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
div { .vx-container {
text-align: left; position: relative;
box-sizing: border-box; top: 0;
left: 0;
width: 100%;
height: 100vh;
overflow: hidden;
} }
img { .general-header {
height: 100%; position: absolute;
top: 0;
left: 0;
z-index: 10;
width: 100%; width: 100%;
display: block; height: 16%;
background: url('~@/assets/image/vxEwm/top-header-bg.png');
background-size: 100% 100%;
} }
.enterprise-container { .general-view {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -53%);
z-index: 20;
width: 100%; width: 100%;
height: 100%; height: 75%;
background-color: #e8f3fc;
border-radius: 20px;
overflow: hidden; overflow: hidden;
box-sizing: border-box;
padding: 0.3rem 0.21rem;
} }
.tab-main { .general-footnote {
position: absolute;
bottom: 0;
left: 0;
z-index: 10;
width: 100%; width: 100%;
height: 20%;
background: url('~@/assets/image/vxEwm/bottom-foot-bg.png');
background-size: 100% 100%;
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
margin-bottom: 0.5rem; justify-content: flex-end;
& > div { .back-home {
flex: 1; width: 1.94rem;
font-size: 0.25rem; height: 0.5rem;
color: #666666; background: url('~@/assets/image/vxEwm/backHome.png');
text-align: center; background-size: 100% 100%;
font-weight: bold;
position: relative;
.tab-line {
position: absolute;
bottom: -0.35rem;
left: 50%;
transform: translateX(-50%);
width: 0.65rem;
height: 0.26rem;
background: url('~@/assets/image/vxEwm/tab-line.png');
background-size: 100% 100%;
}
} }
.activeTab { .app-download-hint {
color: #177fd4; width: 4.11rem;
height: 0.4rem;
margin: 0.1rem 0;
background: url('~@/assets/image/vxEwm/download-text.png');
background-size: 100% 100%;
} }
} .download-btn {
.container-box { margin-bottom: 0.1rem;
height: calc(100% - 0.7rem);
overflow-y: auto;
}
.timer-shaft {
margin-top: 0.4rem;
.timer-item {
position: relative;
.circle {
position: absolute;
left: 0;
top: 0.4rem;
z-index: 2;
width: 0.33rem;
height: 0.34rem;
}
.circle-line {
position: absolute;
left: calc(0.33rem / 2.3);
top: 0.4rem;
z-index: 1;
width: 0.03rem;
height: 100%;
background: url('~@/assets/image/vxEwm/circle-line.png');
background-size: 100% 100%;
}
.data-mian {
box-sizing: border-box;
padding-left: 0.43rem;
padding-bottom: 0.6rem;
width: 100%;
.enterprise-name {
font-weight: 800;
font-size: 0.29rem;
color: #333333;
}
}
.row-cell {
padding-left: 0.43rem;
padding-bottom: 0.5rem;
.cell-box {
padding: 0 0.42rem;
min-height: 1rem;
background: #fff;
border-radius: 28px;
display: flex;
align-items: center;
justify-content: space-between;
}
.two-rows {
padding: 0.2rem 0.42rem;
min-height: 1rem;
background: #fff;
border-radius: 28px;
}
}
}
.top-row {
display: flex;
align-items: center;
justify-content: space-between;
}
.line {
margin: 0.18rem 0;
height: 0.01rem;
background: #eeeeee;
}
.bottom-row {
display: flex;
align-items: center;
& > div {
flex: 1;
display: flex;
align-items: center;
.unit {
font-size: 0.2rem;
color: #666666;
font-weight: 500;
}
.unit-num {
font-size: 0.29rem;
font-weight: bold;
font-family: 'PingFang-SC-Bold';
margin: 0 0.1rem;
}
}
}
.left-icon-name {
display: flex;
align-items: center;
.left-icon {
width: 0.3rem;
height: 0.3rem;
margin-right: 0.1rem;
}
.left-name {
font-weight: 500;
font-size: 0.24rem;
color: #333333;
}
}
.right-data-unit {
display: flex; display: flex;
align-items: center; align-items: center;
.right-data { justify-content: center;
font-size: 0.38rem; color: #feffff;
color: #333333; a {
font-weight: bold; margin: 0 0.1rem;
font-family: 'PingFang-SC-Bold'; text-decoration: underline;
margin-right: 0.1rem;
}
.right-unit {
font-size: 0.19rem;
color: #666666;
font-weight: bold;
} }
} }
} }

@ -0,0 +1,457 @@
<template>
<div class="enterprise-container">
<div class="tab-main">
<div
class="tab-item"
:class="active == index ? 'activeTab' : ''"
v-for="(item, index) in tabList"
:key="item.value"
@click="changeTab(item.name, index)"
>
{{ item.name }}
<div class="tab-line" v-show="active == index"></div>
</div>
</div>
<div class="container-box" ref="targetElement">
<div class="timer-shaft" v-if="active == 0">
<div class="timer-item">
<div class="circle" style="top: 0.08rem">
<img src="@/assets/image/vxEwm/big-circle2.png" alt="" />
</div>
<div class="circle-line" style="top: 0.08rem; height: 135%"></div>
<div class="data-mian">
<div class="timer-line-title enterprise-name">
{{ enterpriseName }}
</div>
</div>
</div>
<div class="timer-item">
<div class="circle">
<img src="@/assets/image/vxEwm/circle.png" alt="" />
</div>
<div class="circle-line"></div>
<div class="row-cell">
<div class="cell-box">
<div class="left-icon-name">
<div class="left-icon">
<img src="@/assets/image/vxEwm/row-cell-1.png" alt="" />
</div>
<div class="left-name">日常巡查</div>
</div>
<div class="right-data-unit">
<div class="right-data">
{{ zhengchang.countValue ? zhengchang.countValue : 0 }}
</div>
<div class="right-unit"></div>
</div>
</div>
</div>
</div>
<div class="timer-item">
<div class="circle">
<img src="@/assets/image/vxEwm/circle.png" alt="" />
</div>
<div class="circle-line"></div>
<div class="row-cell">
<div class="two-rows">
<div class="top-row">
<div class="left-icon-name">
<div class="left-icon">
<img src="@/assets/image/vxEwm/row-cell-3.png" alt="" />
</div>
<div class="left-name">风险隐患</div>
</div>
<div class="right-data-unit">
<div class="right-data">{{ yinhuanSum }}</div>
<div class="right-unit"></div>
</div>
</div>
<div class="line"></div>
<div class="bottom-row">
<div>
<span class="unit">未派单</span>
<span class="unit-num" style="color: #f563cd">
{{ weipandan.countValue || 0 }}
</span>
<span class="unit"> </span>
</div>
<div>
<span class="unit">已派单</span>
<span class="unit-num" style="color: #ff9600">
{{ yipaidan.countValue || 0 }}
</span>
<span class="unit"> </span>
</div>
<div>
<span class="unit">已整改</span>
<span class="unit-num" style="color: #4cbaf3">
{{ yizhenggai.countValue || 0 }}
</span>
<span class="unit"> </span>
</div>
</div>
</div>
</div>
</div>
<div class="timer-item">
<div class="circle">
<img src="@/assets/image/vxEwm/circle.png" alt="" />
</div>
<div class="circle-line"></div>
<div class="row-cell">
<div class="two-rows">
<div class="top-row">
<div class="left-icon-name">
<div class="left-icon">
<img src="@/assets/image/vxEwm/row-cell-3.png" alt="" />
</div>
<div class="left-name">整改工单</div>
</div>
<div class="right-data-unit">
<div class="right-data">
{{ gongdanSum ? gongdanSum : 0 }}
</div>
<div class="right-unit"></div>
</div>
</div>
<div class="line"></div>
<div class="bottom-row">
<div></div>
<div>
<span class="unit">未处理</span>
<span class="unit-num" style="color: #f563cd">
{{ weigongdan ? weigongdan : 0 }}
</span>
<span class="unit"> </span>
</div>
<div>
<span class="unit">已处理</span>
<span class="unit-num" style="color: #4cbaf3">
{{ yigongdan ? yigongdan : 0 }}</span
>
<span class="unit"> </span>
</div>
</div>
</div>
</div>
</div>
<div class="timer-item">
<div class="circle">
<img src="@/assets/image/vxEwm/circle.png" alt="" />
</div>
<!-- <div class="circle-line"></div> -->
<div class="row-cell">
<div class="cell-box">
<div class="left-icon-name">
<div class="left-icon">
<img src="@/assets/image/vxEwm/row-cell-3.png" alt="" />
</div>
<div class="left-name">企业提交整改</div>
</div>
<div class="right-data-unit">
<div class="right-data">
{{ zhenggaiInfo ? zhenggaiInfo : 0 }}
</div>
<div class="right-unit"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import xApi from '../../../api/xApi'
export default {
data() {
return {
enterpriseName: '',
active: 0,
tabList: [
{ name: '企业动态', value: 0 },
{ name: '企业详情', value: 1 },
{ name: '检查记录', value: 2 },
],
zhengchang: {}, //
weipandan: {},
yipaidan: {}, //
yizhenggai: {}, //
zhenggaiInfo: null, //
yinhuanSum: 0,
gongdanSum: null, //
weigongdan: 0,
yigongdan: 0,
}
},
mounted() {
let enterpriseId = this.$route.query.id
this.enterpriseName = this.$route.query.name
let isShow = this.$route.query.isShow
if (isShow) {
this.$store.commit('SET_IS_SHOW', isShow)
} else {
this.$store.commit('SET_IS_SHOW', false)
}
this.getYinHuan(enterpriseId)
this.getJianChaNum(enterpriseId)
this.getGongDan(enterpriseId)
this.getZhengGaiInfo(enterpriseId)
},
methods: {
changeTab(name, index) {
if (this.active == index) return
this.active = index
//
this.$refs.targetElement.scrollTo({
top: 0,
behavior: 'smooth', // 使
})
},
//
getYinHuan(id) {
let params = {
EnterpriseID: id,
}
xApi.getenterprisetroublecount(params).then((res) => {
res.data.forEach((item) => {
if (item.status == 0) {
this.weipandan = item
} else if (item.status == 1) {
this.yipaidan = item
} else if (item.status == 2) {
this.yizhenggai = item
}
})
if (JSON.stringify(this.weipandan) == '{}') {
//state
this.weipandan.countValue = 0
}
if (JSON.stringify(this.yipaidan) == '{}') {
this.yipaidan.countValue = 0
}
if (JSON.stringify(this.yizhenggai) == '{}') {
this.yizhenggai.countValue = 0
}
this.yinhuanSum =
this.weipandan.countValue +
this.yipaidan.countValue +
this.yizhenggai.countValue
// console.log('',JSON.stringify(this.weipandan) == '{}')
// console.log('',this.weipandan,'',this.yipaidan,'',this.yizhenggai,'',this.yinhuanSum)
})
},
//
getJianChaNum(id) {
let params = {
EnterpriseID: id,
}
xApi.getenterprisecheckscount(params).then((res) => {
res.data.forEach((it) => {
if (it.leaderJoin == 0) {
//
this.zhengchang = it
}
if (it.leaderJoin == 1) {
//
this.linDao = it
}
})
})
},
//
getGongDan(id) {
let params = {
EnterpriseID: id,
}
xApi.getenterpriseimprovingcount(params).then((res) => {
// console.log(res.data)
for (var i = 0; i < res.data.length; i++) {
this.gongdanSum += res.data[i].countValue
if (res.data[i].isFinal == 0) {
this.weigongdan += res.data[i].countValue
} else if (res.data[i].isFinal == 1) {
this.yigongdan += res.data[i].countValue
}
}
})
},
//
getZhengGaiInfo(id) {
let params = {
EnterpriseID: id,
}
xApi.getimprovingreviewcount(params).then((res) => {
for (var i = 0; i < res.data.length; i++) {
this.zhenggaiInfo += res.data[i].countValue
}
})
},
},
}
</script>
<style lang="scss" scoped>
div {
text-align: left;
box-sizing: border-box;
}
img {
height: 100%;
width: 100%;
display: block;
}
.enterprise-container {
width: 100%;
height: 100%;
overflow: hidden;
}
.tab-main {
width: 100%;
display: flex;
align-items: center;
margin-bottom: 0.5rem;
& > div {
flex: 1;
font-size: 0.25rem;
color: #666666;
text-align: center;
font-weight: bold;
position: relative;
.tab-line {
position: absolute;
bottom: -0.35rem;
left: 50%;
transform: translateX(-50%);
width: 0.65rem;
height: 0.26rem;
background: url('~@/assets/image/vxEwm/tab-line.png');
background-size: 100% 100%;
}
}
.activeTab {
color: #177fd4;
}
}
.container-box {
height: calc(100% - 0.7rem);
overflow-y: auto;
}
.timer-shaft {
margin-top: 0.4rem;
.timer-item {
position: relative;
.circle {
position: absolute;
left: 0;
top: 0.4rem;
z-index: 2;
width: 0.33rem;
height: 0.34rem;
}
.circle-line {
position: absolute;
left: calc(0.33rem / 2.3);
top: 0.4rem;
z-index: 1;
width: 0.03rem;
height: 100%;
background: url('~@/assets/image/vxEwm/circle-line.png');
background-size: 100% 100%;
}
.data-mian {
box-sizing: border-box;
padding-left: 0.43rem;
padding-bottom: 0.6rem;
width: 100%;
.enterprise-name {
font-weight: 800;
font-size: 0.29rem;
color: #333333;
}
}
.row-cell {
padding-left: 0.43rem;
padding-bottom: 0.5rem;
.cell-box {
padding: 0 0.42rem;
min-height: 1rem;
background: #fff;
border-radius: 28px;
display: flex;
align-items: center;
justify-content: space-between;
}
.two-rows {
padding: 0.2rem 0.42rem;
min-height: 1rem;
background: #fff;
border-radius: 28px;
}
}
}
.top-row {
display: flex;
align-items: center;
justify-content: space-between;
}
.line {
margin: 0.18rem 0;
height: 0.01rem;
background: #eeeeee;
}
.bottom-row {
display: flex;
align-items: center;
& > div {
flex: 1;
display: flex;
align-items: center;
.unit {
font-size: 0.2rem;
color: #666666;
font-weight: 500;
}
.unit-num {
font-size: 0.29rem;
font-weight: bold;
font-family: 'PingFang-SC-Bold';
margin: 0 0.1rem;
}
}
}
.left-icon-name {
display: flex;
align-items: center;
.left-icon {
width: 0.3rem;
height: 0.3rem;
margin-right: 0.1rem;
}
.left-name {
font-weight: 500;
font-size: 0.24rem;
color: #333333;
}
}
.right-data-unit {
display: flex;
align-items: center;
.right-data {
font-size: 0.38rem;
color: #333333;
font-weight: bold;
font-family: 'PingFang-SC-Bold';
margin-right: 0.1rem;
}
.right-unit {
font-size: 0.19rem;
color: #666666;
font-weight: bold;
}
}
}
</style>

@ -1,18 +1,10 @@
<template> <template>
<div class="vx-container"> <div class="vx-container">
<div class="general-header"></div> <div class="general-header"></div>
<div <div class="general-view">
class="general-view"
:style="{ transform: $store.state.isShow ? 'translate(-50%, -50%)' : '' }"
>
<router-view /> <router-view />
</div> </div>
<div class="general-footnote"> <div class="general-footnote">
<!-- <div
class="back-home"
v-show="$store.state.isShow"
@click="backHome"
></div> -->
<div class="app-download-hint"></div> <div class="app-download-hint"></div>
<div class="download-btn" @click="handlerDownload()"> <div class="download-btn" @click="handlerDownload()">
<span>></span> <span>></span>
@ -39,10 +31,6 @@ export default {
windowBar.style.height = 0 + 'px' windowBar.style.height = 0 + 'px'
}, },
methods: { methods: {
backHome() {
this.$store.commit('SET_IS_SHOW', false)
this.$router.back()
},
/** /**
* 下载APP * 下载APP
*/ */

Loading…
Cancel
Save