|
@@ -1,6 +1,6 @@
|
|
|
<!-- @desc:编辑表格 @auth:周兴 @time:2022/11/15 13:06 -->
|
|
<!-- @desc:编辑表格 @auth:周兴 @time:2022/11/15 13:06 -->
|
|
|
<template>
|
|
<template>
|
|
|
- <div :style="{height: 100 + '%',width:divWidth,paddingRight:'3px'}">
|
|
|
|
|
|
|
+ <div :style="{height: 100 + '%',width:divWidth,paddingRight:'3px'}" ref="edit-table-div" v-if="existsFlag">
|
|
|
<div v-if="title" class="table-title">{{ title }}</div>
|
|
<div v-if="title" class="table-title">{{ title }}</div>
|
|
|
<vxe-table
|
|
<vxe-table
|
|
|
border
|
|
border
|
|
@@ -68,31 +68,31 @@
|
|
|
:min-width="colItem.minWidth?colItem.minWidth:vm.$config.columnWidthMin"
|
|
:min-width="colItem.minWidth?colItem.minWidth:vm.$config.columnWidthMin"
|
|
|
:title="colItem.title?colItem.title:$t(colItem.field)" :params="{type:'tableSelect'}"
|
|
:title="colItem.title?colItem.title:$t(colItem.field)" :params="{type:'tableSelect'}"
|
|
|
:edit-render="{autofocus: '.vxe-input--inner'}">
|
|
:edit-render="{autofocus: '.vxe-input--inner'}">
|
|
|
- <template #header="{ row }">
|
|
|
|
|
- <span>{{ colItem.title ? colItem.title : $t(colItem.field) }}</span>
|
|
|
|
|
- <Poptip trigger="click" transfer @on-popper-hide="popperHide">
|
|
|
|
|
- <Icon type="iconfont iconfont icon-copy" style="cursor: pointer;" ref="down-input-icon"
|
|
|
|
|
- v-if="colItem.copyVisible"/>
|
|
|
|
|
- <div slot="content">
|
|
|
|
|
- <div style="display: flex;align-items: center;justify-content: center;">
|
|
|
|
|
- <TableSelect :field="colItem.field" :dataType="colItem.dataType"
|
|
|
|
|
- :sortBoolean="colItem.sortBoolean"
|
|
|
|
|
- :multiple="colItem.multiple"
|
|
|
|
|
- :showType="colItem.showType"
|
|
|
|
|
- :promotionType="colItem.promotionType"
|
|
|
|
|
- @onBatchChoose="onBatchChooseCopy($event,colItem,'batch')"
|
|
|
|
|
- @onChoose="onBatchChooseCopy($event,colItem)"
|
|
|
|
|
- :search-param="typeof colItem.param === 'function'? colItem.param():colItem.param"></TableSelect>
|
|
|
|
|
- <Button type="primary" size="small" @click="inputDown(colItem)">{{ $t('filling') }}</Button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </Poptip>
|
|
|
|
|
- <!--冻结/解冻列-->
|
|
|
|
|
- <Icon ref="freeze" :class="colItem.freezeFlag?'freezed-class':'freeze-class' "
|
|
|
|
|
- v-if="freezeData && colItem.freezeFlag"
|
|
|
|
|
- type="ios-lock"
|
|
|
|
|
- @click="handleFreeze(colItem.field)"/>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <!-- <template #header="{ row }">-->
|
|
|
|
|
+ <!-- <span>{{ colItem.title ? colItem.title : $t(colItem.field) }}</span>-->
|
|
|
|
|
+ <!-- <Poptip trigger="click" transfer @on-popper-hide="popperHide">-->
|
|
|
|
|
+ <!-- <Icon type="iconfont iconfont icon-copy" style="cursor: pointer;" ref="down-input-icon"-->
|
|
|
|
|
+ <!-- v-if="colItem.copyVisible"/>-->
|
|
|
|
|
+ <!-- <div slot="content">-->
|
|
|
|
|
+ <!-- <div style="display: flex;align-items: center;justify-content: center;">-->
|
|
|
|
|
+ <!-- <TableSelect :field="colItem.field" :dataType="colItem.dataType"-->
|
|
|
|
|
+ <!-- :sortBoolean="colItem.sortBoolean"-->
|
|
|
|
|
+ <!-- :multiple="colItem.multiple"-->
|
|
|
|
|
+ <!-- :showType="colItem.showType"-->
|
|
|
|
|
+ <!-- :promotionType="colItem.promotionType"-->
|
|
|
|
|
+ <!-- @onBatchChoose="onBatchChooseCopy($event,colItem,'batch')"-->
|
|
|
|
|
+ <!-- @onChoose="onBatchChooseCopy($event,colItem)"-->
|
|
|
|
|
+ <!-- :search-param="typeof colItem.param === 'function'? colItem.param():colItem.param"></TableSelect>-->
|
|
|
|
|
+ <!-- <Button type="primary" size="small" @click="inputDown(colItem)">{{ $t('filling') }}</Button>-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <!-- </Poptip>-->
|
|
|
|
|
+ <!-- <!–冻结/解冻列–>-->
|
|
|
|
|
+ <!-- <Icon ref="freeze" :class="colItem.freezeFlag?'freezed-class':'freeze-class' "-->
|
|
|
|
|
+ <!-- v-if="freezeData && colItem.freezeFlag"-->
|
|
|
|
|
+ <!-- type="ios-lock"-->
|
|
|
|
|
+ <!-- @click="handleFreeze(colItem.field)"/>-->
|
|
|
|
|
+ <!-- </template>-->
|
|
|
<template style="width:100%;" #edit="{ row,column,rowIndex }">
|
|
<template style="width:100%;" #edit="{ row,column,rowIndex }">
|
|
|
<TableSelect :text="row[colItem.field]" :field="colItem.field" :dataType="colItem.dataType"
|
|
<TableSelect :text="row[colItem.field]" :field="colItem.field" :dataType="colItem.dataType"
|
|
|
v-if="setCellCanTableSelect(row,colItem) "
|
|
v-if="setCellCanTableSelect(row,colItem) "
|
|
@@ -122,14 +122,14 @@
|
|
|
:formatter="formatColumn" :params="colItem"
|
|
:formatter="formatColumn" :params="colItem"
|
|
|
:title="colItem.title?colItem.title:$t(colItem.field)">
|
|
:title="colItem.title?colItem.title:$t(colItem.field)">
|
|
|
<!--标题-->
|
|
<!--标题-->
|
|
|
- <template #header="{ row,column,columnIndex }">
|
|
|
|
|
- <span>{{ colItem.title ? colItem.title : $t(colItem.field) }}</span>
|
|
|
|
|
- <!--冻结/解冻列-->
|
|
|
|
|
- <Icon ref="freeze" :class="colItem.freezeFlag?'freezed-class':'freeze-class' "
|
|
|
|
|
- v-if="freezeData && colItem.freezeFlag"
|
|
|
|
|
- type="ios-lock"
|
|
|
|
|
- @click="handleFreeze(colItem.field)"/>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <!-- <template #header="{ row,column,columnIndex }">-->
|
|
|
|
|
+ <!-- <span>{{ colItem.title ? colItem.title : $t(colItem.field) }}</span>-->
|
|
|
|
|
+ <!-- <!–冻结/解冻列–>-->
|
|
|
|
|
+ <!-- <Icon ref="freeze" :class="colItem.freezeFlag?'freezed-class':'freeze-class' "-->
|
|
|
|
|
+ <!-- v-if="freezeData && colItem.freezeFlag"-->
|
|
|
|
|
+ <!-- type="ios-lock"-->
|
|
|
|
|
+ <!-- @click="handleFreeze(colItem.field)"/>-->
|
|
|
|
|
+ <!-- </template>-->
|
|
|
<template #default="{ row,rowIndex,column }">
|
|
<template #default="{ row,rowIndex,column }">
|
|
|
<div class="edit-div-class" @dblclick.stop="copyValue(row,colItem,rowIndex)">{{
|
|
<div class="edit-div-class" @dblclick.stop="copyValue(row,colItem,rowIndex)">{{
|
|
|
formatColumn({
|
|
formatColumn({
|
|
@@ -148,14 +148,14 @@
|
|
|
:min-width="colItem.width?colItem.width:vm.$config.columnWidthMin" :params="colItem"
|
|
:min-width="colItem.width?colItem.width:vm.$config.columnWidthMin" :params="colItem"
|
|
|
:title="colItem.title?colItem.title:$t(colItem.field)">
|
|
:title="colItem.title?colItem.title:$t(colItem.field)">
|
|
|
<!--标题-->
|
|
<!--标题-->
|
|
|
- <template #header="{ row,column,columnIndex }">
|
|
|
|
|
- <span>{{ colItem.title ? colItem.title : $t(colItem.field) }}</span>
|
|
|
|
|
- <!--冻结/解冻列-->
|
|
|
|
|
- <Icon ref="freeze" :class="colItem.freezeFlag?'freezed-class':'freeze-class' "
|
|
|
|
|
- v-if="freezeData && colItem.freezeFlag"
|
|
|
|
|
- type="ios-lock"
|
|
|
|
|
- @click="handleFreeze(colItem.field)"/>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <!-- <template #header="{ row,column,columnIndex }">-->
|
|
|
|
|
+ <!-- <span>{{ colItem.title ? colItem.title : $t(colItem.field) }}</span>-->
|
|
|
|
|
+ <!-- <!–冻结/解冻列–>-->
|
|
|
|
|
+ <!-- <Icon ref="freeze" :class="colItem.freezeFlag?'freezed-class':'freeze-class' "-->
|
|
|
|
|
+ <!-- v-if="freezeData && colItem.freezeFlag"-->
|
|
|
|
|
+ <!-- type="ios-lock"-->
|
|
|
|
|
+ <!-- @click="handleFreeze(colItem.field)"/>-->
|
|
|
|
|
+ <!-- </template>-->
|
|
|
<template #default="{ row,rowIndex }">
|
|
<template #default="{ row,rowIndex }">
|
|
|
<i-switch size="small" :ref="colItem.field+'_default_'+rowIndex" v-model="row[colItem.field]"
|
|
<i-switch size="small" :ref="colItem.field+'_default_'+rowIndex" v-model="row[colItem.field]"
|
|
|
:disabled="true"/>
|
|
:disabled="true"/>
|
|
@@ -169,26 +169,26 @@
|
|
|
:width="colItem.width?colItem.width:vm.$config.columnWidth"
|
|
:width="colItem.width?colItem.width:vm.$config.columnWidth"
|
|
|
:min-width="colItem.minWidth?colItem.minWidth:vm.$config.columnWidthMin"
|
|
:min-width="colItem.minWidth?colItem.minWidth:vm.$config.columnWidthMin"
|
|
|
:edit-render="{autofocus: '.vxe-input--inner'}">
|
|
:edit-render="{autofocus: '.vxe-input--inner'}">
|
|
|
- <template #header="{ row }">
|
|
|
|
|
- <span>{{ colItem.title ? colItem.title : $t(colItem.field) }}</span>
|
|
|
|
|
- <Poptip trigger="click" transfer @on-popper-hide="popperHide">
|
|
|
|
|
- <Icon type="iconfont iconfont icon-copy" style="cursor: pointer;" ref="down-input-icon"
|
|
|
|
|
- v-if="colItem.copyVisible"/>
|
|
|
|
|
- <div slot="content">
|
|
|
|
|
- <div style="display: flex;align-items: center;justify-content: center;">
|
|
|
|
|
- <Input size="small" v-model="inputDownValue"
|
|
|
|
|
- :maxlength="colItem.maxlength?colItem.maxlength:vm.$config.maxlength"
|
|
|
|
|
- @keydown.13.native.stop="inputDown(colItem)" :name="colItem.field"></Input>
|
|
|
|
|
- <Button type="primary" size="small" @click="inputDown(colItem)">{{ $t('filling') }}</Button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </Poptip>
|
|
|
|
|
- <!--冻结/解冻列-->
|
|
|
|
|
- <Icon ref="freeze" :class="colItem.freezeFlag?'freezed-class':'freeze-class' "
|
|
|
|
|
- v-if="freezeData && colItem.freezeFlag"
|
|
|
|
|
- type="ios-lock"
|
|
|
|
|
- @click="handleFreeze(colItem.field)"/>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <!-- <template #header="{ row }">-->
|
|
|
|
|
+ <!-- <span>{{ colItem.title ? colItem.title : $t(colItem.field) }}</span>-->
|
|
|
|
|
+ <!-- <Poptip trigger="click" transfer @on-popper-hide="popperHide">-->
|
|
|
|
|
+ <!-- <Icon type="iconfont iconfont icon-copy" style="cursor: pointer;" ref="down-input-icon"-->
|
|
|
|
|
+ <!-- v-if="colItem.copyVisible"/>-->
|
|
|
|
|
+ <!-- <div slot="content">-->
|
|
|
|
|
+ <!-- <div style="display: flex;align-items: center;justify-content: center;">-->
|
|
|
|
|
+ <!-- <Input size="small" v-model="inputDownValue"-->
|
|
|
|
|
+ <!-- :maxlength="colItem.maxlength?colItem.maxlength:vm.$config.maxlength"-->
|
|
|
|
|
+ <!-- @keydown.13.native.stop="inputDown(colItem)" :name="colItem.field"></Input>-->
|
|
|
|
|
+ <!-- <Button type="primary" size="small" @click="inputDown(colItem)">{{ $t('filling') }}</Button>-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <!-- </Poptip>-->
|
|
|
|
|
+ <!-- <!–冻结/解冻列–>-->
|
|
|
|
|
+ <!-- <Icon ref="freeze" :class="colItem.freezeFlag?'freezed-class':'freeze-class' "-->
|
|
|
|
|
+ <!-- v-if="freezeData && colItem.freezeFlag"-->
|
|
|
|
|
+ <!-- type="ios-lock"-->
|
|
|
|
|
+ <!-- @click="handleFreeze(colItem.field)"/>-->
|
|
|
|
|
+ <!-- </template>-->
|
|
|
<template #edit="{ row,rowIndex }">
|
|
<template #edit="{ row,rowIndex }">
|
|
|
<vxe-input v-model="row[colItem.field]" type="text" v-if="setCellCanInput( row ,colItem)"
|
|
<vxe-input v-model="row[colItem.field]" type="text" v-if="setCellCanInput( row ,colItem)"
|
|
|
:maxlength="colItem.maxlength?colItem.maxlength:vm.$config.maxlength"
|
|
:maxlength="colItem.maxlength?colItem.maxlength:vm.$config.maxlength"
|
|
@@ -212,29 +212,29 @@
|
|
|
:min-width="colItem.minWidth?colItem.minWidth:vm.$config.columnWidthMin"
|
|
:min-width="colItem.minWidth?colItem.minWidth:vm.$config.columnWidthMin"
|
|
|
:edit-render="{autofocus: '.vxe-input--inner', autoselect: true}" :formatter="formatColumn"
|
|
:edit-render="{autofocus: '.vxe-input--inner', autoselect: true}" :formatter="formatColumn"
|
|
|
:params="colItem">
|
|
:params="colItem">
|
|
|
- <template #header="{ row }">
|
|
|
|
|
- <span>{{ colItem.title ? colItem.title : $t(colItem.field) }}</span>
|
|
|
|
|
- <Poptip trigger="click" transfer @on-popper-show="popperShow(colIndex,'inputNumber')"
|
|
|
|
|
- @on-popper-hide="popperHide">
|
|
|
|
|
- <Icon type="iconfont iconfont icon-copy" style="cursor: pointer;" ref="down-input-icon"
|
|
|
|
|
- v-if="colItem.copyVisible"/>
|
|
|
|
|
- <div slot="content">
|
|
|
|
|
- <!--点回车相当于点按钮填充-->
|
|
|
|
|
- <div style="display: flex;align-items: center;justify-content: center;">
|
|
|
|
|
- <InputNumberPop size="small" :digits="colItem.digits" v-model="inputDownValue"
|
|
|
|
|
- :ref="'pop_' + colIndex"
|
|
|
|
|
- @keydown.13.native.stop="inputDown(colItem)" :pop-visible="false"
|
|
|
|
|
- :name="colItem.field"></InputNumberPop>
|
|
|
|
|
- <Button type="primary" size="small" @click="inputDown(colItem)">{{ $t('filling') }}</Button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </Poptip>
|
|
|
|
|
- <!--冻结/解冻列-->
|
|
|
|
|
- <Icon ref="freeze" :class="colItem.freezeFlag?'freezed-class':'freeze-class' "
|
|
|
|
|
- v-if="freezeData && colItem.freezeFlag"
|
|
|
|
|
- type="ios-lock"
|
|
|
|
|
- @click="handleFreeze(colItem.field)"/>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <!-- <template #header="{ row }">-->
|
|
|
|
|
+ <!-- <span>{{ colItem.title ? colItem.title : $t(colItem.field) }}</span>-->
|
|
|
|
|
+ <!-- <Poptip trigger="click" transfer @on-popper-show="popperShow(colIndex,'inputNumber')"-->
|
|
|
|
|
+ <!-- @on-popper-hide="popperHide">-->
|
|
|
|
|
+ <!-- <Icon type="iconfont iconfont icon-copy" style="cursor: pointer;" ref="down-input-icon"-->
|
|
|
|
|
+ <!-- v-if="colItem.copyVisible"/>-->
|
|
|
|
|
+ <!-- <div slot="content">-->
|
|
|
|
|
+ <!-- <!–点回车相当于点按钮填充–>-->
|
|
|
|
|
+ <!-- <div style="display: flex;align-items: center;justify-content: center;">-->
|
|
|
|
|
+ <!-- <InputNumberPop size="small" :digits="colItem.digits" v-model="inputDownValue"-->
|
|
|
|
|
+ <!-- :ref="'pop_' + colIndex"-->
|
|
|
|
|
+ <!-- @keydown.13.native.stop="inputDown(colItem)" :pop-visible="false"-->
|
|
|
|
|
+ <!-- :name="colItem.field"></InputNumberPop>-->
|
|
|
|
|
+ <!-- <Button type="primary" size="small" @click="inputDown(colItem)">{{ $t('filling') }}</Button>-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <!-- </Poptip>-->
|
|
|
|
|
+ <!-- <!–冻结/解冻列–>-->
|
|
|
|
|
+ <!-- <Icon ref="freeze" :class="colItem.freezeFlag?'freezed-class':'freeze-class' "-->
|
|
|
|
|
+ <!-- v-if="freezeData && colItem.freezeFlag"-->
|
|
|
|
|
+ <!-- type="ios-lock"-->
|
|
|
|
|
+ <!-- @click="handleFreeze(colItem.field)"/>-->
|
|
|
|
|
+ <!-- </template>-->
|
|
|
<template #edit="{ row ,rowIndex}">
|
|
<template #edit="{ row ,rowIndex}">
|
|
|
<vxe-input v-model="row[colItem.field]" type="number"
|
|
<vxe-input v-model="row[colItem.field]" type="number"
|
|
|
:ref="colItem.field+rowIndex"
|
|
:ref="colItem.field+rowIndex"
|
|
@@ -259,34 +259,34 @@
|
|
|
:width="colItem.width?colItem.width:vm.$config.columnWidth"
|
|
:width="colItem.width?colItem.width:vm.$config.columnWidth"
|
|
|
:min-width="colItem.minWidth?colItem.minWidth:vm.$config.columnWidthMin"
|
|
:min-width="colItem.minWidth?colItem.minWidth:vm.$config.columnWidthMin"
|
|
|
:edit-render="{autofocus: '.vxe-input--inner'}">
|
|
:edit-render="{autofocus: '.vxe-input--inner'}">
|
|
|
- <template #header="{ row }">
|
|
|
|
|
- <span>{{ $t(colItem.title ? colItem.title : colItem.field) }}</span>
|
|
|
|
|
- <Poptip trigger="click" transfer @on-popper-hide="popperHide">
|
|
|
|
|
- <Icon type="iconfont iconfont icon-copy" style="cursor: pointer;" ref="down-input-icon"
|
|
|
|
|
- v-if="colItem.copyVisible"/>
|
|
|
|
|
- <div slot="content">
|
|
|
|
|
- <div style="display: flex;align-items: center;justify-content: center;">
|
|
|
|
|
- <!-- {{ colItem.options() }}-->
|
|
|
|
|
- <Select size="small" v-model="inputDownValue" style="width:200px" :multiple="colItem.multiple"
|
|
|
|
|
- clearable>
|
|
|
|
|
- <Option v-for="item in (typeof colItem.options === 'function'?colItem.options():colItem.options)"
|
|
|
|
|
- :key="item[colItem.valueKey]"
|
|
|
|
|
- :value="item[colItem.valueKey]"
|
|
|
|
|
- :label="item[colItem.labelKey]">
|
|
|
|
|
- {{ item[colItem.labelKey] }}
|
|
|
|
|
- </Option>
|
|
|
|
|
- </Select>
|
|
|
|
|
|
|
+ <!-- <template #header="{ row }">-->
|
|
|
|
|
+ <!-- <span>{{ $t(colItem.title ? colItem.title : colItem.field) }}</span>-->
|
|
|
|
|
+ <!-- <Poptip trigger="click" transfer @on-popper-hide="popperHide">-->
|
|
|
|
|
+ <!-- <Icon type="iconfont iconfont icon-copy" style="cursor: pointer;" ref="down-input-icon"-->
|
|
|
|
|
+ <!-- v-if="colItem.copyVisible"/>-->
|
|
|
|
|
+ <!-- <div slot="content">-->
|
|
|
|
|
+ <!-- <div style="display: flex;align-items: center;justify-content: center;">-->
|
|
|
|
|
+ <!-- <!– {{ colItem.options() }}–>-->
|
|
|
|
|
+ <!-- <Select size="small" v-model="inputDownValue" style="width:200px" :multiple="colItem.multiple"-->
|
|
|
|
|
+ <!-- clearable>-->
|
|
|
|
|
+ <!-- <Option v-for="item in (typeof colItem.options === 'function'?colItem.options():colItem.options)"-->
|
|
|
|
|
+ <!-- :key="item[colItem.valueKey]"-->
|
|
|
|
|
+ <!-- :value="item[colItem.valueKey]"-->
|
|
|
|
|
+ <!-- :label="item[colItem.labelKey]">-->
|
|
|
|
|
+ <!-- {{ item[colItem.labelKey] }}-->
|
|
|
|
|
+ <!-- </Option>-->
|
|
|
|
|
+ <!-- </Select>-->
|
|
|
|
|
|
|
|
- <Button type="primary" size="small" @click="inputDown(colItem)">{{ $t('filling') }}</Button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </Poptip>
|
|
|
|
|
- <!--冻结/解冻列-->
|
|
|
|
|
- <Icon ref="freeze" :class="colItem.freezeFlag?'freezed-class':'freeze-class' "
|
|
|
|
|
- v-if="freezeData && colItem.freezeFlag"
|
|
|
|
|
- type="ios-lock"
|
|
|
|
|
- @click="handleFreeze(colItem.field)"/>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <!-- <Button type="primary" size="small" @click="inputDown(colItem)">{{ $t('filling') }}</Button>-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <!-- </Poptip>-->
|
|
|
|
|
+ <!-- <!–冻结/解冻列–>-->
|
|
|
|
|
+ <!-- <Icon ref="freeze" :class="colItem.freezeFlag?'freezed-class':'freeze-class' "-->
|
|
|
|
|
+ <!-- v-if="freezeData && colItem.freezeFlag"-->
|
|
|
|
|
+ <!-- type="ios-lock"-->
|
|
|
|
|
+ <!-- @click="handleFreeze(colItem.field)"/>-->
|
|
|
|
|
+ <!-- </template>-->
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<div class="edit-div-class" @dblclick.stop="copyValue(row,colItem)">{{
|
|
<div class="edit-div-class" @dblclick.stop="copyValue(row,colItem)">{{
|
|
|
row[colItem.field + '_Name']
|
|
row[colItem.field + '_Name']
|
|
@@ -330,7 +330,6 @@
|
|
|
{{ row[colItem.field + '_Name'] }}
|
|
{{ row[colItem.field + '_Name'] }}
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
-
|
|
|
|
|
</vxe-column>
|
|
</vxe-column>
|
|
|
|
|
|
|
|
<!-- date -->
|
|
<!-- date -->
|
|
@@ -340,24 +339,24 @@
|
|
|
:width="colItem.width?colItem.width:vm.$config.columnWidth"
|
|
:width="colItem.width?colItem.width:vm.$config.columnWidth"
|
|
|
:min-width="colItem.minWidth?colItem.minWidth:vm.$config.columnWidthMin"
|
|
:min-width="colItem.minWidth?colItem.minWidth:vm.$config.columnWidthMin"
|
|
|
:title="$t(colItem.field)" :edit-render="{autofocus: '.vxe-input--inner'}">
|
|
:title="$t(colItem.field)" :edit-render="{autofocus: '.vxe-input--inner'}">
|
|
|
- <template #header="{ row }">
|
|
|
|
|
- <span>{{ $t(colItem.title ? colItem.title : colItem.field) }}</span>
|
|
|
|
|
- <Poptip trigger="click" transfer @on-popper-hide="popperHide">
|
|
|
|
|
- <Icon type="iconfont iconfont icon-copy" style="cursor: pointer;" ref="down-input-icon"
|
|
|
|
|
- v-if="colItem.copyVisible"/>
|
|
|
|
|
- <div slot="content">
|
|
|
|
|
- <div style="display: flex;align-items: center;justify-content: center;">
|
|
|
|
|
- <DatePicker transfer v-model="inputDownValue" type="date"></DatePicker>
|
|
|
|
|
- <Button type="primary" size="small" @click="inputDown(colItem)">{{ $t('filling') }}</Button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </Poptip>
|
|
|
|
|
- <!--冻结/解冻列-->
|
|
|
|
|
- <Icon ref="freeze" :class="colItem.freezeFlag?'freezed-class':'freeze-class' "
|
|
|
|
|
- v-if="freezeData && colItem.freezeFlag"
|
|
|
|
|
- type="ios-lock"
|
|
|
|
|
- @click="handleFreeze(colItem.field)"/>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <!-- <template #header="{ row }">-->
|
|
|
|
|
+ <!-- <span>{{ $t(colItem.title ? colItem.title : colItem.field) }}</span>-->
|
|
|
|
|
+ <!-- <Poptip trigger="click" transfer @on-popper-hide="popperHide">-->
|
|
|
|
|
+ <!-- <Icon type="iconfont iconfont icon-copy" style="cursor: pointer;" ref="down-input-icon"-->
|
|
|
|
|
+ <!-- v-if="colItem.copyVisible"/>-->
|
|
|
|
|
+ <!-- <div slot="content">-->
|
|
|
|
|
+ <!-- <div style="display: flex;align-items: center;justify-content: center;">-->
|
|
|
|
|
+ <!-- <DatePicker transfer v-model="inputDownValue" type="date"></DatePicker>-->
|
|
|
|
|
+ <!-- <Button type="primary" size="small" @click="inputDown(colItem)">{{ $t('filling') }}</Button>-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <!-- </Poptip>-->
|
|
|
|
|
+ <!-- <!–冻结/解冻列–>-->
|
|
|
|
|
+ <!-- <Icon ref="freeze" :class="colItem.freezeFlag?'freezed-class':'freeze-class' "-->
|
|
|
|
|
+ <!-- v-if="freezeData && colItem.freezeFlag"-->
|
|
|
|
|
+ <!-- type="ios-lock"-->
|
|
|
|
|
+ <!-- @click="handleFreeze(colItem.field)"/>-->
|
|
|
|
|
+ <!-- </template>-->
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<span @dblclick.stop="copyValue(row,colItem)">{{ dateFormat(row[colItem.field]) }}</span>
|
|
<span @dblclick.stop="copyValue(row,colItem)">{{ dateFormat(row[colItem.field]) }}</span>
|
|
|
</template>
|
|
</template>
|
|
@@ -375,26 +374,26 @@
|
|
|
:width="colItem.width?colItem.width:vm.$config.columnWidth"
|
|
:width="colItem.width?colItem.width:vm.$config.columnWidth"
|
|
|
:min-width="colItem.minWidth?colItem.minWidth:vm.$config.columnWidthMin"
|
|
:min-width="colItem.minWidth?colItem.minWidth:vm.$config.columnWidthMin"
|
|
|
:field="$t(colItem.field)" :edit-render="{autofocus: '.vxe-input--inner'}">
|
|
:field="$t(colItem.field)" :edit-render="{autofocus: '.vxe-input--inner'}">
|
|
|
- <template #header="{ row }">
|
|
|
|
|
- <span>{{ $t(colItem.title ? colItem.title : colItem.field) }}</span>
|
|
|
|
|
- <Poptip trigger="click" transfer @on-popper-hide="popperHide">
|
|
|
|
|
- <Icon type="iconfont iconfont icon-copy" style="cursor: pointer;" ref="down-input-icon"
|
|
|
|
|
- v-if="colItem.copyVisible"/>
|
|
|
|
|
- <div slot="content">
|
|
|
|
|
- <div style="display: flex;align-items: center;justify-content: center;">
|
|
|
|
|
- <i-switch v-model="inputDownBooleanValue"/>
|
|
|
|
|
- <Button type="primary" style="margin-left:10px" size="small" @click="inputDown(colItem)">
|
|
|
|
|
- {{ $t('filling') }}
|
|
|
|
|
- </Button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </Poptip>
|
|
|
|
|
- <!--冻结/解冻列-->
|
|
|
|
|
- <Icon ref="freeze" :class="colItem.freezeFlag?'freezed-class':'freeze-class' "
|
|
|
|
|
- v-if="freezeData && colItem.freezeFlag"
|
|
|
|
|
- type="ios-lock"
|
|
|
|
|
- @click="handleFreeze(colItem.field)"/>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <!-- <template #header="{ row }">-->
|
|
|
|
|
+ <!-- <span>{{ $t(colItem.title ? colItem.title : colItem.field) }}</span>-->
|
|
|
|
|
+ <!-- <Poptip trigger="click" transfer @on-popper-hide="popperHide">-->
|
|
|
|
|
+ <!-- <Icon type="iconfont iconfont icon-copy" style="cursor: pointer;" ref="down-input-icon"-->
|
|
|
|
|
+ <!-- v-if="colItem.copyVisible"/>-->
|
|
|
|
|
+ <!-- <div slot="content">-->
|
|
|
|
|
+ <!-- <div style="display: flex;align-items: center;justify-content: center;">-->
|
|
|
|
|
+ <!-- <i-switch v-model="inputDownBooleanValue"/>-->
|
|
|
|
|
+ <!-- <Button type="primary" style="margin-left:10px" size="small" @click="inputDown(colItem)">-->
|
|
|
|
|
+ <!-- {{ $t('filling') }}-->
|
|
|
|
|
+ <!-- </Button>-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <!-- </Poptip>-->
|
|
|
|
|
+ <!-- <!–冻结/解冻列–>-->
|
|
|
|
|
+ <!-- <Icon ref="freeze" :class="colItem.freezeFlag?'freezed-class':'freeze-class' "-->
|
|
|
|
|
+ <!-- v-if="freezeData && colItem.freezeFlag"-->
|
|
|
|
|
+ <!-- type="ios-lock"-->
|
|
|
|
|
+ <!-- @click="handleFreeze(colItem.field)"/>-->
|
|
|
|
|
+ <!-- </template>-->
|
|
|
<template #default="{ row,rowIndex }">
|
|
<template #default="{ row,rowIndex }">
|
|
|
<!-- <span>{{ row[colItem.field] ? '是' : '否' }}</span>-->
|
|
<!-- <span>{{ row[colItem.field] ? '是' : '否' }}</span>-->
|
|
|
<vxe-switch :ref="colItem.field+'_default_'+rowIndex" v-model="row[colItem.field]"
|
|
<vxe-switch :ref="colItem.field+'_default_'+rowIndex" v-model="row[colItem.field]"
|
|
@@ -450,10 +449,11 @@
|
|
|
import XEUtils from "xe-utils";
|
|
import XEUtils from "xe-utils";
|
|
|
import SeqButton from '@/components/sub/seq-button/index'
|
|
import SeqButton from '@/components/sub/seq-button/index'
|
|
|
import Sortable from "sortablejs";
|
|
import Sortable from "sortablejs";
|
|
|
|
|
+import TableSelect from '@/components/business/table-select'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'EditTable',
|
|
name: 'EditTable',
|
|
|
- components: {SeqButton},
|
|
|
|
|
|
|
+ components: {SeqButton, TableSelect},
|
|
|
props: {
|
|
props: {
|
|
|
value: {
|
|
value: {
|
|
|
type: Array,
|
|
type: Array,
|
|
@@ -614,6 +614,7 @@ export default {
|
|
|
vm: vm,
|
|
vm: vm,
|
|
|
rowIndex: -1,
|
|
rowIndex: -1,
|
|
|
colIndex: -1,
|
|
colIndex: -1,
|
|
|
|
|
+ existsFlag: true, // 存在标识,用于销毁内部组件
|
|
|
visibleRows: [],// 可见的行,用于控制
|
|
visibleRows: [],// 可见的行,用于控制
|
|
|
header: {
|
|
header: {
|
|
|
options: [
|
|
options: [
|
|
@@ -2657,12 +2658,7 @@ export default {
|
|
|
}, 300)
|
|
}, 300)
|
|
|
self.rowDrop(); //行移动
|
|
self.rowDrop(); //行移动
|
|
|
//监听窗口变化
|
|
//监听窗口变化
|
|
|
- window.addEventListener('resize', function (e) {
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- self.settingLeft = self.$refs[self.name] ? (self.$refs[self.name].$el.offsetWidth + self.$refs[self.name].$el.offsetLeft - 26) + 'px' : 0// 设置图标居左的位置
|
|
|
|
|
- self.settingTop = self.$refs[self.name] ? (self.$refs[self.name].$el.offsetTop + 1) + 'px' : 0; // 设置图标居上的位置
|
|
|
|
|
- }, 300)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ window.addEventListener('resize', self.changeSettingLocation)
|
|
|
self.handleSelectData()
|
|
self.handleSelectData()
|
|
|
self.changeSettingLocation();
|
|
self.changeSettingLocation();
|
|
|
},
|
|
},
|
|
@@ -2670,6 +2666,9 @@ export default {
|
|
|
if (this.sortable) {
|
|
if (this.sortable) {
|
|
|
this.sortable.destroy();
|
|
this.sortable.destroy();
|
|
|
}
|
|
}
|
|
|
|
|
+ this.sortable = null;
|
|
|
|
|
+ window.removeEventListener('resize', this.changeSettingLocation)
|
|
|
|
|
+ this.existsFlag = null
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
// 初始化列
|
|
// 初始化列
|