<template>
  <el-dialog
    :title="$t('create')"
    v-model="visible"
    :width="500"
    destroy-on-close
    @closed="$emit('closed')"
  >
    <el-container>
      <el-header>
        <div class="left-panel">
          <div class="left-panel-search">
            <el-input
              v-model="search.Keyword"
              clearable
              style="width: 320px"
              :placeholder="$t('pleaseInput')"
            >
              <template #prepend>
                <el-select
                  v-model="search.QueryType"
                  style="width: 120px"
                  :placeholder="$t('pleaseChoose')"
                  class="filter-item"
                >
                  <el-option
                    v-for="item in queryTypes"
                    :key="item"
                    :label="$t('organization.QueryType' + item)"
                    :value="item"
                  />
                </el-select>
              </template>
            </el-input>
            <el-button type="primary" icon="el-icon-search" @click="upsearch">{{
              $t("query")
            }}</el-button>
          </div>
        </div>
      </el-header>
      <el-main class="nopadding">
        <scTable
          ref="table"
          :apiObj="apiObj"
          :pageSize="10"
          row-key="UserCode"
          @selection-change="selectionChange"
          stripe
        >
          <el-table-column type="selection" width="50"></el-table-column>
          <el-table-column
            :label="$t('organization.OrganizationName')"
            prop="OrganizationName"
          ></el-table-column>
        </scTable>
      </el-main>
    </el-container>

    <template #footer>
      <el-button @click="visible = false">{{
        $t("dialogBox.cancelButtonText")
      }}</el-button>
      <el-button type="primary" :loading="isSaveing" @click="submit()">{{
        $t("dialogBox.saveButtonText")
      }}</el-button>
    </template>
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      visible: false,
    };
  },
  methods: {
    open() {
      return this;
    },
    submit() {},
  },
};
</script>

<style>
</style>
