Commit 26a3c786 authored by pixingfei's avatar pixingfei

优化需求

parent 04b28580
......@@ -217,7 +217,6 @@
>查看详情</el-link>
<el-link
type="primary"
v-if="!checkPermission()"
@click="showEmergencyCarDialog('update', scope.row.id)"
>修改</el-link>
<el-link
......
<template>
<div class='main-header'>
<p class="p">
区域急危重症救治协同平台
</p>
<div class="main-header">
<p class="p">区域急危重症救治协同平台</p>
<div class="div">
<img
src="../../assets/images/user.png"
alt=""
>
<span>{{userInfo.userName}}</span>
<img src="../../assets/images/user.png" alt="" />
<span v-if="userInfo.roleId!=2">{{ userInfo.userName }}</span>
<el-dropdown v-else @command="handleCommand">
<span class="el-dropdown-link">
{{ userInfo.userName}}<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="logout">退出登录</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</template>
<script>
......@@ -29,10 +31,25 @@ export default {
},
methods: {
handleCommand(command) {
if (command === 'logout') {
this.logout()
}
},
logout() {
// 显示确认对话框
this.$confirm('确定要退出登录吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
window.location.href = 'https://tymh.whhealth.org.cn/mdxtpt/info'
}).catch(() => {
this.$message.info('已取消退出')
})
}
},
}
</script>
<style lang="scss">
</style>
<style lang="scss"></style>
......@@ -157,6 +157,7 @@
@click="showSaveDialog('update', scope.row)"
>修改</el-link>
<el-link
v-if="userInfo.roleId!=3"
type="primary"
@click="delHandler(scope.row.id)"
>删除</el-link>
......@@ -173,6 +174,7 @@
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { tableDataMixin } from '../../common/js/mixin'
import { getDic } from '../../util/dict'
import { queryPageList, deleteById } from '@/api/mechanism'
......@@ -245,6 +247,11 @@ export default {
}
}
},
computed: {
...mapGetters([
'userInfo'
])
},
mounted() {
// 获取字典
getDic(['area']).then(res => {
......
......@@ -72,10 +72,10 @@
label="挂靠单位"
prop="hospitalCode"
>
{{ userInfo.hospitalName }}
<!-- <el-select
<!-- {{ dataForm.hospitalName||userInfo.hospitalName }} -->
<el-select
v-model="dataForm.hospitalCode"
placeholder="请选择上级医院"
placeholder="请选择挂靠单位"
style="width: 100%"
filterable
remote
......@@ -89,7 +89,7 @@
:key="item.id"
:value="item.hospitalCode"
/>
</el-select> -->
</el-select>
</el-form-item>
<el-form-item
label="站点状态"
......@@ -166,6 +166,7 @@ export default {
siteLongitude: '',
siteLatitude: '',
hospitalCode: '',
hospitalName:'',
siteStatus: ''
},
areaList: [],
......@@ -194,9 +195,9 @@ export default {
},
mounted() {
//获取可选择的医院
// queryHospitalList().then(res => {
// this.hospitalList = res.respData
// })
queryHospitalList().then(res => {
this.hospitalList = res.respData
})
getDic(['area']).then(res => {
this.areaList = res.area
})
......@@ -242,13 +243,13 @@ export default {
hospitalCode: this.userInfo.hospitalCode,
hospitalName: this.userInfo.hospitalName,
}
// const hospital = this.hospitalList.find(i => i.hospitalCode === this.dataForm.hospitalCode)
// if (!hospital) {
// this.$message.error('无效数据');
// return
// }
// const { hospitalName } = hospital
// params.hospitalName = hospitalName
const hospital = this.hospitalList.find(i => i.hospitalCode === this.dataForm.hospitalCode)
if (!hospital) {
this.$message.error('无效数据');
return
}
const { hospitalName } = hospital
params.hospitalName = hospitalName
const area = this.areaList.find(i => i.id === this.dataForm.area)
if (!area) {
......
......@@ -185,7 +185,6 @@
<el-link
type="primary"
@click="showSaveDialog('update', scope.row.id)"
v-if="!checkPermission()"
>修改</el-link>
<el-link
type="primary"
......
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