[Fix][UI Next][V1.0.0-Alpha]Fix the rules display incorrect in DATA_QUALITY. (#9236)
* [Fix][UI Next][V1.0.0-Alpha]Fix the rules display incorrect in DATA_QUALITY. * [Fix][UI Next][V1.0.0-Alpha]Remove the unuse watch.migrate-dev-docs-to-main
parent
13cc84eb8a
commit
3e82312713
|
|
@ -80,7 +80,8 @@ export function useRules(
|
|||
field: responseItem.field,
|
||||
options: responseItem.options,
|
||||
validate: responseItem.validate,
|
||||
props: responseItem.props
|
||||
props: responseItem.props,
|
||||
value: responseItem.value
|
||||
}
|
||||
const name = responseItem.name?.replace('$t(', '').replace(')', '')
|
||||
item.name = name ? t(`project.node.${name}`) : ''
|
||||
|
|
|
|||
|
|
@ -25,13 +25,15 @@ export function useDataQuality({
|
|||
from = 0,
|
||||
readonly,
|
||||
data,
|
||||
jsonRef
|
||||
jsonRef,
|
||||
updateElements
|
||||
}: {
|
||||
projectCode: number
|
||||
from?: number
|
||||
readonly?: boolean
|
||||
data?: ITaskData
|
||||
jsonRef: Ref<IJsonItem[]>
|
||||
updateElements: () => void
|
||||
}) {
|
||||
const { t } = useI18n()
|
||||
const model = reactive({
|
||||
|
|
@ -87,6 +89,7 @@ export function useDataQuality({
|
|||
...Fields.useTimeoutAlarm(model),
|
||||
...Fields.useRules(model, (items: IJsonItem[], len: number) => {
|
||||
jsonRef.value.splice(15, len, ...items)
|
||||
updateElements()
|
||||
}),
|
||||
Fields.useDeployMode(),
|
||||
Fields.useDriverCores(),
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ref, Ref, unref, watch } from 'vue'
|
||||
import { ref, Ref, unref } from 'vue'
|
||||
import nodes from './tasks'
|
||||
import getElementByJson from '@/components/form/get-elements-by-json'
|
||||
import { useTaskNodeStore } from '@/store/project/task-node'
|
||||
|
|
@ -56,7 +56,10 @@ export function useTask({
|
|||
from,
|
||||
readonly,
|
||||
data,
|
||||
jsonRef
|
||||
jsonRef,
|
||||
updateElements: () => {
|
||||
getElements()
|
||||
}
|
||||
}
|
||||
|
||||
const { model, json } = nodes[data.taskType || 'SHELL'](params)
|
||||
|
|
@ -71,12 +74,5 @@ export function useTask({
|
|||
|
||||
getElements()
|
||||
|
||||
watch(
|
||||
() => jsonRef.value.length,
|
||||
() => {
|
||||
getElements()
|
||||
}
|
||||
)
|
||||
|
||||
return { elementsRef, rulesRef, model }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue