ludc
2023-09-13 4a2835ddadb796c69f180097b95f971dbab4687d
Source/UBCS-WEB/src/views/modeling/originalAdd.vue
@@ -111,7 +111,20 @@
            <!-- 选择枚举时的弹窗 -->
            <el-dialog title="枚举列表" :visible.sync="enumRefer.show" append-to-body @close="closeEnumDialog" width="70%"
                style="height: 115vh;">
                <avue-crud ref="eunmTable" :option="enumRefer.option" :data="enumRefer.data" class="enumTable"
                <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}">
                        <el-radio v-model="enumRefer.selectRow" :label="row.$index">&nbsp;
@@ -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,26 @@
        this.initAttributeReferTypeList();
    },
    methods: {
      onSubmit() {
        const conditionMap = {};
        if (this.form.name) {
          conditionMap[`conditionMap['name_like']`] = this.form.name;
        }
        if (this.form.label) {
          conditionMap[`conditionMap['label_like']`] = this.form.label;
        }
        getParentList(this.enumRefer.enumPage.currentPage, this.enumRefer.enumPage.pageSize, conditionMap)
          .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;
            this.enumRefer.data = res.data.data.records;
          })
        },
        closeSubmitDialog() {
            this.resetAttributeForm();
            this.showSubmitDialog = false;