forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
fb5f713d62
File diff suppressed because one or more lines are too long
@ -52,6 +52,7 @@ class TextSelectTreeServiceImpl extends WidgetService {
|
||||
super(options)
|
||||
this.filterDialog = true
|
||||
this.showSwitch = true
|
||||
this.isTree = true
|
||||
}
|
||||
|
||||
initLeftPanel() {
|
||||
|
@ -1624,7 +1624,7 @@ export default {
|
||||
select_by_table: 'Select by table',
|
||||
data_list: 'Data list',
|
||||
component_list: 'Component list',
|
||||
custom_scope: 'Custom control range',
|
||||
custom_scope: 'Target',
|
||||
multiple_choice: 'Multiple choice',
|
||||
single_choice: 'Single choice',
|
||||
field: 'Field',
|
||||
@ -1751,10 +1751,12 @@ export default {
|
||||
component_hidden: 'Component Hidden',
|
||||
public_link_tips: 'Currently in public link mode, the target panel does not have a public link and cannot jump to it',
|
||||
input_title: 'Input Title',
|
||||
show_title: 'Show Title',
|
||||
show_title: 'Title',
|
||||
default_settings: 'Default Settings',
|
||||
choose_background: 'Choose Component Background',
|
||||
choose_background_tips: 'The component`s own background settings will overwrite the current settings'
|
||||
choose_background_tips: 'The component`s own background settings will overwrite the current settings',
|
||||
visual: 'Visual',
|
||||
prohibit_multiple: 'Prohibit multiple fields in the same dataset'
|
||||
},
|
||||
plugin: {
|
||||
local_install: 'Local installation',
|
||||
|
@ -1625,7 +1625,7 @@ export default {
|
||||
select_by_table: '按錶選擇',
|
||||
data_list: '數據列錶',
|
||||
component_list: '組件列錶',
|
||||
custom_scope: '自定義控製範圍',
|
||||
custom_scope: '控製範圍',
|
||||
multiple_choice: '多選',
|
||||
single_choice: '單選',
|
||||
field: '字段',
|
||||
@ -1752,13 +1752,15 @@ export default {
|
||||
component_hidden: '隱藏的組件',
|
||||
public_link_tips: '當前是公共鏈接模式,目標儀錶闆未設置公共鏈接,無法跳轉',
|
||||
input_title: '請輸入標題',
|
||||
show_title: '顯示標題',
|
||||
show_title: '標題',
|
||||
default_settings: '默認值設置',
|
||||
choose_background: '選擇組件背景',
|
||||
choose_background_tips: '組件自有的背景設置會覆蓋當前設置',
|
||||
setting_background: '設置背景',
|
||||
setting_jump: '跳轉設置',
|
||||
select_view: '請選擇視圖...'
|
||||
select_view: '請選擇視圖...',
|
||||
visual: '虛擬化',
|
||||
prohibit_multiple: '禁止同數據集多字段'
|
||||
},
|
||||
plugin: {
|
||||
local_install: '本地安裝',
|
||||
|
@ -1632,8 +1632,8 @@ export default {
|
||||
select_by_table: '按表选择',
|
||||
data_list: '数据列表',
|
||||
component_list: '组件列表',
|
||||
custom_scope: '自定义控制范围',
|
||||
binding_parameters: '绑定参数',
|
||||
custom_scope: '控制范围',
|
||||
binding_parameters: '参数',
|
||||
multiple_choice: '多选',
|
||||
single_choice: '单选',
|
||||
field: '字段',
|
||||
@ -1761,13 +1761,15 @@ export default {
|
||||
component_hidden: '隐藏的组件',
|
||||
public_link_tips: '当前是公共链接模式,目标仪表板未设置公共链接,无法跳转',
|
||||
input_title: '请输入标题',
|
||||
show_title: '显示标题',
|
||||
show_title: '标题',
|
||||
default_settings: '默认值设置',
|
||||
choose_background: '选择组件背景',
|
||||
choose_background_tips: '组件自有的背景设置会覆盖当前设置',
|
||||
setting_background: '设置背景',
|
||||
setting_jump: '跳转设置',
|
||||
select_view: '请选择视图...'
|
||||
select_view: '请选择视图...',
|
||||
visual: '虚拟化',
|
||||
prohibit_multiple: '禁止同数据集多字段'
|
||||
},
|
||||
plugin: {
|
||||
local_install: '本地安装',
|
||||
|
@ -64,7 +64,7 @@
|
||||
animation="300"
|
||||
:move="onMove"
|
||||
class="drag-list"
|
||||
@end="end"
|
||||
@end="endDs"
|
||||
>
|
||||
<transition-group>
|
||||
<div
|
||||
@ -150,7 +150,7 @@
|
||||
animation="300"
|
||||
:move="onMove"
|
||||
class="drag-list"
|
||||
@end="end"
|
||||
@end="endVw"
|
||||
>
|
||||
<transition-group>
|
||||
<div
|
||||
@ -301,7 +301,9 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
isTree() {
|
||||
return this.widget && this.widget.isTree
|
||||
},
|
||||
...mapState([
|
||||
'componentData'
|
||||
])
|
||||
@ -361,6 +363,7 @@ export default {
|
||||
}
|
||||
this.initWithField()
|
||||
this.loadViews()
|
||||
this.ProhibitMultiple()
|
||||
},
|
||||
mounted() {
|
||||
bus.$on('valid-values-change', valid => {
|
||||
@ -666,19 +669,23 @@ export default {
|
||||
return true
|
||||
},
|
||||
|
||||
end(e) {
|
||||
this.refuseMove(e)
|
||||
endDs(e) {
|
||||
this.refuseMove(e, this.fieldDatas)
|
||||
this.removeCheckedKey(e)
|
||||
},
|
||||
endVw(e) {
|
||||
this.refuseMove(e, this.comFieldDatas)
|
||||
this.removeCheckedKey(e)
|
||||
},
|
||||
|
||||
refuseMove(e) {
|
||||
refuseMove(e, datas) {
|
||||
const that = this
|
||||
const xItems = this.fieldDatas.filter(function(m) {
|
||||
const xItems = datas.filter(function(m) {
|
||||
return m.id === that.moveId
|
||||
})
|
||||
|
||||
if (xItems && xItems.length > 1) {
|
||||
this.fieldDatas.splice(e.newDraggableIndex, 1)
|
||||
this.datas.splice(e.newDraggableIndex, 1)
|
||||
}
|
||||
},
|
||||
removeCheckedKey(e) {
|
||||
@ -691,6 +698,19 @@ export default {
|
||||
if (xItems && xItems.length > 1) {
|
||||
this.currentElement.options.attrs.dragItems.splice(e.newDraggableIndex, 1)
|
||||
}
|
||||
this.ProhibitMultiple()
|
||||
},
|
||||
|
||||
ProhibitMultiple() {
|
||||
if (this.isTree) return
|
||||
const sourceLen = this.currentElement.options.attrs.dragItems.length
|
||||
if (!sourceLen) return
|
||||
const res = new Map()
|
||||
|
||||
const result = this.currentElement.options.attrs.dragItems.filter(item => !res.has(item.tableId) && res.set(item.tableId), 1)
|
||||
this.currentElement.options.attrs.dragItems = result
|
||||
const newLen = result.length
|
||||
if (sourceLen > newLen) this.$warning(this.$t('panel.prohibit_multiple'))
|
||||
},
|
||||
|
||||
enableSureButton() {
|
||||
|
@ -6,12 +6,11 @@
|
||||
v-if="widget.showSwitch"
|
||||
v-model="attrs.multiple"
|
||||
:active-text="$t('panel.multiple_choice')"
|
||||
:inactive-text="$t('panel.single_choice')"
|
||||
@change="multipleChange"
|
||||
/>
|
||||
|
||||
<span v-if="widget.showVisual" style="padding-left: 20px;">
|
||||
<el-checkbox v-model="attrs.visual" @change="showVisualChange">虚拟化</el-checkbox>
|
||||
<span v-if="widget.showVisual" style="padding-left: 16px;">
|
||||
<el-checkbox v-model="attrs.visual" @change="showVisualChange">{{ $t('panel.visual') }}</el-checkbox>
|
||||
</span>
|
||||
</div>
|
||||
</el-col>
|
||||
@ -104,7 +103,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'FilterControl',
|
||||
@ -136,6 +134,9 @@ export default {
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
|
||||
created() {
|
||||
this.attrs = this.controlAttrs
|
||||
|
Loading…
Reference in New Issue
Block a user