<template>
  <div id="containt">
    <x-tabs v-model="activeName" class="tab-box">
      <el-tab-pane :label="$t1('常规')" name="first">
        <editView v-if="showEdit" visible-key="showEdit" :_dataId.sync="dataId" :parent-target="_self"
                  @reload="$reloadHandle" :formTemplate="formTemplate" :wfObjConfig="wfObjConfig"></editView>
      </el-tab-pane>
      <el-tab-pane :label="$t1('列表')" name="second">
        <div class="grid-height">
          <vxe-grid ref="table-m1" v-bind="vxeOption" @resizable-change="$vxeTableUtil.onColumnWitchChange"
                    @custom="$vxeTableUtil.customHandle">
            <template #form>
              <div class="clearfix screen-btns">
                <div class="fl">
                  <vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="openEditDialog"
                              :disabled="!wfObjConfig.id">{{ $t1('新增') }}
                  </vxe-button>
                  <div class="txt-name el-icon-house">
                    {{ $t1('表单类型名称') }}：
                    <span>{{ wfObjConfig.objTypeName }}</span>
                  </div>
                </div>
                <div class="fr">
                  <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
                              plain>{{$t1('重置')}}
                  </vxe-button>
                  <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">{{ $t1('搜索') }}
                  </vxe-button>
                </div>
              </div>
            </template>
            <template #row_edit>
              <a href="#" class="a-link"><i class="el-icon-edit"/></a>
            </template>
          </vxe-grid>
        </div>
      </el-tab-pane>
    </x-tabs>
    <wfObjConfigDialog
      v-if="showWfObjConfigDialog"
      :visiable.sync="showWfObjConfigDialog"
      _dataId="wfObjConfigId"
      :formTemplate="formTemplate"
      @confirm="confirmWfObjConfigDialog"
    ></wfObjConfigDialog>
  </div>
</template>

<script>
import mixin from "./mixins/itemList";

export default {
  name: 'itemList',
  mixins: [mixin]
}
</script>
