|
@@ -36,7 +36,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
-import { ref, inject, onMounted, onBeforeUnmount, watch } from 'vue'
|
|
|
+import { ref, inject, onMounted, onBeforeUnmount, watch, defineEmits } from 'vue'
|
|
|
import { convertBlob2File } from '@/utils/file'
|
|
|
import { http } from '@/utils/request'
|
|
|
import browser from '@/utils/browser'
|
|
@@ -48,6 +48,7 @@ import UiMedias from '../form/medias'
|
|
|
import UiSelectList from '../form/SelectList.vue'
|
|
|
import { from } from 'readable-stream'
|
|
|
import i18n from '@/i18n'
|
|
|
+const emits = defineEmits(['action'])
|
|
|
const { t } = i18n.global
|
|
|
const showLoading = ref(false)
|
|
|
const showTips = ref(null)
|
|
@@ -160,6 +161,7 @@ const handlerUpload = async data => {
|
|
|
|
|
|
http.post(`smart-site/marking/addOrUpdate`, params).then(response => {
|
|
|
showLoading.value = false
|
|
|
+
|
|
|
if (response.success) {
|
|
|
notify.value.status = tag.status
|
|
|
notify.value.members = tag.members
|
|
@@ -169,7 +171,7 @@ const handlerUpload = async data => {
|
|
|
pushData.content = tag.content
|
|
|
pushData.members = tag.members
|
|
|
pushData.createTime = response.data.createTime
|
|
|
-
|
|
|
+
|
|
|
tags.value.push(pushData)
|
|
|
pushData = null
|
|
|
}
|
|
@@ -177,6 +179,7 @@ const handlerUpload = async data => {
|
|
|
delete notify.value.__temp
|
|
|
notify.value.id = response.data.markingId
|
|
|
notify.value = null
|
|
|
+ emits('action', '提交成功')
|
|
|
} else if (response.code == 4008) {
|
|
|
showTips.value = t('code.4008')
|
|
|
} else {
|