瀏覽代碼

提交一下

1
mo 4 年之前
父節點
當前提交
ab15348664
共有 2 個文件被更改,包括 53 次插入5 次删除
  1. 14 0
      src/constant/instructionList.js
  2. 39 5
      src/layout/components/instructions.vue

+ 14 - 0
src/constant/instructionList.js

@@ -0,0 +1,14 @@
+export const instructionList ={
+  '/business/resetTeaming':{
+    1:'新建乐团',
+    2:'新建乐团',
+    9:'乐团预报名',
+    3:'新建学员缴费',
+    6:'新建学校缴费',
+    11:'乐团缴费',
+    10:'乐团筹备',
+    7:'乐团新增学员',
+    5:'乐团建班'
+  },
+  '/teamList':'乐团关闭',
+}

+ 39 - 5
src/layout/components/instructions.vue

@@ -1,6 +1,7 @@
 <template>
   <div>
     <el-button
+      v-if="isShowBtn"
       class="instructionBtn"
       @click="showInstructions"
       type="danger"
@@ -103,6 +104,7 @@
 <script>
 import screenfull from "screenfull";
 import VueDragResize from "vue-drag-resize";
+import { instructionList } from "@/constant/instructionList";
 const defaultSettings = require("@/settings.js");
 
 export default {
@@ -125,6 +127,7 @@ export default {
       videoY: "",
       videoW: 640,
       videoH: 390,
+      isShowBtn: false,
     };
   },
   mounted() {
@@ -257,6 +260,37 @@ export default {
     $route(to, from) {
       this.isShow = false;
       console.log(to);
+
+      if (instructionList.hasOwnProperty(to.path)) {
+        this.isShowBtn = true;
+        console.log(Object.prototype.toString.call(instructionList[to.path]),instructionList[to.path])
+        if (
+          Object.prototype.toString.call(instructionList[to.path]) ===
+          "[object Object]"
+        ) {
+          // 对象 肯定是详情页
+          if (!to.query.tabrouter) {
+           let some = Object.keys(instructionList[to.path])[0]
+            this.url = `/html/index.html#g=1&p=${
+              instructionList[to.path][some]
+            }`;
+          } else {
+            if(instructionList[to.path][to.query.tabrouter]){
+               this.url = `/html/index.html#g=1&p=${
+              instructionList[to.path][to.query.tabrouter]
+            }`;
+            }else{
+              this.isShowBtn = false;
+            }
+
+          }
+        } else {
+          // 字符串
+          this.url = `/html/index.html#g=1&p=${instructionList[to.path]}`;
+        }
+      } else {
+        this.isShowBtn = false;
+      }
     },
     isShow(val) {
       if (val) {
@@ -361,16 +395,16 @@ export default {
 .vdr-stick-tm,
 .vdr-stick-bm {
   width: 99% !important;
-  width: calc(100% - 8px)!important;
-  margin-left: 0!important;
+  width: calc(100% - 8px) !important;
+  margin-left: 0 !important;
   left: 4px;
   // margin-left: -50%!important;
 }
 .vdr-stick-mr,
 .vdr-stick-ml {
   height: 99% !important;
-  height: calc(100% - 8px)!important;;
-  margin-top: 0!important;
- top: 4px!important;
+  height: calc(100% - 8px) !important;
+  margin-top: 0 !important;
+  top: 4px !important;
 }
 </style>