jinx 2 år sedan
förälder
incheckning
d468f04266

+ 2 - 2
src/components/files/TagView.vue

@@ -9,7 +9,7 @@
             </header>
             </header>
             <article>
             <article>
                 <TagMsg @setShow="setShow"></TagMsg>
                 <TagMsg @setShow="setShow"></TagMsg>
-                <Comment v-if="isLogin" :slideHeigt="slideHeigt"></Comment>
+                <Comment v-if="isLogin && isAuth" :slideHeigt="slideHeigt"></Comment>
             </article>
             </article>
             <!-- <footer></footer> -->
             <!-- <footer></footer> -->
         </div>
         </div>
@@ -21,7 +21,7 @@ import { ref, onMounted, onBeforeUnmount, computed, inject, watch } from 'vue'
 import TagMsg from './content/TagMsg.vue'
 import TagMsg from './content/TagMsg.vue'
 import Comment from './content/Comment.vue'
 import Comment from './content/Comment.vue'
 import { nextTick } from 'process'
 import { nextTick } from 'process'
-
+const isAuth = inject('isAuth')
 const isLogin = inject('isLogin')
 const isLogin = inject('isLogin')
 const notify = inject('notify')
 const notify = inject('notify')
 const emits = defineEmits(['action'])
 const emits = defineEmits(['action'])

+ 4 - 3
src/components/files/content/Comment.vue

@@ -81,6 +81,7 @@ import { http } from '@/utils/request'
 import avatar from '@/assets/img/avatar@2x.png'
 import avatar from '@/assets/img/avatar@2x.png'
 import UiConfirm from '@/components/dialog/Confirm.vue'
 import UiConfirm from '@/components/dialog/Confirm.vue'
 import i18n from '@/i18n'
 import i18n from '@/i18n'
+import browser from '@/utils/browser'
 import UiInput from '../../form/Input.vue'
 import UiInput from '../../form/Input.vue'
 const { t } = i18n.global
 const { t } = i18n.global
 const props = defineProps({
 const props = defineProps({
@@ -99,7 +100,7 @@ const replyInfo = ref(null)
 const tipsType = ref('warn')
 const tipsType = ref('warn')
 const showTips = ref(null)
 const showTips = ref(null)
 const slider = ref(null)
 const slider = ref(null)
-
+const projectId = browser.valueFromUrl('projectId') || 1
 const handlerReply = (data, index) => {
 const handlerReply = (data, index) => {
     inputText.value = ''
     inputText.value = ''
     let name = data.nickName ? data.nickName : t('tag.unkownUser')
     let name = data.nickName ? data.nickName : t('tag.unkownUser')
@@ -142,7 +143,7 @@ const hanlderSubmit = () => {
 
 
     if (canPut) {
     if (canPut) {
         canPut = false
         canPut = false
-        http.post(`smart-site/comment/reply`, params)
+        http.post(`smart-site/comment/reply/${projectId}`, params)
             .then(response => {
             .then(response => {
                 if (response.success) {
                 if (response.success) {
                     getAllComments()
                     getAllComments()
@@ -189,7 +190,7 @@ const getAllComments = () => {
 }
 }
 const handlerDel = status => {
 const handlerDel = status => {
     if (status == 'ok') {
     if (status == 'ok') {
-        http.post(`smart-site/comment/del`, { commentId: delComfirm.value.commentId }).then(response => {
+        http.post(`smart-site/comment/del${projectId}`, { commentId: delComfirm.value.commentId }).then(response => {
             if (response.success) {
             if (response.success) {
                 // if (!delComfirm.value.parentIndex) {
                 // if (!delComfirm.value.parentIndex) {
                 //     commentList.value.splice(delComfirm.value.index, 1)
                 //     commentList.value.splice(delComfirm.value.index, 1)

+ 11 - 2
src/components/form/SelectList.vue

@@ -16,7 +16,9 @@
             <div class="panel" v-show="selecterShow">
             <div class="panel" v-show="selecterShow">
                 <ul>
                 <ul>
                     <li v-for="item in data" @click.stop="onselecterChange(item)">
                     <li v-for="item in data" @click.stop="onselecterChange(item)">
-                        <div><span class="checkbox" :class="{ checked: modelValue.includes(item) }"></span>{{ item.text || $t('tag.unkownUser') }}</div>
+                        <div>
+                            <span class="checkbox" :class="{ checked: modelValue.includes(item) }"></span><span class="name">{{ item.text || $t('tag.unkownUser') }}</span>
+                        </div>
                     </li>
                     </li>
                 </ul>
                 </ul>
             </div>
             </div>
@@ -134,7 +136,14 @@ li {
                 > div {
                 > div {
                     display: flex;
                     display: flex;
                     align-items: center;
                     align-items: center;
-                    color:rgba(255, 255, 255, 0.6)
+                    color: rgba(255, 255, 255, 0.6);
+                    width: 100%;
+                    .name {
+                        width: 80%;
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+                        white-space: nowrap;
+                    }
                 }
                 }
             }
             }
         }
         }

+ 1 - 0
src/pages/SViewer.vue

@@ -199,6 +199,7 @@ const onSelected = data => {
         }
         }
     } else {
     } else {
         showTips.value = t('home.dateScene')
         showTips.value = t('home.dateScene')
+        return
     }
     }
 }
 }