{"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\\tripartite\\buildBigScreen\\src\\page\\group\\container.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\tripartite\\buildBigScreen\\src\\page\\group\\container.vue","mtime":1675071992616},{"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\";\n//\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 subgroup from \"./subgroup\";\nimport common from '@/tripartite/buildBigScreen/src/config';\nimport { getObj } from '@/tripartite/buildBigScreen/src/api/visual';\nexport default {\n name: 'contents',\n inject: [\"contain\"],\n props: {\n option: Object,\n props: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n wscale: Number\n },\n provide: function provide() {\n return {\n contain: this.contain,\n container: this\n };\n },\n components: {\n subgroup: subgroup\n },\n data: function data() {\n return {\n contentStyle: {},\n selectCount: {},\n scale: 1,\n gradeFlag: false\n };\n },\n computed: {\n stepScale: function stepScale() {\n var scale = Number((100 / (this.scale * this.wscale)).toFixed(2));\n return scale;\n },\n //计算中央可视化大屏比例\n styleName: function styleName() {\n var _this = this;\n\n var scale = this.contain.config.scale;\n var val = scale / 100 + 0.001;\n return Object.assign({\n transform: \"scale(\".concat(val, \", \").concat(val, \")\"),\n width: this.setPx(this.contain.config.width),\n height: this.setPx(this.contain.config.height),\n backgroundColor: this.contain.config.backgroundColor\n }, function () {\n if (_this.contain.config.backgroundImage) {\n return {\n background: \"url(/mvue\".concat(_this.contain.config.backgroundImage, \") 0% 0% / 100% 100% rgb(3, 12, 59)\")\n };\n }\n\n return;\n }());\n },\n gradeLenStyle: function gradeLenStyle() {\n return {\n backgroundSize: \"\".concat(this.setPx(this.contain.config.gradeLen), \" \").concat(this.setPx(this.contain.config.gradeLen), \",\").concat(this.setPx(this.contain.config.gradeLen), \" \").concat(this.setPx(this.contain.config.gradeLen))\n };\n }\n },\n mounted: function mounted() {\n this.initData();\n this.initFun();\n },\n methods: {\n initFun: function initFun() {\n var _this2 = this;\n\n ['handleRefresh', 'handleGetObj', 'handleRes'].forEach(function (ele) {\n _this2[ele] = _this2.$refs.subgroup[ele];\n });\n },\n //初始化数据\n initData: function initData() {\n var _this3 = this;\n\n var id = this.$route ? this.$route.params.id : this.props.id;\n this.contain.id = id;\n this.contain.contentWidth = this.$refs.content.offsetWidth;\n var isBuild = this.$route ? this.$route.name === 'build' : this.props.name;\n var width = isBuild ? this.contain.contentWidth : document.body.clientWidth;\n var config; //画布执行\n\n this.setScale(width);\n\n var callback = function callback() {\n // console.log(this.contain, 'fdsdsdffdsfsdf')\n //赋值属性\n if (_this3.contain.config.mark.show && !isBuild) {\n _this3.watermark(_this3.contain.config.mark);\n }\n\n _this3.calcData();\n\n _this3.setScale(width);\n };\n\n if (id) {\n var loading = this.$loading({\n lock: true,\n text: '正在加载中,请稍后',\n spinner: 'el-icon-loading',\n background: 'rgba(0, 0, 0, 0.7)'\n });\n getObj(id).then(function (res) {\n // console.log(res, 'id获取大屏数据')\n var data = res;\n _this3.contain.obj = data; // console.log(this.contain, '获取this.contain的数据')\n\n config = data.config;\n _this3.contain.json = {\n detail: JSON.parse(config.detail) || {},\n component: JSON.parse(config.component) || []\n };\n _this3.contain.config = JSON.parse(config.detail) || {};\n _this3.contain.nav = JSON.parse(config.component) || [];\n _this3.contain.visual = data.visual; //添加水印。只有查看页面生效\n // if (!isBuild) {\n // const password = this.contain.visual.password\n // if (!this.validatenull(password)) {\n // this.$prompt('请输入密码', '提示', {\n // confirmButtonText: '确定',\n // showCancelButton: false,\n // showClose: false,\n // closeOnClickModal: false,\n // inputPattern: new RegExp(password),\n // inputErrorMessage: '密码不正确,请重新输入'\n // }).then(() => {\n // callback();\n // })\n // } else {\n // callback();\n // }\n // } else {\n // callback();\n // }\n\n callback();\n loading.close();\n }).catch(function (err) {\n console.log(err);\n loading.close();\n });\n } else if (this.option) {\n config = this.option;\n this.contain.config = config.detail || {};\n this.contain.nav = config.component || [];\n callback();\n } else {\n this.setScale(width);\n }\n },\n //适配尺寸\n setResize: function setResize() {\n this.contentStyle = {\n width: this.setPx(this.contain.config.scale * this.contain.config.width / 100),\n height: this.setPx(this.contain.config.scale * this.contain.config.height / 100)\n }; // console.log(this.contentStyle.width , this.contentStyle.height, 'gsdsfssfdsd')\n },\n //计算比例\n setScale: function setScale(width) {\n this.contain.config.scale = width / this.contain.config.width * 100;\n this.scale = this.contain.config.scale;\n this.setResize();\n },\n calcData: function calcData() {\n if (!this.contain.config.mark) this.contain.config.mark = {};\n if (!this.contain.config.query) this.contain.config.query = {};\n },\n handlePostionSelect: function handlePostionSelect(postion) {\n this.handleCalcPostionSelect();\n var x1 = this.selectCount.maxx1;\n var x2 = this.selectCount.maxx2;\n var y1 = this.selectCount.maxy1;\n var y2 = this.selectCount.maxy2;\n\n if (postion === 'left') {\n this.handleMoveSelectList(x1, undefined, true, postion);\n } else if (postion === 'center') {\n this.handleMoveSelectList(x1 + (x2 - x1) / 2, undefined, true, postion);\n } else if (postion === 'right') {\n this.handleMoveSelectList(x2, undefined, true, postion);\n } else if (postion === 'top') {\n this.handleMoveSelectList(undefined, y1, true, postion);\n } else if (postion === 'middle') {\n this.handleMoveSelectList(undefined, y1 + (y2 - y1) / 2, true, postion);\n } else if (postion === 'bottom') {\n this.handleMoveSelectList(undefined, y2, true, postion);\n }\n },\n handleMoveSelectList: function handleMoveSelectList(left, top, type, postion) {\n var _this4 = this;\n\n this.contain.active.forEach(function (ele) {\n ele = _this4.contain.findlist(ele);\n var ele_component = ele.component; //水平情况\n\n if (left) {\n var baseLeft = Number(type ? left : (ele.left + left).toFixed(2));\n\n if (postion === 'right') {\n baseLeft = baseLeft - ele_component.width;\n } else if (postion === 'center') {\n var obj_center = ele.left + ele_component.width / 2;\n baseLeft = ele.left + (left - obj_center);\n }\n\n _this4.$set(ele, 'left', baseLeft);\n\n _this4.$refs.subgroup.$refs[common.DEAFNAME + ele.index][0].setLeft(baseLeft);\n } //垂直情况\n\n\n if (top) {\n var baseTop = Number(type ? top : (ele.top + top).toFixed(2));\n\n if (postion === 'bottom') {\n baseTop = baseTop - ele_component.height;\n } else if (postion === 'middle') {\n var obj_middle = ele.top + ele_component.height / 2;\n baseTop = ele.top + (top - obj_middle);\n }\n\n _this4.$set(ele, 'top', baseTop);\n\n _this4.$refs.subgroup.$ref[common.DEAFNAME + ele.index][0].setTop(baseTop);\n }\n });\n },\n //计算多选状态下的最大边界值\n handleCalcPostionSelect: function handleCalcPostionSelect() {\n var _this5 = this;\n\n this.selectCount.maxx1 = 99999;\n this.selectCount.maxy1 = 99999;\n this.contain.active.forEach(function (ele) {\n ele = _this5.contain.findlist(ele);\n var left = ele.left;\n var top = ele.top;\n var width = ele.component.width;\n var height = ele.component.height;\n\n if (_this5.selectCount.maxx1 > left) {\n _this5.selectCount.maxx1 = left;\n }\n\n if (_this5.selectCount.maxx2 < left + width) {\n _this5.selectCount.maxx2 = left + width;\n }\n\n if (_this5.selectCount.maxy1 > top) {\n _this5.selectCount.maxy1 = top;\n }\n\n if (_this5.selectCount.maxy2 < top + height) {\n _this5.selectCount.maxy2 = top + height;\n }\n });\n }\n }\n};",null]}