Forráskód Böngészése

1、修改轮播图

lqh 11 hónapja
szülő
commit
70e4420a54
2 módosított fájl, 19 hozzáadás és 5 törlés
  1. 19 2
      src/views/XMHJC/carousel/index.vue
  2. 0 3
      src/views/XMHJC/column/article.vue

+ 19 - 2
src/views/XMHJC/carousel/index.vue

@@ -239,6 +239,7 @@ const formConfig = computed(() => {
       prop: "menuId",
       label: "菜单",
       required: true,
+      isShow: formData.data.targetType == 1,
     },
     {
       label: "跳转文章",
@@ -286,6 +287,7 @@ const openModal = () => {
   dialogVisible.value = true;
   modalType.value = "add";
   formData.data = {};
+  articleList.value = []
 };
 const submitForm = () => {
   byform.value.handleSubmit((valid) => {
@@ -357,6 +359,8 @@ const del = (row) => {
       });
       getList();
     });
+
+
   });
 };
 //获取字典
@@ -374,10 +378,12 @@ const getDictlist = async () => {
     label: x.dictValue,
     value: x.dictKey,
   }));
+  console.log("11",carouselModules.value)
   targetType.value = res["carousel_target_type"].map((x) => ({
     label: x.dictValue,
     value: x.dictKey,
   }));
+  getMenuList();
 };
 
 //获取文章列表
@@ -425,11 +431,22 @@ const carouselUrlSuccess = (response, uploadFile) => {
 const getMenuList = async () => {
   const res = await findMenuListByOpen({});
   columnListData.value = res.data;
+
+   res.data.forEach((x) => {
+     var columnLabel = {
+       label: x.name,
+       value: x.id
+     }
+     console.log(columnLabel)
+     carouselModules.value.push(columnLabel) ;
+  });
+  console.log( "carouselModules.value" ,carouselModules.value)
+
 };
+getDictlist();
 
-getMenuList();
 getList();
-getDictlist();
+
 </script>
 
 <style lang="scss" scoped>

+ 0 - 3
src/views/XMHJC/column/article.vue

@@ -564,9 +564,6 @@ const getSubMenuListSelect = async (id) => {
 
 const getSubMenuList = async (id) => {
   const column = columnListDataOld.value.find((x) => x.id == id);
-  console.log(column);
-  console.log(column.type);
-  console.log(column.type == "2");
   if (column.type == "2") {
     subFlag.value = false;
   } else {