Commit d5e4110a authored by 何虹's avatar 何虹 💬

优化组件

parent 7ac9c537
......@@ -145,13 +145,18 @@ export default {
}
}
},
initIframeConfig(config) {
this.hsDialogConfig = {
title: ''
}
if (typeof config === 'object' && config) {
Object.assign(this.hsDialogConfig, config)
} else if (typeof config === 'string') {
// 单个的字符串 默认这是title
this.hsDialogConfig.title = config
}
debugger
},
showFileIframe(parms, message, config, confirm, cancel) {
let parms_ = {}
......
......@@ -46,9 +46,9 @@
@click="down"
>下移</el-button>
</div>
<hs-table
ref='plTable'
height="350px"
<hs-table
ref='plTable'
height="350px"
:data='hsTableData'
:paging='hsTablePaging'
:config='hsTableConfig'
......@@ -110,7 +110,8 @@ export default {
const data = this.tableData
const { value } = this.configData
const list = this.value ? this.value.split(',') : []
list.forEach(x => { // 设置默认勾选
list.forEach(x => {
// 设置默认勾选
const target = data.find(item => item[value] === x)
target && (target.isSelected = true)
})
......@@ -194,8 +195,7 @@ export default {
const orderby = mainSearchParam.orderby
if (orderby) {
const orderby_list = orderby.split(',')
const parms = {
}
const parms = {}
orderby_list.forEach(item => {
const [prop, value] = item.split(':')
parms[prop] = value
......@@ -241,7 +241,8 @@ export default {
this.queryTable()
}
this.dialogTableVisible = true
this.$refs.plTable && this.$refs.plTable.$children[0].$children[0].tableDoLayout()
this.$refs.plTable &&
this.$refs.plTable.$children[0].$children[0].tableDoLayout()
},
/**
* 焦点失去事件
......@@ -363,11 +364,13 @@ export default {
*/
setDefaultQueryParms() {
if (this.dialogTableVisible) return
const config = this.hsDyncFormConfig.config
const formColumn = config.formColumn
const targetItem = formColumn[0]
const prop = targetItem.prop
this.$set(this.searchForm, prop, this.label_value)
const config = this.hsDyncFormConfig || {}
if (config.formColumn && config.formColumn.length) {
const formColumn = config.formColumn
const targetItem = formColumn[0]
const prop = targetItem.prop
this.$set(this.searchForm, prop, this.label_value)
}
},
/**
* 多选时必须点击确定按钮
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment