Parcourir la source

视频标签新增标签

Hwf il y a 3 mois
Parent
commit
4a61730f48

+ 26 - 1
src/components/VideoTagEdit/index.vue

@@ -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');
   });
 };

+ 1 - 1
src/views/emergencyCommandMap/RightSection/JointDuty.vue

@@ -30,7 +30,7 @@
   <Dialog :hide-title="false" v-model="showQrCode" title="签到码" type="sm" hide-footer>
     <div style="display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; height: 100%">
       <div id="qrCodeBox" style="display: flex; flex-direction: column; justify-content: center; align-items: center">
-        <div class="print-title" style="margin: 30px 0; color: #ffffff">请联合值守人员通过粤政易扫描二维码进行签到、签退</div>
+        <div class="print-title" style="margin: 30px 0; color: #ffffff">请联合值守人员通过粤政易/微信扫描二维码进行签到、签退</div>
         <img :src="qrCodeUrl" alt="" style="width: 800px; height: 800px" />
       </div>
       <div class="flex" style="margin-top: 20px">