{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\system\\generator\\sysModulePreview.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\system\\generator\\sysModulePreview.vue","mtime":1675071993288},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\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//\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\";\n\nvar eipChart = function eipChart() {\n  return import(\"@/components/form/chart/EipChart.vue\");\n};\n\nexport default {\n  name: \"sysModulePreview\",\n  components: {\n    eipChart: eipChart\n  },\n  props: [\"data\", \"dialogVisible\"],\n  data: function data() {\n    return {\n      asideShow: true,\n      workspaceList: [],\n      datalistList: [],\n      viewlistList: [],\n      isShowIframe: true,\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    \"data.id\": function dataId() {\n      this.init();\n      this.initDetails(this.data);\n      var menuData = [];\n      this.initMenuData(menuData);\n      this.menuData = menuData;\n    }\n  },\n  computed: {},\n  mounted: function mounted() {\n    this.initDetails(this.data);\n    var menuData = [];\n    this.initMenuData(menuData);\n    this.menuData = menuData;\n  },\n  methods: {\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\n          switch (type) {\n            case \"workspace\":\n              this.workspaceList.push(data.moduleDetail[i]);\n              break;\n\n            case \"datalist\":\n              this.datalistList.push(data.moduleDetail[i]);\n              break;\n\n            case \"viewlist\":\n              this.viewlistList.push(data.moduleDetail[i]);\n              break;\n\n            case \"chart\":\n              this.chartList.push(data.moduleDetail[i]);\n              break;\n\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\n        if (this[type].length > 0) {\n          var typeList = this[type];\n\n          if (type == \"otherList\") {\n            var map = {};\n\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\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\n                menuData.push(item);\n              }\n            }\n          } else {\n            var item = {\n              text: this.menuTypeList[k].name,\n              children: []\n            };\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\n            menuData.push(item);\n          }\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 path = index.split(\"_\");\n\n      if (path.length > 1) {\n        var item = this.menuData[path[0]].children[path[1]];\n        this.iframeSrc = this.getUrl(item.url, item.type);\n      }\n    },\n    getUrl: function getUrl(url, type) {\n      this.isShowIframe = true;\n      var iframeSrc = url;\n\n      switch (type) {\n        case \"workspaceList\":\n          iframeSrc = window.context.front + url + \"?token=\" + this.$store.state.login.currentUser.token; // Base64.encode(this.$store.state.login.currentUser.account);\n\n          break;\n\n        case \"datalistList\":\n          iframeSrc = window.context.front + \"/sysModulePreview\" + url + \"/true\" + \"?token=\" + this.$store.state.login.currentUser.token; // Base64.encode(this.$store.state.login.currentUser.account);\n\n          break;\n\n        case \"viewlist\":\n          break;\n\n        case \"chartList\":\n          this.isShowIframe = false;\n          this.chartId = url;\n          break;\n      }\n\n      return iframeSrc;\n    }\n  },\n  created: function created() {}\n};",null]}