|
@@ -11,6 +11,21 @@
|
|
|
<div class="tags">
|
|
|
<div v-for="(item, index) in tags" :key="index" class="tag">{{ item.dict_label }}</div>
|
|
|
</div>
|
|
|
+ <div class="title-box">
|
|
|
+ <div class="title">新增标签</div>
|
|
|
+ </div>
|
|
|
+ <div class="tags">
|
|
|
+ <el-select
|
|
|
+ v-model="addTag2"
|
|
|
+ :teleported="false"
|
|
|
+ class="custom-select"
|
|
|
+ popper-class="custom-select-popper"
|
|
|
+ style="width: 840px; margin-left: 20px"
|
|
|
+ >
|
|
|
+ <el-option v-for="item in video_type" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ <div class="common-btn-primary" @click="handleAdd3">添加</div>
|
|
|
+ </div>
|
|
|
<div class="title-box">
|
|
|
<div class="title">新建标签</div>
|
|
|
</div>
|
|
@@ -66,6 +81,7 @@
|
|
|
|
|
|
<script lang="ts" setup name="VideoTagEdit">
|
|
|
import { addVideoTag, addVideoTagLabel, getLxHyVideoTagInfo, getRecentlyVideoTagInfo } from '@/api/videoMonitor';
|
|
|
+import { showSuccessMsg } from '@/utils/notification';
|
|
|
|
|
|
const props = defineProps({
|
|
|
modelValue: Boolean,
|
|
@@ -74,8 +90,9 @@ const props = defineProps({
|
|
|
});
|
|
|
const emits = defineEmits(['update:modelValue', 'updateVideoTag']);
|
|
|
const proxy = getCurrentInstance()?.proxy;
|
|
|
-const { video_tag_type, video_tag_industry } = toRefs<any>(proxy?.useDict('video_tag_type', 'video_tag_industry'));
|
|
|
+const { video_type, video_tag_type, video_tag_industry } = toRefs<any>(proxy?.useDict('video_type', 'video_tag_type', 'video_tag_industry'));
|
|
|
let addTag = ref('');
|
|
|
+let addTag2 = ref('');
|
|
|
let recentTags = ref([]);
|
|
|
let type = ref('lx');
|
|
|
let typeTags = ref([]);
|
|
@@ -123,12 +140,20 @@ const handleAdd = () => {
|
|
|
dict_label: addTag.value,
|
|
|
dict_type: 'video_type'
|
|
|
}).then(() => {
|
|
|
+ showSuccessMsg('新增成功');
|
|
|
emits('updateVideoTag');
|
|
|
});
|
|
|
addTag.value = '';
|
|
|
};
|
|
|
const handleAdd2 = (item) => {
|
|
|
addVideoTag({ video_code: props.id, dict_value: item.dict_value, dict_type: 'video_type' }).then(() => {
|
|
|
+ showSuccessMsg('新增成功');
|
|
|
+ emits('updateVideoTag');
|
|
|
+ });
|
|
|
+};
|
|
|
+const handleAdd3 = () => {
|
|
|
+ addVideoTag({ video_code: props.id, dict_value: addTag2.value, dict_type: 'video_type' }).then(() => {
|
|
|
+ showSuccessMsg('新增成功');
|
|
|
emits('updateVideoTag');
|
|
|
});
|
|
|
};
|