|
@@ -2,6 +2,7 @@ import _ from 'lodash'
|
|
|
import {baseConfig} from "../base";
|
|
|
import {search} from "../../Defaults";
|
|
|
import {invokeMethod} from "../../utils";
|
|
|
+import {lookupScope} from "../../lib/lib";
|
|
|
|
|
|
export default function () {
|
|
|
|
|
@@ -59,6 +60,7 @@ export default function () {
|
|
|
const me = this
|
|
|
const {config} = me
|
|
|
const {widget, vjson, lookup} = config
|
|
|
+ const parentScope = lookupScope(sender)
|
|
|
|
|
|
if (e) {
|
|
|
e.preventDefault()
|
|
@@ -75,6 +77,12 @@ export default function () {
|
|
|
const WidgetScopeClass = widgetScope.default
|
|
|
widgetScope = new WidgetScopeClass()
|
|
|
|
|
|
+ const rawValue = this.getRawValue()
|
|
|
+ const widgetDialogData = {
|
|
|
+ queryKeyword: rawValue
|
|
|
+ }
|
|
|
+ widgetScope.parentScope = parentScope
|
|
|
+ widgetScope.queryKeyword = rawValue
|
|
|
widgetScope.searchWidgetSuccess = (data) => {
|
|
|
if (typeof lookup === 'string') {
|
|
|
// lookup 是字符串的情况下,就是取某个列作为 value 值
|
|
@@ -106,7 +114,7 @@ export default function () {
|
|
|
|
|
|
return true
|
|
|
}
|
|
|
- widgetScope.showDialog(sender)
|
|
|
+ widgetScope.showDialog(sender, vjson, {data: widgetDialogData})
|
|
|
})
|
|
|
},
|
|
|
|