This commit is contained in:
yanran200730
2022-10-10 11:07:23 +08:00
parent 90fed1bae2
commit 8f73ddb063
3 changed files with 18 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
<template>
<ai-list class="list">
<ai-title slot="title" title="卡口登记" isShowBottomBorder :instance="instance" :hideLevel="0" :disabledLevel="disabledLevel" isShowArea v-model="search.arriveAreaId" @change="changeArea"></ai-title>
<ai-title slot="title" title="卡口登记" v-if="this.search.arriveAreaId" isShowBottomBorder :instance="instance" :isShowArea="true" v-model="search.arriveAreaId" @change="changeArea"></ai-title>
<template slot="content">
<div class="statistics-top">
<div class="statistics-top__item">
@@ -133,7 +133,8 @@
tableData: [],
total: 0,
loading: false,
disabledLevel: 0
disabledLevel: 0,
areaId: ''
}
},
@@ -142,9 +143,12 @@
},
created () {
this.disabledLevel = this.user.info.areaList.length - 1
this.search.arriveAreaId = this.user.info.areaId
this.loading = true
this.instance.post(`/app/appdvcpconfig/getCorpArea`).then(res => {
if (res.code == 0) {
this.search.arriveAreaId = res.data
}
})
this.getTotalInfo()
this.getDictList()

View File

@@ -93,7 +93,6 @@
</template>
<script>
import { mapState } from 'vuex'
import * as echarts from 'echarts'
export default {
name: 'Statistics',
@@ -126,10 +125,6 @@
}
},
computed: {
...mapState(['user'])
},
watch: {
unitName (val) {
this.$refs.tree.filter(val)
@@ -137,20 +132,20 @@
},
mounted () {
this.areaId = this.user.info.areaId
this.areaName = this.user.info.areaName
this.endTime = this.$moment().format('YYYY-MM-DD')
this.beginTime = this.$moment(new Date().getTime() - 7 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD')
this.getTree()
this.loading = true
this.$nextTick(() => {
this.chart1 = echarts.init(document.querySelector('.chart1'))
this.chart2 = echarts.init(document.querySelector('.chart2'))
window.addEventListener('resize', this.onResize)
this.dict.load('sex').then(() => {
this.getInfo()
})
this.getInfo()
})
this.instance.post(`/app/appdvcpconfig/getCorpArea`).then(res => {
if (res.code == 0) {
this.areaId = res.data
this.getTree(res.data)
}
})
},
@@ -165,7 +160,6 @@
onTreeChange (e) {
this.areaId = e.id
this.areaName = e.name
this.$nextTick(() => {
this.getInfo()
@@ -177,8 +171,8 @@
return data.name.indexOf(value) !== -1
},
getTree () {
this.instance.post(`/admin/area/queryAllArea?id=${this.user.info.areaId}`).then(res => {
getTree (areaId) {
this.instance.post(`/admin/area/queryAllArea?id=${areaId}`).then(res => {
if (res.code === 0) {
let parent = res.data.map(v => {
v.label = v.name

View File

@@ -117,7 +117,7 @@
@onConfirm="onConfirm">
<el-form ref="form" :model="form" label-width="110px" label-position="right">
<el-form-item label="返乡登记" prop="fxdj">
<ai-area-get multiple v-model="form.fxdj" :root="user.info.areaId" :instance="instance" showAll></ai-area-get>
<ai-area-get multiple v-model="form.fxdj" :root="user.info.areaId" :instance="instance"></ai-area-get>
</el-form-item>
<el-form-item label="卡口登记-卡口" prop="kkdjKk">
<ai-select