This commit is contained in:
2024-07-05 16:15:31 +08:00
parent c9e6ec2645
commit b76ee1557d
4 changed files with 335 additions and 275 deletions

View File

@ -1,10 +1,10 @@
<template> <template>
<div class="navbar"> <div class="navbar">
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" <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"/> <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" />
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/> <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" />
<div class="right-menu"> <div class="right-menu">
<!-- <template v-if="device!=='mobile'"> <!-- <template v-if="device!=='mobile'">
@ -29,7 +29,7 @@
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click"> <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<img :src="avatar" class="user-avatar"> <img :src="avatar" class="user-avatar">
<i class="el-icon-caret-bottom"/> <i class="el-icon-caret-bottom" />
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<router-link to="/user/profile"> <router-link to="/user/profile">
@ -48,155 +48,156 @@
</template> </template>
<script> <script>
import {mapGetters} from 'vuex' import { mapGetters } from 'vuex'
import Breadcrumb from '@/components/Breadcrumb' import Breadcrumb from '@/components/Breadcrumb'
import TopNav from '@/components/TopNav' import TopNav from '@/components/TopNav'
import Hamburger from '@/components/Hamburger' import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull' import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect' import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch' import Search from '@/components/HeaderSearch'
import xineluGit from '@/components/xinelu/Git' import xineluGit from '@/components/xinelu/Git'
import xineluDoc from '@/components/xinelu/Doc' import xineluDoc from '@/components/xinelu/Doc'
export default { export default {
components: { components: {
Breadcrumb, Breadcrumb,
TopNav, TopNav,
Hamburger, Hamburger,
Screenfull, Screenfull,
SizeSelect, SizeSelect,
Search, Search,
xineluGit, xineluGit,
xineluDoc xineluDoc
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
'sidebar', 'sidebar',
'avatar', 'avatar',
'device' 'device'
]), ]),
setting: { setting: {
get() { get() {
return this.$store.state.settings.showSettings return this.$store.state.settings.showSettings
},
set(val) {
this.$store.dispatch('settings/changeSetting', {
key: 'showSettings',
value: val
})
}
}, },
topNav: { set(val) {
get() { this.$store.dispatch('settings/changeSetting', {
return this.$store.state.settings.topNav key: 'showSettings',
} value: val
})
} }
}, },
methods: { topNav: {
toggleSideBar() { get() {
this.$store.dispatch('app/toggleSideBar') return this.$store.state.settings.topNav
},
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/index';
})
}).catch(() => {
});
} }
} }
},
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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.navbar { .navbar {
height: 50px; height: 50px;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
background: #fff; background: #fff;
box-shadow: 0 1px 4px rgba(0, 21, 41, .08); box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
.hamburger-container { .hamburger-container {
line-height: 46px; line-height: 46px;
height: 100%; height: 100%;
float: left; float: left;
cursor: pointer; cursor: pointer;
transition: background .3s; transition: background .3s;
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
&:hover { &:hover {
background: rgba(0, 0, 0, .025) 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 { .right-menu-item {
float: left;
}
.topmenu-container {
position: absolute;
left: 50px;
}
.errLog-container {
display: inline-block; display: inline-block;
vertical-align: top; padding: 0 8px;
}
.right-menu {
float: right;
height: 100%; height: 100%;
line-height: 50px; font-size: 18px;
color: #5a5e66;
vertical-align: text-bottom;
&:focus { &.hover-effect {
outline: none; cursor: pointer;
} transition: background .3s;
.right-menu-item { &:hover {
display: inline-block; background: rgba(0, 0, 0, .025)
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)
}
} }
} }
}
.avatar-container { .avatar-container {
margin-right: 30px; margin-right: 30px;
.avatar-wrapper { .avatar-wrapper {
margin-top: 5px; margin-top: 5px;
position: relative; position: relative;
.user-avatar { .user-avatar {
cursor: pointer; cursor: pointer;
width: 40px; width: 40px;
height: 40px; height: 40px;
border-radius: 10px; border-radius: 10px;
} }
.el-icon-caret-bottom { .el-icon-caret-bottom {
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
right: -20px; right: -20px;
top: 25px; top: 25px;
font-size: 12px; font-size: 12px;
}
} }
} }
} }
} }
}
</style> </style>

View File

