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

update diagnose

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