فهرست منبع

系统视频上传

hongchuangyanfa 3 سال پیش
والد
کامیت
ee14826875
2فایلهای تغییر یافته به همراه53 افزوده شده و 15 حذف شده
  1. 1 11
      src/views/authority/role.vue
  2. 52 4
      src/views/system/menu.vue

+ 1 - 11
src/views/authority/role.vue

@@ -57,17 +57,7 @@
           >
           </el-tree>
         </el-tab-pane>
-        <el-tab-pane label="客户菜单权限">
-          <el-tree
-            :data="menuGrantList"
-            show-checkbox
-            node-key="id"
-            ref="treeMenu"
-            :default-checked-keys="menuTreeObj"
-            :props="props"
-          >
-          </el-tree>
-        </el-tab-pane>
+
         <el-tab-pane label="数据权限">
           <el-tree
             :data="dataScopeGrantList"

+ 52 - 4
src/views/system/menu.vue

@@ -37,6 +37,14 @@
           v-if="userInfo.role_name.includes('admin') && scope.row.category === 1"
         >新增子项
         </el-button>
+
+<!--        <el-button
+          type="text"
+          icon="el-icon-circle-plus-outline"
+          size="small"
+          @click.stop="handleTYAdd(scope.row,scope.index)"
+        >添加提示语
+        </el-button>-->
       </template>
       <template slot-scope="{row}"
                 slot="source">
@@ -80,7 +88,7 @@
           index: true,
           selection: true,
           viewBtn: true,
-          menuWidth: 300,
+          menuWidth: 400,
           dialogClickModal: false,
           column: [
             {
@@ -175,7 +183,7 @@
                   message: "请选择菜单类型",
                   trigger: "blur"
                 }
-              ]
+              ],
             },
             {
               label: "菜单别名",
@@ -264,8 +272,21 @@
               prop: "textInfo",
               type: "textarea",
               span: 24,
-              minRows: 2
-            }
+              minRows: 2,
+            },
+            {
+              label: '菜单视频',
+              prop: 'videoUrl',
+              type: 'upload',
+              listType: 'picture-img',
+              span: 24,
+              accept:"video/mp4",
+              propsHttp: {
+                url:'data',
+              },
+              tip: '只能上传jpg/png用户头像,且不超过500kb',
+              action: "/api/blade-resource/oss/endpoint/put-file2"
+            },
           ]
         },
         data: []
@@ -281,6 +302,24 @@
           if (item.prop === 'isOpen') {
             item.disabled = category === 2;
           }
+          if (item.prop === 'textInfo' ) {
+            if(category===1){
+              item.disabled = true;
+            }
+            if(category===2){
+              item.disabled = false;
+            }
+
+          }
+          if (item.prop === 'videoUrl') {
+            if(category===1){
+              item.disabled = false;
+            }
+            if(category===2){
+              item.disabled = true;
+            }
+          }
+
         });
       },
     },
@@ -316,6 +355,15 @@
         column.addDisabled = true;
         this.$refs.crud.rowAdd();
       },
+
+      // 提示语
+   /*   handleTYAdd(row) {
+        this.parentId = row.id;
+        const column = this.findObject(this.option.column, "parentId");
+        column.value = row.id;
+        column.addDisabled = true;
+        this.$refs.crud.rowAdd();
+      },*/
       rowSave(row, done, loading) {
         add(row).then((res) => {
           // 获取新增数据的相关字段