田源
2023-08-02 2993f2202d4acc47d7c65d0e40456c68c95d8cfb
主数据表格错行-表头动态宽度-添加修改默认字段禁用
已修改2个文件
26 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
@@ -50,7 +50,7 @@
    // 默认禁用元素
    disabledProp: {
      type: Array,
      default: () => ["id"],
      default: () => ["id","lcstatus"],
    },
    templateOid: {
      type: String,
@@ -562,7 +562,7 @@
          maxlength: formItem.maxlength,
          filterable: true,
          referConfig:
            formItem.type == "refer"
            formItem.type == "refer"
              ? {
                  title: formItem.text,
                  showField: formItem.showField || formItem.field,
@@ -604,7 +604,7 @@
      if (this.type === "add") {
        this.loading = false;
      }
      this.geDictData(dictKeys);
      this.getFormDetail();
    },
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -31,7 +31,7 @@
                               :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>
@@ -241,13 +241,12 @@
  created() {
  },
  mounted() {
  },
  activated() {
    // this.doLayout();
    this.$nextTick(() => {
      this.$refs.dataTable.doLayout()
    })
   this.doLayout()
  },
  updated() {
    this.doLayout()
  },
  watch: {
    tableHeadDataFateher: {
@@ -266,6 +265,7 @@
      handler(newval, oldval) {
        this.tableData = newval;
        this.searchResults = newval
        this.doLayout()
      },
    },
    tableHeadFindData: {
@@ -643,10 +643,13 @@
    saveRow() {
      this.editingRow = null;
    },
    //表格错行问题
    doLayout() {
      this.$nextTick(() => {
        this.$refs.crud.doLayout();
      });
        if (this.$refs.dataTable && this.$refs.dataTable.doLayout) {
          this.$refs.dataTable.doLayout();
        }
      })
    },
    //表格头渲染
    CrudHeaderRend() {
@@ -717,6 +720,7 @@
        limit: this.page.pageSize,
      }).then((res) => {
        this.tableData = res.data.data;
        this.doLayout()
      });
    },
    //多选