Commit 942e589b authored by 何鹏程's avatar 何鹏程

修改完成功能

parent 1a63f143
...@@ -71,3 +71,11 @@ export function queryTotalCarInfoByHospital(params) { ...@@ -71,3 +71,11 @@ export function queryTotalCarInfoByHospital(params) {
data: params data: params
}) })
} }
export function unBindSiteToEmergencyCar(params) {
return request({
url: '/api/team/car/unBindSiteToEmergencyCar',
method: 'POST',
data: params
})
}
<template> <template>
<div class="main-page carStatistics"> <div class="main-page carStatistics">
<div class="main-page-header"> <div class="main-page-header">
<p class="title">急救车统计</p> <p class="title">救护车统计</p>
<el-form <el-form
:inline="true" :inline="true"
:model="searchForm" :model="searchForm"
...@@ -30,16 +30,6 @@ ...@@ -30,16 +30,6 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item
prop="isEmergencyCar"
label="是否120急救车"
>
<el-radio-group v-model="searchForm.isEmergencyCar">
<el-radio label="">全部</el-radio>
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
<div class="btns"> <div class="btns">
<el-button <el-button
type="primary" type="primary"
...@@ -71,7 +61,7 @@ ...@@ -71,7 +61,7 @@
</div> </div>
</div> </div>
<div class="box"> <div class="box">
<div class="title">辖区急救车辆总数排行</div> <div class="title">院前急救车总数排行</div>
<EchartsBar <EchartsBar
:dataList="carCountList" :dataList="carCountList"
:areaList="areaList" :areaList="areaList"
...@@ -79,11 +69,11 @@ ...@@ -79,11 +69,11 @@
/> />
</div> </div>
<div class="box mb"> <div class="box mb">
<div class="title">辖区站点总数排行</div> <div class="title">非院前急救车总数排行</div>
<EchartsBar <EchartsBar
:dataList="siteCountList" :dataList="unCarCountList"
:areaList="areaList" :areaList="areaList"
title="站点" title="车辆"
/> />
</div> </div>
</div> </div>
...@@ -103,12 +93,11 @@ export default { ...@@ -103,12 +93,11 @@ export default {
data() { data() {
return { return {
searchForm: { searchForm: {
area: '', area: ''
isEmergencyCar: ''
}, },
areaList: [], areaList: [],
carCountList: [], carCountList: [],
siteCountList: [], unCarCountList: [],
vechieSpecialList: [], vechieSpecialList: [],
vechieTypeList: [], vechieTypeList: [],
vechieType: [], vechieType: [],
...@@ -128,9 +117,9 @@ export default { ...@@ -128,9 +117,9 @@ export default {
getData() { getData() {
queryEmergencyResource(this.searchForm).then(res => { queryEmergencyResource(this.searchForm).then(res => {
if (res.msg == 201) { if (res.msg == 201) {
const { carCountList, siteCountList, vechieSpecialList, vechieTypeList } = res.respData const { carCountList, unCarCountList, vechieSpecialList, vechieTypeList } = res.respData
this.carCountList = carCountList || [] this.carCountList = carCountList || []
this.siteCountList = siteCountList || [] this.unCarCountList = unCarCountList || []
this.vechieSpecialList = vechieSpecialList || [] this.vechieSpecialList = vechieSpecialList || []
this.vechieTypeList = vechieTypeList || [] this.vechieTypeList = vechieTypeList || []
} else { } else {
......
...@@ -163,10 +163,10 @@ ...@@ -163,10 +163,10 @@
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="车辆类型:" label="车辆类型:"
prop="vechieType" prop="vechieTypeNew"
> >
<el-select <el-select
v-model="dataForm.vechieType" v-model="dataForm.vechieTypeNew"
placeholder="请选择车辆类型" placeholder="请选择车辆类型"
style="width: 100%" style="width: 100%"
> >
...@@ -179,8 +179,7 @@ ...@@ -179,8 +179,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="是否为院前急救车:" label="是否为院前救护车:"
v-if="dataForm.vechieType === 3"
prop="isPreHospitalVechie" prop="isPreHospitalVechie"
> >
<el-radio-group <el-radio-group
...@@ -191,8 +190,8 @@ ...@@ -191,8 +190,8 @@
<el-radio :label="2"></el-radio> <el-radio :label="2"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item <!-- <el-form-item
label="是否为120急救车:" label="是否为120救护车:"
prop="isEmergencyCar" prop="isEmergencyCar"
> >
<el-radio-group <el-radio-group
...@@ -202,7 +201,7 @@ ...@@ -202,7 +201,7 @@
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio> <el-radio :label="2"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item> -->
<el-form-item <el-form-item
label="车辆来源:" label="车辆来源:"
prop="vechieSource" prop="vechieSource"
...@@ -269,13 +268,14 @@ ...@@ -269,13 +268,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="特殊设备(选填):" label="特殊设备:"
prop="specialDevice" prop="specialDevice"
class="radio-group-type3" class="radio-group-type3"
> >
<el-checkbox-group v-model="dataForm.specialDevice"> <el-checkbox-group v-model="dataForm.specialDevice">
<el-checkbox label="1">车载CT</el-checkbox> <el-checkbox label="1">车载CT</el-checkbox>
<el-checkbox label="2">车载ECMO</el-checkbox> <el-checkbox label="2">车载ECMO</el-checkbox>
<el-checkbox label="4">无特殊设备</el-checkbox>
<el-checkbox label="3">其他</el-checkbox> <el-checkbox label="3">其他</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<el-input <el-input
...@@ -316,7 +316,7 @@ export default { ...@@ -316,7 +316,7 @@ export default {
name: 'emergencyCarDialog', name: 'emergencyCarDialog',
computed: { computed: {
title: function() { title: function() {
let str = '武汉市医疗急救车辆信息' let str = '武汉市医疗救护车辆信息'
if (this.type === 'add') { if (this.type === 'add') {
str += '填写' str += '填写'
} else if (this.type === 'update') { } else if (this.type === 'update') {
...@@ -388,7 +388,7 @@ export default { ...@@ -388,7 +388,7 @@ export default {
{ required: true, message: '请输入车辆管理负责人' }, { required: true, message: '请输入车辆管理负责人' },
], ],
isPreHospitalVechie: [ isPreHospitalVechie: [
{ required: true, message: '请选择是否为院前急救车' }, { required: true, message: '请选择是否为院前救护车' },
], ],
contactPhone: [ contactPhone: [
{ required: true, message: '请输入负责人联系方式' }, { required: true, message: '请输入负责人联系方式' },
...@@ -419,6 +419,9 @@ export default { ...@@ -419,6 +419,9 @@ export default {
licensePlateNumber: [ licensePlateNumber: [
{ required: true, message: '请输入车牌号' }, { required: true, message: '请输入车牌号' },
], ],
specialDevice: [
{ required: true, message: '请选择特殊设备' },
]
}, },
vechieTypeList: [], vechieTypeList: [],
areaList: [], areaList: [],
...@@ -566,5 +569,52 @@ export default { ...@@ -566,5 +569,52 @@ export default {
} }
} }
} }
.el-input.is-disabled .el-input__inner {
border: 1px solid #40a2de;
background-color: #fff;
color: #606266;
}
.el-radio__input.is-disabled + span.el-radio__label {
color: #606266;
}
.el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #fff;
border-color: #40a2de;
}
.el-radio__input.is-disabled.is-checked .el-radio__inner::after {
background-color: #40a2de;
}
.el-radio__input.is-disabled .el-radio__inner {
border: 1px solid #40a2de;
background-color: #fff;
}
.el-radio__input.is-checked + span.el-radio__label {
color: #017bce;
}
.el-checkbox__input.is-disabled+span.el-checkbox__label{
color: #606266;
}
.el-checkbox__input.is-checked.is-disabled+span.el-checkbox__label{
color: #017bce;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner{
background-color: #017BCE;
border-color: #017BCE;
}
.el-checkbox__input.is-disabled .el-checkbox__inner{
background-color: #fff;
border-color: #40a2de;
}
.el-button--primary.is-disabled, .el-button--primary.is-disabled:hover, .el-button--primary.is-disabled:focus, .el-button--primary.is-disabled:active{
background-color: #017BCE;
border-color: #017BCE;
color: #fff;
}
.el-textarea.is-disabled .el-textarea__inner{
background-color: #fff;
border-color: #40a2de;
color: #606266;
}
} }
</style> </style>
<template> <template>
<div class="main-page"> <div class="main-page">
<div class="main-page-header"> <div class="main-page-header">
<p class="title">急救车资源</p> <p class="title">救护车资源</p>
<el-form <el-form
:inline="true" :inline="true"
:model="searchForm" :model="searchForm"
...@@ -45,11 +45,11 @@ ...@@ -45,11 +45,11 @@
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
prop="vechieType" prop="vechieTypeNew"
label="车辆类型" label="车辆类型"
> >
<el-select <el-select
v-model="searchForm.vechieType" v-model="searchForm.vechieTypeNew"
placeholder="请选择车辆类型" placeholder="请选择车辆类型"
style="width: 100%" style="width: 100%"
:clearable="true" :clearable="true"
...@@ -109,6 +109,16 @@ ...@@ -109,6 +109,16 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item
prop="isPreHospitalVechie"
label="是否为院前救护车:"
>
<el-radio-group v-model="searchForm.isPreHospitalVechie">
<el-radio label="">全部</el-radio>
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
<div class="btns"> <div class="btns">
<el-button <el-button
type="primary" type="primary"
...@@ -198,9 +208,14 @@ ...@@ -198,9 +208,14 @@
>删除</el-link> >删除</el-link>
<el-link <el-link
type="primary" type="primary"
v-if="!checkPermission()" v-if="!scope.row.siteId && !checkPermission()"
@click="siteHandler(scope.row.id)" @click="siteHandler(scope.row.id)"
>绑定站点</el-link> >绑定{{scope.row.siteId}}站点</el-link>
<el-link
type="primary"
v-if="scope.row.siteId && !checkPermission()"
@click="unboundHandler(scope.row.id)"
>解绑</el-link>
<el-link <el-link
type="primary" type="primary"
v-if="(scope.row.auditStatus === 1 || scope.row.auditStatus === 5) && checkPermission()" v-if="(scope.row.auditStatus === 1 || scope.row.auditStatus === 5) && checkPermission()"
...@@ -226,7 +241,7 @@ ...@@ -226,7 +241,7 @@
import { tableDataMixin } from '../../common/js/mixin' import { tableDataMixin } from '../../common/js/mixin'
import EmergencyCarDialog from './components/emergencyCarDialog.vue' import EmergencyCarDialog from './components/emergencyCarDialog.vue'
import BindSiteDialog from './components/bindSiteDialog.vue' import BindSiteDialog from './components/bindSiteDialog.vue'
import { queryEmergencyCarPageList, deleteEmergencyCar, toExamineEmergencyCar } from '@/api/emergencyCar' import { queryEmergencyCarPageList, deleteEmergencyCar, toExamineEmergencyCar, unBindSiteToEmergencyCar } from '@/api/emergencyCar'
import { exportEmergencyResources } from '@/api/common' import { exportEmergencyResources } from '@/api/common'
import { queryEmergencySiteList } from '@/api/site' import { queryEmergencySiteList } from '@/api/site'
...@@ -245,8 +260,9 @@ export default { ...@@ -245,8 +260,9 @@ export default {
area: '', area: '',
licensePlateNumber: '', licensePlateNumber: '',
vechieUseStatus: '', vechieUseStatus: '',
vechieType: '', vechieTypeNew: '',
siteId: '' siteId: '',
isPreHospitalVechie: ''
}, },
vechieTypeList: [], vechieTypeList: [],
auditStatusList: [], auditStatusList: [],
...@@ -271,7 +287,7 @@ export default { ...@@ -271,7 +287,7 @@ export default {
formatter: this.areaFormatter formatter: this.areaFormatter
}, },
{ {
name: '急救车牌号', name: '救护车牌号',
key: 'licensePlateNumber', key: 'licensePlateNumber',
sortable: false, sortable: false,
width: '120', width: '120',
...@@ -293,16 +309,16 @@ export default { ...@@ -293,16 +309,16 @@ export default {
formatter: this.vechieUseStatusFormatter formatter: this.vechieUseStatusFormatter
}, },
{ {
name: '是否120急救车', name: '是否为院前救护车',
key: 'isEmergencyCar', key: 'isPreHospitalVechie',
sortable: false, sortable: false,
width: '80', width: '120',
fixed: false, fixed: false,
formatter: this.isPreHospitalVechieFormatter formatter: this.isPreHospitalVechieFormatter
}, },
{ {
name: '车辆类型', name: '车辆类型',
key: 'vechieType', key: 'vechieTypeNew',
sortable: false, sortable: false,
width: '120', width: '120',
fixed: false, fixed: false,
...@@ -433,6 +449,24 @@ export default { ...@@ -433,6 +449,24 @@ export default {
this.search() this.search()
}) })
}, },
unboundHandler(id) {
this.$confirm('是否确定解绑?', '提示', {
confirmButtonText: '解绑',
cancelButtonText: '取消',
distinguishCancelAndClose: true,
type: 'warning'
}).then(() => {
unBindSiteToEmergencyCar({ id: id }).then(res => {
if (res.msg === 201) {
this.$message.success('操作成功!')
} else {
this.$message.error(res.content)
}
this.search()
})
})
}
} }
} }
</script> </script>
......
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
type="primary" type="primary"
:disabled="scope.row.patientType === 5"
@click="goDetail('detail', scope.row)" @click="goDetail('detail', scope.row)"
>查看详情</el-link> >查看详情</el-link>
<el-link <el-link
...@@ -219,7 +220,7 @@ export default { ...@@ -219,7 +220,7 @@ export default {
width: '100', width: '100',
fixed: false, fixed: false,
formatter: (row, column, cellValue, index) => { formatter: (row, column, cellValue, index) => {
return ['', '胸痛中心', '卒中中心', '创伤中心', '烧伤中心'][cellValue] || '' return ['', '胸痛中心', '卒中中心', '创伤中心', '烧伤中心', '其他'][cellValue] || ''
} }
}, },
{ {
...@@ -253,7 +254,8 @@ export default { ...@@ -253,7 +254,8 @@ export default {
mounted() { mounted() {
// 获取字典 // 获取字典
getDic(['patient_type']).then(res => { getDic(['patient_type']).then(res => {
this.patientTypeList = res.patient_type this.patientTypeList = res.patient_type
console.log(this.patientTypeList)
}) })
this.search() this.search()
}, },
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
label="所在位置" label="所在位置"
> >
<el-radio-group v-model="dataForm.storePlace"> <el-radio-group v-model="dataForm.storePlace">
<el-radio :label="1">急救</el-radio> <el-radio :label="1">救护</el-radio>
<el-radio :label="2">药管处</el-radio> <el-radio :label="2">药管处</el-radio>
<el-radio :label="3">医院急诊科</el-radio> <el-radio :label="3">医院急诊科</el-radio>
</el-radio-group> </el-radio-group>
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="上级医院名称" label="挂靠单位"
prop="hospitalCode" prop="hospitalCode"
> >
{{ userInfo.hospitalName }} {{ userInfo.hospitalName }}
...@@ -168,6 +168,15 @@ export default { ...@@ -168,6 +168,15 @@ export default {
], ],
siteStatus: [ siteStatus: [
{ required: true, message: '请选择站点状态' }, { required: true, message: '请选择站点状态' },
],
siteLocation: [
{ required: true, message: '请输入站点位置' },
],
siteLongitude: [
{ required: true, message: '请输入站点经度' },
],
siteLatitude: [
{ required: true, message: '请输入站点纬度' },
] ]
} }
} }
......
<template> <template>
<div class="main-page"> <div class="main-page">
<div class="main-page-header"> <div class="main-page-header">
<p class="title">急诊站点资源</p> <p class="title">急诊站点信息</p>
<el-form <el-form
:inline="true" :inline="true"
:model="searchForm" :model="searchForm"
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="上级医院名称" label="挂靠单位"
prop="hospitalCode" prop="hospitalCode"
v-if="checkPermission()" v-if="checkPermission()"
> >
<el-select <el-select
v-model="searchForm.hospitalCode" v-model="searchForm.hospitalCode"
placeholder="请选择上级医院" placeholder="请选择挂靠单位"
style="width: 100%" style="width: 100%"
filterable filterable
remote remote
...@@ -237,7 +237,7 @@ export default { ...@@ -237,7 +237,7 @@ export default {
fixed: false fixed: false
}, },
{ {
name: '上级医院名称', name: '挂靠单位',
key: 'hospitalName', key: 'hospitalName',
sortable: false, sortable: false,
width: '200', width: '200',
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
:data="siteListData" :data="siteListData"
highlight-current-row highlight-current-row
ref="siteListData" ref="siteListData"
border
height="100%" height="100%"
@current-change="getCarDataList" @current-change="getCarDataList"
> >
...@@ -61,10 +62,11 @@ ...@@ -61,10 +62,11 @@
</div> </div>
</div> </div>
<div class="bottom main-table"> <div class="bottom main-table">
<div class="title"><span class="bed"><span class="red">{{siteName}}</span>车辆明细信息</span> (共<span class="red"> {{carListData.length}} </span>急救车)</div> <div class="title"><span class="bed"><span class="red">{{siteName}}</span>车辆明细信息</span> (共<span class="red"> {{carListData.length}} </span>救护车)</div>
<div class="table-box"> <div class="table-box">
<el-table <el-table
:data="carListData" :data="carListData"
border
height="100%" height="100%"
> >
<el-table-column <el-table-column
...@@ -102,7 +104,7 @@ ...@@ -102,7 +104,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="isPreHospitalVechie" prop="isPreHospitalVechie"
label="是否院前急救车" label="是否院前救护车"
min-width="80" min-width="80"
:formatter="isPreHospitalVechieFormatter" :formatter="isPreHospitalVechieFormatter"
> >
...@@ -167,17 +169,22 @@ export default { ...@@ -167,17 +169,22 @@ export default {
this.siteListData = res.respData this.siteListData = res.respData
res.respData.forEach(item => { res.respData.forEach(item => {
if (item.siteLatitude && item.siteLongitude) { if (item.siteLatitude && item.siteLongitude) {
const point = new BMapGL.Point(item.siteLongitude, item.siteLatitude) try {
const marker = new BMapGL.Marker(point) const point = new BMapGL.Point(item.siteLongitude, item.siteLatitude)
this.map.addOverlay(marker) const marker = new BMapGL.Marker(point)
marker.addEventListener('click', () => { this.map.addOverlay(marker)
this.getSiteListData(item.areaName) marker.addEventListener('click', () => {
this.$nextTick(() => { this.getSiteListData(item.areaName)
const dataList = this.allData.filter(i => i.id === item.id) || [] this.$nextTick(() => {
this.$refs.siteListData.setCurrentRow(dataList[0]); const dataList = this.allData.filter(i => i.id === item.id) || []
this.$refs.siteListData.setCurrentRow(dataList[0]);
})
map.centerAndZoom(new BMapGL.Point(item.siteLongitude, item.siteLatitude), 18)
}) })
map.centerAndZoom(new BMapGL.Point(item.siteLongitude, item.siteLatitude), 18) } catch (error) {
})
}
} }
}) })
} }
...@@ -188,14 +195,19 @@ export default { ...@@ -188,14 +195,19 @@ export default {
} }
, ,
init() { init() {
//划分出行政区 try {
this.map = new BMapGL.Map('allmap') this.map = new BMapGL.Map('allmap')
this.map.centerAndZoom(new BMapGL.Point(defaultCenterPoint[0], defaultCenterPoint[1]), 11) this.map.centerAndZoom(new BMapGL.Point(defaultCenterPoint[0], defaultCenterPoint[1]), 11)
this.map.enableScrollWheelZoom(true); this.map.enableScrollWheelZoom(true);
// 划分出行政单位 // 划分出行政单位
this.getSelections() this.getSelections()
// 地图上打点 // 地图上打点
this.markerHandler() this.markerHandler()
} catch (error) {
this.getSelections()
// 地图上打点
this.markerHandler()
}
}, },
getBoundary(districtName) { getBoundary(districtName) {
const bdary = new BMapGL.Boundary() const bdary = new BMapGL.Boundary()
...@@ -238,7 +250,11 @@ export default { ...@@ -238,7 +250,11 @@ export default {
this.$message.error(res.content) this.$message.error(res.content)
} }
}) })
this.map.centerAndZoom(new BMapGL.Point(val.siteLongitude, val.siteLatitude), 18) try {
this.map.centerAndZoom(new BMapGL.Point(val.siteLongitude, val.siteLatitude), 18)
} catch (error) {
}
}, },
vechieTypeFormatter(row, column, cellValue, index) { vechieTypeFormatter(row, column, cellValue, index) {
const vechieType = this.vechieTypeList.find(i => i.val === cellValue) const vechieType = this.vechieTypeList.find(i => i.val === cellValue)
......
<template>
<div class="main">
<div
class="chart"
ref="chart"
>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts';
export default {
props: {
dataList: {
type: Array,
default: []
},
title: {
type: String,
default: ''
},
areaList: {
type: Array,
default: []
}
},
watch: {
dataList: function(val) {
if (val.length > 0) {
this.init()
}
}
},
data() {
return {
chart: null
}
},
mounted() {
this.init()
},
methods: {
init() {
const myChart = this.chart || echarts.init(this.$refs.chart);
const data = this.dataList.map(item => {
return [item.name, item.value]
})
let option = {
title: {
text: this.title + '数',
textStyle: {
fontSize: 14,
fontWeight: 400,
color: '#444444'
},
top: 0,
left: 30
},
grid: {
left: '60',
right: '30',
bottom: '65',
top: '48'
},
legend: {
data: [this.title + '总数'],
top: 0,
right: 30
},
xAxis: [
{
type: 'category',
nameLocation: 'center',
axisLabel: {
formatter: function(value) {
if (value.length > 5) {
let i = 0
const strList = []
while (i < value.length) {
strList.push(value.slice(i, i + 5))
i += 5
}
return strList.join("\n");
} else {
return value
}
}
},
}
],
yAxis: [
{
type: 'value'
}
],
series: [{
data: data,
type: 'bar',
name: this.title + '总数',
label: {
show: true,
position: 'top'
},
itemStyle: {
color: '#4495E6'
},
barWidth: 28
}]
};
myChart.setOption(option);
this.chart = myChart
}
}
}
</script>
<style lang="scss" scoped>
.main {
height: 300px;
width: 100%;
.chart {
width: 100%;
height: 100%;
}
}
</style>
\ No newline at end of file
<template>
<div class="main">
<div
class="chart"
ref="chart"
>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts';
export default {
props: {
dataList: {
type: Array,
default: []
},
colorList: {
type: Array,
default: []
}
},
watch: {
dataList: function(val) {
if (val.length > 0) {
this.init()
}
}
},
data() {
return {
chart: null
}
},
mounted() {
this.init()
},
methods: {
init() {
const myChart = this.chart || echarts.init(this.$refs.chart);
let option = {
tooltip: {
trigger: 'item'
},
legend: {
left: 'center',
bottom: '24',
itemWidth: 12,
itemHeight: 12,
itemGap: 12,
orient: 'horizontal',
textStyle: {
color: '#666666',
fontSize: 12,
height: 12,
padding: [2, 20, 0, 0]
}
},
series: [
{
type: 'pie',
radius: ['60%', '100%'],
left: 'center',
height: 200,
width: 584,
minAngle: 5,
bottom: 100,
top: 50,
label: {
alignTo: 'edge',
edgeDistance: 10,
minMargin: 5,
margin: '15%',
formatter: (params) => {
return '{a|' + params.name + '}\n{a|' + Math.round(params.percent) + '% ' + params.value + '辆}'
},
rich: {
a: {
color: '#333333',
fontSize: 14,
fontWeight: 500
}
},
},
labelLine: {
lineStyle: {
color: '#B3B3B3'
},
length: 15,
length2: 15
},
labelLayout: function(params) {
var isLeft = params.labelRect.x < myChart.getWidth() / 2;
var points = params.labelLinePoints;
// Update the end point.
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
return {
labelLinePoints: points
};
},
itemStyle: {
color: (color) => {
const item = this.colorList.find(i => i.name === color.name)
return (item && item.color) || '#333333'
}
},
data: this.dataList
}
]
};
myChart.setOption(option);
this.chart = myChart
}
}
}
</script>
<style lang="scss" scoped>
.main {
height: 370px;
width: 100%;
.chart {
width: 100%;
height: 100%;
}
}
</style>
\ No newline at end of file
<template>
<div class="main-page carStatistics">
<div class="main-page-header">
<p class="title">急救站点统计</p>
<el-form
:inline="true"
:model="searchForm"
ref="searchForm"
size="small"
>
<el-form-item
prop="area"
label="辖区"
>
<el-select
v-model="searchForm.area"
placeholder="请选择车辆类型"
style="width: 100%"
:clearable="true"
>
<el-option
label="全部"
value=""
/>
<el-option
v-for="item in areaList"
:label="item.name"
:key="item.id"
:value="item.val"
/>
</el-select>
</el-form-item>
<div class="btns">
<el-button
type="primary"
size="small"
@click="getData"
>查询</el-button>
</div>
</el-form>
</div>
<div class="main-page-body">
<div class="box">
<div class="title">辖区救护车辆总数排行</div>
<EchartsBar
:dataList="siteCountList"
:areaList="areaList"
title="站点"
/>
</div>
</div>
</div>
</template>
<script>
import { queryEmergencyResource } from '@/api/common'
import { getDic } from '../../util/dict'
import EchartsBar from './components/echartsBar.vue'
export default {
name: 'siteStatistics',
components: {
EchartsBar
},
data() {
return {
searchForm: {
area: ''
},
areaList: [],
siteCountList: [],
}
},
mounted() {
// 获取字典
getDic(['area']).then(res => {
this.areaList = res.area
})
this.getData()
},
methods: {
getData() {
queryEmergencyResource(this.searchForm).then(res => {
if (res.msg == 201) {
const { siteCountList } = res.respData
this.siteCountList = siteCountList || []
} else {
this.$message.error(res.content)
}
})
}
}
}
</script>
<style lang="scss" scoped>
.carStatistics {
.main-page-body {
background-color: transparent !important;
display: block;
.top-main {
min-width: 1300px;
position: relative;
.box {
width: calc(50% - 12px);
min-width: auto;
.title {
padding: 16px 32px;
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
font-weight: 500;
}
&:last-child {
position: absolute;
top: 0;
right: 1px;
}
}
}
.box {
min-width: 1300px;
background: #ffffff;
margin-bottom: 24px;
.title {
font-size: 20px;
color: rgba(0, 0, 0, 0.87);
padding: 24px 36px;
font-weight: 500;
}
&.mb {
margin-bottom: 0;
}
}
}
}
</style>
<template> <template>
<el-dialog <el-dialog
:title="title + '急救车信息明细'" :title="title + '救护车信息明细'"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="1200px" width="1200px"
:close-on-click-modal="false" :close-on-click-modal="false"
...@@ -90,7 +90,7 @@ export default { ...@@ -90,7 +90,7 @@ export default {
fixed: false fixed: false
}, },
{ {
name: '是否120急救车', name: '是否120救护车',
key: 'isEmergencyCarStr', key: 'isEmergencyCarStr',
sortable: false, sortable: false,
width: '120', width: '120',
......
<template> <template>
<div class="main-page"> <div class="main-page">
<div class="main-page-header"> <div class="main-page-header">
<p class="title">急救车使用情况</p> <p class="title">救护车使用情况</p>
<el-form <el-form
:inline="true" :inline="true"
:model="searchForm" :model="searchForm"
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
fixed: false fixed: false
}, },
{ {
name: '急救车总数', name: '救护车总数',
key: 'carCountStr', key: 'carCountStr',
sortable: false, sortable: false,
width: '100', width: '100',
......
...@@ -23,8 +23,28 @@ ...@@ -23,8 +23,28 @@
> >
<el-radio :label="1">管理员</el-radio> <el-radio :label="1">管理员</el-radio>
<el-radio :label="2">机构用户</el-radio> <el-radio :label="2">机构用户</el-radio>
<el-radio :label="3">二级管理员</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item
label="管理区域:"
prop="area"
v-if="dataForm.roleId === 3"
>
<el-select
v-model="dataForm.area"
placeholder="请选择管理区域"
style="width: 100%"
:clearable="true"
>
<el-option
v-for="item in areaList"
:label="item.name"
:key="item.id"
:value="item.val"
/>
</el-select>
</el-form-item>
</el-form> </el-form>
<span <span
slot="footer" slot="footer"
...@@ -45,12 +65,15 @@ ...@@ -45,12 +65,15 @@
<script> <script>
import { updateInsideRole } from '@/api/user' import { updateInsideRole } from '@/api/user'
import { getDic } from '@/util/dict'
export default { export default {
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
areaList: [],
dataForm: { dataForm: {
roleId: '' roleId: '',
area: ''
}, },
rules: { rules: {
roleId: [ roleId: [
...@@ -60,13 +83,17 @@ export default { ...@@ -60,13 +83,17 @@ export default {
} }
}, },
mounted() { mounted() {
// 获取字典
getDic(['area']).then(res => {
this.areaList = res.area
})
}, },
methods: { methods: {
init(userId, roleId) { init(userId, roleId, area = '') {
this.dialogVisible = true this.dialogVisible = true
this.dataForm.roleId = roleId this.dataForm.roleId = roleId
this.dataForm.userId = userId this.dataForm.userId = userId
this.dataForm.area = area
}, },
submitForm() { submitForm() {
this.$refs.dataForm.validate((valid) => { this.$refs.dataForm.validate((valid) => {
......
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="备注(急救车查询)" label="备注(救护车查询)"
prop="remark" prop="remark"
> >
<el-input <el-input
...@@ -141,6 +141,24 @@ ...@@ -141,6 +141,24 @@
<el-radio :label="2"></el-radio> <el-radio :label="2"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item
label="区域"
prop="area"
>
<el-select
v-model="dataForm.area"
placeholder="请选择辖区"
style="width: 100%"
:clearable="true"
>
<el-option
v-for="item in areaList"
:label="item.name"
:key="item.id"
:value="item.val"
/>
</el-select>
</el-form-item>
</el-form> </el-form>
<span <span
slot="footer" slot="footer"
......
...@@ -48,6 +48,10 @@ ...@@ -48,6 +48,10 @@
label="机构用户" label="机构用户"
:value="2" :value="2"
/> />
<el-option
label="二级管理员"
:value="3"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
...@@ -143,7 +147,7 @@ ...@@ -143,7 +147,7 @@
>删除</el-link> >删除</el-link>
<el-link <el-link
type="primary" type="primary"
@click="showAuthDialog(scope.row.userId, scope.row.roleId)" @click="showAuthDialog(scope.row.userId, scope.row.roleId, scope.row.area)"
>权限配置</el-link> >权限配置</el-link>
</template> </template>
</el-table-column> </el-table-column>
...@@ -227,6 +231,13 @@ export default { ...@@ -227,6 +231,13 @@ export default {
sortable: false, sortable: false,
width: '300', width: '300',
fixed: false fixed: false
},
{
name: '管理区域',
key: 'area',
sortable: false,
width: '150',
fixed: false
} }
], ],
body: [], body: [],
...@@ -265,8 +276,8 @@ export default { ...@@ -265,8 +276,8 @@ export default {
this.selectLoading = false; this.selectLoading = false;
}) })
}, },
showAuthDialog(userId, roleId) { showAuthDialog(userId, roleId, area) {
this.$refs.authDialog.init(userId, roleId) this.$refs.authDialog.init(userId, roleId, area)
}, },
delHandler(id) { delHandler(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
......
...@@ -118,6 +118,11 @@ const dist = { ...@@ -118,6 +118,11 @@ const dist = {
name: '烧伤', name: '烧伤',
val: 4, val: 4,
id: 4 id: 4
},
{
name: '其他',
val: 5,
id: 5
} }
], ],
audit_status: [{ audit_status: [{
......
window.global = { window.global = {
// URL_303: 'http://88.3.201.57:82', // 303路径地址 // URL_303: 'http://88.3.201.57:82', // 303路径地址
// BASE_API: 'http://40.1.2.84/teamwork/', // 测试环境 // BASE_API: 'http://40.1.2.84/teamwork/', // 测试环境
BASE_API: 'http://122.51.94.140/mdxtpt/teamwork/', // 远程开发环境 BASE_API: '/mdxtpt/teamwork/', // 远程开发环境
// BASE_API: 'http://40.4.6.250:9002/mdxtpt/teamwork/', // 线上环境 // BASE_API: 'http://40.4.6.250:9002/mdxtpt/teamwork/', // 线上环境
// BASE_API: 'http://10.88.26.49:82/mdxtpt/teamwork/', // 线上环境 // BASE_API: 'http://10.88.26.49:82/mdxtpt/teamwork/', // 线上环境
// BASE_API: 'http://88.3.201.57:82/mdxtpt/teamwork/',// 专网环境 // BASE_API: 'http://88.3.201.57:82/mdxtpt/teamwork/',// 专网环境
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment