|
|
@@ -1022,8 +1022,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
this.defId = button.deflow
|
|
|
- // eslint-disable-next-line no-eval
|
|
|
- this.addDataCont = button.initAddDataCont ? eval('(' + button.initAddDataCont + ')') : {}
|
|
|
+ this.addDataCont = button.initAddDataCont
|
|
|
this.npmDialogFormVisible = true
|
|
|
break
|
|
|
case 'consult': // 查阅
|
|
|
@@ -1269,10 +1268,18 @@ export default {
|
|
|
// 功能按钮
|
|
|
functionButtons.forEach((rf, i) => {
|
|
|
const btn = this.buildButton(rf, i)
|
|
|
+
|
|
|
if (rf.button_type === 'openTask') {
|
|
|
+ const obj = {}
|
|
|
+ if (rf.initAddDataCont) {
|
|
|
+ const arr1 = rf.initAddDataCont.split('&')
|
|
|
+ for (const i of arr1) {
|
|
|
+ const arr = i.split(':')
|
|
|
+ obj[arr[0]] = arr[1]
|
|
|
+ }
|
|
|
+ }
|
|
|
this.defId = rf.deflow
|
|
|
- // eslint-disable-next-line no-eval
|
|
|
- this.addDataCont = rf.initAddDataCont ? eval('(' + rf.initAddDataCont + ')') : {}
|
|
|
+ this.addDataCont = rf.initAddDataCont ? obj : {}
|
|
|
}
|
|
|
// 查询列默认是顶部
|
|
|
if (hasSearchPermission(rf.button_type) && !rf.position) {
|
|
|
@@ -1423,6 +1430,14 @@ export default {
|
|
|
return JTemplate._onLoadActions(this, key, rf, 'disabled', row, data)
|
|
|
}
|
|
|
}
|
|
|
+ const obj = {}
|
|
|
+ if (rf.initAddDataCont) {
|
|
|
+ const arr1 = rf.initAddDataCont.split('&')
|
|
|
+ for (const i of arr1) {
|
|
|
+ const arr = i.split(':')
|
|
|
+ obj[arr[0]] = arr[1]
|
|
|
+ }
|
|
|
+ }
|
|
|
return {
|
|
|
$index: i,
|
|
|
key: key,
|
|
|
@@ -1433,7 +1448,7 @@ export default {
|
|
|
type: rf.style || defaultButton.type,
|
|
|
deflow: rf.deflow || null,
|
|
|
// eslint-disable-next-line no-eval
|
|
|
- initAddDataCont: rf.initAddDataCont || null,
|
|
|
+ initAddDataCont: rf.initAddDataCont ? obj : null,
|
|
|
reportPath: rf.reportPath,
|
|
|
mode: mode,
|
|
|
rightIcon: rightIcon,
|