1 |
- {"remainingRequest":"E:\\mec-cloud_IntelligentManufacturing_CRM\\mec-cloud_IntelligentManufacturing_CRM\\ruoyi-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!E:\\mec-cloud_IntelligentManufacturing_CRM\\mec-cloud_IntelligentManufacturing_CRM\\ruoyi-ui\\src\\views\\system\\fromModeling\\package\\components\\KFormDesign\\module\\layoutItem.vue?vue&type=script&lang=js&","dependencies":[{"path":"E:\\mec-cloud_IntelligentManufacturing_CRM\\mec-cloud_IntelligentManufacturing_CRM\\ruoyi-ui\\src\\views\\system\\fromModeling\\package\\components\\KFormDesign\\module\\layoutItem.vue","mtime":1688635005501},{"path":"E:\\mec-cloud_IntelligentManufacturing_CRM\\mec-cloud_IntelligentManufacturing_CRM\\ruoyi-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1688725391035},{"path":"E:\\mec-cloud_IntelligentManufacturing_CRM\\mec-cloud_IntelligentManufacturing_CRM\\ruoyi-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":1688725407620},{"path":"E:\\mec-cloud_IntelligentManufacturing_CRM\\mec-cloud_IntelligentManufacturing_CRM\\ruoyi-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1688725391035},{"path":"E:\\mec-cloud_IntelligentManufacturing_CRM\\mec-cloud_IntelligentManufacturing_CRM\\ruoyi-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":1688725415411}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:Ly8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"layoutItem.vue","sourceRoot":"src/views/system/fromModeling/package/components/KFormDesign/module","sourcesContent":["<template>\n <div\n :class=\"{\n 'layout-width': [\n 'grid',\n 'table',\n 'selectInputList',\n 'tabs',\n 'card',\n 'editor',\n 'batch',\n 'divider',\n 'html'\n ].includes(record.type)\n }\"\n >\n <!-- 动态表格设计模块 start -->\n <template v-if=\"record.type === 'batch'\">\n <div\n class=\"batch-box\"\n :class=\"{ active: record.key === selectItem.key }\"\n @click.stop=\"handleSelectItem(record)\"\n >\n <a-form-item\n :label=\"!record.options.showLabel ? '' : record.label\"\n :label-col=\"\n config.layout === 'horizontal' && record.options.showLabel\n ? config.labelLayout === 'flex'\n ? { style: `width:${config.labelWidth}px` }\n : config.labelCol\n : {}\n \"\n :wrapper-col=\"\n config.layout === 'horizontal' && record.options.showLabel\n ? config.labelLayout === 'flex'\n ? { style: 'width:auto;flex:1' }\n : config.wrapperCol\n : {}\n \"\n :style=\"\n config.layout === 'horizontal' &&\n config.labelLayout === 'flex' &&\n record.options.showLabel\n ? { display: 'flex' }\n : {}\n \"\n >\n <draggable\n tag=\"div\"\n class=\"draggable-box\"\n v-bind=\"{\n group: insertAllowed ? 'form-draggable' : '',\n ghostClass: 'moving',\n animation: 180,\n handle: '.drag-move'\n }\"\n v-model=\"record.list\"\n @start=\"$emit('dragStart', $event, record.list)\"\n @add=\"$emit('handleColAdd', $event, record.list)\"\n >\n <transition-group tag=\"div\" name=\"list\" class=\"list-main\">\n <formNode\n v-for=\"item in record.list\"\n :key=\"item.key\"\n class=\"drag-move\"\n :selectItem.sync=\"selectItem\"\n :record=\"item\"\n :hideModel=\"hideModel\"\n :config=\"config\"\n @handleSelectItem=\"handleSelectItem\"\n @handleColAdd=\"handleColAdd\"\n @handleCopy=\"$emit('handleCopy')\"\n @handleShowRightMenu=\"handleShowRightMenu\"\n @handleDelete=\"$emit('handleDelete')\"\n />\n </transition-group>\n </draggable>\n </a-form-item>\n <div\n class=\"copy\"\n :class=\"record.key === selectItem.key ? 'active' : 'unactivated'\"\n @click.stop=\"$emit('handleCopy')\"\n >\n <a-icon type=\"copy\" />\n </div>\n <div\n class=\"delete\"\n :class=\"record.key === selectItem.key ? 'active' : 'unactivated'\"\n @click.stop=\"$emit('handleDelete')\"\n >\n <a-icon type=\"delete\" />\n </div>\n </div>\n </template>\n <!-- 动态表格设计模块 end -->\n <!-- 选择输入列 start -->\n <template v-else-if=\"record.type === 'selectInputList'\">\n <div\n class=\"select-input-list-box\"\n :class=\"{ active: record.key === selectItem.key }\"\n @click.stop=\"handleSelectItem(record)\"\n >\n <a-form-item\n :label=\"!record.options.showLabel ? '' : record.label\"\n :label-col=\"\n config.layout === 'horizontal' && record.options.showLabel\n ? config.labelLayout === 'flex'\n ? { style: `width:${config.labelWidth}px` }\n : config.labelCol\n : {}\n \"\n :wrapper-col=\"\n config.layout === 'horizontal' && record.options.showLabel\n ? config.labelLayout === 'flex'\n ? { style: 'width:auto;flex:1' }\n : config.wrapperCol\n : {}\n \"\n :style=\"\n config.layout === 'horizontal' &&\n config.labelLayout === 'flex' &&\n record.options.showLabel\n ? { display: 'flex' }\n : {}\n \"\n >\n <div\n class=\"column-box\"\n v-for=\"(column, index) in record.columns\"\n :key=\"index\"\n >\n <div class=\"check-box\">\n <CheckboxItem v-if=\"record.options.multiple\" disabled>\n {{ column.label }}\n </CheckboxItem>\n <RadioItem v-else disabled name=\"radio\" :value=\"column.value\">{{\n column.label\n }}</RadioItem>\n </div>\n <draggable\n tag=\"div\"\n class=\"draggable-box\"\n v-bind=\"{\n group: insertAllowed ? 'form-draggable' : '',\n ghostClass: 'moving',\n animation: 180,\n handle: '.drag-move'\n }\"\n v-model=\"column.list\"\n @start=\"$emit('dragStart', $event, column.list)\"\n @add=\"$emit('handleColAdd', $event, column.list)\"\n >\n <transition-group tag=\"div\" name=\"list\" class=\"list-main\">\n <formNode\n v-for=\"item in column.list\"\n :key=\"item.key\"\n class=\"drag-move\"\n :selectItem.sync=\"selectItem\"\n :record=\"item\"\n :hideModel=\"hideModel\"\n :config=\"config\"\n @handleSelectItem=\"handleSelectItem\"\n @handleColAdd=\"handleColAdd\"\n @handleCopy=\"$emit('handleCopy')\"\n @handleShowRightMenu=\"handleShowRightMenu\"\n @handleDelete=\"$emit('handleDelete')\"\n />\n </transition-group>\n </draggable>\n </div>\n </a-form-item>\n <div\n class=\"copy\"\n :class=\"record.key === selectItem.key ? 'active' : 'unactivated'\"\n @click.stop=\"$emit('handleCopy')\"\n >\n <a-icon type=\"copy\" />\n </div>\n <div\n class=\"delete\"\n :class=\"record.key === selectItem.key ? 'active' : 'unactivated'\"\n @click.stop=\"$emit('handleDelete')\"\n >\n <a-icon type=\"delete\" />\n </div>\n </div>\n </template>\n <!-- 选择输入列 end -->\n <!-- 标签Tabs布局 start -->\n <template v-else-if=\"record.type === 'tabs'\">\n <div\n class=\"grid-box\"\n :class=\"{ active: record.key === selectItem.key }\"\n @click.stop=\"handleSelectItem(record)\"\n >\n <a-tabs\n class=\"grid-row\"\n :default-active-key=\"0\"\n :tabBarGutter=\"record.options.tabBarGutter || null\"\n :type=\"record.options.type\"\n :size=\"record.options.size\"\n :tabPosition=\"record.options.tabPosition\"\n :animated=\"record.options.animated\"\n >\n <a-tab-pane\n v-for=\"(tabItem, index) in record.columns\"\n :key=\"index\"\n :tab=\"tabItem.label\"\n >\n <div class=\"grid-col\">\n <draggable\n tag=\"div\"\n class=\"draggable-box\"\n v-bind=\"{\n group: 'form-draggable',\n ghostClass: 'moving',\n animation: 180,\n handle: '.drag-move'\n }\"\n v-model=\"tabItem.list\"\n @start=\"$emit('dragStart', $event, tabItem.list)\"\n @add=\"$emit('handleColAdd', $event, tabItem.list)\"\n >\n <transition-group tag=\"div\" name=\"list\" class=\"list-main\">\n <layoutItem\n class=\"drag-move\"\n v-for=\"item in tabItem.list\"\n :key=\"item.key\"\n :selectItem.sync=\"selectItem\"\n :startType=\"startType\"\n :insertAllowedType=\"insertAllowedType\"\n :record=\"item\"\n :hideModel=\"hideModel\"\n :config=\"config\"\n @handleSelectItem=\"handleSelectItem\"\n @handleColAdd=\"handleColAdd\"\n @handleCopy=\"$emit('handleCopy')\"\n @handleShowRightMenu=\"handleShowRightMenu\"\n @handleDelete=\"$emit('handleDelete')\"\n />\n </transition-group>\n </draggable>\n </div>\n </a-tab-pane>\n </a-tabs>\n\n <div\n class=\"copy\"\n :class=\"record.key === selectItem.key ? 'active' : 'unactivated'\"\n @click.stop=\"$emit('handleCopy')\"\n >\n <a-icon type=\"copy\" />\n </div>\n <div\n class=\"delete\"\n :class=\"record.key === selectItem.key ? 'active' : 'unactivated'\"\n @click.stop=\"$emit('handleDelete')\"\n >\n <a-icon type=\"delete\" />\n </div>\n </div>\n </template>\n <!-- 标签Tabs布局 end -->\n <!-- 栅格布局 start -->\n <template v-else-if=\"record.type === 'grid'\">\n <div\n class=\"grid-box\"\n :class=\"{ active: record.key === selectItem.key }\"\n @click.stop=\"handleSelectItem(record)\"\n >\n <a-row class=\"grid-row\" :gutter=\"record.options.gutter\">\n <a-col\n class=\"grid-col\"\n v-for=\"(colItem, idnex) in record.columns\"\n :key=\"idnex\"\n :span=\"colItem.span || 0\"\n >\n <draggable\n tag=\"div\"\n class=\"draggable-box\"\n v-bind=\"{\n group: 'form-draggable',\n ghostClass: 'moving',\n animation: 180,\n handle: '.drag-move'\n }\"\n v-model=\"colItem.list\"\n @start=\"$emit('dragStart', $event, colItem.list)\"\n @add=\"$emit('handleColAdd', $event, colItem.list)\"\n >\n <transition-group tag=\"div\" name=\"list\" class=\"list-main\">\n <layoutItem\n class=\"drag-move\"\n v-for=\"item in colItem.list\"\n :key=\"item.key\"\n :selectItem.sync=\"selectItem\"\n :startType=\"startType\"\n :insertAllowedType=\"insertAllowedType\"\n :record=\"item\"\n :hideModel=\"hideModel\"\n :config=\"config\"\n @handleSelectItem=\"handleSelectItem\"\n @handleColAdd=\"handleColAdd\"\n @handleCopy=\"$emit('handleCopy')\"\n @handleShowRightMenu=\"handleShowRightMenu\"\n @handleDelete=\"$emit('handleDelete')\"\n />\n </transition-group>\n </draggable>\n </a-col>\n </a-row>\n\n <div\n class=\"copy\"\n :class=\"record.key === selectItem.key ? 'active' : 'unactivated'\"\n @click.stop=\"$emit('handleCopy')\"\n >\n <a-icon type=\"copy\" />\n </div>\n <div\n class=\"delete\"\n :class=\"record.key === selectItem.key ? 'active' : 'unactivated'\"\n @click.stop=\"$emit('handleDelete')\"\n >\n <a-icon type=\"delete\" />\n </div>\n </div>\n </template>\n <!-- 栅格布局 end -->\n <!-- 卡片布局 start -->\n <template v-else-if=\"record.type === 'card'\">\n <div\n class=\"grid-box\"\n :class=\"{ active: record.key === selectItem.key }\"\n @click.stop=\"handleSelectItem(record)\"\n >\n <a-card class=\"grid-row\" :title=\"record.label\">\n <div class=\"grid-col\">\n <draggable\n tag=\"div\"\n class=\"draggable-box\"\n v-bind=\"{\n group: 'form-draggable',\n ghostClass: 'moving',\n animation: 180,\n handle: '.drag-move'\n }\"\n v-model=\"record.list\"\n @start=\"$emit('dragStart', $event, record.list)\"\n @add=\"$emit('handleColAdd', $event, record.list)\"\n >\n <transition-group tag=\"div\" name=\"list\" class=\"list-main\">\n <layoutItem\n class=\"drag-move\"\n v-for=\"item in record.list\"\n :key=\"item.key\"\n :selectItem.sync=\"selectItem\"\n :startType=\"startType\"\n :insertAllowedType=\"insertAllowedType\"\n :record=\"item\"\n :hideModel=\"hideModel\"\n :config=\"config\"\n @handleSelectItem=\"handleSelectItem\"\n @handleColAdd=\"handleColAdd\"\n @handleCopy=\"$emit('handleCopy')\"\n @handleShowRightMenu=\"handleShowRightMenu\"\n @handleDelete=\"$emit('handleDelete')\"\n />\n </transition-group>\n </draggable>\n </div>\n </a-card>\n\n <div\n class=\"copy\"\n :class=\"record.key === selectItem.key ? 'active' : 'unactivated'\"\n @click.stop=\"$emit('handleCopy')\"\n >\n <a-icon type=\"copy\" />\n </div>\n <div\n class=\"delete\"\n :class=\"record.key === selectItem.key ? 'active' : 'unactivated'\"\n @click.stop=\"$emit('handleDelete')\"\n >\n <a-icon type=\"delete\" />\n </div>\n </div>\n </template>\n <!-- 卡片布局 end -->\n <!-- 表格布局 start -->\n <template v-else-if=\"record.type === 'table'\">\n <div\n class=\"table-box\"\n :class=\"{ active: record.key === selectItem.key }\"\n @click.stop=\"handleSelectItem(record)\"\n >\n <table\n class=\"table-layout kk-table-9136076486841527\"\n :class=\"{\n bright: record.options.bright,\n small: record.options.small,\n bordered: record.options.bordered\n }\"\n :style=\"\n 'width:' + record.options.width + ';' + record.options.customStyle\n \"\n >\n <tr v-for=\"(trItem, trIndex) in record.trs\" :key=\"trIndex\">\n <td\n class=\"table-td\"\n v-for=\"(tdItem, tdIndex) in trItem.tds\"\n v-show=\"tdItem.colspan && tdItem.rowspan\"\n :key=\"tdIndex\"\n :colspan=\"tdItem.colspan\"\n :rowspan=\"tdItem.rowspan\"\n @contextmenu.prevent=\"\n $emit('handleShowRightMenu', $event, record, trIndex, tdIndex)\n \"\n >\n <draggable\n tag=\"div\"\n class=\"draggable-box\"\n v-bind=\"{\n group: 'form-draggable',\n ghostClass: 'moving',\n animation: 180,\n handle: '.drag-move'\n }\"\n v-model=\"tdItem.list\"\n @start=\"$emit('dragStart', $event, tdItem.list)\"\n @add=\"$emit('handleColAdd', $event, tdItem.list)\"\n >\n <transition-group\n tag=\"div\"\n name=\"list\"\n :style=\"{ 'min-height': tdItem.rowspan * 80 - 19 + 'px' }\"\n class=\"list-main\"\n >\n <layoutItem\n class=\"drag-move\"\n v-for=\"item in tdItem.list\"\n :key=\"item.key\"\n :selectItem.sync=\"selectItem\"\n :startType=\"startType\"\n :insertAllowedType=\"insertAllowedType\"\n :record=\"item\"\n :hideModel=\"hideModel\"\n :config=\"config\"\n @handleSelectItem=\"handleSelectItem\"\n @handleColAdd=\"handleColAdd\"\n @handleCopy=\"$emit('handleCopy')\"\n @handleShowRightMenu=\"handleShowRightMenu\"\n @handleDelete=\"$emit('handleDelete')\"\n />\n </transition-group>\n </draggable>\n </td>\n </tr>\n </table>\n\n <div\n class=\"copy\"\n :class=\"record.key === selectItem.key ? 'active' : 'unactivated'\"\n @click.stop=\"$emit('handleCopy')\"\n >\n <a-icon type=\"copy\" />\n </div>\n <div\n class=\"delete\"\n :class=\"record.key === selectItem.key ? 'active' : 'unactivated'\"\n @click.stop=\"$emit('handleDelete')\"\n >\n <a-icon type=\"delete\" />\n </div>\n </div>\n </template>\n <!-- 表格布局 end -->\n <template v-else>\n <formNode\n :key=\"record.key\"\n :selectItem.sync=\"selectItem\"\n :record=\"record\"\n :config=\"config\"\n :hideModel=\"hideModel\"\n @handleSelectItem=\"handleSelectItem\"\n @handleCopy=\"$emit('handleCopy')\"\n @handleDelete=\"$emit('handleDelete')\"\n @handleShowRightMenu=\"$emit('handleShowRightMenu')\"\n />\n </template>\n </div>\n</template>\n<script>\n/*\n * author kcz\n * date 2019-11-20\n * description 使用递归组件调用自己,生成布局结构及表单\n */\nimport draggable from \"vuedraggable\";\nimport formNode from \"./formNode\";\nimport { pluginManager } from \"../../../utils/index\";\nconst CheckboxItem = pluginManager.getComponent(\"checkboxItem\").component;\nconst RadioItem = pluginManager.getComponent(\"radioItem\").component;\nexport default {\n name: \"layoutItem\",\n props: {\n record: {\n type: Object,\n required: true\n },\n selectItem: {\n type: Object,\n required: true\n },\n config: {\n type: Object,\n required: true\n },\n startType: {\n type: String,\n required: true\n },\n insertAllowedType: {\n type: Array,\n required: true\n },\n hideModel: {\n type: Boolean,\n default: false\n }\n },\n computed: {\n insertAllowed() {\n return this.insertAllowedType.includes(this.startType);\n }\n },\n components: {\n formNode,\n draggable,\n CheckboxItem,\n RadioItem\n },\n methods: {\n handleShowRightMenu(e, record, trIndex, tdIndex) {\n this.$emit(\"handleShowRightMenu\", e, record, trIndex, tdIndex);\n },\n handleSelectItem(record) {\n this.$emit(\"handleSelectItem\", record);\n },\n handleColAdd(e, list) {\n this.$emit(\"handleColAdd\", e, list);\n }\n }\n};\n</script>\n"]}]}
|