{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web\\src\\components\\appCenter\\AppContent.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web\\src\\components\\appCenter\\AppContent.vue","mtime":1675214576370},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nconst eipChart = () => import('@/components/form/chart/EipChart.vue')\r\nconst templatePreview = () =>\r\n  import('@/components/dataTemplate/templatePreview.vue')\r\nconst querySqlContent = () =>\r\n  import('@/components/querySql/querySqlContent.vue')\r\nconst previewForm = () => import('@/components/common/previewForm.vue')\r\nconst start = () => import('@/components/flow/start.vue')\r\nimport portal from '@/api/portal.js'\r\nimport {mapState} from 'vuex'\r\nexport default {\r\n  name: 'app-content',\r\n  components: {\r\n    eipChart,\r\n    templatePreview,\r\n    querySqlContent,\r\n    previewForm,\r\n    start\r\n  },\r\n  props: {\r\n    id: String,\r\n    otherId: String,\r\n    type: String,\r\n    appName: String\r\n  },\r\n  data() {\r\n    return {\r\n      currentActiveMenuName:'',\r\n      firstMenuId:null,\r\n      asideShow: true,\r\n      title: '',\r\n      iframeSrc: '',\r\n      menus: [],\r\n      app: {\r\n        id: '',\r\n        type: 0,\r\n        key: '',\r\n        sqlAlias: '',\r\n        alias: '',\r\n        url: ''\r\n      },\r\n      path: '',\r\n      fvue: window.context.front\r\n    }\r\n  },\r\n  computed: mapState({\r\n    token: function(mapState) {\r\n      return mapState.login.currentUser.token\r\n    }\r\n  }),\r\n  created() {\r\n    this.init()\r\n  },\r\n  methods: {\r\n    //返回\r\n    goBack() {\r\n      this.$router.go(-1)\r\n    },\r\n    //初始化标题和类型\r\n    init() {\r\n      if (this.type === '4') {\r\n        this.title = '图表'\r\n      } else if (this.type === '2') {\r\n        this.title = '数据报表'\r\n      } else if (this.type === '3') {\r\n        this.title = '自定义视图'\r\n      } else if (this.type === '6') {\r\n        this.title = '表单'\r\n      } else if (this.type === '7') {\r\n        this.title = '模块开发'\r\n        this.path = `${window.context.front}/sysModulePreview/${\r\n          this.id\r\n        }/${this.appName}?token=${this.token}`\r\n      } else if (this.type === '1') {\r\n        this.title = '应用'\r\n        //获取app的菜单树\r\n        portal.getSysAppTree(this.id).then(data => {\r\n          this.menus = data\r\n          if (this.menus && this.menus.length>0) {\r\n            if (this.menus[0].children && this.menus[0].children.length>0) {\r\n              this.open(this.menus[0].children[0])\r\n              this.firstMenuId = this.menus[0].children[0].id\r\n            }else {\r\n              this.open(this.menus[0])\r\n              this.firstMenuId = this.menus[0].id\r\n            }\r\n          }\r\n\r\n        })\r\n      } else if (this.type === '8') {\r\n        this.title = '流程启动'\r\n      }\r\n    },\r\n    getUrl(url) {\r\n      if (url.startsWith('http') || url.startsWith('https')) {\r\n        return url\r\n      } else return `${this.fvue}/${url}`\r\n    },\r\n    //点击菜单\r\n    open(menu) {\r\n      this.currentActiveMenuName = menu ? menu.name : ''\r\n      //菜单类型为链接菜单时不用转content内容\r\n      if (menu.type === 1) {\r\n        this.app = {\r\n          url: menu.content + '?token=' + this.token,\r\n          type: menu.type\r\n        }\r\n        return\r\n      }\r\n      //其他类型需要转换content内容\r\n      let content = JSON.parse(menu.content)\r\n      this.app = {\r\n        id: content.id,\r\n        type: menu.type,\r\n        key: content.key,\r\n        sqlAlias: content.sqlAlias,\r\n        alias: content.alias\r\n      }\r\n    }\r\n  }\r\n}\r\n",null]}