guoyuji
2024-12-05 26aa014b40fa80905990997bc848db975861c916
north-glass-erp/northglass-erp/src/views/sd/basicData/SearchBasicData.vue
@@ -162,9 +162,10 @@
  //表头按钮
  toolbarConfig: {
    buttons: [
      {'code': 'add', 'name': t('basicData.insert'),status: 'primary'},
    ],
    slots:{
      buttons: "toolbar_buttons",
      tools:'add'
    },
    // import: false,
    // export: true,
@@ -187,6 +188,11 @@
      }
    }
  }
}
const add = () => {
  rowIndex.value = null
  dialogTableVisible.value = true
}
request.get('/basicData/getBasicData').then(res => {
@@ -253,22 +259,12 @@
</script>
<template>
  <div>
    <el-row>
      <el-col :span="8">
        <el-cascader
            v-model="basic.basicType"
            @change="handleChange"
            :options="options"
            clearable
            :placeholder="$t('processCard.pleaseSelect')"
        />
      </el-col>
    </el-row>
  <div  style="width: 100%;height: 100%">
    <div class="main-table">
    <vxe-grid
        style="width: 40vw;"
        class="mytable-scrollbar"
        max-height="500px"
          height="100%"
        ref="xGrid"
        v-bind="gridOptions"
        v-on="gridEvents"
@@ -294,8 +290,25 @@
        </div>
      </template>
        <template #toolbar_buttons>
          <el-col :span="8">
            <el-cascader
                v-model="basic.basicType"
                @change="handleChange"
                :options="options"
                clearable
                :placeholder="$t('processCard.pleaseSelect')"
            />
          </el-col>
        </template>
        <template #add>
          <el-button @click="add" type="primary" style="margin-right: 3px">新增</el-button>
        </template>
    </vxe-grid>
    </div>
    <el-dialog
        v-model="dialogTableVisible"
        destroy-on-close
@@ -306,5 +319,13 @@
</template>
<style scoped>
.head{
  width: 100%;
  height: 35px;
}
.main-table{
  width: 100%;
  height: calc(100% - 0px);
}
</style>