通用js方法说明
<h1>深度保存</h1>
<p>this.$api.recursion('模型名',提交参数, 是否批量保存)
例如:</p>
<pre><code class="language-javascript"> const params = {
id: this.form.id,
operator: this.form.id ? 'MODIFY' : 'ADD',
warningType: this.warningType,
noticeGroups: this.form.noticeGroupArr ? this.form.noticeGroupArr.join(',') : '',
noticeUsers: this.form.noticeUserArr ? this.form.noticeUserArr.join(',') : '',
noticeWay: this.form.noticeWayArr ? this.form.noticeWayArr.join(',') : '',
noticeTemplateName: this.noticeTemplateName,
dxWarningRules: this.tableData
}
this.$api.recursion('DxWarningConfig', params).then(res =&gt; {
this.$utils.showMessageSuccess('保存成功')
this.handleClose()
})</code></pre>
<h1>深度查询</h1>
<p>this.$api.searchApi('模型名',查询参数)
例如:</p>
<pre><code class="language-javascript"> const params = {
searchItems: {
'operator': 'AND',
'items': [
{
'fieldName': 'bucketId',
'operator': 'EQ',
'value': this.basicData.id
}
]
}
}
this.$api.searchApi('DxApplication', params).then(res =&gt; {
this.tableData = []
res.items.content &amp;&amp; res.items.content.forEach((el) =&gt; {
this.tableData.push(el)
})
})</code></pre>