主数据表格错行-表头动态宽度-添加修改默认字段禁用
| | |
| | | // 默认禁用元素 |
| | | disabledProp: { |
| | | type: Array, |
| | | default: () => ["id"], |
| | | default: () => ["id","lcstatus"], |
| | | }, |
| | | templateOid: { |
| | | type: String, |
| | |
| | | maxlength: formItem.maxlength, |
| | | filterable: true, |
| | | referConfig: |
| | | formItem.type == "refer" |
| | | formItem.type == "refer" |
| | | ? { |
| | | title: formItem.text, |
| | | showField: formItem.showField || formItem.field, |
| | |
| | | if (this.type === "add") { |
| | | this.loading = false; |
| | | } |
| | | |
| | | |
| | | this.geDictData(dictKeys); |
| | | this.getFormDetail(); |
| | | }, |
| | |
| | | :label="item.label" |
| | | :prop="item.prop" :show-overflow-tooltip="true" |
| | | :sortable="item.sortable" |
| | | :width="item.label.length >= 4 ? '150' : item.label.length == 3 ? '120' : '90'" |
| | | :width="item.width" |
| | | align="center"> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | created() { |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | activated() { |
| | | // this.doLayout(); |
| | | this.$nextTick(() => { |
| | | this.$refs.dataTable.doLayout() |
| | | }) |
| | | this.doLayout() |
| | | }, |
| | | updated() { |
| | | this.doLayout() |
| | | }, |
| | | watch: { |
| | | tableHeadDataFateher: { |
| | |
| | | handler(newval, oldval) { |
| | | this.tableData = newval; |
| | | this.searchResults = newval |
| | | this.doLayout() |
| | | }, |
| | | }, |
| | | tableHeadFindData: { |
| | |
| | | saveRow() { |
| | | this.editingRow = null; |
| | | }, |
| | | //表格错行问题 |
| | | doLayout() { |
| | | this.$nextTick(() => { |
| | | this.$refs.crud.doLayout(); |
| | | }); |
| | | if (this.$refs.dataTable && this.$refs.dataTable.doLayout) { |
| | | this.$refs.dataTable.doLayout(); |
| | | } |
| | | }) |
| | | }, |
| | | //表格头渲染 |
| | | CrudHeaderRend() { |
| | |
| | | limit: this.page.pageSize, |
| | | }).then((res) => { |
| | | this.tableData = res.data.data; |
| | | this.doLayout() |
| | | }); |
| | | }, |
| | | //多选 |