Browse Source

Merge branch 'dev' of http://192.168.0.115:3000/4dkankan/4dkankan_bim into dev

rindy 2 years ago
parent
commit
fd57428c38
2 changed files with 6 additions and 3 deletions
  1. 2 2
      src/components/files/TagEditor.vue
  2. 4 1
      src/components/files/index.vue

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

@@ -168,13 +168,13 @@ const handlerUpload = async data => {
                 pushData.content = tag.content
                 pushData.members = tag.members
                 pushData.createTime = response.data.createTime
-                console.error(pushData)
+              
                 tags.value.push(pushData)
                 pushData = null
             }
             isEdit.value = false
             delete notify.value.__temp
-            notify.value.id = response.data
+            notify.value.id = response.data.markingId
             notify.value = null
         } else if (response.code == 4008) {
             showTips.value = t('code.4008')

+ 4 - 1
src/components/files/index.vue

@@ -38,24 +38,26 @@
             <div>{{ $t('tag.deleteTagText') }}</div>
         </template>
     </ui-confirm>
+    <Toast v-if="showTips" type="warn" :content="showTips" :close="() => (showTips = null)" />
 </template>
 <script setup>
 import { ref, inject, watchEffect, onMounted, nextTick } from 'vue'
 import { http } from '@/utils/request'
 import UiConfirm from '@/components/dialog/Confirm.vue'
+import Toast from '@/components/dialog/Toast'
 let editTag = null
 let tempTag = null
 const exit$ = ref(null)
 const add$ = ref(null)
 const props = defineProps(['show'])
 const emits = defineEmits(['add', 'exit'])
+const showTips = ref(null)
 const handlerDel = status => {
     if (status == 'ok') {
         http.post(`smart-site/marking/del`, {
             markingId: delComfirm.value.id,
         }).then(response => {
             if (response.success) {
-                console.log(delComfirm.value)
                 let index = tags.value.findIndex(item => item.sid == delComfirm.value.sid)
                 if (index != -1) {
                     tags.value.splice(index, 1)
@@ -64,6 +66,7 @@ const handlerDel = status => {
                     notify.value = null
                 }
             } else {
+                showTips.value = response.message
             }
             delComfirm.value = null
         })