田源
2023-07-21 a758bc277ff4d1f8ede96a03cbbc10b96176be82
路由配置
已修改9个文件
51 ■■■■ 文件已修改
Source/UBCS-WEB/public/public/cdn/vue-router/3.0.1/vue-router.min.js 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/public/src/permission.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/public/src/store/modules/tags.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Master/MasterTree.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/template/SetPersonnel.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/work/BusinessWork.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/page/index/index.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/permission.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/router/avue-router.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/public/public/cdn/vue-router/3.0.1/vue-router.min.js
Source/UBCS-WEB/public/src/permission.js
@@ -36,7 +36,7 @@
          if (to.query.target) {
            window.open(value)
          } else if (meta.isTab !== false && !validatenull(value) && !validatenull(label)) {
            store.commit('ADD_TAG', {
            store.commit('', {
              label: label,
              value: value,
              params: to.params,
Source/UBCS-WEB/public/src/store/modules/tags.js
@@ -47,6 +47,7 @@
      setStore({name: 'tagList', content: state.tagList})
    },
    DEL_TAG: (state, action) => {
      console.log('779',state,action)
      state.tagList = state.tagList.filter(item => {
        return !diff(item, action);
      })
Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -70,14 +70,15 @@
  },
  created() {
    this.getTreeLists()
  },
  computed:{
   },
  methods:{
    //获取数据
    getTreeLists(){
      getTreeList({'conditionMap[id]': 'wupin'}).then(res=>{
      const fullPath = this.$route.fullPath
      const queryString = fullPath.split('?')[1];
      getTreeList({'conditionMap[id]': queryString}).then(res=>{
        this.Treedata=res.data
        this.ModifyProperties(this.Treedata, 'text', 'label');
        this.codeClassifyOid=res.data[0].oid;
Source/UBCS-WEB/src/components/template/SetPersonnel.vue
@@ -92,7 +92,6 @@
        },
      parameter:{
          handler(newval,oldval){
            console.log('子',newval,oldval)
            this.saveParam=newval
          },deep:true,
          immediate:true
@@ -118,7 +117,6 @@
    },
    mounted() {
      console.log('---',this.parameter)
    },
  created() {
  },
Source/UBCS-WEB/src/components/work/BusinessWork.vue
@@ -150,7 +150,7 @@
              }
            }
            if(validatenull(item.edit)) {
            if(!validatenull(item.edit)) {
              if (typeof item.editConfig == "string") {
                columnItem.editConfig = eval("(" + item.editConfig + ")");
              } else {
Source/UBCS-WEB/src/page/index/index.vue
@@ -18,9 +18,9 @@
        <!-- 主体视图层 -->
        <div style="height:100%;overflow-y:auto;overflow-x:hidden;" id="avue-view" v-show="!isSearch">
          <keep-alive>
            <router-view class="avue-view" v-if="$route.meta.keepAlive" :key="$route.id"></router-view>
            <router-view class="avue-view" v-if="$route.meta.keepAlive" :key="$route.fullPath"></router-view>
          </keep-alive>
          <router-view class="avue-view"  v-if="!$route.meta.keepAlive" :key="$route.id" ></router-view>
          <router-view class="avue-view"  v-if="!$route.meta.keepAlive" :key="$route.fullPath" ></router-view>
        </div>
      </div>
    </div>
@@ -60,14 +60,15 @@
        refreshLock: false,
        //刷新token的时间
        refreshTime: "",
        loading:true
        loading:true,
        routeList:[],
        ids:[]
      };
    },
    created() {
      //实时检测刷新token
      this.refreshToken();
      this.getRoute()
    },
    mounted() {
      this.init();
@@ -79,15 +80,6 @@
    computed: mapGetters(["isMenu", "isLock", "isCollapse", "website", "menu"]),
    props: [],
    methods: {
      getRoute(topMenuId){
        getRoutes(topMenuId).then(res=>{
          console.log('route',res)
        })
      },
      getIds(){
      },
      showCollapse() {
        this.$store.commit("SET_COLLAPSE");
      },
Source/UBCS-WEB/src/permission.js
@@ -7,7 +7,8 @@
import {validatenull} from '@/util/validate'
import {getToken} from '@/util/auth'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style
import 'nprogress/nprogress.css'
import Store from "@/store"; // progress bar style
NProgress.configure({showSpinner: false});
const lockPage = store.getters.website.lockPage; //锁屏页
router.beforeEach((to, from, next) => {
@@ -29,8 +30,16 @@
            next({path: '/login'})
          })
        } else {
          const fullPath = to.fullPath
          const queryString = fullPath.split('?')[1];
          const value = to.query.src || to.fullPath;
          const label = to.query.name || to.name;
          const label = queryString === 'wupin'
            ? '物品主数据'
            : (queryString === 'renyuan'
              ? '人员主数据'
              : (queryString === 'gongyingshang'
                ? '供应商主数据'
                : (to.query.name || to.name)));
          const meta = to.meta || router.$avueRouter.meta || {};
          const i18n = to.query.i18n;
          if (to.query.target) {
Source/UBCS-WEB/src/router/avue-router.js
@@ -23,18 +23,23 @@
    return result.join('&');
  }
  let titileName;
  this.$router.$avueRouter = {
    //全局配置
    $website: this.$store.getters.website,
    group: '',
    meta: {},
    safe: this,
    tianyuan:'',
    // 设置标题
    setTitle: (title) => {
      titileName=title
      const defaultTitle = this.$vue.$t('title');
      this.$router.$avueRouter.tianyuan=title
      title = title ? `${title}-${defaultTitle}` : defaultTitle;
      document.title = title;
    },
    closeTag: (value) => {
      let tag = value || this.$store.getters.tag;
      if (typeof value === 'string') {
@@ -90,8 +95,6 @@
       * first: 为了区分外界 调用formatRoutes 和 当前文件调用 formatRoutes
      */
    formatRoutes: function (aMenu = [], first) {
      // window.console.log('aMenu')
      // window.console.log(aMenu)
      const aRouter = []
      // 获取到全局配置中的 props
      const propsConfig = this.$website.menu.props;
@@ -184,6 +187,7 @@
          })()
        }
        aRouter.push(oRouter)
        // console.log(aRouter)
      }
      // for循环结束
      // 这个first 卡的其实就是首路由