|
@@ -9,7 +9,7 @@
|
|
|
<div class="title">当前标签</div>
|
|
|
</div>
|
|
|
<div class="tags">
|
|
|
- <div v-for="(item, index) in currentTags" :key="index" class="tag">{{ item.name }}</div>
|
|
|
+ <div v-for="(item, index) in currentTags" :key="index" class="tag">{{ item.dict_label }}</div>
|
|
|
</div>
|
|
|
<div class="title-box">
|
|
|
<div class="title">新建标签</div>
|
|
@@ -75,11 +75,18 @@ let typeOptions = ref([]);
|
|
|
let industry = ref('');
|
|
|
let industryTags = ref([]);
|
|
|
let industryOptions = ref([]);
|
|
|
+
|
|
|
+const getData = () => {
|
|
|
+ getVideoTagInfo({ video_code: props.id }).then((res) => {
|
|
|
+ currentTags.value = res.data;
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
watch(
|
|
|
() => props.id,
|
|
|
() => {
|
|
|
if (!!props.id) {
|
|
|
- currentTags.value = [{ name: '河坝' }, { name: '水库' }];
|
|
|
+ getData();
|
|
|
recentTags.value = [{ name: '河坝' }, { name: '水库' }, { name: '山塘' }];
|
|
|
typeTags.value = [{ name: '河坝' }, { name: '水库' }, { name: '山塘' }];
|
|
|
industryTags.value = [{ name: '河坝' }, { name: '水库' }, { name: '山塘' }];
|
|
@@ -108,8 +115,15 @@ const handleClose = () => {
|
|
|
emits('update:modelValue', false);
|
|
|
};
|
|
|
const handleAdd = () => {
|
|
|
+ addVideoTag({
|
|
|
+ video_code: props.id,
|
|
|
+ dict_value: addTag.value,
|
|
|
+ dict_type: 'video_type'
|
|
|
+ }).then(() => {
|
|
|
+ getData();
|
|
|
+ });
|
|
|
addTag.value = '';
|
|
|
-}
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|