2020-09-29 11:28:39 +08:00
|
|
|
Tea.context(function () {
|
|
|
|
|
this.isUpdating = false
|
|
|
|
|
this.cond = null
|
2021-06-08 22:46:08 +08:00
|
|
|
this.paramsTitle = ""
|
2021-12-12 16:11:25 +08:00
|
|
|
this.paramsCaseInsensitive = false
|
|
|
|
|
this.isCaseInsensitive = false
|
2020-09-29 11:28:39 +08:00
|
|
|
|
|
|
|
|
this.success = NotifyPopup
|
|
|
|
|
this.condType = (this.components.length > 0) ? this.components[0].type : ""
|
|
|
|
|
|
|
|
|
|
// 是否正在修改
|
|
|
|
|
if (window.parent.UPDATING_COND != null) {
|
|
|
|
|
this.isUpdating = true
|
|
|
|
|
this.condType = window.parent.UPDATING_COND.type
|
|
|
|
|
this.cond = window.parent.UPDATING_COND
|
2021-12-12 16:11:25 +08:00
|
|
|
if (typeof (this.cond.isCaseInsensitive) == "boolean") {
|
|
|
|
|
this.isCaseInsensitive = this.cond.isCaseInsensitive
|
|
|
|
|
}
|
2020-09-29 11:28:39 +08:00
|
|
|
}
|
2021-06-08 22:46:08 +08:00
|
|
|
|
|
|
|
|
this.changeCondType = function () {
|
|
|
|
|
let that = this
|
|
|
|
|
let c = this.components.$find(function (k, v) {
|
|
|
|
|
return v.type == that.condType
|
|
|
|
|
})
|
|
|
|
|
if (c == null || c.paramsTitle.length == 0) {
|
|
|
|
|
that.paramsTitle = "条件参数"
|
2021-12-12 16:11:25 +08:00
|
|
|
that.paramsCaseInsensitive = false
|
2021-06-08 22:46:08 +08:00
|
|
|
} else {
|
|
|
|
|
that.paramsTitle = c.paramsTitle
|
2021-12-12 16:11:25 +08:00
|
|
|
if (typeof (c.caseInsensitive) != "undefined") {
|
|
|
|
|
that.paramsCaseInsensitive = c.caseInsensitive
|
|
|
|
|
that.$delay(function () {
|
|
|
|
|
that.changeCaseInsensitive()
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
that.paramsCaseInsensitive = false
|
|
|
|
|
}
|
2021-06-08 22:46:08 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.$delay(function () {
|
|
|
|
|
this.changeCondType()
|
|
|
|
|
})
|
2021-12-12 16:11:25 +08:00
|
|
|
|
|
|
|
|
this.changeCaseInsensitive = function () {
|
|
|
|
|
let componentRef = this.$refs.component
|
|
|
|
|
if (componentRef == null) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (typeof (componentRef.changeCaseInsensitive) == "function") {
|
|
|
|
|
componentRef.changeCaseInsensitive(this.isCaseInsensitive)
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-09-29 11:28:39 +08:00
|
|
|
})
|