xiejun
2023-09-18 7db3ee6e84714a868e0b57a61a033d050b1a61fc
Source/UBCS-WEB/src/views/modeling/originalAdd.vue
@@ -111,6 +111,19 @@
            <!-- 选择枚举时的弹窗 -->
            <el-dialog title="枚举列表" :visible.sync="enumRefer.show" append-to-body @close="closeEnumDialog" width="70%"
                style="height: 115vh;">
                <div>
                  <el-form :inline="true" :model="form" class="demo-form-inline" size="small">
                    <el-form-item label="枚举代号">
                      <el-input v-model="form.name" placeholder="枚举代号"></el-input>
                    </el-form-item>
                    <el-form-item label="枚举名称">
                        <el-input v-model="form.label" placeholder="枚举名称"></el-input>
                    </el-form-item>
                    <el-form-item>
                      <el-button type="primary" @click="onSubmit">查询</el-button>
                    </el-form-item>
                  </el-form>
                </div>
                <avue-crud ref="eunmTable" :option="enumRefer.option"  @on-load="enumOnLoad" :data="enumRefer.data" class="enumTable"
                    @row-click="enumReferClick" :page.sync="enumRefer.enumPage">
                    <template slot="radio" slot-scope="{row}">
@@ -141,6 +154,10 @@
    },
    data() {
        return {
            form:{
              name:'',
              label:''
            },
            showSubmitDialog: false,
            // 默认的页签
            activeName: 'referTab',
@@ -229,7 +246,8 @@
                    border: true,
                    reserveSelection: true,
                    searchMenuSpan: 32,
                    searchShowBtn: false,
                    // searchShowBtn: false,
                    // search:true,
                    highlightCurrentRow: true,
                    column: [{
                        label: '',
@@ -241,13 +259,13 @@
                        prop: 'name',
                        align: 'center',
                        searchSpan: 8,
                        search: true,
                        // search: true,
                    }, {
                        label: '枚举名称',
                        prop: 'label',
                        align: 'center',
                        searchSpan: 8,
                        search: true,
                        // search: true,
                    }]
                },
                // 枚举参照表格数据
@@ -281,6 +299,22 @@
        this.initAttributeReferTypeList();
    },
    methods: {
      onSubmit() {
        if (this.form.name || this.form.label) {
          const params = {};
          if (this.form.name) {
            params.name = this.form.name;
          }
          if (this.form.label) {
            params.label = this.form.label;
          }
          getParentList(this.enumRefer.enumPage.currentPage, this.enumRefer.enumPage.pageSize, params)
            .then((res) => {
              this.enumRefer.enumPage.total = res.data.data.total;
              this.enumRefer.data = res.data.data.records;
            });
        }
      },
        enumOnLoad(){
          getParentList(this.enumRefer.enumPage.currentPage, this.enumRefer.enumPage.pageSize).then(res => {
            this.enumRefer.enumPage.total = res.data.data.total;