Commit fcdf9269 by lianyang

弹框双击选择selectEty方法修改,增加请求地址有()下标时的处理

parent 732a3add
......@@ -354,10 +354,22 @@ export default {
* @param {String} rulePath 路径
*/
selectEty(val, rulePath) {
const props = rulePath.replaceAll(".", "_")
const obj = {}
obj[props] = val;
Utils.copyValueFromVO(this.model, obj);
// const props = rulePath.replaceAll(".", "_")
// const obj = {}
// obj[props] = val;
// Utils.copyValueFromVO(this.model, obj);
if (rulePath.indexOf("(") > 0) {//请求地址有"()"下标时,如setmod.setglg.setgll(2).setgrp.snd756.pts.extkey
let tempRulePath = rulePath
let rulePath = ""
const reg = /\((\d+)\)/
while (reg.test(tempRulePath)) {
const match = tempRulePath.match(reg)
rulePath += tempRulePath.substring(0, match.index) + "[" + (parseInt(match[1]) - 1) + "]"
tempRulePath = tempRulePath.substring(match.index + match[0].length)
}
rulePath += tempRulePath
}
_.set(this.model, rulePath, val)
this.executeRule(rulePath, { "selectStatus": 1,'EventType': 1}).then((res) => {
if (res.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model, res.data);
......
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