{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web\\src\\components\\generator\\sysModulePreview.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web\\src\\components\\generator\\sysModulePreview.vue","mtime":1675214577261},{"path":"D:\\jenkins\\workspace\\xypm-web\\babel.config.js","mtime":1675214572901},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"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":["import \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.function.name\";\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\nimport { Base64 } from 'js-base64';\nimport req from '@/request.js';\nvar eipChart = function eipChart() {\n  return import('@/components/form/chart/EipChart.vue');\n};\nexport default {\n  name: 'sysModulePreview',\n  components: {\n    eipChart: eipChart\n  },\n  props: ['id', 'dialogVisible', 'appName'],\n  data: function data() {\n    return {\n      asideShow: true,\n      workspaceList: [],\n      datalistList: [],\n      viewlistList: [],\n      isShowIframe: true,\n      loading: false,\n      chartId: '',\n      iframeSrc: '',\n      menuData: {},\n      chartList: [],\n      menuTypeList: [{\n        type: 'workspaceList',\n        name: '工作空间'\n      }, {\n        type: 'datalistList',\n        name: '数据列表'\n      }, {\n        type: 'viewlistList',\n        name: '视图列表'\n      }, {\n        type: 'chartList',\n        name: '图表列表'\n      }, {\n        type: 'otherList',\n        name: '栏目列表'\n      }],\n      otherList: []\n    };\n  },\n  watch: {\n    id: function id(newVal, oldVal) {\n      var _this = this;\n      if (!newVal) {\n        return;\n      }\n      this.init();\n      var url = window.context.portal + '/sys/sysModule/v1/getJson?id=' + this.id;\n      req.get(url).then(function (response) {\n        _this.initDetails(response.data);\n        var menuData = [];\n        _this.initMenuData(menuData);\n        _this.menuData = menuData;\n      }, true);\n    }\n  },\n  created: function created() {\n    var _this2 = this;\n    var id = this.id;\n    if (!this.dialogVisible) {\n      id = this.$route.params.id;\n    }\n    if (!id) {\n      return;\n    }\n    this.init();\n    var url = window.context.portal + '/sys/sysModule/v1/getJson?id=' + id;\n    req.get(url).then(function (response) {\n      _this2.initDetails(response.data);\n      var menuData = [];\n      _this2.initMenuData(menuData);\n      _this2.menuData = menuData;\n    });\n  },\n  methods: {\n    testLoad: function testLoad() {\n      this.loading = false;\n    },\n    init: function init() {\n      this.workspaceList = [];\n      this.datalistList = [];\n      this.viewlistList = [];\n      this.iframeSrc = '';\n      this.menuData = {};\n      this.chartList = [];\n      this.menuTypeList = [{\n        type: 'workspaceList',\n        name: '工作空间'\n      }, {\n        type: 'datalistList',\n        name: '数据列表'\n      }, {\n        type: 'viewlistList',\n        name: '视图列表'\n      }, {\n        type: 'chartList',\n        name: '图表列表'\n      }, {\n        type: 'otherList',\n        name: '栏目列表'\n      }];\n      this.otherList = [];\n    },\n    initDetails: function initDetails(data) {\n      if (data.moduleDetail && data.moduleDetail.length > 0) {\n        for (var i = 0; i < data.moduleDetail.length; i++) {\n          var type = data.moduleDetail[i].type;\n          switch (type) {\n            case 'workspace':\n              this.workspaceList.push(data.moduleDetail[i]);\n              break;\n            case 'datalist':\n              this.datalistList.push(data.moduleDetail[i]);\n              break;\n            case 'viewlist':\n              this.viewlistList.push(data.moduleDetail[i]);\n              break;\n            case 'chart':\n              this.chartList.push(data.moduleDetail[i]);\n              break;\n            case 'other':\n              this.otherList.push(data.moduleDetail[i]);\n              break;\n          }\n        }\n      }\n    },\n    initMenuData: function initMenuData(menuData) {\n      for (var k = 0; k < this.menuTypeList.length; k++) {\n        var type = this.menuTypeList[k].type;\n        if (this[type].length > 0) {\n          var typeList = this[type];\n          if (type == 'otherList') {\n            var map = {};\n            for (var i = 0; i < typeList.length; i++) {\n              if (!map[typeList[i].columnName]) {\n                map[typeList[i].columnName] = typeList[i].columnName;\n                var item = {\n                  text: typeList[i].columnName,\n                  children: []\n                };\n                for (var n = 0; n < typeList.length; n++) {\n                  if (typeList[i].columnName == typeList[n].columnName) {\n                    var sub = {\n                      text: typeList[n].name,\n                      code: typeList[n].code,\n                      type: type,\n                      url: typeList[n].url\n                    };\n                    item.children.push(sub);\n                  }\n                }\n                menuData.push(item);\n              }\n            }\n          } else {\n            var item = {\n              text: this.menuTypeList[k].name,\n              children: []\n            };\n            for (var i = 0; i < typeList.length; i++) {\n              var sub = {\n                text: typeList[i].name,\n                code: typeList[i].code,\n                type: type,\n                url: typeList[i].url\n              };\n              item.children.push(sub);\n            }\n            menuData.push(item);\n          }\n        }\n      }\n      if (menuData.length > 0) {\n        var _item = menuData[0].children[0];\n        this.iframeSrc = this.getUrl(_item.url, _item.type);\n      }\n    },\n    handleSelect: function handleSelect(index) {\n      var _this3 = this;\n      var path = index.split('_');\n      if (path.length > 1) {\n        var item = this.menuData[path[0]].children[path[1]];\n        if (item.type == 'chartList') {\n          this.isShowIframe = false;\n          this.chartId = item.url;\n        } else {\n          this.isShowIframe = false;\n          setTimeout(function () {\n            _this3.iframeSrc = _this3.getUrl(item.url, item.type);\n          });\n        }\n      }\n    },\n    getUrl: function getUrl(url, type) {\n      this.loading = true;\n      this.isShowIframe = true;\n      var iframeSrc = url;\n      switch (type) {\n        case 'workspaceList':\n          iframeSrc = window.context.front + url + '?token=' + this.$store.state.login.currentUser.token;\n          break;\n        case 'datalistList':\n          iframeSrc = window.context.front + \"/sysModulePreview\" + url + \"/true\" + '?token=' + this.$store.state.login.currentUser.token;\n          break;\n        case 'viewlist':\n          break;\n        case 'chartList':\n          this.isShowIframe = false;\n          this.loading = false;\n          this.chartId = url;\n          break;\n      }\n      return iframeSrc;\n    }\n  },\n  destroyed: function destroyed() {}\n};",null]}