mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
fix(数据集): SQL 数据集参数支持绑定系统变量
This commit is contained in:
parent
f88dd709fa
commit
d7cba2eeaf
@ -227,7 +227,10 @@ const handleSearchVariableApi = async () => {
|
|||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
dsChange(sqlNode.value.datasourceId)
|
dsChange(sqlNode.value.datasourceId)
|
||||||
await handleSearchVariableApi()
|
await handleSearchVariableApi()
|
||||||
codeCom.value = myCm.value.codeComInit(Base64.decode(sqlNode.value.sql), true)
|
codeCom.value = myCm.value.codeComInit(
|
||||||
|
setNameIdTrans('id', 'name', Base64.decode(sqlNode.value.sql)),
|
||||||
|
true
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
@ -770,10 +773,10 @@ const mousedownDrag = () => {
|
|||||||
:height="`${dragHeight}px`"
|
:height="`${dragHeight}px`"
|
||||||
dom-id="sql-editor"
|
dom-id="sql-editor"
|
||||||
ref="myCm"
|
ref="myCm"
|
||||||
:quotaMap="fieldFormList.filter(ele => [2, 3].includes(ele.deType)).map(ele => ele.name)"
|
:quotaMap="fieldFormList.filter(ele => ['num'].includes(ele.type)).map(ele => ele.name)"
|
||||||
:dimensionMap="
|
:dimensionMap="
|
||||||
builtInList
|
builtInList
|
||||||
.concat(fieldFormList.filter(ele => ![2, 3].includes(ele.deType)))
|
.concat(fieldFormList.filter(ele => !['num'].includes(ele.type)))
|
||||||
.map(ele => ele.name)
|
.map(ele => ele.name)
|
||||||
"
|
"
|
||||||
></code-mirror>
|
></code-mirror>
|
||||||
@ -910,7 +913,7 @@ const mousedownDrag = () => {
|
|||||||
v-for="fieldForm in fieldFormListComputed"
|
v-for="fieldForm in fieldFormListComputed"
|
||||||
:key="fieldForm.id"
|
:key="fieldForm.id"
|
||||||
@click="insertFieldToCodeMirror(`[${fieldForm.name}]`)"
|
@click="insertFieldToCodeMirror(`[${fieldForm.name}]`)"
|
||||||
:class="[2, 3].includes(fieldForm.deType) && 'with-type'"
|
:class="['num'].includes(fieldForm.type) && 'with-type'"
|
||||||
>
|
>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<Icon
|
<Icon
|
||||||
|
Loading…
Reference in New Issue
Block a user