| | |
| | | <el-table-column v-for="item in this.option.column" :key="item.id" |
| | | :label="item.label" |
| | | :prop="item.prop" |
| | | :formatter="formAttr" |
| | | :width="item.label.length >=4 ?'150':item.label.length==3 ?'120':'90'" |
| | | :show-overflow-tooltip="true" |
| | | align="center" |
| | |
| | | <template slot-scope="{ row }"> |
| | | <el-input v-if="editingRows === row && editShows== item.prop" v-model="row[item.prop]" |
| | | @blur="saveRows"></el-input> |
| | | <el-switch |
| | | v-if="item.label === 'true' || item.label === 'false'" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949"> |
| | | </el-switch> |
| | | <span v-else>{{ row[item.prop] }}</span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | formAttr(row, column) { |
| | | console.log(row,column) |
| | | // if (column.property === "keyAttrFlag" |
| | | // ||column.property === "queryAttrFlag" |
| | | // ||column.property === "seniorQueryAttrFlag" |
| | | // ||column.property === "sameRepeatAttrFlag" |
| | | // ||column.property === "requireFlag" |
| | | // ||column.property === "formDisplayFlag" |
| | | // ||column.property === "tableDisplayFlag" |
| | | // ||column.property === "sortAttrFlag") { |
| | | // return row[column.property] =='true'? "是" : "否"; |
| | | // } |
| | | // return row[column.property]; |
| | | }, |
| | | //属性分组按钮 |
| | | attrVisibleHandle() { |
| | | this.formatBoolean() |
| | | if (this.CrudSelect.length > 1) { |
| | | this.$message.warning('只能选择一条模板属性') |
| | | } else if (this.CrudSelect < 1) { |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | <style scoped lang="scss"> |
| | | /deep/ .el-button { |
| | | margin: 0 10px 10px 0; |
| | | } |
| | | </style> |