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

优化组件

parent 7ac9c537
...@@ -145,13 +145,18 @@ export default { ...@@ -145,13 +145,18 @@ export default {
} }
} }
}, },
initIframeConfig(config) { initIframeConfig(config) {
this.hsDialogConfig = {
title: ''
}
if (typeof config === 'object' && config) { if (typeof config === 'object' && config) {
Object.assign(this.hsDialogConfig, config) Object.assign(this.hsDialogConfig, config)
} else if (typeof config === 'string') { } else if (typeof config === 'string') {
// 单个的字符串 默认这是title // 单个的字符串 默认这是title
this.hsDialogConfig.title = config this.hsDialogConfig.title = config
} }
debugger
}, },
showFileIframe(parms, message, config, confirm, cancel) { showFileIframe(parms, message, config, confirm, cancel) {
let parms_ = {} let parms_ = {}
......
...@@ -46,9 +46,9 @@ ...@@ -46,9 +46,9 @@
@click="down" @click="down"
>下移</el-button> >下移</el-button>
</div> </div>
<hs-table <hs-table
ref='plTable' ref='plTable'
height="350px" height="350px"
:data='hsTableData' :data='hsTableData'
:paging='hsTablePaging' :paging='hsTablePaging'
:config='hsTableConfig' :config='hsTableConfig'
...@@ -110,7 +110,8 @@ export default { ...@@ -110,7 +110,8 @@ export default {
const data = this.tableData const data = this.tableData
const { value } = this.configData const { value } = this.configData
const list = this.value ? this.value.split(',') : [] const list = this.value ? this.value.split(',') : []
list.forEach(x => { // 设置默认勾选 list.forEach(x => {
// 设置默认勾选
const target = data.find(item => item[value] === x) const target = data.find(item => item[value] === x)
target && (target.isSelected = true) target && (target.isSelected = true)
}) })
...@@ -194,8 +195,7 @@ export default { ...@@ -194,8 +195,7 @@ export default {
const orderby = mainSearchParam.orderby const orderby = mainSearchParam.orderby
if (orderby) { if (orderby) {
const orderby_list = orderby.split(',') const orderby_list = orderby.split(',')
const parms = { const parms = {}
}
orderby_list.forEach(item => { orderby_list.forEach(item => {
const [prop, value] = item.split(':') const [prop, value] = item.split(':')
parms[prop] = value parms[prop] = value
...@@ -241,7 +241,8 @@ export default { ...@@ -241,7 +241,8 @@ export default {
this.queryTable() this.queryTable()
} }
this.dialogTableVisible = true 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 { ...@@ -363,11 +364,13 @@ export default {
*/ */
setDefaultQueryParms() { setDefaultQueryParms() {
if (this.dialogTableVisible) return if (this.dialogTableVisible) return
const config = this.hsDyncFormConfig.config const config = this.hsDyncFormConfig || {}
const formColumn = config.formColumn if (config.formColumn && config.formColumn.length) {
const targetItem = formColumn[0] const formColumn = config.formColumn
const prop = targetItem.prop const targetItem = formColumn[0]
this.$set(this.searchForm, prop, this.label_value) 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