{"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\\components\\form\\WidgetGridLayout.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\form\\WidgetGridLayout.vue","mtime":1675071992038},{"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//\nimport Draggable from \"vuedraggable\";\nimport WidgetFormItem from \"@/components/form/WidgetFormItem.vue\";\nimport controlsApi from \"@/api/controlsConfig.js\";\nimport deepmerge from \"deepmerge\";\nexport default {\n name: \"widget-grid-layout\",\n components: {\n Draggable: Draggable,\n WidgetFormItem: WidgetFormItem\n },\n props: [\"element\", \"select\", \"index\", \"data\", \"selectWidgetList\"],\n data: function data() {\n return {\n selectWidget: this.select\n };\n },\n methods: {\n handleMoveStart: function handleMoveStart(evt) {\n // 新增控件时 将控件属性切断联系\n evt.item._underlying_vm_ = deepmerge({}, evt.item._underlying_vm_, {\n clone: true\n });\n var key = Date.parse(new Date()) + \"_\" + Math.ceil(Math.random() * 99999);\n evt.item._underlying_vm_.key = key;\n },\n handleSelectWidget: function handleSelectWidget(index) {\n this.selectWidget = this.data.list[index];\n },\n handleMoveEnd: function handleMoveEnd(_ref) {\n var newIndex = _ref.newIndex,\n oldIndex = _ref.oldIndex;\n console.log(\"index\", newIndex, oldIndex);\n },\n handleWidgetColAdd: function handleWidgetColAdd($event, row, colIndex) {\n var newIndex = $event.newIndex;\n var oldIndex = $event.oldIndex;\n var item = $event.item;\n\n if (row.parentNodeType) {\n var text = \"\";\n\n if (row.parentNodeType == \"sub\") {\n text = \"子表\";\n } else if (row.parentNodeType == \"sun\") {\n text = \"孙表\";\n }\n\n if (item.innerText == \"二维码\") {\n this.$message.warning(text + \"不允许存在二维码\");\n row.columns[colIndex].list.splice(newIndex, 1);\n return false;\n }\n\n if (item.innerText == \"里程碑\") {\n this.$message.warning(text + \"不允许存在里程碑\");\n row.columns[colIndex].list.splice(newIndex, 1);\n return false;\n }\n\n if (item.innerText == \"表格布局\") {\n this.$message.warning(text + \"不允许存在表格布局\");\n row.columns[colIndex].list.splice(newIndex, 1);\n return false;\n }\n\n if (item.innerText == \"高德地图\") {\n this.$message.warning(text + \"不允许存在高德地图\");\n row.columns[colIndex].list.splice(newIndex, 1);\n return false;\n }\n\n if (item.innerText == \"相关流程\") {\n this.$message.warning(text + \"不允许存在相关流程\");\n row.columns[colIndex].list.splice(newIndex, 1);\n return false;\n }\n\n if (item.innerText === \"数据视图\") {\n this.$message.warning(text + \"不允许存在数据视图\");\n row.columns[colIndex].list.splice(newIndex, 1);\n return false;\n }\n } // 防止布局元素的嵌套拖拽\n\n\n if (item.className.indexOf(\"data-grid\") >= 0 || item.innerText == \"分页符\") {\n // 如果是列表中拖拽的元素需要还原到原来位置\n item.tagName === \"DIV\" && this.data.list.splice(oldIndex, 0, row.columns[colIndex].list[newIndex]);\n row.columns[colIndex].list.splice(newIndex, 1);\n\n if (item.innerText == \"分页符\") {\n this.$message.warning(\"栅格布局中不允许再拖入分页布局\");\n }\n\n return false;\n }\n\n controlsApi.handleLayoutComponents(this, row, row.columns[colIndex].list, newIndex);\n\n if (row.columns[colIndex].list[newIndex]) {\n this.selectWidget = row.columns[colIndex].list[newIndex];\n this.selectWidget.parentNodeType = row.parentNodeType;\n this.selectWidget.boSubEntity = row.boSubEntity;\n }\n },\n handleWidgetDelete: function handleWidgetDelete(index) {\n var _this = this;\n\n if (this.data.list.length - 1 === index) {\n if (index === 0) {\n this.selectWidget = {\n options: {\n validateType: \"\"\n }\n };\n } else {\n this.selectWidget = this.data.list[index - 1];\n }\n } else {\n this.selectWidget = this.data.list[index + 1];\n }\n\n this.$nextTick(function () {\n _this.data.list.splice(index, 1);\n });\n },\n //复制布局+字段\n handleWidgetFieldClone: function handleWidgetFieldClone(index) {\n var _this2 = this;\n\n var cloneData = deepmerge({}, this.data.list[index], {\n clone: true\n });\n cloneData.key = Date.parse(new Date()) + \"_\" + Math.ceil(Math.random() * 99999);\n cloneData.columns.forEach(function (v) {\n v.list.forEach(function (t) {\n t.key = Date.parse(new Date()) + \"_\" + Math.ceil(Math.random() * 99999);\n });\n });\n this.data.list.splice(index + 1, 0, cloneData);\n this.$nextTick(function () {\n _this2.selectWidget = _this2.data.list[index + 1];\n });\n },\n //复制布局\n handleWidgetClone: function handleWidgetClone(index) {\n var _this3 = this;\n\n var cloneData = deepmerge({}, this.data.list[index], {\n clone: true\n });\n cloneData.key = Date.parse(new Date()) + \"_\" + Math.ceil(Math.random() * 99999);\n cloneData.columns.forEach(function (v) {\n v.list = [];\n });\n this.data.list.splice(index + 1, 0, cloneData);\n this.$nextTick(function () {\n _this3.selectWidget = _this3.data.list[index + 1];\n });\n }\n },\n watch: {\n select: function select(val) {\n this.selectWidget = val;\n },\n selectWidget: {\n handler: function handler(val) {\n this.$emit(\"update:select\", val);\n },\n deep: true\n }\n }\n};",null]}