This commit is contained in:
steven
2022-10-20 13:47:18 +08:00
parent fe629fac6b
commit 1f7f94a5ea

View File

@@ -28,7 +28,12 @@
</div>
</div> -->
<!-- <pfe-button @click="issue" type="primary" text="发布" icon="&#xe68e;" /> -->
<a-button type="primary" class="publish-btn" @click="issue" v-show="isLogin">
<a-button
type="primary"
class="publish-btn"
@click="issue"
v-show="isLogin && questionsData.survey?.status === 0"
>
<template #icon>
<i class="iconfont icon-Path" style="font-size: 18px; margin-right: 6px"></i>
</template>
@@ -147,8 +152,8 @@ export default defineComponent({
// 获取问卷
const sn = proxy.$route.query.sn;
const commentVisible = ref(false);
const linkAddress = ref(window.location.href)
const isLogin = computed(() => window.localStorage.getItem('plantToken'))
const linkAddress = ref(window.location.href);
const isLogin = computed(() => window.localStorage.getItem("plantToken"));
// ref(window.localStorage.getItem('token'))
// plantToken
@@ -211,11 +216,11 @@ export default defineComponent({
issueLoading.value = false;
}
function handleDownload() {
if(!isLogin.value) {
if (!isLogin.value) {
proxy.$router.push({
name: "login",
});
return
return;
}
downloadVisible.value = true;
}
@@ -231,12 +236,11 @@ export default defineComponent({
commentInfo.value = data;
}
function handleComment() {
if(!isLogin.value) {
if (!isLogin.value) {
proxy.$router.push({
name: "login",
});
return
return;
}
store.commit("comment/ToggleCommentDrawer", true);
openModal({
@@ -252,8 +256,8 @@ export default defineComponent({
}
function handleCopy() {
useCopy(linkAddress.value)
message.success('复制成功')
useCopy(linkAddress.value);
message.success("复制成功");
}
onBeforeMount(() => {
getQuetions();
@@ -278,7 +282,7 @@ export default defineComponent({
handleComment,
linkAddress,
handleCopy,
isLogin
isLogin,
};
},
});
@@ -318,7 +322,8 @@ export default defineComponent({
.action-container {
display: flex;
align-items: center;
.comment, .download {
.comment,
.download {
display: flex;
align-items: center;
color: #434343;