浏览代码

md5回显

朱鑫波 4 年之前
父节点
当前提交
19e59cc66a
共有 1 个文件被更改,包括 59 次插入15 次删除
  1. 59 15
      src/views/modules/material/videoMaterial.vue

+ 59 - 15
src/views/modules/material/videoMaterial.vue

@@ -813,6 +813,7 @@ a {
               { rules: [{ required: true, message: '请选择项目!' }] }
             ]"
             @change="getProjectId"
+            @focus="getParticipateList"
             showSearch
             optionFilterProp="children"
             :filterOption="filterOption"
@@ -978,7 +979,7 @@ a {
             sm: { span: 12 }
           }"
           label="形式标签"
-          v-if="add"
+          v-if="add&&visible"
         >
           <el-cascader
             placeholder="搜索你想要的形式标签"
@@ -999,7 +1000,7 @@ a {
             sm: { span: 12 }
           }"
           label="内容标签"
-          v-if="add"
+          v-if="add&&visible"
         >
           <el-cascader
             placeholder="搜索你想要的内容标签"
@@ -1021,7 +1022,7 @@ a {
             sm: { span: 12 }
           }"
           label="场景标签"
-          v-if="add"
+          v-if="add&&visible"
         >
           <el-cascader
             placeholder="搜索你想要的场景标签"
@@ -1042,7 +1043,7 @@ a {
             sm: { span: 12 }
           }"
           label="基调标签"
-          v-if="add"
+          v-if="add&&visible"
         >
           <el-cascader
             placeholder="搜索你想要的基调标签"
@@ -1877,14 +1878,14 @@ export default {
   updated() {
     stopOtherVideo()
   },
-  mounted(){
-    setInterval(function() {
-    document.querySelectorAll(".el-cascader-node__label").forEach(el => {
-      el.onclick = function() {
-        if (this.previousElementSibling) this.previousElementSibling.click();
-      };
-    });
-  }, 1000);
+  mounted() {
+    setInterval(function () {
+      document.querySelectorAll('.el-cascader-node__label').forEach((el) => {
+        el.onclick = function () {
+          if (this.previousElementSibling) this.previousElementSibling.click()
+        }
+      })
+    }, 1000)
   },
   watch: {
     $route: function (n, o) {
@@ -1958,8 +1959,6 @@ export default {
         categoryId: type,
       }).then((res) => {
         if (res.success) {
-          //部门全选后,再添加部门,选中数量增多
-
           if (arr == 'departTreeContent') {
             this[arr] = this.getTreeData(res.result)
           } else {
@@ -2727,13 +2726,58 @@ export default {
       //   this.queryParam.status = key
       this.loadData(1)
     },
-    removeUpload() {},
+    removeUpload() {
+      this.form.setFieldsValue({
+        contentTagList: null,
+        modalityTagList:null,
+        modTagList:null,
+        senceTagList: null,
+      })
+    },
     overUpload(urlAll) {
       console.log(urlAll)
       this.confirmLoading = true
       this.repeat = false
       this.urlList.url = urlAll[0].url
       this.$message.success('上传成功')
+
+      getAction('/ctop/materialTagInfo/detail', {
+        code: this.urlList.md5,
+      }).then((res) => {
+        if (res.success) {
+          if (res.modalityTagList.length > 0) {
+            this.form.setFieldsValue({
+              contentTagList: res.contentTagList.map((item) => {
+                return item.tagId
+              }),
+              modalityTagList: res.modalityTagList.map((item) => {
+                return item.tagId
+              }),
+              modTagList: res.modTagList.map((item) => {
+                return item.tagId
+              }),
+              senceTagList: res.senceTagList.map((item) => {
+                return item.tagId
+              }),
+            })
+          }
+          // this.tagInfoList = [...res.modalityTagList, ...res.contentTagList, ...res.senceTagList, ...res.modTagList]
+          // if (this.tagInfoListVisible) {
+          //   this.departValueInfoModality = res.modalityTagList.map((item) => {
+          //     return item.tagId
+          //   })
+          //   this.departValueInfoMod = res.modTagList.map((item) => {
+          //     return item.tagId
+          //   })
+          //   this.departValueInfoContent = res.contentTagList.map((item) => {
+          //     return item.tagId
+          //   })
+          //   this.departValueInfoSence = res.senceTagList.map((item) => {
+          //     return item.tagId
+          //   })
+          // }
+        }
+      })
     },
     deleteImage(url) {
       console.log(url, this.urlListImage.url)