|
|
@ -9,7 +9,7 @@ |
|
|
|
<!-- 角色栏 --> |
|
|
|
<Roles /> |
|
|
|
<!-- 体验项目切换角色 --> |
|
|
|
<!-- <Experience v-if="showEXP" /> --> |
|
|
|
<Experience v-if="showEXP" /> |
|
|
|
<!-- 日常任务面板 --> |
|
|
|
<Globals /> |
|
|
|
|
|
|
@ -17,16 +17,16 @@ |
|
|
|
<TimeLine @getTasks="getTasks" class="flex-1 overflow-hidden" ref="timeLine" /> |
|
|
|
|
|
|
|
<!-- 医院项目的问卷悬浮按钮 --> |
|
|
|
<view style="z-index: 99" class="absolute bottom-10 right-5" v-if="showQuestion"> |
|
|
|
<view style="z-index: 99" class="absolute bottom-10 right-5" v-if="name"> |
|
|
|
<view |
|
|
|
@click="openQuestionnaire(true)" |
|
|
|
@click="openQuestionnaire" |
|
|
|
class="relative text-white bg-blue-400 flex justify-center items-center w-12 h-12 rounded-full shadow-2xl" |
|
|
|
> |
|
|
|
问卷 |
|
|
|
{{ name }} |
|
|
|
<!-- <u-badge type="error" :count="count" :offset="[-8, -8]"></u-badge> --> |
|
|
|
</view> |
|
|
|
|
|
|
|
<u-popup v-model="showQuestionList" mode="bottom" border-radius="14"> |
|
|
|
<!-- <u-popup v-model="showQuestionList" mode="bottom" border-radius="14"> |
|
|
|
<view class="h-64"> |
|
|
|
<view class="text-center font-bold fixed bg-white py-3 top-0 w-full">请选择</view> |
|
|
|
<view class="flex flex-col mx-3 pt-10 pb-6 h-full overflow-y-auto" :class="questionnaires.length < 5 ? 'justify-center' : ''"> |
|
|
@ -42,7 +42,7 @@ |
|
|
|
</view> |
|
|
|
<view class="fixed bottom-0 bg-white h-6 w-full"></view> |
|
|
|
</view> |
|
|
|
</u-popup> |
|
|
|
</u-popup> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -65,6 +65,8 @@ export default { |
|
|
|
chooseItem: false, |
|
|
|
showGuide: false, |
|
|
|
showEXP: false, |
|
|
|
name: '', |
|
|
|
url: '', |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
@ -78,8 +80,11 @@ export default { |
|
|
|
...mapGetters('user', ['userId']), |
|
|
|
}, |
|
|
|
|
|
|
|
onLoad(options) { |
|
|
|
async onLoad(options) { |
|
|
|
console.log('this.$route.query: ', this.$route); |
|
|
|
const data = await this.$u.api.getQueryButton({}); |
|
|
|
this.name = data.name; |
|
|
|
this.url = data.url; |
|
|
|
if (options.share && options.share === '1') { |
|
|
|
this.shareInit(options); |
|
|
|
} else { |
|
|
@ -128,16 +133,16 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 医院项目下的调查问卷 |
|
|
|
questionnaires(val) { |
|
|
|
if (val && val.length) { |
|
|
|
this.showQuestion = true; |
|
|
|
val.forEach(item => { |
|
|
|
if (item.isWrite === 0 || item.isWrite === -1) { |
|
|
|
this.count += 1; |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
// questionnaires(val) { |
|
|
|
// if (val && val.length) { |
|
|
|
// this.showQuestion = true; |
|
|
|
// val.forEach(item => { |
|
|
|
// if (item.isWrite === 0 || item.isWrite === -1) { |
|
|
|
// this.count += 1; |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// } |
|
|
|
// }, |
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
@ -375,7 +380,7 @@ export default { |
|
|
|
// TODO |
|
|
|
this.getProjectById({ projectId: options.p, num: 0 }); // 根据项目id获取项目信息 |
|
|
|
// 查询医院是否填写了调查问卷 |
|
|
|
this.handleQueryNotWrite(options.p); |
|
|
|
// this.handleQueryNotWrite(options.p); |
|
|
|
this.getByProject(options.p); |
|
|
|
} |
|
|
|
}, |
|
|
@ -494,14 +499,8 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 打开问卷 |
|
|
|
openQuestionnaire(value, type) { |
|
|
|
this.chooseItem = value; |
|
|
|
if (this.count === 1 || this.chooseItem) { |
|
|
|
window.location.href = `https://www.tall.wiki/carbasics/survey?userId=${this.user.id}&type=${type}`; |
|
|
|
// window.location.href = `https://www.baidu.com`; |
|
|
|
} else { |
|
|
|
this.showQuestionList = true; |
|
|
|
} |
|
|
|
openQuestionnaire() { |
|
|
|
window.location.href = `${this.url}?userId=${this.user.id}`; |
|
|
|
}, |
|
|
|
|
|
|
|
// 根据当前打开的项目id 查询当前项目是否是 医院体验项目 |
|
|
|