<div :class="{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }">
    <i-form>
    <el-table v-if="isDisplay === true"
        :default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"  
        @sort-change="onSortChange($event)"  
        :border="isDragendCol"
        :highlight-current-row ="isSingleSelect"
        :row-class-name="getRowClassName.bind(_self)"
        :cell-class-name="getCellClassName.bind(_self)"
        size="mini"
        stripe
        :height="tableHeight"
        @row-click="rowClick($event)"  
        @select-all="selectAll($event)"  
        @select="select($event)"  
        @row-class-name="onRowClassName($event)"  
        @row-dblclick="rowDBLClick($event)"  
        ref='multipleTable' :data="items" :show-header="!isHideHeader">
            <template slot="empty">
                无数据 
                <span class="quick-toolbar">
                </span>
            </template>
            <template v-if="!isSingleSelect">
                <el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
            </template>
            <template v-if="getColumnState('modulename')">
                <el-table-column show-overflow-tooltip :prop="'modulename'" :label="$t('entities.subtask.subtasknew_grid.columns.modulename')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.subtask.subtasknew_grid.columns.modulename')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template v-if="actualIsOpenEdit">
                            <app-form-item :error="gridItemsModel[$index][column.property].error">
                                
            <app-picker  
              :formState="viewState" 
              :data="row"
              :context="context"
              :viewparams="viewparams"
              :localContext ='{ PROJECT:"%project%", ALLMODULES:"%allmodules%" }' 
              :localParam ='{ project:"%project%", allmodules:"%allmodules%" }' 
              :disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1" 
              name='modulename' 
              deMajorField='name'
              deKeyField='projectmodule'
              :service="service"
              :acParams="{ serviceName: 'ProjectModuleService', interfaceName: 'FetchTaskModules'}"
              valueitem='module' 
              :value="row[column.property]" 
              editortype="dropdown" 
              style="" 
              @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
            </app-picker>
            
                            </app-form-item>
                        </template>
                        <template v-if="!actualIsOpenEdit">
            <app-span name='modulename' editorType="PICKER" :value="row.modulename" dataType="PICKUPTEXT" precision="0" ></app-span>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('storyname')">
                <el-table-column show-overflow-tooltip :prop="'storyname'" :label="$t('entities.subtask.subtasknew_grid.columns.storyname')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.subtask.subtasknew_grid.columns.storyname')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template v-if="actualIsOpenEdit">
                            <app-form-item :error="gridItemsModel[$index][column.property].error">
                                
            <app-picker  
              :formState="viewState" 
              :data="row"
              :context="context"
              :viewparams="viewparams"
              :localContext ='{ N_MODULE_EQ:"%module%", PROJECT:"%project%" }' 
              :localParam ='{ project:"%project%", n_module_eq:"%module%" }' 
              :disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1" 
              name='storyname' 
              deMajorField='title'
              deKeyField='story'
              :service="service"
              :acParams="{ serviceName: 'StoryService', interfaceName: 'FetchTaskRelatedStory'}"
              valueitem='story' 
              :value="row[column.property]" 
              editortype="dropdown" 
              style="" 
              @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
            </app-picker>
            
                            </app-form-item>
                        </template>
                        <template v-if="!actualIsOpenEdit">
                              <app-column-link deKeyField='story' :context="JSON.parse(JSON.stringify(context))" :viewparams="JSON.parse(JSON.stringify(viewparams))" :data="row" :linkview="{viewname: 'story-main-view', height: 0,width: 0,title: $t('entities.story.views.mainview.title'),placement: 'DRAWER_TOP', isRedirectView: false,deResParameters: [
            { pathName: 'products', parameterName: 'product' },
            ]
            ,parameters: [
            { pathName: 'stories', parameterName: 'story' },
            { pathName: 'mainview', parameterName: 'mainview' }
            ]}" valueitem="story">
                                <app-span name='storyname' editorType="PICKER" :value="row.storyname"></app-span>
                              </app-column-link>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('name')">
                <el-table-column show-overflow-tooltip :prop="'name'" :label="$t('entities.subtask.subtasknew_grid.columns.name')" :min-width="200"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.subtask.subtasknew_grid.columns.name')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template v-if="actualIsOpenEdit">
                            <app-form-item :error="gridItemsModel[$index][column.property].error">
                                <input-box 
              
              :disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1" 
              v-model="row[column.property]" 
              style=""
              type="text"
              
              
              @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
            </input-box>
            
                            </app-form-item>
                        </template>
                        <template v-if="!actualIsOpenEdit">
            <app-span name='name' editorType="TEXTBOX" :value="row.name" dataType="TEXT" precision="0" ></app-span>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('type')">
                <el-table-column show-overflow-tooltip :prop="'type'" :label="$t('entities.subtask.subtasknew_grid.columns.type')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.subtask.subtasknew_grid.columns.type')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template v-if="actualIsOpenEdit">
                            <app-form-item :error="gridItemsModel[$index][column.property].error">
                                
             <dropdown-list 
              
              v-model="row[column.property]" 
              :disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1" 
              :data="row" 
              :context="context"
              :viewparams="viewparams" 
              :localContext ='{ }' 
              :localParam ='{ }' 
              tag='Task__type' 
              codelistType='STATIC'
              placeholder='请选择...' 
              style="" 
              @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
             </dropdown-list>
            
                            </app-form-item>
                        </template>
                        <template v-if="!actualIsOpenEdit">
            <codelist :value="row.type" tag='Task__type' codelistType='STATIC' ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('assignedto')">
                <el-table-column show-overflow-tooltip :prop="'assignedto'" :label="$t('entities.subtask.subtasknew_grid.columns.assignedto')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.subtask.subtasknew_grid.columns.assignedto')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template v-if="actualIsOpenEdit">
                            <app-form-item :error="gridItemsModel[$index][column.property].error">
                                
             <dropdown-list 
              
              v-model="row[column.property]" 
              :disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1" 
              :data="row" 
              :context="context"
              :viewparams="viewparams" 
              :localContext ='{ PROJECT:"%project%" }' 
              :localParam ='{ project:"%project%" }' 
              tag='UserRealNameProject' 
              codelistType='DYNAMIC'
              placeholder='请选择...' 
              style="" 
              @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
             </dropdown-list>
            
                            </app-form-item>
                        </template>
                        <template v-if="!actualIsOpenEdit">
            <codelist :value="row.assignedto" tag='UserRealNameProject' codelistType='DYNAMIC' renderMode="STR" valueSeparator="," textSeparator="," ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('estimate')">
                <el-table-column show-overflow-tooltip :prop="'estimate'" :label="$t('entities.subtask.subtasknew_grid.columns.estimate')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.subtask.subtasknew_grid.columns.estimate')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template v-if="actualIsOpenEdit">
                            <app-form-item :error="gridItemsModel[$index][column.property].error">
                                <input-box 
              
              :disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1" 
              v-model="row[column.property]" 
              style=""
              type="text"
              
              
              @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
            </input-box>
            
                            </app-form-item>
                        </template>
                        <template v-if="!actualIsOpenEdit">
            <app-span name='estimate' editorType="TEXTBOX" :value="row.estimate" dataType="FLOAT" precision="0" ></app-span>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('eststarted')">
                <el-table-column show-overflow-tooltip :prop="'eststarted'" :label="$t('entities.subtask.subtasknew_grid.columns.eststarted')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.subtask.subtasknew_grid.columns.eststarted')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template v-if="actualIsOpenEdit">
                            <app-form-item :error="gridItemsModel[$index][column.property].error">
                                <date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1" :value="row[column.property]" style="" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker>
            
                            </app-form-item>
                        </template>
                        <template v-if="!actualIsOpenEdit">
            <app-span name='eststarted' editorType="DATEPICKER" :value="row.eststarted" dataType="DATE" precision="0" ></app-span>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('deadline')">
                <el-table-column show-overflow-tooltip :prop="'deadline'" :label="$t('entities.subtask.subtasknew_grid.columns.deadline')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.subtask.subtasknew_grid.columns.deadline')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template v-if="actualIsOpenEdit">
                            <app-form-item :error="gridItemsModel[$index][column.property].error">
                                <date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1" :value="row[column.property]" style="" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker>
            
                            </app-form-item>
                        </template>
                        <template v-if="!actualIsOpenEdit">
            <app-span name='deadline' editorType="DATEPICKER" :value="row.deadline" dataType="DATE" precision="0" ></app-span>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('desc')">
                <el-table-column show-overflow-tooltip :prop="'desc'" :label="$t('entities.subtask.subtasknew_grid.columns.desc')" :width="100"  :align="'left'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.subtask.subtasknew_grid.columns.desc')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template v-if="actualIsOpenEdit">
                            <app-form-item :error="gridItemsModel[$index][column.property].error">
                                <div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type">
                <textarea class="ivu-input" :disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1" v-model="row[column.property]" style=""  @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></textarea>
            </div>
            
                            </app-form-item>
                        </template>
                        <template v-if="!actualIsOpenEdit">
            <app-span name='desc' editorType="TEXTAREA" :value="row.desc" dataType="LONGTEXT" precision="0" ></app-span>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('pri')">
                <el-table-column show-overflow-tooltip :prop="'pri'" :label="$t('entities.subtask.subtasknew_grid.columns.pri')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.subtask.subtasknew_grid.columns.pri')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template v-if="actualIsOpenEdit">
                            <app-form-item :error="gridItemsModel[$index][column.property].error">
                                
             <dropdown-list 
              
              v-model="row[column.property]" 
              :disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1" 
              :data="row" 
              :context="context"
              :viewparams="viewparams" 
              :localContext ='{ }' 
              :localParam ='{ }' 
              tag='Task__pri' 
              codelistType='STATIC'
              placeholder='请选择...' 
              style="" 
              @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
             </dropdown-list>
            
                            </app-form-item>
                        </template>
                        <template v-if="!actualIsOpenEdit">
            <codelist :value="row.pri" tag='Task__pri' codelistType='STATIC' ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="adaptiveState">
                <el-table-column></el-table-column>
            </template>
    </el-table>
  </i-form>
</div>