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

update diagnose

上级 bd4cb591
此差异已折叠。
...@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册