mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2025-12-08 17:12:28 +08:00
JeecgBoot低代码平台 2.4.5 版本发布,钉钉与企业微信集成版本
This commit is contained in:
@ -350,7 +350,7 @@
|
||||
<a-tooltip v-bind="buildTooltipProps(row, col, id)">
|
||||
<a-upload
|
||||
name="file"
|
||||
:data="{'isup':1}"
|
||||
:data="{'isup':1, ...(col.data||{})}"
|
||||
:multiple="false"
|
||||
:action="col.action"
|
||||
:headers="uploadGetHeaders(row,col)"
|
||||
@ -381,6 +381,8 @@
|
||||
:dest-fields="col.destFields"
|
||||
:code="col.popupCode"
|
||||
:groupId="caseId"
|
||||
:param="col.param"
|
||||
:sorter="col.sorter"
|
||||
@input="(value,others)=>popupCallback(value,others,id,row,col,rowIndex)"
|
||||
/>
|
||||
<span
|
||||
@ -595,6 +597,33 @@
|
||||
</template>
|
||||
<!-- select搜索 -end -->
|
||||
|
||||
<!-- select异步搜索 -begin -->
|
||||
<template v-else-if="col.type === formTypes.sel_search_async">
|
||||
<a-tooltip v-bind="buildTooltipProps(row, col, id)">
|
||||
<j-search-select-tag
|
||||
v-if="isEditRow(row, col)"
|
||||
:id="id"
|
||||
:key="i"
|
||||
:value="searchSelectAsyncValues[id]"
|
||||
:placeholder="replaceProps(col, col.placeholder)"
|
||||
:dict="col.dict"
|
||||
:async="true"
|
||||
:getPopupContainer="getParentContainer"
|
||||
v-bind="buildProps(row,col)"
|
||||
style="width: 100%;"
|
||||
@change="(v)=>handleSearchSelectAsyncChange(v,id,row,col)"
|
||||
>
|
||||
</j-search-select-tag>
|
||||
<span
|
||||
v-else
|
||||
class="j-td-span no-edit"
|
||||
:class="{disabled: buildProps(row,col).disabled}"
|
||||
@click="handleEditRow(row, col)"
|
||||
>{{ searchSelectAsyncValues[id] }}</span>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<!-- select异步搜索 -end -->
|
||||
|
||||
<div v-else-if="col.type === formTypes.slot" :key="i">
|
||||
<a-tooltip v-bind="buildTooltipProps(row, col, id)">
|
||||
<slot
|
||||
@ -615,7 +644,7 @@
|
||||
</div>
|
||||
|
||||
<!-- else (normal) -->
|
||||
<span v-else :key="i" v-bind="buildProps(row,col)">{{ inputValues[rowIndex][col.key] }}</span>
|
||||
<span class="comp-normal" v-else :key="i" :title="inputValues[rowIndex][col.key]" v-bind="buildProps(row,col)">{{ inputValues[rowIndex][col.key] }}</span>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
@ -672,13 +701,13 @@
|
||||
import Draggable from 'vuedraggable'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { FormTypes, VALIDATE_NO_PASSED } from '@/utils/JEditableTableUtil'
|
||||
import { cloneObject, randomString, randomNumber, getEventPath } from '@/utils/util'
|
||||
import { cloneObject, getEventPath, randomNumber, randomString } from '@/utils/util'
|
||||
import JDate from '@/components/jeecg/JDate'
|
||||
import { filterDictText, initDictOptions } from '@/components/dict/JDictSelectUtil'
|
||||
import { getFileAccessHttpUrl } from '@/api/manage';
|
||||
import { getFileAccessHttpUrl } from '@/api/manage'
|
||||
import JInputPop from '@/components/jeecg/minipop/JInputPop'
|
||||
import JFilePop from '@/components/jeecg/minipop/JFilePop'
|
||||
import { getNoAuthCols } from "@/utils/authFilter"
|
||||
import { getNoAuthCols } from '@/utils/authFilter'
|
||||
|
||||
// 行高,需要在实例加载完成前用到
|
||||
let rowHeight = 61
|
||||
@ -814,6 +843,7 @@
|
||||
metaCheckboxValues: {},
|
||||
multiSelectValues: {},
|
||||
searchSelectValues: {},
|
||||
searchSelectAsyncValues: {},
|
||||
// 绑定左侧选择框已选择的id
|
||||
selectedRowIds: [],
|
||||
// 存储被删除行的id
|
||||
@ -1048,6 +1078,10 @@
|
||||
this.inputValues = []
|
||||
this.rows = []
|
||||
this.deleteIds = []
|
||||
this.selectedRowIds = []
|
||||
this.tooltips = {}
|
||||
this.notPassedIds = []
|
||||
// 重置values
|
||||
this.selectValues = {}
|
||||
this.checkboxValues = {}
|
||||
this.jdateValues = {}
|
||||
@ -1055,14 +1089,16 @@
|
||||
this.departCompValues = {}
|
||||
this.userCompValues = {}
|
||||
this.slotValues = {}
|
||||
this.selectedRowIds = []
|
||||
this.tooltips = {}
|
||||
this.notPassedIds = []
|
||||
this.uploadValues = []
|
||||
this.popupValues = []
|
||||
this.radioValues = []
|
||||
this.multiSelectValues = []
|
||||
this.searchSelectValues = []
|
||||
//update-begin-author:shunjlei date:20210415 for:类型赋值错误
|
||||
this.uploadValues = {}
|
||||
this.popupValues = {}
|
||||
this.radioValues = {}
|
||||
this.multiSelectValues = {}
|
||||
this.searchSelectValues = {}
|
||||
this.searchSelectAsyncValues = {}
|
||||
//update-end-author:shunjlei date:20210415 for:类型赋值错误
|
||||
|
||||
// 重置滚动条
|
||||
this.scrollTop = 0
|
||||
this.$nextTick(() => {
|
||||
this.getElement('tbody').scrollTop = 0
|
||||
@ -1136,6 +1172,7 @@
|
||||
let radioValues = { ...this.radioValues }
|
||||
let multiSelectValues = { ...this.multiSelectValues }
|
||||
let searchSelectValues = { ...this.searchSelectValues }
|
||||
let searchSelectAsyncValues = { ...this.searchSelectAsyncValues }
|
||||
// 禁用行的id
|
||||
let disabledRowIds = (this.disabledRowIds || [])
|
||||
dataSource.forEach((data, newValueIndex) => {
|
||||
@ -1225,6 +1262,8 @@
|
||||
radioValues[inputId] = sourceValue
|
||||
} else if (column.type === FormTypes.sel_search) {
|
||||
searchSelectValues[inputId] = sourceValue
|
||||
} else if (column.type === FormTypes.sel_search_async) {
|
||||
searchSelectAsyncValues[inputId] = sourceValue
|
||||
} else if (column.type === FormTypes.list_multi) {
|
||||
if (typeof sourceValue === 'string' && sourceValue.length > 0) {
|
||||
multiSelectValues[inputId] = sourceValue.split(',')
|
||||
@ -1245,6 +1284,8 @@
|
||||
status: 'done',
|
||||
path: sourceValue
|
||||
}
|
||||
} else {
|
||||
uploadValues[inputId] = null
|
||||
}
|
||||
} else {
|
||||
value[column.key] = sourceValue
|
||||
@ -1309,6 +1350,7 @@
|
||||
this.radioValues = radioValues
|
||||
this.multiSelectValues = multiSelectValues
|
||||
this.searchSelectValues = searchSelectValues
|
||||
this.searchSelectAsyncValues = searchSelectAsyncValues
|
||||
// 重新计算所有统计列
|
||||
this.recalcAllStatisticsColumns()
|
||||
// 更新到 dom
|
||||
@ -1543,6 +1585,8 @@
|
||||
value[column.key] = this.radioValues[inputId]
|
||||
} else if (column.type === FormTypes.sel_search) {
|
||||
value[column.key] = this.searchSelectValues[inputId]
|
||||
} else if (column.type === FormTypes.sel_search_async) {
|
||||
value[column.key] = this.searchSelectAsyncValues[inputId]
|
||||
} else if (column.type === FormTypes.list_multi) {
|
||||
if (!this.multiSelectValues[inputId] || this.multiSelectValues[inputId].length === 0) {
|
||||
value[column.key] = ''
|
||||
@ -1671,6 +1715,7 @@
|
||||
radioValues: this.radioValues,
|
||||
multiSelectValues: this.multiSelectValues,
|
||||
searchSelectValues: this.searchSelectValues,
|
||||
searchSelectAsyncValues: this.searchSelectAsyncValues,
|
||||
})
|
||||
},
|
||||
/** 设置某行某列的值 */
|
||||
@ -1736,6 +1781,8 @@
|
||||
edited = this.setOneValue(this.multiSelectValues, modelKey, newValue, true)
|
||||
} else if (column.type === FormTypes.sel_search) {
|
||||
edited = this.setOneValue(this.searchSelectValues, modelKey, newValue)
|
||||
} else if (column.type === FormTypes.sel_search_async) {
|
||||
edited = this.setOneValue(this.searchSelectAsyncValues, modelKey, newValue)
|
||||
} else {
|
||||
edited = false
|
||||
}
|
||||
@ -2731,6 +2778,11 @@
|
||||
this.validateOneInput(value, row, column, this.notPassedIds, true, 'change')
|
||||
this.elemValueChange(FormTypes.sel_search, row, column, value)
|
||||
},
|
||||
handleSearchSelectAsyncChange(value, id, row, column) {
|
||||
this.searchSelectAsyncValues = this.bindValuesChange(value, id, 'searchSelectAsyncValues')
|
||||
this.validateOneInput(value, row, column, this.notPassedIds, true, 'change')
|
||||
this.elemValueChange(FormTypes.sel_search_async, row, column, value)
|
||||
},
|
||||
filterOption(input, option) {
|
||||
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
},
|
||||
@ -2992,6 +3044,8 @@
|
||||
border-bottom: @border;
|
||||
transition: background-color 300ms;
|
||||
width: 100%;
|
||||
height: 61px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
z-index: 10;
|
||||
@ -3101,6 +3155,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
.comp-normal {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.j-td-span {
|
||||
position: relative;
|
||||
padding: 4px 11px;
|
||||
|
||||
Reference in New Issue
Block a user