提交 a79c6c31 编写于 作者: chengxiang.li's avatar chengxiang.li

update diagnose

上级 bd4cb591
<template>
<div class="add-diagnose-wrap">
<el-dialog
:close-on-click-modal="false"
title="添加诊断"
:visible.sync="centerDialogVisible"
width="900px"
center>
<!-- <span>需要注意的是内容是默认不居中的</span> -->
<div>
<el-input v-model="searchInput" placeholder="搜索疾病" class="search-disease"></el-input>
</div>
<div class="main-content">
<div class="left-box left">
<!-- 常用诊断 -->
<!-- <div class="common-diagnose">
<p class="title">常用诊断<span class='no-result'>没有找到相关搜索结果</span></p>
<ul class="list">
<li
v-for="item in commonList"
:class="returnEachCommonLiClass(item)"
@click="handleEachCommonLiClick(item)"
>
{{item}}
</li>
</ul>
</div> -->
<!-- 搜索列表 有搜索结果时-->
<div class="search-list-wrap">
<ul class="search-list">
<li>
<div class="left">
克里斯都看过了单身快乐<span class="keyword">关键词</span>格但斯克偶尔玩几个看总额为给了我赶紧来看看链接
<p class="code">89234232</p>
</div>
<div class="right"><i class="el-icon-check"></i></div>
</li>
<li>
<div class="left">
克里斯都看过了单身快乐<span class="keyword">关键词</span>格但斯克
<p class="code">89234232</p>
</div>
<div class="right"><i class="el-icon-check"></i></div>
</li>
<li>
<div class="left">
克里斯都看过了单身快乐<span class="keyword">关键词</span>格但斯克偶尔玩几个看总额为给了我赶紧来看看链接
<p class="code">89234232</p>
</div>
<div class="right"><i class="el-icon-check"></i></div>
</li>
<li v-if="showSearchLoading" class="loading">加载中...</li>
</ul>
</div>
<div class="fixed-wrap" v-show="showDiagnoseModal">
<div class="fullscreen-bg"></div>
<div class="add-diagnose-modal" >
<span class="close-btn el-icon-close" @click="hideSelf"></span>
<p class="title-text">添加诊断</p>
<div class="search-input">
<el-input v-model="searchInput" placeholder="搜索疾病" class="search-disease" @input="handleInputSearch" @blur=""></el-input>
</div>
<!-- 已选 -->
<div class="choosed-list-wrap left">
<div class="title">已选 {{choosedList.length}}/20</div>
<div class="choosed-list">
<el-tag
:key="tag"
v-for="tag in choosedList"
closable
:disable-transitions="false"
@close="handleClose(tag)">
<div class="text">{{tag}}</div>
</el-tag>
<div class="main-content">
<div class="left-box left">
<!-- 搜索列表 有搜索结果时-->
<div
v-show="searchList && searchList.length > 0"
class="search-list-wrap" tabindex="0" outline="0" hidefocus="true"
@blur="handleSearchListBlur"
v-infinite-scroll="loadMore"
infinite-scroll-disabled="busy"
infinite-scroll-distance="5"
infinite-scroll-immediate-check="false"
>
<ul class="search-list">
<li v-for="(searchLi, index) in searchList" @mousedown.prevent="handleSearchLiClick(searchLi)">
<div class="left">
<p class="disease-name" v-html="searchLi.diseaseName"></p>
<div class="one-line">
<p class="alias" v-html="searchLi.alias"></p>
<p class="sign" v-if="searchLi.alias">|</p>
<p class="code">{{searchLi.icdCode}}</p>
</div>
</div>
<div class="right" v-if="isSearchLiSelected(searchLi)"><i class="el-icon-check"></i></div>
</li>
<p v-if="busy" class="loading">加载中...</p>
<p v-if="noMore" class="loading">没有更多了...</p>
</ul>
</div>
<!-- 常用诊断 -->
<div v-show="!(searchList && searchList.length > 0)" class="common-diagnose">
<p class="title">常用诊断<span class='no-result' v-if="hasNoResult">没有找到相关搜索结果</span></p>
<ul class="list">
<li
v-for="item in commonList"
:class="returnEachCommonLiClass(item)"
@click="handleEachCommonLiClick(item)"
>
{{item.diseaseName}}
</li>
</ul>
</div>
</div>
<!-- 已选 -->
<div class="choosed-list-wrap left">
<div class="title">已选 {{choosedList.length}}/20</div>
<div class="choosed-list">
<el-tag
v-for="(tag, index) in choosedList"
closable
:disable-transitions="false"
@close="handleClose(tag)">
<div class="text" v-html="tag.diseaseName"></div>
</el-tag>
</div>
</div>
</div>
<div class="dialog-footer">
<el-button @click="hideSelf">取 消</el-button>
<el-button type="primary" @click="handleConfirm">确 定</el-button>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="hideSelf">取 消</el-button>
<el-button type="primary" @click="handleConfirm">确 定</el-button>
</span>
</el-dialog>
<!-- 已选数量不能超过20个 提示 -->
<el-dialog
title="提示"
......@@ -90,68 +91,187 @@
</template>
<script>
console.log('&&& 333333333333333333333333')
import {
getCommonDiagnoseList,
goToSearch,
} from '@/utils/patients/patientsapi';
export default {
data() {
return {
centerDialogVisible: false,
showDiagnoseModal: true,
limitTipsVisible: false,
showSearchLoading: false,
searchInput: '',
commonList: ['杀戮空间放开了十几个', '北京', '水电费', '阿尕更多干点', '深刻理解过类似赶紧来看看就两个都是圣诞快乐广俊克雷登斯', '孔1结构','杀戮空间放1开了十几个', '北京2', '水电2费', '阿尕2更多干点', '深刻理2解过类似赶紧来看看就两个都是圣诞快乐广俊克雷登斯', '孔d结构'],
commonChoosedList: ['上海'],
choosedList: ['标签一', '标签一多少分的', '标签二是哦多功能流口水的功能上课了多个接口来的丧假快来打几个是的范德萨范德萨', '标签三','标签三d', 'dewf', '北京'],
canScroll: true,
searchList: [],
commonList: [],
choosedList: [],
hasNoResult: false,
page: 1,
pageSize: 30,
busy: false,
noMore: false,
totalPageNum: 0,
}
},
computed: {
},
created() {
let that = this;
getCommonDiagnoseList().then(res => {
console.log('>>>>>>*********** res: ', res)
if(res.code == '000000'){
that.commonList = res.data;
}else{
that.$message({
message: (data && data.message) || '接口出错',
type: 'warning'
});
}
})
},
mounted() {
console.log(11999);
console.log('>>>>>>>>>>>>>>>>>>>>>>>> ', this.centerDialogVisible)
console.log('>>>>>>>>>>>>>>>>>>>>>>>> ', this.showDiagnoseModal)
},
watch: {
centerDialogVisible(val) {
let that = this;
console.log('val: ', val)
// 搜索时
that.$nextTick(function(){
let searchListWrap = document.querySelector('.search-list-wrap');
console.log('>>> ', searchListWrap)
if( searchListWrap ){
searchListWrap.onscroll = function(){
console.log(11)
let contentH = document.querySelector('.search-list').offsetHeight;
let viewH = 290;
let scrollTop = searchListWrap.scrollTop;
if( that.canScroll && (contentH - viewH - scrollTop <= 50) ){
console.log('到达临界点,开始加载下一页');
that.canScroll = false;
that.loadMoreSearchData();
}
}
}
})
showDiagnoseModal(val) {
}
},
methods: {
showSelf(params) {
this.centerDialogVisible = true;
if(params && params.clearChoosedList){
this.choosedList = [];
}
this.showDiagnoseModal = true;
let list = JSON.parse(JSON.stringify(this.$store.state.patientsDiagnose.selectedDiagList));
this.choosedList = list;
},
hideSelf() {
this.centerDialogVisible = false;
this.showDiagnoseModal = false;
this.choosedList = [];
this.searchList = [];
this.searchInput = ''
},
isSearchLiSelected(item) {
return this.hasItem(this.choosedList, item) > -1 ? true : false;
},
handleSearchLiClick(item) {
let hasIndex = this.hasItem(this.choosedList, item);
if( hasIndex > -1 ){
this.choosedList.splice(hasIndex, 1);
}else{
this.choosedList.push(item);
}
},
handleSearchListBlur() {
this.searchList = [];
},
handleSearchWrapScroll() {
// console.log('ddxx88888888888')
// let that = this;
// // console.log('val: ', val)
// // 搜索时
// that.$nextTick(function(){
// let searchListWrap = document.querySelector('.search-list-wrap');
// console.log('>>> ', searchListWrap)
// if( searchListWrap ){
// // searchListWrap.onscroll = function(){
// let contentH = document.querySelector('.search-list').offsetHeight;
// let viewH = 290;
// let scrollTop = searchListWrap.scrollTop;
// if( that.canScroll && (contentH - viewH - scrollTop <= 50) ){
// console.log('到达临界点,开始加载下一页');
// that.canScroll = false;
// that.loadMoreSearchData();
// }
// // }
// }
// })
},
// 搜索框中输入文字 时 page=1 pageSize=30
handleInputSearch() {
let that = this;
that.page = 1;
if( that.searchInput == ''){
that.searchList = [];
return;
}
let params = {
name: that.searchInput,
page: 1,
pageSize: 30,
};
goToSearch(params).then(res => {
console.log('>>>>>>*********** search: ', res)
if(res.code == '000000'){
that.totalPageNum = Math.ceil(res.data.total/that.pageSize); // 总页数
let list = res.data.icdContentsList || [];
if(list.length > 0){
that.searchList = list;
that.hasNoResult = false;
}else{
that.searchList = [];
that.hasNoResult = true;
}
}else{
that.searchList = [];
that.$message({
message: data.message,
type: 'warning'
});
}
})
},
// 上拉加载更多
loadMore() {
console.log('loadmore...')
let that = this;
that.busy = true;
that.page += 1;
// console.log('请求第几页数据: ', that.page)
if(that.page > that.totalPageNum){
// console.log('没有更多了。。。。。');
that.busy = false;
that.noMore = true;
return;
}else{
that.noMore = false;
}
let params = {
name: that.searchInput,
page: that.page,
pageSize: that.pageSize,
}
setTimeout(()=>{
goToSearch(params).then(res => {
console.log('>>>>>>*********** search: ', res)
// request ...加载完成后,可以继续滚动加载\
that.busy = false;
if(res.code == '000000'){
let list = res.data.icdContentsList || [];
if(list.length > 0){
that.searchList = that.searchList.concat(list);
}
}else{
that.$message({
message: data.message,
type: 'warning'
});
}
})
}, 500)
},
handleInputSearchBlur(){
this.searchList = [];
},
handleConfirm() {
//
let list = JSON.parse(JSON.stringify(this.choosedList));
this.$store.dispatch('patientsDiagnose/changeDiagnoseList', list)
this.showDiagnoseModal = false;
this.searchInput == '';
this.searchList = [];
},
handleClose(tag) {
this.choosedList.splice(this.choosedList.indexOf(tag), 1);
this.choosedList.splice(this.hasItem(this.choosedList, tag), 1);
},
returnEachCommonLiClass(item) {
let hasIndex = this.hasItem(this.choosedList, item);
......@@ -172,17 +292,13 @@ console.log('&&& 333333333333333333333333')
},
hasItem(list, item) {
for(let i=0; i<list.length; i++){
if( list[i] == item ){
if( list[i].icdCode == item.icdCode ){
return i;
}
}
return -1;
},
loadMoreSearchData() {
// request ...加载完成后,可以继续滚动加载
this.canScroll = true;
},
},
}
</script>
......@@ -212,138 +328,201 @@ console.log('&&& 333333333333333333333333')
}
}
.add-diagnose-wrap{
.search-disease{
width: 370px;
}
.main-content{
overflow: hidden;
.left{
float: left;
.fixed-wrap{
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: auto;
z-index: 1000;
.fullscreen-bg{
position: absolute;
width: 100%; height: 100%;
background: black; opacity: 0.3;
}
.left-box{
width: 370px;
height: 300px;
.common-diagnose{
width: 100%; height: 300px;
.title{
color: #303133;
font-size: 16px;
line-height: 40px;
margin-top: 10px;
.no-result{
font-size: 14px;
color: #e6a23c;
margin-left: 28px;
}
}
.list{
width: 100%; height: 250px;
overflow: hidden;
overflow-y: scroll;
.scroll-bar;
padding: 10px;
border: 1px solid #DCDFE6; border-radius: 4px;
li{
height: 35px; line-height: 35px; padding: 0 15px;
background: #fff;
border: 1px solid #dcdfe6;
color: #606266;
cursor: pointer;
&.active{
color: #fff;
background: #409eff;
border-color: #409eff;
}
display: inline-block;
margin: 0 10px 10px 0;
border-radius: 4px;
max-width: 350px;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.add-diagnose-modal{
position: relative;
border-radius: 4px;
width: 910px; padding: 0 30px 0;
position: fixed;
left: 50%; margin-left: -500px;
top: 60px;
background: #fff;
.close-btn{
position: absolute; right: 20px; top: 20px;
cursor: pointer;
&:hover{
color: #409eff;
}
}
.search-list-wrap{
width: 100%; height: 290px; margin-top: 10px;
border: 1px solid #DCDFE6;
overflow: hidden;
overflow-y: scroll;
.scroll-bar;
.title-text{
text-align: center;
line-height: 60px;
}
.search-list{
border-radius: 4px;
width: 100%;
padding: 10px;
li{
position: relative;
margin-bottom: 10px;
line-height: 20px;
overflow: hidden;
.left{
width: 310px;
float: left;
}
.right{
position: absolute;
right: 0;
top: 50%;
margin-top: -13px;
// width: 0px;
// float: left;
display: inline-block;
vertical-align: middle;
i{
font-size: 24px;
color: #449284;
font-weight: 700;
.search-disease{
width: 370px;
}
.main-content{
overflow: hidden;
.left{
float: left;
}
.left-box{
width: 370px;
height: 300px;
.common-diagnose{
width: 100%; height: 300px;
.title{
color: #303133;
font-size: 16px;
line-height: 40px;
margin-top: 10px;
.no-result{
font-size: 14px;
color: #e6a23c;
margin-left: 28px;
}
}
.list{
width: 100%; height: 250px;
overflow: hidden;
overflow-y: scroll;
.scroll-bar;
padding: 10px;
border: 1px solid #DCDFE6;
li{
height: 35px; line-height: 35px; padding: 0 15px;
background: #fff;
border: 1px solid #dcdfe6;
color: #606266;
cursor: pointer;
font-size: 12px;
&.active{
color: #fff;
background: #409eff;
border-color: #409eff;
}
display: inline-block;
margin: 0 10px 10px 0;
border-radius: 4px;
max-width: 350px;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
}
}
.keyword{
color: #ff8429;
}
.code{
line-height: 30px;
}
&.loading{
color: red;
text-align: center;
margin: 0;
.search-list-wrap{
width: 100%; height: 290px; margin-top: 10px;
border: 1px solid #DCDFE6;
overflow: hidden;
overflow-y: scroll;
.scroll-bar;
.search-list{
border-radius: 4px;
width: 100%;
padding: 10px;
li{
position: relative;
line-height: 30px;
overflow: hidden;
cursor: pointer;
font-size: 12px;
&:hover{
background: #eee;
}
.left{
width: 310px;
float: left;
span{
color: #ff8429;
}
.disease-name{
font-size: 14px;
}
.one-line{
width: 100%; overflow: hidden;
font-size: 12px; color: #aaa;
.alias{
float: left;
}
.sign{
float: left;
margin: 0 5px;
}
.code{
float: left;
}
}
}
.right{
position: absolute;
right: 0;
top: 50%;
margin-top: -13px;
// width: 0px;
// float: left;
display: inline-block;
vertical-align: middle;
i{
font-size: 24px;
color: #449284;
font-weight: 700;
}
}
.code{
line-height: 30px;
}
}
.loading{
color: #ccc;
text-align: center;
margin: 0;
font-size: 12px;
margin-top: 5px;
}
}
}
}
}
}
.choosed-list-wrap{
width: 450px;
height: 300px;
margin-left: 30px;
.title{
color: #303133;
font-size: 16px;
line-height: 40px;
margin-top: 10px;
}
.choosed-list{
overflow: hidden;
overflow-y: scroll;
width: 450px;
height: 250px;
padding: 10px;
border: 1px solid #DCDFE6; border-radius: 4px;
.scroll-bar;
.el-tag {
margin: 0 10px 10px 0;;
.text{
display: inline-block;
max-width: 342px;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
.choosed-list-wrap{
width: 450px;
height: 300px;
margin-left: 30px;
.title{
color: #303133;
font-size: 16px;
line-height: 40px;
margin-top: 10px;
}
.el-tag__close{
top: -12px;
.choosed-list{
overflow: hidden;
overflow-y: scroll;
width: 450px;
height: 250px;
padding: 10px;
border: 1px solid #DCDFE6;
.scroll-bar;
.el-tag {
margin: 0 10px 10px 0;;
.text{
display: inline-block;
max-width: 342px;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.el-tag__close{
top: -12px;
}
}
}
}
}
}
.dialog-footer{
text-align: center;
margin: 20px auto;
}
}
}
</style>
......
......@@ -4,6 +4,8 @@ import common from './education/common';
//随访
import followModules from './followup/index';
import getters from './getters'
//居民诊断
import patientsDiagnose from './patientsManage/patientsDiagnose';
Vue.use(Vuex)
......@@ -11,7 +13,8 @@ Vue.use(Vuex)
export default new Vuex.Store({
modules: {
common,
...followModules
...followModules,
patientsDiagnose,
},
getters
})
......
const patientsDiagnose = {
namespaced: true,
state: {
selectedDiagList: [],
},
mutations: {
CHANGE_DIAGNOSE_LIST: (state, data) => {
state.selectedDiagList = data;
}
},
actions: {
changeDiagnoseList({ commit }, list) {
commit('CHANGE_DIAGNOSE_LIST', list);
}
}
}
export default patientsDiagnose;
\ No newline at end of file
......@@ -12,7 +12,7 @@ export const envConfig = {
// baseUrl: 'http://10.177.15.150:11905/',
// baseUrl: 'https://dev-sc.yunqueyi.com/',
// baseUrl: 'https://test1-sc.yunqueyi.com/',
baseUrl: 'https://uat-sc.yunqueyi.com/',
baseUrl: 'https://dev-sc.yunqueyi.com/',
apiUrl: 'https://dev-api.yunqueyi.com/',
qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
......
......@@ -54,7 +54,7 @@ service.interceptors.request.use(config => {
}
if( process.env.BUILD_ENV == "development" ){ // 本地开发环境
// console.log('环境变量>>>> ', process.env.BUILD_ENV);
config.headers['token'] = '6F0F3B3F0EB24A14AA025FA47CD43770';
config.headers['token'] = 'BFD804F3A3194FBBBE113962222839F6';
}else{
config.headers['token'] = localStorage.getItem('storageToken')
}
......
......@@ -377,6 +377,7 @@ export const getRemindPatient = (data) => {
})
};
// 保存并新增
export const savePatientInfo = (data) => {
return utils.checkAuth(()=>{
return fetch({
......@@ -426,3 +427,38 @@ export const getPatientInfoList = (data) => {
})
};
// 添加诊断:获取常用诊断列表
export const getCommonDiagnoseList = params => {
return fetch({
headers,
url: getBaseUrl(`medicineDictionary/icdCommonDiagnosis`),
method: 'get',
params: params,
description: '获取常用诊断列表',
})
}
// 添加诊断:搜索
export const goToSearch = params => {
return fetch({
headers,
url: getBaseUrl(`medicineDictionary/icdContents`),
method: 'get',
params: params,
description: '常用诊断搜索',
})
}
// 选择或搜索诊断
export const getIcdList = params => {
return fetch({
headers,
// url: getBaseUrl(`healths/icd/list`),
url: 'http://sosoapi.yunqueyi.com/sosoapi-web/pass/mock/46/healths/icd/list',
method: 'get',
params: params,
description: '选择或搜索诊断',
})
}
......@@ -50,6 +50,9 @@
</el-option>
</el-select> -->
<el-button icon="el-icon-plus" @click="handleAddDiagnose">添加诊断</el-button>
<ul class="final-diagnose-list" v-if="selectedDiagList && selectedDiagList.length > 0">
<li v-for="diagnose in selectedDiagList" v-html="diagnose.name+'; '"></li>
</ul>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -244,7 +247,7 @@
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { mapGetters, mapState } from 'vuex';
import { checkMobile } from '@/utils/patients/checkValid';
import { isCardNo, checkProvince, checkBirthday, checkParity, validateIdCard } from '@/utils/patients/checkCardNum';
import {
......@@ -447,6 +450,9 @@
...mapGetters([
'_token',
]),
...mapState('patientsDiagnose', {
selectedDiagList: state => state.selectedDiagList
}),
currentCount(){
if(this.patientInfoForm.remark) {
return this.patientInfoForm.remark.length
......@@ -486,9 +492,7 @@
},
// 点击 添加诊断
handleAddDiagnose() {
this.$refs.addDiagnose.showSelf({
clearChoosedList: true
});
this.$refs.addDiagnose.showSelf();
},
initConstant(){
getDiseasesList().then((data) => {
......@@ -518,17 +522,18 @@
});
this.getProvinceLists();
},
changeDiseases(val) {
let newDiseaseList = [];
val.forEach((valItem) => {
this.diseasesList.forEach((item2) => {
if(valItem == item2.diseaseId){
newDiseaseList.push({parentDiseaseId: item2.diseaseId});
}
})
});
this.patientInfoForm.patientDiseases = newDiseaseList;
},
// changeDiseases(val) {
// // 格式化数据 提交用
// let newDiseaseList = [];
// val.forEach((valItem) => {
// this.diseasesList.forEach((item2) => {
// if(valItem == item2.diseaseId){
// newDiseaseList.push({parentDiseaseId: item2.diseaseId});
// }
// })
// });
// this.patientInfoForm.patientDiseases = newDiseaseList;
// },
changeLabels(val){
let newLabelsList = [];
val.forEach((valItem) => {
......@@ -606,6 +611,7 @@
status: true,
patientInfoForm: {
...this.patientInfoForm,
icdList: this.selectedDiagList,
birthTime: this.patientInfoForm.birthTime ? `${this.patientInfoForm.birthTime} 00:00:00` : '',
}
})
......@@ -615,6 +621,7 @@
// patientInfoForm: this.patientInfoForm,
patientInfoForm: {
...this.patientInfoForm,
icdList: this.selectedDiagList,
birthTime: this.patientInfoForm.birthTime ? `${this.patientInfoForm.birthTime} 00:00:00` : '',
}
})
......@@ -811,5 +818,15 @@
.idNoTxt{
display: inline-flex;color:#C0C4CC;line-height:20px;vertical-align: middle;
}
.final-diagnose-list{
color: #BBB;
line-height: 20px;
margin-top: 15px;
overflow: hidden;
li{
float:left;
margin-right: 5px;
}
}
}
</style>
......@@ -31,14 +31,33 @@
</el-select>
</el-form-item>
<el-form-item label="诊断:" prop="startDate">
<el-select v-model="searchData.diseaseId" size="small" clearable :popper-append-to-body="false">
<!-- <el-select v-model="searchData.diseaseId" size="small" clearable :popper-append-to-body="false" placeholder="请选择或搜索诊断">
<el-option
v-for="item in diseaseList"
:key="item.diseaseId"
:label="item.diseaseName"
:value="item.diseaseId">
</el-option>
</el-select> -->
<!-- new Start -->
<el-select
v-model="searchData.icdCodeList"
multiple
filterable
remote
reserve-keyword
placeholder="请选择或搜索诊断"
:remote-method="getDiseaseData"
:loading="loading"
>
<el-option
v-for="item in options"
:key="item.icdCode"
:label="item.icdName"
:value="item.icdCode">
</el-option>
</el-select>
<!-- new End -->
</el-form-item>
<el-form-item label="分组:" prop="labelId">
<el-select v-model="searchData.labelId" size="small" clearable :popper-append-to-body="false">
......@@ -138,7 +157,8 @@
<script>
import BreadCrumb from '../../../components/breadcrumb.vue'
import { getConstants,
getDiseasesList,
// getDiseasesList,
getIcdList,
getLabelList,
getPatientList} from '../../../utils/patients/patientsapi'
export default {
......@@ -161,12 +181,14 @@
agesList: [], //年龄
diseaseList: [],
groupList: [],
patientList: []
patientList: [],
options: [],
loading: false,
}
},
mounted() {
this.getConstantData(); //获取性别、年龄段常量
this.getDiseaseData(); //获取疾病种类
this.getDiseaseData(); //获取 搜索诊断
this.getGroupList(); //获取分组
this.getPatients({
...this.searchData
......@@ -188,17 +210,39 @@
});
});
},
getDiseaseData() {
getDiseasesList().then((data) => {
if(data.code == "000000") {
this.diseaseList = data.data;
}
}).catch((error) => {
this.$message({
message: error,
type: 'error'
getDiseaseData(query) {
// getDiseasesList().then((data) => {
// if(data.code == "000000") {
// this.diseaseList = data.data;
// }
// }).catch((error) => {
// this.$message({
// message: error,
// type: 'error'
// });
// });
if (query !== '') {
let params = {
icdName: query ? query : '',
pageSize: 1,
pageNum: 200,
};
this.loading = true;
getIcdList(params).then(data => {
this.loading = false;
if(data.code == "000000") {
this.options = data.data.icdList;
}
}).catch((error) => {
this.$message({
message: error,
type: 'error'
});
});
});
}else {
this.options = [];
}
},
getGroupList() {
getLabelList({
......
......@@ -95,6 +95,9 @@
this.$refs.newForm.diseaseIdList = [];
this.$refs.newForm.labelIdList = [];
this.$refs.newForm.addressList = [];
// 清空已选的诊断列表
this.$store.dispatch('patientsDiagnose/changeDiagnoseList', []);
// this.$router.go(0);//体验不好
},500)
}else {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册