{"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\\reportManagement\\BigScreen\\BigScreenManagement.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\reportManagement\\BigScreen\\BigScreenManagement.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/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.number.constructor\";\nimport \"core-js/modules/es7.array.includes\";\nimport _defineProperty from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/defineProperty\";\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//\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// import { getList, addObj, updateObj, delObj, getCategory, copyObj } from '@/api/visual';\nimport { getObj } from '@/tripartite/buildBigScreen/src/api/visual';\nimport report from '@/api/report.js';\nexport default {\n  name: 'list',\n  data: function data() {\n    var _ref;\n\n    return _ref = {\n      tabPosition: 'left',\n      typelist: [],\n      index: 0,\n      type: '',\n      page: {\n        page: 1,\n        size: 10,\n        total: 0\n      },\n      form: {},\n      box: false,\n      activeName: '',\n      list: [],\n      category: []\n    }, _defineProperty(_ref, \"form\", {\n      category: '5',\n      title: '',\n      width: 1920,\n      height: 1080,\n      status: 0\n    }), _defineProperty(_ref, \"rules\", {\n      category: [{\n        required: true,\n        message: '请选择分组名称',\n        trigger: 'blur'\n      }],\n      title: [{\n        required: true,\n        message: '请输入大屏名称',\n        trigger: 'blur'\n      }],\n      height: [{\n        required: true,\n        message: '请输入高度大小',\n        trigger: 'blur'\n      }],\n      width: [{\n        required: true,\n        message: '请输入宽度大小',\n        trigger: 'blur'\n      }]\n    }), _defineProperty(_ref, \"activeCategoryName\", '5'), _ref;\n  },\n  created: function created() {\n    this.getCategory();\n  },\n  methods: {\n    vaildData: function vaildData(id) {\n      var list = [];\n\n      for (var i = 0; i < 20; i++) {\n        list.push(i);\n      }\n\n      return list.includes(id);\n    },\n    getCategory: function getCategory() {\n      // getCategory().then(res => {\n      //   const data = res.data.data;\n      //   this.typelist = data;\n      //   this.activeName = (data[0] || {}).categoryValue;\n      this.getList(); // })\n\n      this.getClassificName();\n    },\n    handleExport: function handleExport(item) {\n      getObj(item.id).then(function (res) {\n        var data = res;\n        var mode = {\n          detail: JSON.parse(data.config.detail),\n          component: JSON.parse(data.config.component)\n        };\n        var zip = new window.JSZip();\n        zip.file('view.js', \"const option =\".concat(JSON.stringify(mode, null, 4)));\n        zip.file('index.html', window.html);\n        zip.generateAsync({\n          type: 'base64'\n        }).then(function (content) {\n          location.href = 'data:application/zip;base64,' + content;\n        });\n      });\n    },\n    handleCopy: function handleCopy(item) {\n      var _this = this;\n\n      this.$message({\n        message: '演示环境不允许复制',\n        type: 'danger'\n      });\n      return;\n      this.$confirm('确认复制当前大屏', '提示', {\n        confirmButtonText: '确定',\n        cancelButtonText: '取消',\n        type: 'warning'\n      }).then(function () {\n        copyObj(item.id).then(function () {\n          _this.$message.success('复制成功');\n\n          _this.getList();\n        });\n      }).catch(function () {});\n    },\n    //大屏管理删除\n    handleDel: function handleDel(item, index) {\n      var _this2 = this;\n\n      // console.log(item, 'item')\n      this.$confirm('是否确认永久删除?', '提示', {\n        confirmButtonText: '确定',\n        cancelButtonText: '取消',\n        type: 'warning'\n      }).then(function () {\n        if (!_this2.vaildData(index)) {\n          _this2.$message.error('例子模板不允许修改');\n\n          return false;\n        }\n\n        report.delObj(item.id).then(function () {\n          _this2.list.splice(index, 1);\n\n          _this2.$message.success('删除成功');\n\n          return _this2.getList();\n        });\n      }).catch(function () {});\n    },\n    handleAdd: function handleAdd() {\n      this.form.title = '';\n      this.type = 'add';\n      this.box = true;\n    },\n    handleUpdate: function handleUpdate(item, index) {\n      this.type = 'edit';\n      this.form = item;\n      this.form.width = '1920';\n      this.form.height = '1080';\n      this.form.category = this.form.category + '';\n      this.box = true;\n      this.index = index;\n    },\n    handleEdit: function handleEdit(item) {\n      var routeUrl = this.$router.resolve({\n        path: '/build/' + item.id\n      });\n      window.open(routeUrl.href, '_blank');\n    },\n    handleViews: function handleViews(item) {\n      var routeUrl = this.$router.resolve({\n        path: '/view/' + item.id\n      });\n      window.open(routeUrl.href, '_blank');\n    },\n    handleSave: function handleSave(form, done) {\n      var _this3 = this;\n\n      done();\n\n      if (this.type == 'add') {\n        addObj(Object.assign({\n          category: this.activeName\n        }, this.form)).then(function (res) {\n          _this3.box = false;\n\n          _this3.$message.success('新增成功');\n\n          _this3.getList();\n\n          var id = res.data.data.id;\n\n          _this3.handleEdit({\n            id: id\n          });\n        });\n      } else {\n        if (this.vaildData(Number(this.index))) {\n          this.$message.error('例子模板不允许修改');\n          return false;\n        }\n\n        updateObj({\n          id: this.form.id,\n          category: this.form.category,\n          password: this.form.password,\n          status: this.form.status,\n          title: this.form.title\n        }).then(function () {\n          _this3.box = false;\n\n          _this3.$message.success('修改成功');\n\n          _this3.getList();\n        });\n      }\n    },\n    handleCurrentChange: function handleCurrentChange(val) {\n      // console.log(val, '当前要访问的页数')\n      this.page.page = val;\n      this.getList();\n    },\n    handleSizeChange: function handleSizeChange(val) {\n      // console.log(val, '当前页面显示的条数')\n      this.page.size = val;\n      this.getList();\n    },\n    getList: function getList(category) {\n      var _this4 = this;\n\n      report.getList({\n        groupTree: {},\n        pageBean: {\n          page: this.page.page,\n          pageSize: this.page.size,\n          showTotal: true\n        },\n        querys: [{\n          group: 'main',\n          operation: 'EQUAL',\n          parentGroup: '',\n          property: 'b.category_value_',\n          relation: 'AND',\n          value: this.activeCategoryName\n        }]\n      }).then(function (res) {\n        var data = res;\n        _this4.page.total = data.total;\n        _this4.list = data.rows;\n\n        _this4.initData();\n      });\n    },\n    initData: function initData() {\n      var _this5 = this;\n\n      this.list.forEach(function (ele, index) {\n        _this5.$set(_this5.list[index], '_menu', false);\n      });\n    },\n    //获取分类管理的名称\n    getClassificName: function getClassificName() {\n      var _this6 = this;\n\n      report.getClassific().then(function (res) {\n        _this6.category = res.rows; // this.form.category = this.category.slice(0, 1)[0].categoryKey\n        // console.log(this.category.slice(0,1)[0].categoryKey)\n      });\n    },\n    //新建大屏\n    handleBuild: function handleBuild() {\n      var _this7 = this;\n\n      //验证表格\n      this.$refs.form.validate(function (bool) {\n        if (bool) {\n          _this7.box = false;\n          report.buildBigScreen({\n            visual: {\n              category: _this7.form.category,\n              title: _this7.form.title,\n              status: _this7.form.status\n            },\n            config: {\n              detail: JSON.stringify({\n                name: _this7.form.title,\n                width: _this7.form.width,\n                height: _this7.form.height,\n                scale: 1,\n                backgroundImage: '/img/bg/bg1.png',\n                url: '',\n                mark: {},\n                gradeShow: false,\n                gradeLen: 30\n              }),\n              component: '[]'\n            }\n          }).then(function (res) {\n            // console.log(res)\n            var routeUrl = _this7.$router.resolve({\n              path: '/build/' + res.message\n            });\n\n            window.open(routeUrl.href, '_blank');\n\n            _this7.getList();\n          });\n        }\n      });\n    },\n    //模板发布时间\n    handleRelease: function handleRelease(data) {\n      var _this8 = this;\n\n      //判断当前是否是已经发布\n      if (data.status !== 1) {\n        report.updateStatus({\n          id: data.id,\n          status: 1\n        }).then(function (res) {\n          //重新获取数据\n          _this8.getList();\n        });\n      }\n    },\n    //获取点击的分类管理的模块值\n    handleClick: function handleClick(tab) {\n      // console.log(tab, 'tab')\n      this.activeCategoryName = tab.name;\n      this.page.page = 1;\n      this.getList();\n    }\n  }\n};",null]}