@ -1,5 +1,6 @@
import { login, logout, getInfo } from '@/api/login' import { login, logout, getInfo } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth' import { getToken, setToken, removeToken } from '@/utils/auth'
import { selectAgencyList } from '@/api/manage/selectAgencyList'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
const user = { const user = {
@ -52,17 +53,23 @@ const user = {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getInfo().then(res => { getInfo().then(res => {
const user = res.user const user = res.user
Cookies.set("userId",user.userId) Cookies.set("userId", user.userId)
Cookies.set("userName",user.userName) Cookies.set("userName", user.userName)
// localStorage.setItem("userId",user.userId); // 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; 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)) 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是否是一个非空数组 if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
commit('SET_ROLES', res.roles) commit('SET_ROLES', res.roles)
commit('SET_PERMISSIONS', res.permissions) commit('SET_PERMISSIONS', res.permissions)
} else { } else {
commit('SET_ROLES', ['ROLE_DEFAULT']) commit('SET_ROLES', ['ROLE_DEFAULT'])
} }
selectAgencyList({ nodeType: 'HOSPITAL' }).then(res => {
localStorage.setItem('HOSPITALlist', JSON.stringify(res.data))
})
commit('SET_NAME', user.userName) commit('SET_NAME', user.userName)
commit('SET_AVATAR', avatar) commit('SET_AVATAR', avatar)
resolve(res) resolve(res)

View File

@ -1,22 +1,57 @@
<template> <template>
<div class="left"> <div class="left">
<div class="name">科室名称</div> <div class="name" :style="!switchvalue ? 'opacity: 0.6;' : ''">
<div> <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 <el-input v-model="querydepartmen.departmentName" placeholder="请输入科室名称" clearable
@keyup.enter.native="Departmentlist" /> @keyup.enter.native="Departmentlist" />
</div> </div>
<div class="listitem"> <div class="listitem" @click="itemdata" :style="!switchvalue ? 'opacity: 0.6;' : ''">
<div :class="itemid == null ? 'allactive' : 'all'" @click="itemdata()"> <div :class="itemid == null ? 'allactive' : 'all'">
全部 全部
</div> </div>
<span class="count">{{ count }}</span> <span class="count">{{ count }}</span>
</div> </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'"> <div :class="itemid == item.id ? 'allactive' : 'all'">
{{ item.departmentName }} {{ item.departmentName }}
</div> </div>
<span class="count">{{ item.countNum }}</span> <span class="count">{{ item.countNum }}</span>
</div> </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> </div>
</template> </template>
@ -26,6 +61,8 @@ export default {
name: "DepartmentList", name: "DepartmentList",
data() { data() {
return { return {
open: false,
switchvalue: true,
// //
itemid: null, itemid: null,
// //
@ -34,39 +71,105 @@ export default {
// //
querydepartmen: { querydepartmen: {
departmentName: "", departmentName: "",
hospitalAgencyId: '',
}, },
opentablequery: {
hospitalAgencyName: '',
},
//
hospitalAgencyName: '',
HOSPITALlist: JSON.parse(localStorage.getItem('HOSPITALlist'))
}; };
}, },
created() {
this.Departmentlist();
},
watch: { watch: {
name(val) { 'querydepartmen.departmentName'(val) {
this.querydepartmen.departmentName = val this.querydepartmen.departmentName = val
this.Departmentlist(); 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: { methods: {
// handquery() {
itemdata(item) { this.HOSPITALlist = JSON.parse(localStorage.getItem('HOSPITALlist')).filter(item => item.agencyName.includes(this.opentablequery.hospitalAgencyName));
if (item) { },
this.itemid = item.id queryreset() {
} else { this.opentablequery.hospitalAgencyName = ''
this.itemid = null 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() { Departmentlist() {
listOperationNum(this.querydepartmen).then(response => { listOperationNum(this.querydepartmen).then(response => {
this.DepartmentoList = response.data; this.DepartmentoList = response.data.deptNumList;
let sum = 0; this.hospitalAgencyName = response.data.hospitalAgencyName
this.count = 0;
this.DepartmentoList.forEach((item) => { this.DepartmentoList.forEach((item) => {
if (item.countNum != null) { if (item.countNum != null) {
sum += item.countNum; this.count += item.countNum;
} }
this.count = sum;
}); });
}); });
}, },
@ -78,40 +181,85 @@ export default {
text-align: left; text-align: left;
} }
.opentable {
height: 500px;
overflow: auto;
}
.left { .left {
// height: calc(100vh - 119px); // height: calc(100vh - 119px);
height: 100%; height: 100%;
overflow: auto; 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 { .name {
font-weight: 700; font-weight: 700;
margin-bottom: 10px; margin-bottom: 10px;
line-height: 40px;
} }
.listitem { .listitem {
width: 100%; width: 100%;
height: 50px; height: 50px;
border-bottom: 1px solid #dcdfe6; border-bottom: 1px solid #dcdfe6;
display: flex;
align-items: center;
position: relative;
.count { .count {
display: inline-block; display: inline-block;
position: relative; position: absolute;
// right: -172px;
left: 210px;
color: #a4a6aa; color: #a4a6aa;
top: -35px;
font-size: 13px; font-size: 13px;
right: 15px;
} }
.all { .all {
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
padding-left: 13px; padding-left: 13px;
font-size: 15px;
} }
.allactive { .allactive {
background: #e8f4ff; background: #e8f4ff;
height: 50px; height: 50px;
width: 100%;
line-height: 50px; line-height: 50px;
padding-left: 13px; padding-left: 13px;
border-left: 3px solid #4d9de7; border-left: 3px solid #4d9de7;

View File

@ -2,7 +2,7 @@
<div class="app-container" ref="layout"> <div class="app-container" ref="layout">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="5" :xs="24"> <el-col :span="5" :xs="24">
<DepartmentList ref="DepartmentList"></DepartmentList> <DepartmentList ref="DepartmentList" @clickdepartment="clickdepartment"></DepartmentList>
</el-col> </el-col>
<el-col :span="19" :xs="24"> <el-col :span="19" :xs="24">
<div ref="topform" class="form"> <div ref="topform" class="form">
@ -53,28 +53,13 @@
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <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 ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="科室名称" prop="departmentId"> <el-form-item label="科室名称" prop="departmentId">
<el-button type="" v-if="departmentName == '请选择科室'" @click="clickinnerVisible()" style=" <el-button @click="clickinnerVisible()" style="
width: 379px; width: 379px;
text-align: left; text-align: left;
height: 36px; height: 36px;
color: #c0c4cc;
overflow: hidden; overflow: hidden;
">{{ departmentName }}</el-button> " :style="form.departmentName == '请选择科室' ? 'color: #c0c4cc;' : ''">{{ form.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>
</el-form-item> </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-form-item label="手术名称" prop="operationName">
<el-input v-model="form.operationName" placeholder="请输入手术名称" :disabled="disabled" /> <el-input v-model="form.operationName" placeholder="请输入手术名称" :disabled="disabled" />
</el-form-item> </el-form-item>
@ -82,7 +67,6 @@
<el-input-number v-model="form.sort" controls-position="right" :min="0" placeholder="请输入手术排序" <el-input-number v-model="form.sort" controls-position="right" :min="0" placeholder="请输入手术排序"
style="width: 380px" /> style="width: 380px" />
</el-form-item> </el-form-item>
<el-form-item label="术式信息" prop="operationInfo"> <el-form-item label="术式信息" prop="operationInfo">
<el-input v-model="form.operationInfo" placeholder="请输入术式信息" type="textarea" /> <el-input v-model="form.operationInfo" placeholder="请输入术式信息" type="textarea" />
</el-form-item> </el-form-item>
@ -99,13 +83,11 @@
<el-form-item label="科室名称" prop="departmentName" label-width="120"> <el-form-item label="科室名称" prop="departmentName" label-width="120">
<el-input v-model="informationqueryParams.departmentName" placeholder="请输入科室名称" clearable /> <el-input v-model="informationqueryParams.departmentName" placeholder="请输入科室名称" clearable />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="informationInfoinfo">搜索</el-button> <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-button icon="el-icon-refresh" size="mini" @click="addresetQuerylist">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table :data="infolist" @cell-dblclick="nurseclick" v-loading="loading"> <el-table :data="infolist" @cell-dblclick="nurseclick" v-loading="loading">
<el-table-column label="请选择" width="100" align="center"> <el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -138,12 +120,6 @@ export default {
return { return {
obj: null, obj: null,
disabled: false, disabled: false,
itemname: null,
departmentName: null,
diseaseTypeName: null,
name: '',
departmentId: null,
count: '',
innerVisibleshow: false, // innerVisibleshow: false, //
// //
informationqueryParams: { informationqueryParams: {
@ -151,6 +127,7 @@ export default {
pageSize: 10, pageSize: 10,
departmentName: null, departmentName: null,
}, },
departmentName: undefined,
infolist: [], infolist: [],
totaldepartment: 0, totaldepartment: 0,
// //
@ -167,7 +144,6 @@ export default {
total: 0, total: 0,
// //
operationInfoList: [], operationInfoList: [],
DepartmentoList: [],
// //
title: "", title: "",
// //
@ -184,11 +160,6 @@ export default {
operationRemark: null, operationRemark: null,
sort: null, sort: null,
}, },
querydepartmen: {
departmentName: "",
// pageNum: 1,
// pageSize: 10,
},
maxTableHeight: undefined, maxTableHeight: undefined,
// //
form: { form: {
@ -209,8 +180,6 @@ export default {
rules: { rules: {
departmentId: [ departmentId: [
{ required: true, message: "所属科室名称不能为空", trigger: "blur" } { required: true, message: "所属科室名称不能为空", trigger: "blur" }
], ],
operationName: [ operationName: [
{ required: true, message: "手术名称不能为空", trigger: "blur" } { required: true, message: "手术名称不能为空", trigger: "blur" }
@ -225,14 +194,9 @@ export default {
}; };
}, },
created() { created() {
this.getList(); // this.getList();
this.Departmentlist();
}, },
watch: { watch: {
name(val) {
this.querydepartmen.departmentName = val
this.Departmentlist();
},
'form.sort'(val) { 'form.sort'(val) {
if (val) { if (val) {
var name = '' var name = ''
@ -250,19 +214,12 @@ export default {
mounted() { mounted() {
this.getMaxTableHeight() this.getMaxTableHeight()
this.screenChange() this.screenChange()
// this.$refs.DepartmentList.addEventListener('scroll', this.lazyLoading) // this.informationInfoinfo();
}, },
methods: { methods: {
// //
clickinnerVisible() { clickinnerVisible() {
this.innerVisibleshow = true; this.innerVisibleshow = true;
if (this.itemname) {
this.informationqueryParams.departmentId = this.itemname
} else {
this.informationqueryParams.departmentId = null
}
this.informationInfoinfo();
}, },
// //
informationInfoinfo() { informationInfoinfo() {
@ -271,7 +228,6 @@ export default {
this.totaldepartment = response.total; this.totaldepartment = response.total;
this.loading = false; this.loading = false;
}); });
// this.informationqueryParams.page = 1;
}, },
// //
addresetQuerylist() { addresetQuerylist() {
@ -287,48 +243,15 @@ export default {
// //
nurseclick(row) { nurseclick(row) {
this.form.departmentId = row.id; this.form.departmentId = row.id;
this.departmentName = row.departmentName; this.form.departmentName = row.departmentName;
this.form.diseaseTypeId = ''; this.form.diseaseTypeId = '';
this.diseaseTypeName = '请选择病种';
this.innerVisibleshow = false; 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() { getList() {
this.loading = true; this.loading = true;
listOperationInfo(this.queryParams).then(response => { listOperationInfo(this.queryParams).then(response => {
this.operationInfoList = response.rows; this.operationInfoList = response.rows;
this.operationInfoList.forEach(e => {
})
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
@ -336,9 +259,7 @@ export default {
// //
cancel() { cancel() {
this.open = false; this.open = false;
this.form.operationName = ''; this.reset()
this.form.operationInfo = '';
// this.reset();
}, },
// //
reset() { reset() {
@ -361,23 +282,15 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
if (this.itemname) {
this.queryParams.departmentId = this.itemname
} else {
this.queryParams.departmentId = null;
this.itemname = null;
}
this.getList(); this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams.departmentId = null; this.queryParams.departmentId = null;
this.itemname = null; this.queryParams.operationName = null;
this.$refs.DepartmentList.resetQuery()
this.resetForm("queryForm"); this.resetForm("queryForm");
this.getList(); this.handleQuery();
// this.handleQuery();
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
@ -385,22 +298,26 @@ export default {
this.single = selection.length !== 1 this.single = selection.length !== 1
this.multiple = !selection.length 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() { handleAdd() {
this.reset(); this.reset();
if (this.itemname) { if (this.queryParams.departmentId) {
this.form.departmentName = this.departmentName this.form.departmentName = this.departmentName
this.form.departmentId = this.itemname this.form.departmentId = this.queryParams.departmentId
} else if (this.itemname == null) { } else {
this.departmentName = "请选择科室" this.form.departmentName = '请选择科室'
} }
else {
this.departmentName = "请选择科室"
}
this.open = true; this.open = true;
this.title = "添加手术信息"; this.title = "添加手术信息";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
@ -409,7 +326,6 @@ export default {
const id = row.id || this.ids const id = row.id || this.ids
getOperationInfo(id).then(response => { getOperationInfo(id).then(response => {
this.form = response.data; this.form = response.data;
this.departmentName = response.data.departmentName;
if (!this.form.sort) { if (!this.form.sort) {
this.form.sort = undefined this.form.sort = undefined
} }
@ -419,12 +335,9 @@ export default {
// this.disabled = true // this.disabled = true
} }
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.form.departmentName = this.departmentName
console.log(this.form, '0000')
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.obj.length > 10) { if (this.obj.length > 10) {
@ -438,25 +351,16 @@ export default {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
this.Departmentlist();
}); });
} else { } 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 => { addOperationInfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
this.Departmentlist(); this.$refs.DepartmentList.Departmentlist()
}); });
} }
} }
} }
}); });
}, },
@ -467,8 +371,8 @@ export default {
return delOperationInfo(ids); return delOperationInfo(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.Departmentlist();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
this.$refs.DepartmentList.Departmentlist()
}).catch(() => { }); }).catch(() => { });
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */