| | |
| | | <template> |
| | | <div> |
| | | <div style="display: flex;flex-wrap: wrap;" v-if="this.crudArrayFlag"> |
| | | <el-button-group> |
| | | <!--新增--> |
| | | <el-button v-if="attrEditVisible == false && attrFlagChiledren==false" size="small" type="primary" |
| | | @click="busineHandle">+ 添加 {{ msg }} |
| | | </el-button> |
| | | <el-button v-if="attrEditVisible == false && attrFlagChiledren==false" size="small" type="primary" icon="el-icon-plus" @click="busineHandle">添加 {{ msg }}</el-button> |
| | | <!-- 全屏编辑--> |
| | | <el-button v-if=" attrEditVisible == false && attrFlagChiledren==false" size="small" @click="fullscreenHandle"> |
| | | 全屏编辑 |
| | | </el-button> |
| | | <!-- 组合规则--> |
| | | <el-button size="small" @click="isShowHandler">组合规则</el-button> |
| | | <el-button v-if=" attrEditVisible == false && attrFlagChiledren==false" size="small" @click="fullscreenHandle" icon="el-icon-full-screen">全屏编辑</el-button> |
| | | <!-- 验证规则--> |
| | | <el-button icon="el-icon-info" size="small" @click="rulesVisible=true">验证规则</el-button> |
| | | <!-- 属性分组--> |
| | | <el-button icon="el-icon-menu" size="small" @click="attrVisibleHandle">属性分组</el-button> |
| | | </el-button-group> |
| | | <el-button-group> |
| | | <!-- 分类注入--> |
| | | <el-button icon="el-icon-magic-stick" size="small" @click="injectBtn">分类注入</el-button> |
| | | <!-- 组合规则--> |
| | | <el-button size="small" @click="isShowHandler">组合规则</el-button> |
| | | <!-- 枚举注入--> |
| | | <el-button size="small" @click="enmuVisHandle">枚举注入</el-button> |
| | | <!-- 级联属性--> |
| | | <el-button size="small" @click="CascadeHandle">级联属性</el-button> |
| | | <!-- 预览排序--> |
| | | <el-button size="small">预览排序</el-button> |
| | | <el-button size="small" icon="el-icon-arrow-down">预览排序</el-button> |
| | | </el-button-group> |
| | | <el-button-group> |
| | | <!-- 保存--> |
| | | <el-button size="small" @click="addsHandler">保存</el-button> |
| | | <el-button size="small" @click="addsHandler" icon="el-icon-check">保存</el-button> |
| | | <!-- 删除--> |
| | | <el-button size="small" @click="CrudRemove">删除</el-button> |
| | | <el-button size="small" @click="CrudRemove" icon="el-icon-delete">删除</el-button> |
| | | <!-- 重置--> |
| | | <el-button size="small" @click="reset">重置</el-button> |
| | | <el-button size="small" @click="reset" icon="el-icon-refresh-right">重置</el-button> |
| | | <!-- 同步到其他模板--> |
| | | <el-button size="small"@click="syncHandle">同步到其他模板</el-button> |
| | | <el-button size="small"@click="syncHandle" icon="el-icon-share">同步到其他模板</el-button> |
| | | </el-button-group> |
| | | <!-- 编码申请预览--> |
| | | <el-button size="small" @click="applicationHandle" style="">编码申请预览</el-button> |
| | | <!-- 验证规则--> |
| | |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="small" type="text" @click.native.prevent="enumDeleteRow(scope.$index, tableData)"> |
| | | <el-button size="small" type="text" plain @click="enumDeleteRow"> |
| | | 移除 |
| | | </el-button> |
| | | </template> |
| | |
| | | </avue-crud> |
| | | <div style="display: flex;justify-content: flex-end;margin-top: 15px"> |
| | | <el-button size="small" type="primary" @click="busineAddHandle">保存</el-button> |
| | | <el-button size="small" type="primary">取消</el-button> |
| | | <el-button size="small" type="primary" @click="addVisible=false">取消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | style="width: 100%" |
| | | @cell-click="handleCellClicks" |
| | | @select="selectHandle" |
| | | @selection-change="selectionChange" |
| | | v-if="this.crudArrayFlag" |
| | | > |
| | | <el-table-column |
| | |
| | | :label="item.label" |
| | | :prop="item.prop" |
| | | :formatter="formAttr" |
| | | :width="item.label.length >=4 ?'150':item.label.length==3 ?'120':'90'" |
| | | :width="item.width||(item.label.length >=4 ?'150':item.label.length==3 ?'120':'90')" |
| | | :show-overflow-tooltip="true" |
| | | align="center" |
| | | > |
| | |
| | | }, |
| | | { |
| | | label: "数据类型", |
| | | prop: "attrDataType" |
| | | prop: "attrDataType", |
| | | formatter:function(row,column){ |
| | | let vciFieldTypeMap = { |
| | | VTBoolean: "布尔型", |
| | | VTClob: "长文本", |
| | | VTDate: "日期", |
| | | VTDateTime: "日期时间", |
| | | VTTime: "时间", |
| | | VTLong: "长整型", |
| | | VTDouble: "金额/双精度", |
| | | VTInteger: "整形", |
| | | VTFilePath: "文件", |
| | | VTString: "字符串" |
| | | } |
| | | return vciFieldTypeMap[row.attrDataType]; |
| | | } |
| | | }, |
| | | { |
| | | label: "可空", |
| | | prop: "nullableFlag" |
| | | prop: "nullableFlag", |
| | | formatter:function(row,column){return row.nullableFlag=='true' || row.nullableFlag=='1'?'是':'否'} |
| | | }, |
| | | { |
| | | label: "默认值", |
| | |
| | | }, |
| | | { |
| | | label: "参照", |
| | | prop: "referFlag" |
| | | prop: "referFlag", |
| | | formatter: function (d) { |
| | | if (!d.referFlag) { |
| | | return ''; |
| | | } else { |
| | | return d.referBtmTypeId |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | label: "枚举", |
| | | prop: "enumFlag" |
| | | prop: "enumFlag", |
| | | formatter: function (d) { |
| | | if (!d.enumFlag) { |
| | | return ''; |
| | | } else { |
| | | return d.enumId |
| | | } |
| | | } |
| | | }, |
| | | ] |
| | | }, |
| | |
| | | label: '排序号', |
| | | sortable: true, |
| | | edit: 'number', |
| | | width: 60, |
| | | width: 70, |
| | | fixed: true |
| | | }, { |
| | | label: "属性英文编号", |
| | |
| | | { |
| | | label: "高级查询属性", |
| | | prop: "seniorQueryAttrFlag", |
| | | width: 95, |
| | | width: 110, |
| | | cell: false, |
| | | edit: "switch" |
| | | }, |
| | | { |
| | | label: "相似查重属性", |
| | | prop: "sameRepeatAttrFlag", |
| | | width: 95, |
| | | width: 110, |
| | | cell: false, |
| | | edit: "switch" |
| | | }, |
| | |
| | | this.$message.warning('请选择属性集'); |
| | | return false; |
| | | } |
| | | debugger; |
| | | let ordernum = this.ProData.length; |
| | | this.busineSelectList.forEach((citem) => { |
| | | let isCopy = false; |
| | |
| | | this.ProData.push(JSON.parse(JSON.stringify(this.busineAddList))) |
| | | } |
| | | }) |
| | | |
| | | |
| | | this.addVisible = false; |
| | | |
| | | }, |
| | |
| | | }, |
| | | //枚举注入删除 |
| | | enumDeleteRow(row) { |
| | | this.tableData.splice(row, 1) |
| | | this.tableData.splice(row.$index, 1) |
| | | }, |
| | | //枚举注入按钮 |
| | | enmuVisHandle() { |
| | |
| | | }, |
| | | //表格删除 |
| | | CrudRemove() { |
| | | this.ProData.splice(this.attrRow.$index, 1) |
| | | this.attrSelectList.forEach((item)=>{ |
| | | this.ProData.splice(item.$index, 1) |
| | | }) |
| | | |
| | | }, |
| | | //表格重置 |
| | | reset() { |