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

update diagnose

上级 bd4cb591
此差异已折叠。
......@@ -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,10 +210,29 @@
});
});
},
getDiseaseData() {
getDiseasesList().then((data) => {
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.diseaseList = data.data;
this.options = data.data.icdList;
}
}).catch((error) => {
this.$message({
......@@ -199,6 +240,9 @@
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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册