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

no message

上级 6d25fae7
......@@ -20,7 +20,14 @@
:value="item.no">
</el-option>
</el-select>
<el-select v-if="showSecond" v-model="typeId" placeholder="请选择类目" size="small" style="margin-left:20px;">
<el-select
v-if="showSecond"
v-model="typeId"
@change="changeType"
placeholder="请选择类目"
size="small"
style="margin-left:20px;"
>
<el-option
v-for="(item,index) in typeList"
:key="index"
......@@ -57,10 +64,11 @@
hasSelected: '',
closeStatus: false,
},
saasDisease: '', // 高血压标识
showSecond: false,//是否显示分类
showCartoonDialog: true,
cartoonList: [],
patientTypeModels: [],
diseaseId: '',//所选疾病id
typeId: '',//所选分类id
typeList : [ // 分类列表
......@@ -88,9 +96,17 @@
}).then(res=>{
this.diseaseOptions = this.diseaseOptions.concat(res.data.P004)
this.typeList = this.typeList.concat(res.data.P036)
this.patientTypeModels = [...res.data.P004,...res.data.P036]
})
getAllEducationComtent({}).then(res=>{
this.cartoonList = [...res.data.picapEducationComtentsForHypertension,...res.data.picapEducationComtentsForNotHypertension]
this.picapEducationComtentsForHypertension = res.data.picapEducationComtentsForHypertension;
this.picapEducationComtentsForNotHypertension = res.data.picapEducationComtentsForNotHypertension;
this.allList = [...this.picapEducationComtentsForHypertension,...this.picapEducationComtentsForNotHypertension];
this.cartoonList = this.allList
this.articleTable = this.picapEducationComtentsForNotHypertension
})
}
}
......@@ -100,15 +116,46 @@
},
methods: {
changeDisease(val){
console.log(val)
this.saasDisease = val
if(!val){
console.log('选择了全部')
this.cartoonList = this.allList
this.showSecond = false
}else if(val===1){
this.showSecond = true
this.articleTable = this.picapEducationComtentsForHypertension
this.reduceArticleArray(this.articleTable,val)
this.cartoonList = this.articleTable
}else{
this.showSecond = false
this.articleTable = this.picapEducationComtentsForNotHypertension
this.cartoonList = this.reduceArticleArray(this.articleTable,val)
}
},
changeType(id){
if(!id && this.saasDisease === 1){ // 选中全部时。
this.cartoonList = this.picapEducationComtentsForHypertension
}else{
this.cartoonList = this.reduceArticleArray(this.articleTable,id);
}
},
reduceArticleArray(articleTable,id){
let array = [];
let count = 0;
for(let k = 0; k < this.patientTypeModels.length; k++){
if(this.patientTypeModels[k].no > count){
count = this.patientTypeModels[k].no;
}
}
for(let j = 0; j <= count; j++){
array[j] = [];
}
for(let i = 0; i < articleTable.length; i++){
let coun = this.showSecond ? articleTable[i].education_classify : articleTable[i].type;
if(coun && coun <= count){
array[coun].push(articleTable[i]);
}
}
return array[id]
},
clickClose() {
this.$emit('closeSelectCartoon', this.sendObj)
......
......@@ -124,7 +124,6 @@
data() {
return {
checkForm: false,
// saveStatus: false,
/*面包屑配置*/
curmbFirst: '随访管理',
curmbSecond: '计划管理',
......@@ -212,7 +211,6 @@
message: res.message,
showClose: false
});
// this.saveStatus = false
}
})
// console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1)
......
......@@ -95,7 +95,6 @@
checkForm: false,
patientIdList: [], //获取的病人列表
hasSelectedList: [], //已选居民
// saveStatus: false,
/*面包屑配置*/
curmbFirst: '随访管理',
curmbSecond: '计划管理',
......@@ -240,7 +239,6 @@
message: res.message,
showClose: false
});
// this.saveStatus = false
}
})
}else{
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册