Bläddra i källkod

提交测试

1
mo 3 år sedan
förälder
incheckning
30e326f539

+ 32 - 0
src/constant/guide.js

@@ -0,0 +1,32 @@
+export const guideList = {
+  organ:{
+    name:'分部',
+    desc:'分部用于区分本机构下各校区,各分部员工只可查询和操作本分部数据',
+    path:'/sysBasics/branchSetting',
+    permission:'/branchSetting'
+  },
+  teamManager:{
+    name:'乐团主管',
+    desc:'乐团主管是直接管理乐团的负责人,可在分部中设置各分部的乐团主管',
+    path:'/sysBasics/branchSetting',
+    permission:'/branchSetting'
+  },
+  teamPayType:{
+    name:'收费类型',
+    desc:'收费类型用于区分乐团运营模式,不同类型的乐团可设置不同的课程定价',
+    path:'/sysBasics/branchSetting',
+    permission:'/globalConfig/chargesList'
+  },
+  cooperationOrgan:{
+    name:'合作单位',
+    desc:'合作单位既合作学校,乐团需从属与具体合作单位',
+    path:'/sysBasics/branchManager',
+    permission:'/branchManager'
+  },
+  school:{
+    name:'教学点',
+    desc:'教学点是乐团线下课的上线地点,学员和老师需根据教学点前往制定地点上课,同时老师需在教学点定位范围内进行考勤',
+    path:'/sysBasics/addressManager',
+    permission:'/addressManager'
+  },
+}

+ 53 - 2
src/layout/components/AppMain.vue

@@ -16,15 +16,35 @@
         <router-view v-if="!needKeep" :key="key" /> -->
       </div>
     </transition>
+    <el-dialog :visible.sync="guideVisible" title="您需要完成以下设置" width="800px" :modal="false">
+      <div class="guideWrap">
+        <div class="guideItem">
+          <p>
+            <span class="guideTitle">分部</span>
+            <el-button type='text' @click="gotoSet('/sysBasics/branchSetting')">立即设置 >></el-button>
+            <span>您暂无此设置权限,请联系机构管理员</span>
+          </p>
+          <p>分部用于区分本机构下各校区,各分部员工只可查询和操作本分部数据</p>
+        </div>
+
+      </div>
+    </el-dialog>
+    <!-- <el-button @click="show">点击触发引导</el-button> -->
   </section>
 </template>
 
 <script>
 import notKeepAliveList from "@/router/notKeepAliveList";
