Commit 26a3c786 authored by pixingfei's avatar pixingfei

优化需求

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