Commit d4d26eab authored by songrui's avatar songrui

健康指导修改

parent 4adfa9a3
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
console.log(this.visible) console.log(this.visible)
const res = await getDict() const res = await getDict()
this.store.$patch({ dict: res.data || {} }) this.store.$patch({ dict: res.data || {} })
const user = await getResidentByInfo({idCard: '510215192405265723'}) const user = await getResidentByInfo({idCard: '620622196307194019'})
this.store.$patch({ userInfo: user.data || {} }) this.store.$patch({ userInfo: user.data || {} })
this.visible = true this.visible = true
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<div v-for="item in contentList" :key="item.templateMode" class="mb-1 flex" <div v-for="item in contentList" :key="item.templateMode" class="mb-1 flex"
:style="`order: ${item.templateMode}`"> :style="`order: ${item.templateMode}`">
<span class="shrink-0 mr-1" v-if="item.templateModeTrans != '无'">{{ item.templateModeTrans }} :</span> <span class="shrink-0 mr-1" v-if="item.templateModeTrans != '无'">{{ item.templateModeTrans }} :</span>
<span> {{ item.templateContent }}</span> <span v-html="textHandle(item.templateContent)"></span>
</div> </div>
</div> </div>
<div v-if="mp4List.length" class="card mt-2"> <div v-if="mp4List.length" class="card mt-2">
...@@ -109,11 +109,11 @@ export default { ...@@ -109,11 +109,11 @@ export default {
}, },
// 文本内容 // 文本内容
contentList() { contentList() {
return this.info?.publicize?.contentList || [] return this.info?.guide?.contentList || []
}, },
// 文件内容 // 文件内容
annexList() { annexList() {
return this.info?.publicize?.annexList || [] return this.info?.guide?.annexList || []
}, },
mp3List() { mp3List() {
return this.annexList.filter(e => e.type == 2) return this.annexList.filter(e => e.type == 2)
...@@ -155,6 +155,10 @@ export default { ...@@ -155,6 +155,10 @@ export default {
onBack() { onBack() {
this.$router.back() this.$router.back()
}, },
textHandle(str) {
if (!str) return ''
return str.replace(/\n/g, '<br>')
}
} }
} }
</script> </script>
...@@ -204,4 +208,10 @@ export default { ...@@ -204,4 +208,10 @@ export default {
border-radius: 4px; border-radius: 4px;
color: #4D5665; color: #4D5665;
} }
textarea {
height: 100%;
width: 100%;
border: 0;
resize: none;
}
</style> </style>
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
<span class="label">筛查科室</span> <span class="label">筛查科室</span>
<span>{{ item.visitOfficeName }}</span> <span>{{ item.visitOfficeName }}</span>
</div> </div>
<span class="tag tag-orange" v-show="item.visitWayRules == '2'">健康指导</span>
<span class="tag tag-green" v-show="item.visitWayRules == '3'">健康宣教</span>
</div> </div>
</div> </div>
</van-list> </van-list>
...@@ -55,8 +57,9 @@ export default { ...@@ -55,8 +57,9 @@ export default {
data() { data() {
return { return {
store: useStore(), store: useStore(),
activeTab: '2', activeTab: '',
tabList: [ tabList: [
{ title: '全部', name: '' },
{ title: '健康指导', name: '2' }, { title: '健康指导', name: '2' },
{ title: '健康宣教', name: '3' }, { title: '健康宣教', name: '3' },
], ],
...@@ -96,11 +99,14 @@ export default { ...@@ -96,11 +99,14 @@ export default {
}, },
load(loading = true) { load(loading = true) {
const query = { const query = {
visitWayRules: this.activeTab,
residentInfoId: this.userInfo.residentInfoId, residentInfoId: this.userInfo.residentInfoId,
pageIndex: this.pagination.pageIndex, pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize pageSize: this.pagination.pageSize
} }
if (this.activeTab) {
query.visitWayRules = this.activeTab
}
queryGuideList(query, loading).then(res => { queryGuideList(query, loading).then(res => {
if (this.pagination.pageIndex === 1) { if (this.pagination.pageIndex === 1) {
this.list = [] this.list = []
...@@ -164,4 +170,22 @@ export default { ...@@ -164,4 +170,22 @@ export default {
color: #8C8C8C; color: #8C8C8C;
} }
} }
.tag {
position: absolute;
top: 8px;
right: 8px;
border-radius: 2px;
padding: 4px 8px;
font-size: 12px;
}
.tag-orange {
border: 1px solid #FFD591;
color: #FA8C16;
background-color: #FFF7E6;
}
.tag-green {
border: 1px solid #B7EB8F;
color: #52C41A;
background-color: #F6FFED;
}
</style> </style>
...@@ -327,6 +327,7 @@ export default { ...@@ -327,6 +327,7 @@ export default {
showFailToast('删除失败') showFailToast('删除失败')
} else { } else {
showSuccessToast('删除成功') showSuccessToast('删除成功')
this.msgs = []
} }
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment