{"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\\portal\\LayoutManager.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\portal\\LayoutManager.vue","mtime":1675071993053},{"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/web.dom.iterable\";\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//\nimport portal from \"@/api/portal.js\";\nimport utils from \"@/hotent-ui-util.js\";\n\nvar PortalDesignerDialog = function PortalDesignerDialog() {\n  return import(\"@/components/portal/PortalDesignerDialog.vue\");\n};\n\nvar LayoutPreviewDialog = function LayoutPreviewDialog() {\n  return import(\"@/views/portal/LayoutPreviewDialog.vue\");\n};\n\nvar Base64 = require(\"js-base64\").Base64;\n\nexport default {\n  components: {\n    PortalDesignerDialog: PortalDesignerDialog,\n    LayoutPreviewDialog: LayoutPreviewDialog\n  },\n  // props: [\"orgId\"],\n  props: {\n    orgId: {\n      type: String\n    },\n    orgManagerNow: {\n      //传入的组织对象 用于判断用户是否有增删改权限\n      type: Object\n    }\n  },\n  mounted: function mounted() {\n    console.log(this.orgManagerNow);\n  },\n  data: function data() {\n    return {\n      designShow: false,\n      sidebarTitle: \"\",\n      dialogVisible: false,\n      layout: {\n        name: \"\",\n        memo: \"\",\n        templateHtml: \"\",\n        templateHtml2: \"\"\n      },\n      data: [],\n      pageResult: {\n        page: 1,\n        pageSize: 30,\n        total: 0\n      },\n      loadDataUrl: \"\",\n      uploadDialogVisible: false,\n      fileList: [],\n      uploadUrl: \"\"\n    };\n  },\n  computed: {\n    defaultQuerys: function defaultQuerys() {\n      return [{\n        property: \"orgId\",\n        value: this.orgId,\n        group: \"main\",\n        operation: \"EQUAL\",\n        relation: \"AND\"\n      }];\n    },\n    deleteUrl: function deleteUrl() {\n      return window.context.portal + \"/portal/sysIndexLayoutManage/sysIndexLayoutManage/v1/remove\";\n    }\n  },\n  methods: {\n    rowClick: function rowClick(row, column, event) {\n      this.$refs.layoutTable.$refs.htTable.toggleRowSelection(row);\n    },\n    addLayout: function addLayout(layoutType) {\n      if (!this.orgId) {\n        this.$message({\n          message: \"请先选择一个组织\",\n          type: \"warning\"\n        });\n        return;\n      }\n\n      if (layoutType == 0) {\n        //管理端\n        this.$refs.designDialog.showDialog(\"\", layoutType, this.orgId);\n      } else if (layoutType == 1) {\n        //手机端\n        this.$refs.designDialog.showDialog(\"\", layoutType, this.orgId);\n      } else if (layoutType == 2) {\n        this.$refs.designDialog.showDialog(\"\", layoutType, this.orgId); //应用端\n      }\n    },\n    loadData: function loadData(param, cb) {\n      var _this = this;\n\n      portal.getLayoutManagerPage(param).then(function (response) {\n        _this.data = response.rows;\n        _this.pageResult = {\n          page: response.page,\n          pageSize: response.pageSize,\n          total: response.total\n        };\n      }).finally(function () {\n        return cb && cb();\n      });\n    },\n    handleCommand: function handleCommand(params) {\n      switch (params.command) {\n        case \"preview\":\n          this.preview(params.row.id);\n          break;\n\n        case \"shareToSub\":\n          this.shareToSub(params.row.id, params.share);\n          break;\n\n        case \"enable\":\n          this.enable(params.row.id, params.enable);\n          break;\n\n        case \"edit\":\n          this.$refs.designDialog.showDialog(params.row.id, params.row.layoutType);\n          break;\n      }\n    },\n    shareToSub: function shareToSub(id, share) {\n      var _this2 = this;\n\n      this.$confirm(\"\".concat(share == 1 ? '确认共享给子部门' : '确认取消共享', \"\\u5417?\"), \"提示\", {\n        confirmButtonText: \"确定\",\n        cancelButtonText: \"取消\",\n        type: \"warning\"\n      }).then(function () {\n        portal.setlayoutMngShareToSub(id, share).then(function (data) {\n          if (data.state) {\n            _this2.$message({\n              message: data.message,\n              type: 'success'\n            });\n\n            _this2.$refs.layoutTable.load();\n          } else {\n            _this2.$message({\n              message: data.message,\n              type: 'error'\n            });\n          }\n        });\n      });\n    },\n    enable: function enable(id, _enable) {\n      var _this3 = this;\n\n      this.$confirm(\"\\u786E\\u5B9A\".concat(_enable == 1 ? '启用' : '停用', \"\\u8BE5\\u5E03\\u5C40\\u5417?\"), \"提示\", {\n        confirmButtonText: \"确定\",\n        cancelButtonText: \"取消\",\n        type: \"warning\"\n      }).then(function () {\n        portal.setlayoutMngEnable(id, _enable).then(function (data) {\n          if (data.state) {\n            _this3.$message({\n              message: data.message,\n              type: 'success'\n            });\n\n            _this3.$refs.layoutTable.load();\n          } else {\n            _this3.$message({\n              message: data.message,\n              type: 'error'\n            });\n          }\n        });\n      });\n    },\n    designClose: function designClose(val) {\n      this.$refs.layoutTable.load();\n    },\n    preview: function preview(id) {\n      this.$refs.previewDialog.showDialog(id);\n    },\n    exportOrgLayout: function exportOrgLayout() {\n      var selection = this.$refs.layoutTable.$refs.htTable.selection;\n\n      if (!selection || selection.length == 0) {\n        this.$message.warning(\"请至少选择一条数据\");\n        return;\n      }\n\n      var ids = new Array();\n      selection.forEach(function (item) {\n        ids.push(item.id);\n      });\n      this.$http.request({\n        url: \"\".concat(window.context.portal, \"/portal/sysIndexLayoutManage/sysIndexLayoutManage/v1/exportDefaultLayout?isDefault=false\"),\n        method: \"POST\",\n        data: ids,\n        responseType: \"arraybuffer\"\n      });\n    },\n    beforeClose: function beforeClose() {\n      this.uploadDialogVisible = false;\n      this.fileList.splice(0);\n    },\n    uploadSubmit: function uploadSubmit() {\n      if (this.$refs.elUpload.uploadFiles.length == 0) {\n        this.$message.warning(\"请上传文件\");\n        return;\n      }\n\n      this.$refs.elUpload.submit();\n    },\n    handleImport: function handleImport(param) {\n      var _this4 = this;\n\n      var formData = new FormData();\n      formData.append(\"file\", param.file);\n      portal.importOrgLayout(formData, this.orgId).then(function (resp) {\n        if (resp.state) {\n          _this4.$message.success(resp.message);\n\n          _this4.fileList.splice(0);\n\n          _this4.uploadDialogVisible = false;\n\n          _this4.$refs.layoutTable.load();\n        } else {\n          _this4.beforeClose();\n        }\n      });\n    },\n    showUploadDialog: function showUploadDialog() {\n      this.uploadDialogVisible = true;\n    }\n  }\n};",null]}