修改
This commit is contained in:
parent
c9e6ec2645
commit
b76ee1557d
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div class="navbar">
|
||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container"
|
||||
@toggleClick="toggleSideBar"/>
|
||||
@toggleClick="toggleSideBar" />
|
||||
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
|
||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" />
|
||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" />
|
||||
|
||||
<div class="right-menu">
|
||||
<!-- <template v-if="device!=='mobile'">
|
||||
@ -29,7 +29,7 @@
|
||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||
<div class="avatar-wrapper">
|
||||
<img :src="avatar" class="user-avatar">
|
||||
<i class="el-icon-caret-bottom"/>
|
||||
<i class="el-icon-caret-bottom" />
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<router-link to="/user/profile">
|
||||
@ -48,155 +48,156 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from 'vuex'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import TopNav from '@/components/TopNav'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
import Screenfull from '@/components/Screenfull'
|
||||
import SizeSelect from '@/components/SizeSelect'
|
||||
import Search from '@/components/HeaderSearch'
|
||||
import xineluGit from '@/components/xinelu/Git'
|
||||
import xineluDoc from '@/components/xinelu/Doc'
|
||||
import { mapGetters } from 'vuex'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import TopNav from '@/components/TopNav'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
import Screenfull from '@/components/Screenfull'
|
||||
import SizeSelect from '@/components/SizeSelect'
|
||||
import Search from '@/components/HeaderSearch'
|
||||
import xineluGit from '@/components/xinelu/Git'
|
||||
import xineluDoc from '@/components/xinelu/Doc'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Breadcrumb,
|
||||
TopNav,
|
||||
Hamburger,
|
||||
Screenfull,
|
||||
SizeSelect,
|
||||
Search,
|
||||
xineluGit,
|
||||
xineluDoc
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'device'
|
||||
]),
|
||||
setting: {
|
||||
get() {
|
||||
return this.$store.state.settings.showSettings
|
||||
},
|
||||
set(val) {
|
||||
this.$store.dispatch('settings/changeSetting', {
|
||||
key: 'showSettings',
|
||||
value: val
|
||||
})
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
Breadcrumb,
|
||||
TopNav,
|
||||
Hamburger,
|
||||
Screenfull,
|
||||
SizeSelect,
|
||||
Search,
|
||||
xineluGit,
|
||||
xineluDoc
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'device'
|
||||
]),
|
||||
setting: {
|
||||
get() {
|
||||
return this.$store.state.settings.showSettings
|
||||
},
|
||||
topNav: {
|
||||
get() {
|
||||
return this.$store.state.settings.topNav
|
||||
}
|
||||
set(val) {
|
||||
this.$store.dispatch('settings/changeSetting', {
|
||||
key: 'showSettings',
|
||||
value: val
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
},
|
||||
async logout() {
|
||||
this.$confirm('确定注销并退出系统吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.href = '/index';
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
topNav: {
|
||||
get() {
|
||||
return this.$store.state.settings.topNav
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
},
|
||||
async logout() {
|
||||
this.$confirm('确定注销并退出系统吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
localStorage.clear()
|
||||
location.href = '/index';
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.navbar {
|
||||
height: 50px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
|
||||
.navbar {
|
||||
height: 50px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
|
||||
|
||||
.hamburger-container {
|
||||
line-height: 46px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
transition: background .3s;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
.hamburger-container {
|
||||
line-height: 46px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
transition: background .3s;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, .025)
|
||||
}
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, .025)
|
||||
}
|
||||
}
|
||||
|
||||
.breadcrumb-container {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.topmenu-container {
|
||||
position: absolute;
|
||||
left: 50px;
|
||||
}
|
||||
|
||||
.errLog-container {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.right-menu {
|
||||
float: right;
|
||||
height: 100%;
|
||||
line-height: 50px;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.breadcrumb-container {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.topmenu-container {
|
||||
position: absolute;
|
||||
left: 50px;
|
||||
}
|
||||
|
||||
.errLog-container {
|
||||
.right-menu-item {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.right-menu {
|
||||
float: right;
|
||||
padding: 0 8px;
|
||||
height: 100%;
|
||||
line-height: 50px;
|
||||
font-size: 18px;
|
||||
color: #5a5e66;
|
||||
vertical-align: text-bottom;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
&.hover-effect {
|
||||
cursor: pointer;
|
||||
transition: background .3s;
|
||||
|
||||
.right-menu-item {
|
||||
display: inline-block;
|
||||
padding: 0 8px;
|
||||
height: 100%;
|
||||
font-size: 18px;
|
||||
color: #5a5e66;
|
||||
vertical-align: text-bottom;
|
||||
|
||||
&.hover-effect {
|
||||
cursor: pointer;
|
||||
transition: background .3s;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, .025)
|
||||
}
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, .025)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
margin-right: 30px;
|
||||
.avatar-container {
|
||||
margin-right: 30px;
|
||||
|
||||
.avatar-wrapper {
|
||||
margin-top: 5px;
|
||||
position: relative;
|
||||
.avatar-wrapper {
|
||||
margin-top: 5px;
|
||||
position: relative;
|
||||
|
||||
.user-avatar {
|
||||
cursor: pointer;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.user-avatar {
|
||||
cursor: pointer;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.el-icon-caret-bottom {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: -20px;
|
||||
top: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.el-icon-caret-bottom {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: -20px;
|
||||
top: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { login, logout, getInfo } from '@/api/login'
|
||||
import { getToken, setToken, removeToken } from '@/utils/auth'
|
||||
import { selectAgencyList } from '@/api/manage/selectAgencyList'
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
const user = {
|
||||
@ -52,17 +53,23 @@ const user = {
|
||||
return new Promise((resolve, reject) => {
|
||||
getInfo().then(res => {
|
||||
const user = res.user
|
||||
Cookies.set("userId",user.userId)
|
||||
Cookies.set("userName",user.userName)
|
||||
Cookies.set("userId", user.userId)
|
||||
Cookies.set("userName", user.userName)
|
||||
// localStorage.setItem("userId",user.userId);
|
||||
const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
|
||||
localStorage.setItem('user', JSON.stringify(user))
|
||||
if (res.roles.findIndex(e => e == "admin") != -1) {
|
||||
localStorage.setItem('roleKey', 'admin')
|
||||
}
|
||||
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
|
||||
commit('SET_ROLES', res.roles)
|
||||
commit('SET_PERMISSIONS', res.permissions)
|
||||
} else {
|
||||
commit('SET_ROLES', ['ROLE_DEFAULT'])
|
||||
}
|
||||
selectAgencyList({ nodeType: 'HOSPITAL' }).then(res => {
|
||||
localStorage.setItem('HOSPITALlist', JSON.stringify(res.data))
|
||||
})
|
||||
commit('SET_NAME', user.userName)
|
||||
commit('SET_AVATAR', avatar)
|
||||
resolve(res)
|
||||
|
||||
@ -1,22 +1,57 @@
|
||||
<template>
|
||||
<div class="left">
|
||||
<div class="name">科室名称</div>
|
||||
<div>
|
||||
<div class="name" :style="!switchvalue ? 'opacity: 0.6;' : ''">
|
||||
<el-tooltip class="btn" effect="light" :content="'科室名称' + '(' + hospitalAgencyName + ')'"
|
||||
placement="bottom">
|
||||
<el-button @click="open = true">科室名称({{ hospitalAgencyName }})</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div class="select">
|
||||
<el-switch v-model="switchvalue" active-color="#1890ff" inactive-color="#DCDFE6" @change="changeswitch" />
|
||||
</div>
|
||||
<div class="input">
|
||||
<el-input v-model="querydepartmen.departmentName" placeholder="请输入科室名称" clearable
|
||||
@keyup.enter.native="Departmentlist" />
|
||||
</div>
|
||||
<div class="listitem">
|
||||
<div :class="itemid == null ? 'allactive' : 'all'" @click="itemdata()">
|
||||
<div class="listitem" @click="itemdata" :style="!switchvalue ? 'opacity: 0.6;' : ''">
|
||||
<div :class="itemid == null ? 'allactive' : 'all'">
|
||||
全部
|
||||
</div>
|
||||
<span class="count">{{ count }}</span>
|
||||
</div>
|
||||
<div class="listitem" v-for="(item, index) in DepartmentoList" :key="index" @click="itemdata(item)">
|
||||
<div class="listitem" :style="!switchvalue ? 'opacity: 0.6;' : ''" v-for="(item, index) in DepartmentoList"
|
||||
:key="index" @click="itemdata(item)">
|
||||
<div :class="itemid == item.id ? 'allactive' : 'all'">
|
||||
{{ item.departmentName }}
|
||||
</div>
|
||||
<span class="count">{{ item.countNum }}</span>
|
||||
</div>
|
||||
<el-dialog title="切换医院" :visible.sync="open" width="50%">
|
||||
<div class="opentable">
|
||||
<el-form :model="opentablequery" label-width="80px" :inline="true">
|
||||
<el-form-item label="科室名称" prop="hospitalAgencyName" label-width="120">
|
||||
<el-input v-model="opentablequery.hospitalAgencyName" placeholder="请输入科室名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handquery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="queryreset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="HOSPITALlist" style="width: 100%" @cell-dblclick="nurseclick">
|
||||
<el-table-column label="请选择" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" style="width: 15px; height: 15px"
|
||||
v-if="querydepartmen.hospitalAgencyId == scope.row.id" circle
|
||||
@click="nurseclick(scope.row)"></el-button>
|
||||
<el-button v-else style="width: 15px; height: 15px" circle
|
||||
@click="nurseclick(scope.row)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="agencyName" align="center" label="机构名称" />
|
||||
<el-table-column prop="agencyCode" align="center" label="机构代码" />
|
||||
</el-table>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -26,6 +61,8 @@ export default {
|
||||
name: "DepartmentList",
|
||||
data() {
|
||||
return {
|
||||
open: false,
|
||||
switchvalue: true,
|
||||
//校验
|
||||
itemid: null,
|
||||
// 表格数据
|
||||
@ -34,39 +71,105 @@ export default {
|
||||
// 查询参数
|
||||
querydepartmen: {
|
||||
departmentName: "",
|
||||
hospitalAgencyId: '',
|
||||
},
|
||||
opentablequery: {
|
||||
hospitalAgencyName: '',
|
||||
},
|
||||
//医院名称
|
||||
hospitalAgencyName: '',
|
||||
HOSPITALlist: JSON.parse(localStorage.getItem('HOSPITALlist'))
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.Departmentlist();
|
||||
},
|
||||
watch: {
|
||||
name(val) {
|
||||
'querydepartmen.departmentName'(val) {
|
||||
this.querydepartmen.departmentName = val
|
||||
this.Departmentlist();
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
created() {
|
||||
this.querydepartmen.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId
|
||||
this.Departmentlist();
|
||||
this.$emit("clickdepartment", {
|
||||
itemid: '',
|
||||
itemName: '',
|
||||
hospitalAgencyId: JSON.parse(localStorage.getItem('user')).hospitalAgencyId
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 左侧科室
|
||||
itemdata(item) {
|
||||
if (item) {
|
||||
this.itemid = item.id
|
||||
} else {
|
||||
this.itemid = null
|
||||
handquery() {
|
||||
this.HOSPITALlist = JSON.parse(localStorage.getItem('HOSPITALlist')).filter(item => item.agencyName.includes(this.opentablequery.hospitalAgencyName));
|
||||
},
|
||||
queryreset() {
|
||||
this.opentablequery.hospitalAgencyName = ''
|
||||
this.HOSPITALlist = JSON.parse(localStorage.getItem('HOSPITALlist'))
|
||||
},
|
||||
nurseclick(item) {
|
||||
this.itemid = null
|
||||
this.querydepartmen.hospitalAgencyId = item.id
|
||||
this.Departmentlist();
|
||||
this.open = false
|
||||
this.$emit("clickdepartment", {
|
||||
hospitalAgencyId: this.querydepartmen.hospitalAgencyId,
|
||||
itemid: '',
|
||||
itemName: ''
|
||||
});
|
||||
},
|
||||
changeswitch(e) {
|
||||
let hospitalAgencyId = ''
|
||||
if (e) {
|
||||
hospitalAgencyId = this.querydepartmen.hospitalAgencyId
|
||||
}
|
||||
this.itemid = ''
|
||||
this.$emit("clickdepartment", {
|
||||
hospitalAgencyId: hospitalAgencyId,
|
||||
itemid: '',
|
||||
itemName: ''
|
||||
});
|
||||
},
|
||||
resetQuery() {
|
||||
this.itemid = null
|
||||
this.switchvalue = true
|
||||
this.querydepartmen.departmentName = ''
|
||||
this.querydepartmen.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId
|
||||
this.$emit("clickdepartment", {
|
||||
hospitalAgencyId: this.querydepartmen.hospitalAgencyId,
|
||||
itemid: '',
|
||||
itemName: ''
|
||||
});
|
||||
this.Departmentlist();
|
||||
},
|
||||
// 左侧科室
|
||||
itemdata(item) {
|
||||
if (!this.switchvalue) return
|
||||
let obj
|
||||
if (item) {
|
||||
this.itemid = item.id
|
||||
obj = {
|
||||
itemid: this.itemid,
|
||||
itemName: item.departmentName,
|
||||
hospitalAgencyId: this.querydepartmen.hospitalAgencyId
|
||||
}
|
||||
} else {
|
||||
this.itemid = null
|
||||
obj = {
|
||||
itemid: '',
|
||||
itemName: '',
|
||||
hospitalAgencyId: this.querydepartmen.hospitalAgencyId
|
||||
}
|
||||
}
|
||||
this.$emit("clickdepartment", obj);
|
||||
},
|
||||
// 科室列表
|
||||
Departmentlist() {
|
||||
listOperationNum(this.querydepartmen).then(response => {
|
||||
this.DepartmentoList = response.data;
|
||||
let sum = 0;
|
||||
this.DepartmentoList = response.data.deptNumList;
|
||||
this.hospitalAgencyName = response.data.hospitalAgencyName
|
||||
this.count = 0;
|
||||
this.DepartmentoList.forEach((item) => {
|
||||
if (item.countNum != null) {
|
||||
sum += item.countNum;
|
||||
this.count += item.countNum;
|
||||
}
|
||||
this.count = sum;
|
||||
});
|
||||
});
|
||||
},
|
||||
@ -78,40 +181,85 @@ export default {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.opentable {
|
||||
height: 500px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.left {
|
||||
// height: calc(100vh - 119px);
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
padding-right: 10px;
|
||||
|
||||
.select {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
color: #1890ff !important;
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.btn:focus {
|
||||
color: #1890ff !important;
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.btn {
|
||||
font-size: 16px !important;
|
||||
color: black !important;
|
||||
padding-left: 6px !important;
|
||||
text-align: left;
|
||||
white-space: nowrap !important;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
width: 80% !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.input {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-weight: 700;
|
||||
margin-bottom: 10px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.listitem {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.count {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
// right: -172px;
|
||||
left: 210px;
|
||||
position: absolute;
|
||||
color: #a4a6aa;
|
||||
top: -35px;
|
||||
font-size: 13px;
|
||||
right: 15px;
|
||||
}
|
||||
|
||||
.all {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
padding-left: 13px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.allactive {
|
||||
background: #e8f4ff;
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
line-height: 50px;
|
||||
padding-left: 13px;
|
||||
border-left: 3px solid #4d9de7;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="app-container" ref="layout">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="5" :xs="24">
|
||||
<DepartmentList ref="DepartmentList"></DepartmentList>
|
||||
<DepartmentList ref="DepartmentList" @clickdepartment="clickdepartment"></DepartmentList>
|
||||
</el-col>
|
||||
<el-col :span="19" :xs="24">
|
||||
<div ref="topform" class="form">
|
||||
@ -53,28 +53,13 @@
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="科室名称" prop="departmentId">
|
||||
<el-button type="" v-if="departmentName == '请选择科室'" @click="clickinnerVisible()" style="
|
||||
<el-button @click="clickinnerVisible()" style="
|
||||
width: 379px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
color: #c0c4cc;
|
||||
overflow: hidden;
|
||||
">{{ departmentName }}</el-button>
|
||||
<el-button @click="clickinnerVisible()" type="" v-else style="
|
||||
width: 379px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
padding-left: -10px;
|
||||
overflow: hidden;
|
||||
">{{ departmentName }}</el-button>
|
||||
" :style="form.departmentName == '请选择科室' ? 'color: #c0c4cc;' : ''">{{ form.departmentName }}</el-button>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="所属科室" prop="departmentName">
|
||||
<el-input
|
||||
v-model="form.departmentName"
|
||||
placeholder="请输入所属科室"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="手术名称" prop="operationName">
|
||||
<el-input v-model="form.operationName" placeholder="请输入手术名称" :disabled="disabled" />
|
||||
</el-form-item>
|
||||
@ -82,7 +67,6 @@
|
||||
<el-input-number v-model="form.sort" controls-position="right" :min="0" placeholder="请输入手术排序"
|
||||
style="width: 380px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="术式信息" prop="operationInfo">
|
||||
<el-input v-model="form.operationInfo" placeholder="请输入术式信息" type="textarea" />
|
||||
</el-form-item>
|
||||
@ -99,13 +83,11 @@
|
||||
<el-form-item label="科室名称" prop="departmentName" label-width="120">
|
||||
<el-input v-model="informationqueryParams.departmentName" placeholder="请输入科室名称" clearable />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="informationInfoinfo">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="addresetQuerylist">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="infolist" @cell-dblclick="nurseclick" v-loading="loading">
|
||||
<el-table-column label="请选择" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
@ -138,12 +120,6 @@ export default {
|
||||
return {
|
||||
obj: null,
|
||||
disabled: false,
|
||||
itemname: null,
|
||||
departmentName: null,
|
||||
diseaseTypeName: null,
|
||||
name: '',
|
||||
departmentId: null,
|
||||
count: '',
|
||||
innerVisibleshow: false, //科室弹框
|
||||
// 科室
|
||||
informationqueryParams: {
|
||||
@ -151,6 +127,7 @@ export default {
|
||||
pageSize: 10,
|
||||
departmentName: null,
|
||||
},
|
||||
departmentName: undefined,
|
||||
infolist: [],
|
||||
totaldepartment: 0,
|
||||
// 遮罩层
|
||||
@ -167,7 +144,6 @@ export default {
|
||||
total: 0,
|
||||
// 手术信息表格数据
|
||||
operationInfoList: [],
|
||||
DepartmentoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@ -184,11 +160,6 @@ export default {
|
||||
operationRemark: null,
|
||||
sort: null,
|
||||
},
|
||||
querydepartmen: {
|
||||
departmentName: "",
|
||||
// pageNum: 1,
|
||||
// pageSize: 10,
|
||||
},
|
||||
maxTableHeight: undefined,
|
||||
// 表单参数
|
||||
form: {
|
||||
@ -209,8 +180,6 @@ export default {
|
||||
rules: {
|
||||
departmentId: [
|
||||
{ required: true, message: "所属科室名称不能为空", trigger: "blur" }
|
||||
|
||||
|
||||
],
|
||||
operationName: [
|
||||
{ required: true, message: "手术名称不能为空", trigger: "blur" }
|
||||
@ -225,14 +194,9 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.Departmentlist();
|
||||
// this.getList();
|
||||
},
|
||||
watch: {
|
||||
name(val) {
|
||||
this.querydepartmen.departmentName = val
|
||||
this.Departmentlist();
|
||||
},
|
||||
'form.sort'(val) {
|
||||
if (val) {
|
||||
var name = ''
|
||||
@ -250,19 +214,12 @@ export default {
|
||||
mounted() {
|
||||
this.getMaxTableHeight()
|
||||
this.screenChange()
|
||||
// this.$refs.DepartmentList.addEventListener('scroll', this.lazyLoading) // 滚动到底部,再加载的处理事件
|
||||
this.informationInfoinfo();
|
||||
},
|
||||
methods: {
|
||||
// 点击科室
|
||||
clickinnerVisible() {
|
||||
this.innerVisibleshow = true;
|
||||
if (this.itemname) {
|
||||
this.informationqueryParams.departmentId = this.itemname
|
||||
|
||||
} else {
|
||||
this.informationqueryParams.departmentId = null
|
||||
}
|
||||
this.informationInfoinfo();
|
||||
},
|
||||
// 科室列表
|
||||
informationInfoinfo() {
|
||||
@ -271,7 +228,6 @@ export default {
|
||||
this.totaldepartment = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
// this.informationqueryParams.page = 1;
|
||||
},
|
||||
// 科室名称重置
|
||||
addresetQuerylist() {
|
||||
@ -287,48 +243,15 @@ export default {
|
||||
// 科室名称圆点按钮
|
||||
nurseclick(row) {
|
||||
this.form.departmentId = row.id;
|
||||
this.departmentName = row.departmentName;
|
||||
this.form.departmentName = row.departmentName;
|
||||
this.form.diseaseTypeId = '';
|
||||
this.diseaseTypeName = '请选择病种';
|
||||
this.innerVisibleshow = false;
|
||||
},
|
||||
// 左侧科室
|
||||
itemdata(item) {
|
||||
if (item) {
|
||||
this.itemname = item.id
|
||||
this.departmentName = item.departmentName
|
||||
this.loading = true;
|
||||
this.queryParams.departmentId = item.id
|
||||
this.getList()
|
||||
} else {
|
||||
this.queryParams.departmentId = ''
|
||||
this.itemname = null
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
// 左侧科室
|
||||
Departmentlist() {
|
||||
this.loading = true;
|
||||
listOperationNum(this.querydepartmen).then(response => {
|
||||
this.DepartmentoList = response.data;
|
||||
let sum = 0;
|
||||
this.DepartmentoList.forEach((item) => {
|
||||
if (item.countNum != null) {
|
||||
sum += item.countNum;
|
||||
}
|
||||
this.count = sum;
|
||||
});
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
},
|
||||
/** 查询手术信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listOperationInfo(this.queryParams).then(response => {
|
||||
this.operationInfoList = response.rows;
|
||||
this.operationInfoList.forEach(e => {
|
||||
})
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
@ -336,9 +259,7 @@ export default {
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.form.operationName = '';
|
||||
this.form.operationInfo = '';
|
||||
// this.reset();
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
@ -361,23 +282,15 @@ export default {
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
if (this.itemname) {
|
||||
this.queryParams.departmentId = this.itemname
|
||||
|
||||
} else {
|
||||
this.queryParams.departmentId = null;
|
||||
this.itemname = null;
|
||||
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams.departmentId = null;
|
||||
this.itemname = null;
|
||||
this.queryParams.operationName = null;
|
||||
this.$refs.DepartmentList.resetQuery()
|
||||
this.resetForm("queryForm");
|
||||
this.getList();
|
||||
// this.handleQuery();
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
@ -385,22 +298,26 @@ export default {
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
//接收科室列表传值
|
||||
clickdepartment(item) {
|
||||
this.queryParams.hospitalAgencyId = item.hospitalAgencyId
|
||||
this.queryParams.departmentId = item.itemid
|
||||
this.departmentName = item.itemName
|
||||
if (item.hospitalAgencyId) {
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
if (this.itemname) {
|
||||
if (this.queryParams.departmentId) {
|
||||
this.form.departmentName = this.departmentName
|
||||
this.form.departmentId = this.itemname
|
||||
} else if (this.itemname == null) {
|
||||
this.departmentName = "请选择科室"
|
||||
this.form.departmentId = this.queryParams.departmentId
|
||||
} else {
|
||||
this.form.departmentName = '请选择科室'
|
||||
}
|
||||
else {
|
||||
this.departmentName = "请选择科室"
|
||||
}
|
||||
|
||||
this.open = true;
|
||||
this.title = "添加手术信息";
|
||||
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
@ -409,7 +326,6 @@ export default {
|
||||
const id = row.id || this.ids
|
||||
getOperationInfo(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.departmentName = response.data.departmentName;
|
||||
if (!this.form.sort) {
|
||||
this.form.sort = undefined
|
||||
}
|
||||
@ -419,12 +335,9 @@ export default {
|
||||
// this.disabled = true
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.form.departmentName = this.departmentName
|
||||
console.log(this.form, '0000')
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.obj.length > 10) {
|
||||
@ -438,25 +351,16 @@ export default {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.Departmentlist();
|
||||
});
|
||||
} else {
|
||||
if (this.itemname) {
|
||||
this.form.departmentName = this.departmentName
|
||||
this.form.departmentId = this.itemname
|
||||
|
||||
} else {
|
||||
this.form.departmentName = this.departmentName
|
||||
}
|
||||
addOperationInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.Departmentlist();
|
||||
this.$refs.DepartmentList.Departmentlist()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -467,8 +371,8 @@ export default {
|
||||
return delOperationInfo(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.Departmentlist();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
this.$refs.DepartmentList.Departmentlist()
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user