| | |
| | | <div style="height: calc(100vh - 190px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <span> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | |
| | | <el-main> |
| | | <basic-container> |
| | | <div> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">创建</el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">修改</el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="deleteClickHandler">删除</el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">导出</el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">导入</el-button> |
| | | <el-button icon="el-icon-circle-plus-outline" plain size="small" type="primary" @click="createViewClickHandler">创建视图</el-button> |
| | | <el-button icon="el-icon-menu" plain size="small" type="primary" @click="checkClickHandler">一致性检查</el-button> |
| | | <el-button v-if="permissionList.addBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="addClickHandler"> |
| | | <icon-show :name="permissionList.addBtn.source"></icon-show> |
| | | 创建 |
| | | </el-button> |
| | | <el-button v-if="permissionList.editBtn" class="button-custom-icon" plain size="small" type="primary" @click="editClickHandler"> |
| | | <icon-show :name="permissionList.editBtn.source"></icon-show> |
| | | 修改 |
| | | </el-button> |
| | | <el-button v-if="permissionList.delBtn" class="button-custom-icon" plain size="small" type="danger" @click="deleteClickHandler"> |
| | | <icon-show :name="permissionList.delBtn.source"></icon-show> |
| | | 删除 |
| | | </el-button> |
| | | <el-button v-if="permissionList.importBtn" class="button-custom-icon" plain size="small" type="primary" @click="upLoadClickHandler"> |
| | | <icon-show :name="permissionList.importBtn.source"></icon-show> |
| | | 导入 |
| | | </el-button> |
| | | <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary" @click="exportClickHandler"> |
| | | <icon-show :name="permissionList.exportBtn.source"></icon-show> |
| | | 导出 |
| | | </el-button> |
| | | <el-button v-if="permissionList.createViewBtn" class="button-custom-icon" plain size="small" type="primary" @click="createViewClickHandler"> |
| | | <icon-show :name="permissionList.createViewBtn.source"></icon-show> |
| | | 创建视图 |
| | | </el-button> |
| | | <el-button v-if="permissionList.consistencyCheckBtn" class="button-custom-icon" plain size="small" type="primary" @click="checkClickHandler"> |
| | | <icon-show :name="permissionList.consistencyCheckBtn.source"></icon-show> |
| | | 一致性检查 |
| | | </el-button> |
| | | </div> |
| | | <div style="height: 380px;margin-top: 10px"> |
| | | <el-descriptions :column="2" border class="margin-top" size="medium"> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.id"></i> |
| | | 名称 |
| | | </template> |
| | | {{ nodeRow.name }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.name"></i> |
| | | 标签 |
| | | </template> |
| | | {{ nodeRow.tag }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.tableName"></i> |
| | | 实现类 |
| | | </template> |
| | | {{ nodeRow.implClass }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.domain"></i> |
| | | 形状 |
| | | </template> |
| | | <el-tag v-if="nodeRow.shape"> |
| | | {{ nodeRow.shape }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.desc"></i> |
| | | 描述 |
| | | </template> |
| | | {{ nodeRow.description }} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | | <el-descriptions :column="3" border class="margin-top" direction="vertical"> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.from"></i> |
| | | From端类型 |
| | | </template> |
| | | <div style="height: 60px;overflow-y: auto;display: flex;flex-wrap: wrap"> |
| | | <span v-for="item in nodeRow.btmItemsFrom" style="margin-left:3px;"> |
| | | <el-tag effect="plain" style="margin-top: 3px;"> |
| | | {{ item }} |
| | | </el-tag> |
| | | </span> |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.from"></i> |
| | | Form端主类型 |
| | | </template> |
| | | <el-tag v-if="nodeRow.primitivesFrom" effect="plain"> |
| | | {{ nodeRow.primitivesFrom === '请选择' ? nodeRow.btmItemsFrom[0] : nodeRow.primitivesFrom }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.from"></i> |
| | | From端对应关系 |
| | | </template> |
| | | <el-tag v-if="nodeRow.relationFrom" effect="plain">{{ nodeRow.relationFrom }}</el-tag> |
| | | </el-descriptions-item> |
| | | |
| | | </el-descriptions> |
| | | |
| | | <el-descriptions :column="3" border class="margin-top" direction="vertical"> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.to"></i> |
| | | To端类型 |
| | | </template> |
| | | <div style="height: 60px;overflow-y: auto;display: flex;flex-wrap: wrap"> |
| | | <span v-for="item in nodeRow.btmItemsTo" style="margin-left:2px;"> |
| | | <el-tag effect="plain" style="margin-top: 2px;"> |
| | | <el-descriptions style="margin: 10px 0 20px" :column="2" border class="margin-top" size="medium"> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.id"></i> |
| | | 名称 |
| | | </template> |
| | | {{ nodeRow.name }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.name"></i> |
| | | 标签 |
| | | </template> |
| | | {{ nodeRow.tag }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.tableName"></i> |
| | | 实现类 |
| | | </template> |
| | | <el-tooltip v-if="nodeRow.implClass" :content="nodeRow.implClass" class="item" effect="dark" |
| | | placement="top-start"> |
| | | <el-tag style="max-width: 100%;overflow: hidden;display: block">{{ nodeRow.implClass }}</el-tag> |
| | | </el-tooltip> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.domain"></i> |
| | | 形状 |
| | | </template> |
| | | <el-tag v-if="nodeRow.shape"> |
| | | {{ nodeRow.shape }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :span="2" :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.desc"></i> |
| | | 描述 |
| | | </template> |
| | | {{ nodeRow.description }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :span="2" contentStyle="word-break:break-all;" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.from"></i>From端类型 |
| | | </template> |
| | | <span v-for="item in nodeRow.btmItemsFrom"> |
| | | <el-tag effect="plain" style="margin:2px 5px 2px 0;"> |
| | | {{ item }} |
| | | </el-tag> |
| | | </span> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.from"></i> |
| | | Form端主类型 |
| | | </template> |
| | | <el-tag v-if="nodeRow.primitivesFrom" effect="plain"> |
| | | {{ nodeRow.primitivesFrom === '请选择' ? nodeRow.btmItemsFrom[0] : nodeRow.primitivesFrom }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.from"></i> |
| | | From端对应关系 |
| | | </template> |
| | | <el-tag v-if="nodeRow.relationFrom" effect="plain">{{ nodeRow.relationFrom }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :span="2" contentStyle="word-break:break-all;" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.to"></i> |
| | | To端类型 |
| | | </template> |
| | | <span v-for="item in nodeRow.btmItemsTo"> |
| | | <el-tag effect="plain" style="margin:2px 5px 2px 0;"> |
| | | {{ item }} |
| | | </el-tag> |
| | | </span> |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.to"></i> |
| | | To端主类型 |
| | | </template> |
| | | <el-tag v-if="nodeRow.primitivesTo" effect="plain"> |
| | | {{ nodeRow.primitivesTo === '请选择' ? nodeRow.btmItemsTo[0] : nodeRow.primitivesTo }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.to"></i> |
| | | To端对应关系 |
| | | </template> |
| | | <el-tag v-if="nodeRow.relationTo" effect="plain">{{ nodeRow.relationTo }}</el-tag> |
| | | </el-descriptions-item> |
| | | |
| | | </el-descriptions> |
| | | </div> |
| | | <div style="margin-top: 30px;position: relative"> |
| | | </span> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.to"></i> |
| | | To端主类型 |
| | | </template> |
| | | <el-tag v-if="nodeRow.primitivesTo" effect="plain"> |
| | | {{ nodeRow.primitivesTo === '请选择' ? nodeRow.btmItemsTo[0] : nodeRow.primitivesTo }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.to"></i> |
| | | To端对应关系 |
| | | </template> |
| | | <el-tag v-if="nodeRow.relationTo" effect="plain">{{ nodeRow.relationTo }}</el-tag> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | <div style="position: relative"> |
| | | <h3 style="margin: 0;position: absolute;top:0;z-index: 1000;">属性列表</h3> |
| | | <avue-crud |
| | | :data="tableData" |
| | |
| | | width="70%" |
| | | @close="addDialogClose" |
| | | > |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="90px" size="small"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="85px" size="small"> |
| | | <div class="dialogForm"> |
| | | <div class="leftForm"> |
| | | <el-form-item label="名称:" prop="name"> |
| | |
| | | <el-input v-model="form.shape"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="描述"> |
| | | <el-input v-model="form.description" :rows="2" type="textarea"></el-input> |
| | | <el-input v-model="form.description" :rows="3" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | |
| | | <div class="centerForm"> |
| | | <el-form-item label="Form端类型:" label-width="110px"> |
| | | <div style="display: flex; align-items: center"> |
| | | <div style="height: 200px; width: 280px; border: 1px solid #bdbbbb;overflow-y: auto"> |
| | | <!-- 内容 --> |
| | | <el-table |
| | | :data="bizFormData" |
| | | :show-header="false" |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | align="center" |
| | | prop="name"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="操作" |
| | | width="60"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="small" |
| | | style="color:#F56C6C;" |
| | | type="text" |
| | | @click.native.prevent="bizTypeDeleteRow('form',scope.$index)"> |
| | | 移除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-button plain size="mini" style="margin-left: 5px" type="success" |
| | | @click="FormItemReferChange('form')">添加 |
| | | </el-button> |
| | | |
| | | <el-form-item label-width="110px" style="margin-bottom: 5px;"> |
| | | <div slot="label"> |
| | | <span>Form端类型:</span> |
| | | <el-button plain size="mini" style="margin-right: 10px" type="success" @click="FormItemReferChange('form')">添加</el-button> |
| | | </div> |
| | | <div style="height: 190px;border: 1px solid #EBEEF5;overflow-y: auto"> |
| | | <el-table :data="bizFormData" :show-header="false" style="width: 100%" size="mini"> |
| | | <el-table-column |
| | | align="center" |
| | | prop="name"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="操作" |
| | | width="60"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | style="color:#F56C6C;" |
| | | type="text" |
| | | @click.native.prevent="bizTypeDeleteRow('form',scope.$index)"> |
| | | 移除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="对应关系:" label-width="110px"> |
| | | <el-select v-model="form.relationFrom"> |
| | | <el-option label="N" value="N"></el-option> |
| | | <el-option label="1" value="1"></el-option> |
| | | </el-select> |
| | | <el-form-item label="对应关系:" label-width="110px" style="margin-bottom: 5px;"> |
| | | <el-radio v-model="form.relationFrom" label="N">N</el-radio> |
| | | <el-radio v-model="form.relationFrom" label="1">1</el-radio> |
| | | </el-form-item> |
| | | <el-form-item label="主类型:" label-width="110px"> |
| | | <el-select v-model="form.primitivesFrom"> |
| | |
| | | </div> |
| | | |
| | | <div class="rightForm"> |
| | | <el-form-item label="To端类型:" label-width="110px"> |
| | | <div style="display: flex; align-items: center"> |
| | | <div style="height: 200px; width: 280px; border: 1px solid #bdbbbb;overflow-y: auto"> |
| | | <!-- 内容 --> |
| | | <el-table |
| | | :data="bizToData" |
| | | :show-header="false" |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | align="center" |
| | | prop="name"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="操作" |
| | | width="60"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="small" |
| | | style="color:#F56C6C;" |
| | | type="text" |
| | | @click.native.prevent="bizTypeDeleteRow('to',scope.$index)"> |
| | | 移除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-button plain size="mini" style="margin-left: 5px" type="success" |
| | | @click="FormItemReferChange('to')">添加 |
| | | </el-button> |
| | | |
| | | <el-form-item label-width="100px" style="margin-bottom: 5px;"> |
| | | <div slot="label"> |
| | | <span>To端类型:</span> |
| | | <el-button plain size="mini" style="margin-right: 10px" type="success" @click="FormItemReferChange('to')">添加</el-button> |
| | | </div> |
| | | <div style="height: 190px;border: 1px solid #EBEEF5;overflow-y: auto"> |
| | | <el-table :data="bizToData" :show-header="false" style="width: 100%" size="mini"> |
| | | <el-table-column |
| | | align="center" |
| | | prop="name"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="操作" |
| | | width="60"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | style="color:#F56C6C;" |
| | | type="text" |
| | | @click.native.prevent="bizTypeDeleteRow('to',scope.$index)"> |
| | | 移除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="对应关系:" label-width="110px"> |
| | | <el-select v-model="form.relationTo"> |
| | | <el-option label="N" value="N"></el-option> |
| | | <el-option label="1" value="1"></el-option> |
| | | </el-select> |
| | | <el-form-item label="对应关系:" label-width="110px" style="margin-bottom: 5px;"> |
| | | <el-radio v-model="form.relationTo" label="N">N</el-radio> |
| | | <el-radio v-model="form.relationTo" label="1">1</el-radio> |
| | | </el-form-item> |
| | | <el-form-item label="主类型:" label-width="110px"> |
| | | <el-select v-model="form.primitivesTo"> |
| | |
| | | </div> |
| | | </el-form> |
| | | |
| | | <div class="bottomForm"> |
| | | <h3 style="margin-bottom: 10px;">属性池列表</h3> |
| | | <div class="bottomForm" style="margin-top: 10px;"> |
| | | <avue-crud |
| | | size="mini" |
| | | :data="dialogBottomData" |
| | | :option="dialogBottomOption" |
| | | @row-del="dialogBottomAttrDel" |
| | | > |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="dialogAddClickHandler">增 加 |
| | | <h3 style="display: inline-block;margin-right: 20px;margin-bottom: 10px;">属性池列表</h3> |
| | | <el-button icon="el-icon-plus" plain size="mini" type="primary" @click="dialogAddClickHandler">增 加 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="addDialogSavaHandler">确 定</el-button> |
| | | <el-button @click="addDialogClose">取 消</el-button> |
| | | </span> |
| | | <el-button size="small" type="primary" @click="addDialogSavaHandler">确 定</el-button> |
| | | <el-button size="small" @click="addDialogClose">取 消</el-button> |
| | | </span> |
| | | |
| | | <!-- 属性池列表 --> |
| | | <el-dialog |
| | |
| | | > |
| | | </avue-crud> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="dialogAttrAddClickHandler">确 定</el-button> |
| | | <el-button @click="dialogAttrClose">取 消</el-button> |
| | | <el-button size="small" type="primary" @click="dialogAttrAddClickHandler">确 定</el-button> |
| | | <el-button size="small" @click="dialogAttrClose">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </el-dialog> |
| | |
| | | :table-loading="conCheckLoading"> |
| | | </avue-crud> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="conCheckVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="repairClickHandler">修 复</el-button> |
| | | <el-button size="small" @click="conCheckVisible = false">取 消</el-button> |
| | | <el-button size="small" type="primary" @click="repairClickHandler">修 复</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | </avue-crud> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="bizTypeVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="bizTypeAddHandler">确 定</el-button> |
| | | <el-button size="small" type="primary" @click="bizTypeAddHandler">确 定</el-button> |
| | | <el-button size="small" @click="bizTypeVisible = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | import basicOption from '@/util/basic-option' |
| | | import {gridAttribute} from "@/api/modeling/attributePool/api"; |
| | | import func from "@/util/func"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | name: "index", |
| | |
| | | searchMenuSpan: 8, |
| | | searchLabelWidth: 100, |
| | | calcHeight: 30, |
| | | header: false, |
| | | column: [ |
| | | { |
| | | label: '业务类型名', |
| | |
| | | index: false, |
| | | selection: false, |
| | | refreshBtn: false, |
| | | header:false, |
| | | column: [ |
| | | { |
| | | label: '类型名', |
| | |
| | | dialogAttrReload: Math.random(), |
| | | dialogAttrSelectList: [], |
| | | dialogAttrLoading: false, |
| | | dialogAttrData: [], // 属性池新增表格 |
| | | dialogAttrData: [], // 属性池弹窗表格 |
| | | dialogAttrOption: { |
| | | ...basicOption, |
| | | calcHeight: -60, |
| | |
| | | height: 450, |
| | | searchMenuSpan: 8, |
| | | header:false, |
| | | selectable:function(row){ |
| | | return row.selectable; |
| | | }, |
| | | column: [ |
| | | { |
| | | label: '属性名', |
| | | prop: 'id', |
| | | sortable: true, |
| | | search: true, |
| | | width:260, |
| | | }, |
| | | { |
| | | label: '属性类型', |
| | | prop: 'attributeDataType', |
| | | sortable: true, |
| | | width:150, |
| | | }, |
| | | { |
| | | label: '初始值', |
| | | prop: 'defaultValue', |
| | | sortable: true, |
| | | width:200, |
| | | }, |
| | | { |
| | | label: '说明', |
| | |
| | | editBtn: false, |
| | | refreshBtn: false, |
| | | selection: false, |
| | | height: 200, |
| | | height: 220, |
| | | menuWidth:100, |
| | | addBtn: false, |
| | | gridBtn:false, |
| | | columnBtn:false, |
| | | // index:false, |
| | | column: [ |
| | | { |
| | | label: '属性名', |
| | | prop: 'id', |
| | | sortable: true, |
| | | width:260, |
| | | }, |
| | | { |
| | | label: '属性类型', |
| | | prop: 'attributeDataType', |
| | | sortable: true, |
| | | width:150, |
| | | }, |
| | | { |
| | | label: '初始值', |
| | | prop: 'defaultValue', |
| | | sortable: true, |
| | | width:200, |
| | | }, |
| | | { |
| | | label: '说明', |
| | |
| | | // index:false, |
| | | addBtn: false, |
| | | menu: false, |
| | | calcHeight: -55, |
| | | calcHeight: -30, |
| | | column: [ |
| | | { |
| | | label: '属性名', |
| | | prop: 'id', |
| | | sortable: true, |
| | | width:260, |
| | | }, |
| | | { |
| | | label: '属性类型', |
| | | prop: 'attributeDataType', |
| | | sortable: true, |
| | | width:150, |
| | | }, |
| | | { |
| | | label: '初始值', |
| | | prop: 'defaultValue', |
| | | sortable: true, |
| | | width:200, |
| | | }, |
| | | { |
| | | label: '说明', |
| | |
| | | nodeRow: {}, |
| | | descriptionOption: { |
| | | labelStyle: 'text-align:center;width:120px', |
| | | contentStyle: 'width:240px;text-align:center;word-break;break-all;' |
| | | contentStyle: 'width:240px;text-align:center;word-break:break-all;' |
| | | }, |
| | | icons: { |
| | | id: 'el-icon-finished', |
| | |
| | | created() { |
| | | this.getTreeList(); |
| | | }, |
| | | mounted() { |
| | | |
| | | computed:{ |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false), |
| | | delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false), |
| | | editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false), |
| | | exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false), |
| | | importBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false), |
| | | consistencyCheckBtn: this.vaildData(this.permission[this.$route.query.id].USE, false), |
| | | createViewBtn: this.vaildData(this.permission[this.$route.query.id].ADD2, false), |
| | | }; |
| | | }, |
| | | }, |
| | | methods: { |
| | | // 树onLoad请求 |
| | |
| | | const data = res.data.data; |
| | | this.treeData = data; |
| | | this.tableLoading = false; |
| | | }).catch(err => { |
| | | this.$message.error(err); |
| | | }); |
| | | }) |
| | | }, |
| | | |
| | | // 导入 |
| | |
| | | // 查询属性池列表数据 |
| | | getAttrDialogDta() { |
| | | gridAttribute(this.attrPage.currentPage, this.attrPage.pageSize, this.searchAttrParams).then(res => { |
| | | const data = res.data.data; |
| | | const data = res.data.data.map(item=>{ |
| | | item.selectable=!this.dialogBottomData.some(existingItem => existingItem.id === item.id); |
| | | return item; |
| | | }); |
| | | this.dialogAttrData = data; |
| | | this.attrPage.total = res.data.total; |
| | | this.dialogAttrLoading = false; |
| | |
| | | |
| | | // 添加属性池 行点击 |
| | | dialogAttrRowClickHandler(row) { |
| | | |
| | | if(!row.selectable){ |
| | | return; |
| | | } |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.dialogAttrCrud, |
| | |
| | | this.attrLastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectList = []; |
| | | this.dialogAttrSelectList = [row]; |
| | | } |
| | | ); |
| | | }, |
| | |
| | | |
| | | // 添加属性池 保存 |
| | | dialogAttrAddClickHandler() { |
| | | let hasDuplicate = false; |
| | | |
| | | // 先创建一个临时数组来存储不重复的项 |
| | | const newItems = []; |
| | | |
| | | this.dialogAttrSelectList.forEach(item => { |
| | | const exists = this.dialogBottomData.some(existingItem => existingItem.id === item.id); |
| | | |
| | | if (exists) { |
| | | hasDuplicate = true; |
| | | return; |
| | | } |
| | | |
| | | // 如果没有重复项,则将该项添加到临时数组中 |
| | | newItems.push({ |
| | | this.dialogBottomData.push({ |
| | | id: item.id, |
| | | attributeDataType: item.attributeDataType, |
| | | defaultValue: item.defaultValue, |
| | | description: item.description |
| | | }); |
| | | }); |
| | | |
| | | if (hasDuplicate) { |
| | | this.$message.error('请检查是否有添加重复项!'); |
| | | } else { |
| | | // 如果没有重复项,将新项添加到 dialogBottomData |
| | | this.dialogBottomData.push(...newItems); |
| | | this.attrPollDialogVisible = false; |
| | | } |
| | | this.attrPollDialogVisible = false; |
| | | }, |
| | | |
| | | //添加属性池 条数 |
| | |
| | | this.bizLastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectList = []; |
| | | this.bizTypeList = [row]; |
| | | } |
| | | ); |
| | | }, |
| | |
| | | |
| | | .dialogForm { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .dialogForm > div { |
| | | width: 34%; |
| | | border: 1px solid #eee; |
| | | padding: 25px 20px 5px 10px; /* 上 右 下 左 */ |
| | | box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); /* 添加阴影效果 */ |
| | | width: 31%; |
| | | border: 1px solid #EBEEF5; |
| | | border-radius: 2px; |
| | | padding: 15px 20px 0 10px; /* 上 右 下 左 */ |
| | | box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */ |
| | | } |
| | | |
| | | .leftForm { |
| | | width: 19% !important; |
| | | padding: 25px 20px 5px 0px !important; |
| | | width: 28% !important; |
| | | } |
| | | |
| | | .smallBtn { |