提交 80d857b3 编写于 作者: tao.wu's avatar tao.wu

no message

上级 e1c95189
...@@ -246,3 +246,37 @@ export const getBasicData = (params) => { ...@@ -246,3 +246,37 @@ export const getBasicData = (params) => {
description: '获取常量', description: '获取常量',
}) })
}; };
// 获取所有漫画列表
export const getAllEducationComtent = (data) => {
return fetch({
headers:{},
// url: getFollowUpSC(`/patientEdus/postEducationComtentList/`),
url: 'https://www.yunqueyi.com/web/patientEdus/postEducationComtentList',
method: 'post',
data: data,
description: '获取所有漫画列表'
})
}
// 获取所有疾病
export const getAllDiseases = (params) => {
return fetch({
headers,
url: getFollowUpSC(`/healths/patients/diseases/-1`),
method: 'get',
params: params,
description: '获取所有疾病',
})
}
// 获取所有分组
export const getAllLabels = (params) => {
return fetch({
headers,
url: getFollowUpSC(`/healths/labels/`),
method: 'get',
params: params,
description: '获取所有分组',
})
}
...@@ -7,15 +7,26 @@ ...@@ -7,15 +7,26 @@
center> center>
<div class="select-content"> <div class="select-content">
<div class="first-section"> <div class="first-section">
<el-select placeholder="请选择疾病" v-model="diseaseId" size="small"> <el-select
placeholder="请选择疾病"
v-model="diseaseId"
size="small"
@change="changeDisease"
>
<el-option <el-option
v-for="item in diseaseOptions" v-for="(item,index) in diseaseOptions"
:key="item.value" :key="index"
:label="item.label" :label="item.value"
:value="item.value"> :value="item.no">
</el-option> </el-option>
</el-select> </el-select>
<el-select placeholder="请选择类目" size="small" v-model="typeId" style="margin-left:20px;"> <el-select v-if="showSecond" v-model="typeId" placeholder="请选择类目" size="small" style="margin-left:20px;">
<el-option
v-for="(item,index) in typeList"
:key="index"
:label="item.value"
:value="item.no">
</el-option>
</el-select> </el-select>
</div> </div>
<div class="scroll-section"> <div class="scroll-section">
...@@ -34,6 +45,7 @@ ...@@ -34,6 +45,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { getBasicData, getAllEducationComtent } from '@/utils/followup/followapis'
export default { export default {
...@@ -44,58 +56,55 @@ ...@@ -44,58 +56,55 @@
hasSelected: '', hasSelected: '',
closeStatus: false, closeStatus: false,
}, },
diseaseId: '', showSecond: false,//是否显示分类
typeId: '',
showCartoonDialog: true, showCartoonDialog: true,
cartoonList: [ cartoonList: [],
{
name: '降压药什么时候服用?' diseaseId: '',//所选疾病id
}, typeId: '',//所选分类id
{ typeList : [], // 分类列表
name: '得了高血压怎么办?'
},
{
name: '降压药什么时候服用?'
},
{
name: '得了高血压怎么办?'
},
{
name: '降压药什么时候服用?'
},
],
diseaseOptions: [ diseaseOptions: [
{ {
value: 0, no: '',
label: '高血压', value: '全部'
}, { }
value: 1,
label: '高血脂',
}, {
value: 2,
label: '糖尿病',
}, {
value: 3,
label: '冠心病',
},
], ],
} }
}, },
props: { props: {
isSelectCartoon: { isSelectCartoon: Boolean,
type: Boolean, },
default: function () { watch: {
return false; isSelectCartoon(val){
if(val){
getBasicData({
numList: 'P036,P004'
}).then(res=>{
this.diseaseOptions = this.diseaseOptions.concat(res.data.P004)
this.typeList = res.data.P036
})
getAllEducationComtent().then(res=>{
})
} }
}, }
}, },
created() { created() {
},
mounted() {
}, },
methods: { methods: {
changeDisease(val){
console.log(val)
if(!val){
console.log('选择了全部')
this.showSecond = false
}else if(val===1){
this.showSecond = true
}else{
this.showSecond = false
}
},
clickClose() { clickClose() {
// this.sendObj.hasSelected = '';
this.$emit('closeSelectCartoon', this.sendObj) this.$emit('closeSelectCartoon', this.sendObj)
}, },
sureSelect() { sureSelect() {
......
...@@ -11,40 +11,40 @@ ...@@ -11,40 +11,40 @@
<div class="finish-content"> <div class="finish-content">
<el-form ref="searchData" :model="searchData" :inline="true" class="select-width" size="small"> <el-form ref="searchData" :model="searchData" :inline="true" class="select-width" size="small">
<el-form-item> <el-form-item>
<el-select v-model="searchData.sex"> <el-select v-model="searchData.sex" @change="changeSex">
<el-option <el-option
v-for="item in sexOptions" v-for="(item,index) in sexOptions"
:key="item.value" :key="index"
:label="item.label" :label="item.value"
:value="item.value"> :value="item.no">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="searchData.ageRange"> <el-select v-model="searchData.ageRange" @change="changeAge">
<el-option <el-option
v-for="item in ageOptions" v-for="(item,index) in ageOptions"
:key="item.value" :key="index"
:label="item.label" :label="item.value"
:value="item.value"> :value="item.no">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="searchData.diseaseId"> <el-select v-model="searchData.diseaseId" @change="changeDisease">
<el-option <el-option
v-for="item in diseaseOptions" v-for="(item,index) in diseaseOptions"
:key="item.diseaseId" :key="index"
:label="item.diseaseName" :label="item.diseaseName"
:value="item.diseaseId"> :value="item.diseaseId">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="searchData.labelId"> <el-select v-model="searchData.labelId" @change="changeLabel">
<el-option <el-option
v-for="item in labelOptions" v-for="(item,index) in labelOptions"
:key="item.labelId" :key="index"
:label="item.labelName" :label="item.labelName"
:value="item.labelId"> :value="item.labelId">
</el-option> </el-option>
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
<script> <script>
import {getPlanPatientsList} from '@/utils/followup/followapis' import { getBasicData, getPlanPatientsList, getAllDiseases, getAllLabels } from '@/utils/followup/followapis'
export default { export default {
components: {}, components: {},
name: "select-patient", name: "select-patient",
...@@ -135,65 +135,37 @@ ...@@ -135,65 +135,37 @@
// totalSelect: [],// 当前所选的人 // totalSelect: [],// 当前所选的人
patientsData: [], patientsData: [],
searchData: { searchData: {
sex: 'all', sex: '性别',
ageRange: '0', ageRange: '年龄范围',
diseaseId: '0', ageBegin: '',
labelId: '0', ageEnd: '',
diseaseId: '基础疾病',
labelId: '分组',
searchCondition: '' searchCondition: ''
}, },
// searchPara.ageBegin = $scope.ageDate($scope.search.age).ageBegin
// searchPara.ageEnd = $scope.ageDate($scope.search.age).ageEnd
paginationSet: { paginationSet: {
pageNum: 1, pageNum: 1,
pageSize: 5, pageSize: 5,
total: 0 total: 0
}, },
sexOptions: [{ sexOptions: [{
value: 'all', no: '',
label: '性别' value: '性别'
}, {
value: 'mail',
label: '男'
}, {
value: 'femail',
label: '女'
}], }],
ageOptions: [{ ageOptions: [{
value: '0', no: '',
label: '年龄范围' value: '年龄范围'
}, {
value: '1',
label: '1-6'
}, {
value: '2',
label: '7-17'
}, {
value: '3',
label: '18-28'
}], }],
diseaseOptions: [{ diseaseOptions: [{
diseaseId: '0', diseaseId: '',
diseaseName: '基础疾病' diseaseName: '基础疾病'
}, {
diseaseId: '1',
diseaseName: '高血压'
}, {
diseaseId: '2',
diseaseName: '糖尿病'
}, {
diseaseId: '3',
diseaseName: '高血脂'
}], }],
labelOptions: [{ labelOptions: [{
labelId: '0', labelId: '',
labelName: '分组' labelName: '分组'
}, {
labelId: '1',
labelName: '高危筛查项目-非高危'
}, {
labelId: '2',
labelName: '高危筛查项目-高危组'
}, {
labelId: '3',
labelName: '公卫项目'
}], }],
} }
}, },
...@@ -204,35 +176,57 @@ ...@@ -204,35 +176,57 @@
watch: { watch: {
isShowSelectPatient(val){ isShowSelectPatient(val){
if(val){ if(val){
this.getPatientsList(this.paginationSet.pageNum) this.getPatientsList({pageNum: this.paginationSet.pageNum})
// 获取常量 性别、年龄
getBasicData({
numList: 'P057,P006'
}).then(res=>{
this.sexOptions = this.sexOptions.concat(res.data.P006);//性别
this.ageOptions = this.ageOptions.concat(res.data.P057);//年龄段
})
// 获取所有疾病
getAllDiseases().then(res=>{
this.diseaseOptions = this.diseaseOptions.concat(res.data);
})
// 获取所有分组
getAllLabels({type: 1}).then(res=>{
this.labelOptions = this.labelOptions.concat(res.data.labelNameList);
})
} }
} }
}, },
methods: { methods: {
getPatientsList(pageNum){ getPatientsList(opts){
getPlanPatientsList({ getPlanPatientsList({
pageSize: this.paginationSet.pageSize, pageSize: this.paginationSet.pageSize,
pageNo: pageNum pageNo: opts.pageNum,
labelId:opts.labelId,
diseaseId: opts.diseaseId,
age: opts.age,
sex: opts.sex,
// ageBegin:'',
// ageEnd:'',
srvPackageId:opts.srvPackageId,
searchCondition:opts.searchCondition,
}).then(res=>{ }).then(res=>{
if(res.data.patientList){ if(res.data.patientList){
this.patientsData = res.data.patientList //接口获取的当页居民 this.patientsData = res.data.patientList //接口获取的当页居民
this.paginationSet.total = res.data.totalRows this.paginationSet.total = res.data.totalRows
// 设置所请求的当页人员是否成为选中状态 // // 设置所请求的当页人员是否成为选中状态
if(this.patientIdList.length > 0){ // if(this.patientIdList.length > 0){
this.patientsData.forEach((item)=>{ // this.patientsData.forEach((item)=>{
if(this.patientIdList.includes(item.patientId)){// 如果已经选过居民 // if(this.patientIdList.includes(item.patientId)){// 如果已经选过居民
this.$nextTick(()=>{ // this.$nextTick(()=>{
this.$refs.multipleTable.toggleRowSelection(item,true); // this.$refs.multipleTable.toggleRowSelection(item,true);
}) // })
} // }
}) // })
} // }
} }
}) })
}, },
searchHandler() {
console.log('搜索')
},
// 对选中的居民进行去重 // 对选中的居民进行去重
removeDuplicates(list){ removeDuplicates(list){
return Array.from(new Set(list)) return Array.from(new Set(list))
...@@ -245,7 +239,9 @@ ...@@ -245,7 +239,9 @@
// 切换分页 // 切换分页
handleCurrentChangePre(val) { handleCurrentChangePre(val) {
console.log('handleCurrentChangePre') console.log('handleCurrentChangePre')
this.getPatientsList(val) this.getPatientsList({
pageNum: val
})
}, },
clickClose(){ clickClose(){
this.$emit('closeSelectPatient',false) this.$emit('closeSelectPatient',false)
...@@ -256,9 +252,66 @@ ...@@ -256,9 +252,66 @@
handleSizeChangePre(val) { handleSizeChangePre(val) {
console.log('handleSizeChangePre') console.log('handleSizeChangePre')
this.paginationSet.pageSize = val this.paginationSet.pageSize = val
this.getPatientsList(this.paginationSet.pageNum) this.getPatientsList({
pageNum:this.paginationSet.pageNum
})
}, },
changeSex(val){
console.log(val)
this.getPatientsList({
sex: val,
pageNum: this.paginationSet.pageNum
})
},
changeAge(val){
console.log(val)
this.getPatientsList({
age: val,
pageNum: this.paginationSet.pageNum
})
},
changeDisease(val){
console.log(val)
this.getPatientsList({
diseaseId: val,
pageNum: this.paginationSet.pageNum
})
},
changeLabel(val){
console.log(val)
this.getPatientsList({
labelId: val,
pageNum: this.paginationSet.pageNum
})
},
searchHandler() {
const searchCondition = this.searchData.searchCondition
this.getPatientsList({
searchCondition: searchCondition,
pageNum: this.paginationSet.pageNum
})
},
ageDate(val){
var ageObj;
if(!val){
ageObj = {
ageBegin:'',
ageEnd:''
}
}else if(val.indexOf('+') > -1){
ageObj = {
ageBegin: 84,
ageEnd: 200
}
}else {
var ageItem = val.split('-');
ageObj = {
ageBegin:ageItem[0],
ageEnd:ageItem[1]
}
}
return ageObj;
}
} }
} }
</script> </script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册