-
+import { permission } from "@/utils/directivePage";
+import guide from '@/constant'
 export default {
   name: "AppMain",
-
+  data() {
+    return {
+      guideVisible:false,
+      guideList:[]
+    };
+  },
   computed: {
     key() {
       return this.$route.path;
@@ -39,7 +59,21 @@ export default {
       return this.$route.meta.noCache * 1; // 0是缓存 1是不缓存
     },
   },
+  mounted() {
+
+    this.$bus.$on('showguide',(obj)=>{
+      // console.log(obj)
+       console.log("bus", this.$bus);
+    this.guideVisible = true;
+    })
+  },
+   beforeDestroy () {
+    this.$bus.$off('showguide', ()=>{})
+  },
   methods: {
+    show(){
+      this.$bus.$emit ('showguide',[])
+    },
     onResize(e) {
       console.log(e);
     },
@@ -50,10 +84,27 @@ export default {
       console.log("点击", this.$refs.portal);
       this.$refs.instructions.showInstructions();
     },
+    gotoSet(path){
+      this.$router.push({path,})
+    }
   },
 };
 </script>
+<style lang="scss" scoped>
+.guideWrap {
+  .guideItem {
+  margin-bottom: 30px;
+   .guideTitle {
+    width: 160px;
+    text-align: left;
+    font-weight: bold;
+    display: inline-block;
+  }
+}
+}
+
 
+</style>
 <style scoped>
 .app-main {
   /*50 = navbar  */

+ 38 - 27
src/main.js

@@ -10,7 +10,9 @@ import lodash from 'lodash'
 import qs from 'qs'
 import PortalVue from 'portal-vue'
 Vue.use(PortalVue)
-import { permission } from "@/utils/directivePage";
+import {
+  permission
+} from "@/utils/directivePage";
 
 dayjs.extend(isSameOrBefore)
 dayjs.extend(isSameOrAfter)
@@ -38,36 +40,38 @@ import './utils/directive'
 // Vue.use(vueFilter)
 import '@/icons' // icon
 import '@/permission' // permission control
-import { Message } from 'element-ui'
+import {
+  Message
+} from 'element-ui'
 const showMessage = Symbol('showMessage')
 class DonMessage {
-  success (options, single = true) {
+  success(options, single = true) {
     this[showMessage]('success', options, single)
   }
-  warning (options, single = true) {
+  warning(options, single = true) {
     this[showMessage]('warning', options, single)
   }
-  info (options, single = true) {
+  info(options, single = true) {
     this[showMessage]('info', options, single)
   }
-  error (options, single = true) {
-    this[showMessage]('error', options, single)
-  }
-  [showMessage] (type, options, single) {
-    // console.log(type, options, Message)
-    let params = {
-      message: options,
-      offset: 90
+  error(options, single = true) {
+      this[showMessage]('error', options, single)
     }
-    if (single) {
-      // 判断是否已存在Message
-      if (document.getElementsByClassName('el-message').length === 0) {
+    [showMessage](type, options, single) {
+      // console.log(type, options, Message)
+      let params = {
+        message: options,
+        offset: 90
+      }
+      if (single) {
+        // 判断是否已存在Message
+        if (document.getElementsByClassName('el-message').length === 0) {
+          Message[type](params)
+        }
+      } else {
         Message[type](params)
       }
-    } else {
-      Message[type](params)
     }
-  }
 }
 
 // 修改默认属性
@@ -80,7 +84,7 @@ ElementUI.Select.watch.value = function (newValue, oldValue) {
   SelectValueWatch.call(this, newValue, oldValue)
   if (this.selected && this.selected.value === 0 && this.selected.currentLabel === 0 && newValue !== oldValue) {
     this.handleClearClick.call(this, {
-      stopPropagation: () => { }
+      stopPropagation: () => {}
     })
   }
 }
@@ -99,10 +103,10 @@ document.addEventListener('mousewheel', function () {
 })
 document.addEventListener('keydown', function (event) {
   //  (document.activeElement,event.keyCode)
-  if(event.keyCode == 13){
-    setTimeout(res=>{
+  if (event.keyCode == 13) {
+    setTimeout(res => {
       document.activeElement.blur()
-    },300)
+    }, 300)
 
   }
 })
@@ -125,11 +129,18 @@ Vue.use(VueAMap)
 
 // 检测浏览器是否缩放
 // import '@/utils/zoom'
-Vue.prototype.$ELEMENT = { size: 'medium', zIndex: 3000 }
+Vue.prototype.$ELEMENT = {
+  size: 'medium',
+  zIndex: 3000
+}
 // set ElementUI lang to EN
-Vue.use(ElementUI, { locale })
+Vue.use(ElementUI, {
+  locale
+})
 
 Vue.config.productionTip = false
+Vue.prototype.$bus = new Vue()
+
 
 // 将selects全局混入当前vue实例中
 Vue.mixin({
@@ -156,9 +167,9 @@ Vue.mixin({
       const origin = window.location.origin
       history.replaceState("", "", `${origin}/#${this.$route.path}?opt=${value}`)
     },
-    getFullPermission(str){
+    getFullPermission(str) {
       let routeName = this.$route.path
-      return str+routeName
+      return str + routeName
     }
   }
 })

+ 2 - 2
src/views/courseRulersManager/components/offlineTeamRules.vue

@@ -133,7 +133,7 @@
             <el-input v-model="form['140']" placeholder="请输入时间">
               <template slot="append">分钟</template>
             </el-input>
-            可进行签到
+            。
           </el-form-item>
         </el-row>
         <p class="example" v-if="form['80']">
@@ -613,7 +613,7 @@
           <el-form-item
             prop="180"
             :rules="[
-              { pattern: /^\d+(\.\d{1,8})?$/, message: '请输入正确的百分比' },
+              { pattern: /^([1-9]\d?|100)$/, message: '请输入正确的百分比' },
             ]"
           >
             试用期内的课程按预计课酬