| | |
| | | <!-- 全屏编辑--> |
| | | <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-info" size="small" @click="rulesVisibleHandle">验证规则</el-button> |
| | | <!-- 属性分组--> |
| | | <el-button icon="el-icon-menu" size="small" @click="attrVisibleHandle">属性分组</el-button> |
| | | </el-button-group> |
| | |
| | | </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" @click="busineAddHandle">确认选择</el-button> |
| | | <el-button size="small" type="primary" @click="addVisible=false">取消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 参照配置--> |
| | | <refer-config-form-dialog |
| | | ref="referConfigFormDialog" |
| | | @echoReferConfig="echoReferConfig" |
| | | ></refer-config-form-dialog> |
| | | </div> |
| | | <el-table :data="ProData" |
| | | style="width: 100%" |
| | |
| | | <el-select v-model="row[item.prop]" filterable allow-create default-first-option slot="prepend" v-if="editingRows === row && editShows== item.prop && item.edit == 'select' " @focus="DataChangeHandler(item.editConfig,index)"> |
| | | <el-option |
| | | v-for="optionItem in item.data" |
| | | :key="optionItem.key" |
| | | :label="optionItem.value" |
| | | :value="optionItem.key"> |
| | | :key="optionItem.dictValue" |
| | | :label="optionItem.dictValue" |
| | | :value="optionItem.dictValue"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-switch |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | //参照 |
| | | referVisible:false, |
| | | crudArrayFlag:false, |
| | | editingRows: null, |
| | | editShows:"", |
| | |
| | | prop: "prefixValue", |
| | | sortable: true, |
| | | edit: 'select', |
| | | width: 110, |
| | | editConfig: { |
| | | extraParams: { |
| | | code: 'codeclstempattr', |
| | |
| | | prop: "suffixValue", |
| | | sortable: true, |
| | | edit: 'select', |
| | | width: 110, |
| | | editConfig: { |
| | | extraParams: { |
| | | code: 'codeclstempattr', |
| | |
| | | formAttr(row, column) { |
| | | console.log(row,column) |
| | | }, |
| | | //参照配置子组件 |
| | | echoReferConfig(val){ |
| | | console.log(val) |
| | | }, |
| | | //时间下拉格式 |
| | | DataChangeHandler(editConfig,index){ |
| | | listByFlag(editConfig.extraParams).then(res=>{ |
| | | console.log(res); |
| | | this.option.column[index].data=res; |
| | | }) |
| | | if(!this.option.column[index].data){ |
| | | listByFlag(editConfig.extraParams).then(res=>{ |
| | | this.option.column[index].data=res.data; |
| | | }) |
| | | } |
| | | }, |
| | | //属性分组按钮 |
| | | attrVisibleHandle() { |
| | | if (this.attrSelectList.length > 1) { |
| | | this.$message.warning('只能选择一条模板属性') |
| | | } else if (this.attrSelectList < 1) { |
| | | this.$message.warning('请选择一条模板属性') |
| | | } else if (this.attrSelectList.length === 1) { |
| | | this.attrVisible = true; |
| | | if(this.attrSelectList.length==0){ |
| | | this.$message.warning('请选择属性'); |
| | | return false; |
| | | } |
| | | this.attrVisible = true; |
| | | }, |
| | | //属性分组提交 |
| | | attrHandle() { |
| | | this.$set(this.attrRow, 'attributeGroup', this.attrModel) |
| | | this.attrSelectList.forEach((item)=>{ |
| | | this.$set(item, 'attributeGroup', this.attrModel) |
| | | }) |
| | | this.attrModel = "" |
| | | this.attrVisible = false |
| | | }, |
| | |
| | | this.editShows = column.property; |
| | | this.rowOid = row.oid; |
| | | console.log(row,column) |
| | | if(column.property == 'codeDateFormat' ){ |
| | | |
| | | if(column.property == 'referConfig' ){ |
| | | this.$refs.referConfigFormDialog.isShowReferConfigForm = true; |
| | | } |
| | | }, |
| | | saveRows() { |
| | |
| | | saveRow() { |
| | | this.editingRow = null; |
| | | }, |
| | | rulesVisibleHandle(){ |
| | | if(this.attrSelectList.length==0){ |
| | | this.$message.warning('请选择属性'); |
| | | return false; |
| | | } |
| | | this.rulesVisible = true; |
| | | }, |
| | | //规则校验,双击表单事件 |
| | | handleRulesRowDBLClick(row) { |
| | | this.RulesForm.expressionText = row.bds |
| | |
| | | }, |
| | | // 验证规则确定 |
| | | rulesHandle() { |
| | | this.attrSelectList.forEach((item)=>{ |
| | | this.$set(item, 'verifyRule', this.RulesForm.expressionText) |
| | | }) |
| | | this.rulesVisible = false |
| | | }, |
| | | //验证规则检查 |