zenglf
2023-09-19 3457909638c660c0cfcb521b6104ab64c679b914
src/views/eam/modules/equipmentCategory/EquipmentCategoryModel.vue
@@ -46,7 +46,7 @@
        </a-row>-->
        <a-row :gutter="24">
          <a-col :span="24">
          <a-col :span="12">
            <a-form-item
              label="设备分类编号"
              :labelCol="labelCol"
@@ -60,9 +60,7 @@
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24" v-if="parentId!='-1'">
          <a-col :span="24">
          <a-col :span="12" v-if="parentId!='-1'">
            <a-form-item
              label="设备分类名称"
              :labelCol="labelCol"
@@ -76,9 +74,7 @@
              />
            </a-form-item>
          </a-col>
        </a-row>
       <a-row :gutter="24" v-if="parentId=='-1'">
          <a-col :span="24">
          <a-col :span="12" v-if="parentId=='-1'">
            <a-form-item
              label="设备分类名称"
              :labelCol="labelCol"
@@ -95,9 +91,8 @@
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
          <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
@@ -113,9 +108,7 @@
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
          <a-col :span="12">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
@@ -132,8 +125,8 @@
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
          <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
@@ -148,7 +141,6 @@
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
      <a-divider  v-if="title!='新增'" orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 选择子设备分类使其跟随父设备分类属性 </a-divider>
      <a-tabs
@@ -159,7 +151,7 @@
      <a-tab-pane
          tab='子设备分类'
          key='1'
        >
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
@@ -176,11 +168,23 @@
      :loading="loading"
      :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
      @change="handleTableChange"
      :scroll="{ x: true, y: 900 }"
     ></a-table>
      :scroll="{ x: true}"
     >
        <template slot="num" slot-scope="text" >
          <a-tooltip placement="top" :title="text" trigger="hover">
            <div>
              <template slot="title"> </template>
              <p style="cusor:pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 130px;">{{ text }}</p>
            </div>
          </a-tooltip>
        </template>
      </a-table>
    </a-tab-pane>
    </a-tabs>
    </a-spin>
    <template slot="footer">
@@ -235,10 +239,10 @@
      parentId: '',
      model: {},
      labelCol: {
        span:3
        span:7
      },
      wrapperCol: {
        span:21
        span:17
      },
      confirmLoading: false,
      form: this.$form.createForm(this),
@@ -307,7 +311,9 @@
          title: '分类编码',
          align: "center",
          dataIndex: 'num',
          width: 220,
          scopedSlots: { customRender: 'num' },
          width: 100,
          ellipsis: true,
          // scopedSlots: {
          //   customRender: 'num',
          // },
@@ -318,7 +324,7 @@
          align: "center",
          dataIndex: 'name',
          width: 220,
          // scopedSlots: {
          //   customRender: 'name',
          // },
@@ -333,31 +339,32 @@
          //   customRender: 'name',
          // },
          // sorter: true,
          width: 220,
        },
        {
          title: '创建人',
          align: "center",
          dataIndex: 'createBy',
          width: 220,
        },
        {
          title: '创建时间',
          align: "center",
          dataIndex: 'createTime',
          width: 220,
        },
        {
          title: '修改人',
          align: "center",
          dataIndex: 'updateBy',
          width: 220,
        },
        {
          title: '创建时间',
          align: "center",
          dataIndex: 'createTime',
        },
        {
          title: '修改时间',
          align: "center",
          dataIndex: 'updateTime',
          width: 220,
        },
      ],
      //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性
@@ -390,6 +397,7 @@
    close() {
      this.$emit('close');
      this.visible = false;
      this.onClearSelected();
    },
    onSelectChange(selectedRowKeys, selectionRows) {
        this.selectedRowKeys = selectedRowKeys;
@@ -455,6 +463,7 @@
            that.confirmLoading = false;
            that.$bus.$emit('loadData')
            that.close();
            that.onClearSelected();
          })
        }
      })