70 changed files with 331378 additions and 388 deletions
@ -0,0 +1,71 @@ |
|||||
|
<template> |
||||
|
<w-dialog ref="dialogRef" :title="$t('re.dictionary.import.dialog.title')" width="600px" :can-maximize="false"> |
||||
|
<q-form action="post"> |
||||
|
<div class="row py-1"> |
||||
|
<div class="col-3"></div> |
||||
|
<div class="col-6"> |
||||
|
<q-file ref="fileRef" v-model="modelValue.file" :label="$t('file.single.tip')" dense outlined clearable counter accept=".json"> |
||||
|
<template #prepend> |
||||
|
<q-icon name="cloud_upload" /> |
||||
|
</template> |
||||
|
</q-file> |
||||
|
</div> |
||||
|
<div class="col-3"></div> |
||||
|
</div> |
||||
|
<div class="row py-1"> |
||||
|
<div class="col-3"></div> |
||||
|
<div class="col-6 row justify-center q-gutter-md py-2"> |
||||
|
<q-btn icon="bi-database-up" :label="$t('import')" color="primary" @click="importData"></q-btn> |
||||
|
</div> |
||||
|
<div class="col-3"></div> |
||||
|
</div> |
||||
|
</q-form> |
||||
|
</w-dialog> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref, reactive } from 'vue'; |
||||
|
import { axios, Environment } from 'platform-core'; |
||||
|
|
||||
|
const emit = defineEmits<{ |
||||
|
(e: 'afterImported', evt: Event): void; |
||||
|
}>(); |
||||
|
|
||||
|
const dialogRef = ref(); |
||||
|
const modelValue = reactive({ |
||||
|
file: undefined, |
||||
|
}); |
||||
|
const fileRef = ref(); |
||||
|
|
||||
|
const importData = () => { |
||||
|
axios |
||||
|
.post( |
||||
|
Environment.apiContextPath('/api/re/dictionary/import'), |
||||
|
{ |
||||
|
file: fileRef.value.nativeEl.files[0], |
||||
|
}, |
||||
|
{ |
||||
|
headers: { |
||||
|
'Content-Type': 'multipart/form-data', |
||||
|
}, |
||||
|
}, |
||||
|
) |
||||
|
.then(() => { |
||||
|
close(); |
||||
|
emit('afterImported'); |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
const open = () => { |
||||
|
modelValue.file = undefined; |
||||
|
dialogRef.value.show(); |
||||
|
}; |
||||
|
|
||||
|
const close = () => { |
||||
|
dialogRef.value.hide(); |
||||
|
}; |
||||
|
|
||||
|
defineExpose({ |
||||
|
open, |
||||
|
close, |
||||
|
}); |
||||
|
</script> |
@ -0,0 +1,91 @@ |
|||||
|
<template> |
||||
|
<w-dialog ref="dialogRef" :title="$t('re.dictionary.importSample.dialog.title')" width="900px" :can-maximize="false"> |
||||
|
<div class="px-2"> |
||||
|
<w-grid |
||||
|
ref="gridRef" |
||||
|
:height="300" |
||||
|
:title="$t('re.dictionary.importSample.grid.title')" |
||||
|
selection="multiple" |
||||
|
:full-screen-button="false" |
||||
|
:tree="true" |
||||
|
dense-body |
||||
|
:toolbar-configure="{ noIcon: false }" |
||||
|
:toolbar-actions="[ |
||||
|
'refresh', |
||||
|
'separator', |
||||
|
'expand', |
||||
|
'separator', |
||||
|
{ |
||||
|
name: 'import', |
||||
|
label: $t('re.dictionary.importSample.grid.toolbar.import'), |
||||
|
icon: 'bi-database-up', |
||||
|
enableIf: (arg) => { |
||||
|
return arg.ticked; |
||||
|
}, |
||||
|
click: (arg) => { |
||||
|
if (arg.tickeds && arg.tickeds.length > 0) { |
||||
|
const ids = Tools.extractProperties(arg.tickeds, 'id'); |
||||
|
console.log(ids); |
||||
|
DialogManager.confirm($t('re.dictionary.importSample.grid.toolbar.import.tip'), () => { |
||||
|
axios.post(Environment.apiContextPath('/api/re/dictionary/createExample'), ids).then(() => { |
||||
|
close(); |
||||
|
emit('afterImported'); |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
]" |
||||
|
:query-form-fields="[]" |
||||
|
:auto-fetch-data="false" |
||||
|
:fetch-data-url="Environment.apiContextPath('/api/re/dictionary/listDictionaryExampleContributionItems')" |
||||
|
foreign-key="parentId" |
||||
|
:columns="[ |
||||
|
{ |
||||
|
width: 200, |
||||
|
name: 'name', |
||||
|
label: $t('name'), |
||||
|
format: (value, row) => { |
||||
|
return $t(row.id); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
width: '100%', |
||||
|
name: 'description', |
||||
|
label: $t('description'), |
||||
|
format: (value, row) => { |
||||
|
return $t(row.id + '.description'); |
||||
|
}, |
||||
|
}, |
||||
|
]" |
||||
|
></w-grid> |
||||
|
</div> |
||||
|
</w-dialog> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref, nextTick } from 'vue'; |
||||
|
import { axios, Environment, DialogManager, Tools } from 'platform-core'; |
||||
|
|
||||
|
const emit = defineEmits<{ |
||||
|
(e: 'afterImported', evt: Event): void; |
||||
|
}>(); |
||||
|
|
||||
|
const dialogRef = ref(); |
||||
|
const gridRef = ref(); |
||||
|
|
||||
|
const open = () => { |
||||
|
dialogRef.value.show(); |
||||
|
nextTick(() => { |
||||
|
gridRef.value.refresh(); |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
const close = () => { |
||||
|
dialogRef.value.hide(); |
||||
|
}; |
||||
|
|
||||
|
defineExpose({ |
||||
|
open, |
||||
|
close, |
||||
|
}); |
||||
|
</script> |
@ -0,0 +1,25 @@ |
|||||
|
<template> |
||||
|
<w-dialog ref="dialogRef" :title="$t('re.dictionary.sampleJson.dialog.title')" width="600px" :can-maximize="false"> |
||||
|
<w-code-mirror v-model="sourceCodeRef" lang="json" :rows="15"></w-code-mirror> |
||||
|
</w-dialog> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref } from 'vue'; |
||||
|
|
||||
|
const dialogRef = ref(); |
||||
|
const sourceCodeRef = ref(); |
||||
|
|
||||
|
const open = (sourceCode: string) => { |
||||
|
sourceCodeRef.value = sourceCode; |
||||
|
dialogRef.value.show(); |
||||
|
}; |
||||
|
|
||||
|
const close = () => { |
||||
|
dialogRef.value.hide(); |
||||
|
}; |
||||
|
|
||||
|
defineExpose({ |
||||
|
open, |
||||
|
close, |
||||
|
}); |
||||
|
</script> |
@ -0,0 +1,71 @@ |
|||||
|
<template> |
||||
|
<w-dialog ref="dialogRef" :title="$t('re.dictionary.import.dialog.title')" width="600px" :can-maximize="false"> |
||||
|
<q-form action="post"> |
||||
|
<div class="row py-1"> |
||||
|
<div class="col-3"></div> |
||||
|
<div class="col-6"> |
||||
|
<q-file ref="fileRef" v-model="modelValue.file" :label="$t('file.single.tip')" dense outlined clearable counter accept=".json"> |
||||
|
<template #prepend> |
||||
|
<q-icon name="cloud_upload" /> |
||||
|
</template> |
||||
|
</q-file> |
||||
|
</div> |
||||
|
<div class="col-3"></div> |
||||
|
</div> |
||||
|
<div class="row py-1"> |
||||
|
<div class="col-3"></div> |
||||
|
<div class="col-6 row justify-center q-gutter-md py-2"> |
||||
|
<q-btn icon="bi-database-up" :label="$t('import')" color="primary" @click="importData"></q-btn> |
||||
|
</div> |
||||
|
<div class="col-3"></div> |
||||
|
</div> |
||||
|
</q-form> |
||||
|
</w-dialog> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref, reactive } from 'vue'; |
||||
|
import { axios, Environment } from 'platform-core'; |
||||
|
|
||||
|
const emit = defineEmits<{ |
||||
|
(e: 'afterImported', evt: Event): void; |
||||
|
}>(); |
||||
|
|
||||
|
const dialogRef = ref(); |
||||
|
const modelValue = reactive({ |
||||
|
file: undefined, |
||||
|
}); |
||||
|
const fileRef = ref(); |
||||
|
|
||||
|
const importData = () => { |
||||
|
axios |
||||
|
.post( |
||||
|
Environment.apiContextPath('/api/re/dictionary/import'), |
||||
|
{ |
||||
|
file: fileRef.value.nativeEl.files[0], |
||||
|
}, |
||||
|
{ |
||||
|
headers: { |
||||
|
'Content-Type': 'multipart/form-data', |
||||
|
}, |
||||
|
}, |
||||
|
) |
||||
|
.then(() => { |
||||
|
close(); |
||||
|
emit('afterImported'); |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
const open = () => { |
||||
|
modelValue.file = undefined; |
||||
|
dialogRef.value.show(); |
||||
|
}; |
||||
|
|
||||
|
const close = () => { |
||||
|
dialogRef.value.hide(); |
||||
|
}; |
||||
|
|
||||
|
defineExpose({ |
||||
|
open, |
||||
|
close, |
||||
|
}); |
||||
|
</script> |
@ -0,0 +1,91 @@ |
|||||
|
<template> |
||||
|
<w-dialog ref="dialogRef" :title="$t('re.dictionary.importSample.dialog.title')" width="900px" :can-maximize="false"> |
||||
|
<div class="px-2"> |
||||
|
<w-grid |
||||
|
ref="gridRef" |
||||
|
:height="300" |
||||
|
:title="$t('re.dictionary.importSample.grid.title')" |
||||
|
selection="multiple" |
||||
|
:full-screen-button="false" |
||||
|
:tree="true" |
||||
|
dense-body |
||||
|
:toolbar-configure="{ noIcon: false }" |
||||
|
:toolbar-actions="[ |
||||
|
'refresh', |
||||
|
'separator', |
||||
|
'expand', |
||||
|
'separator', |
||||
|
{ |
||||
|
name: 'import', |
||||
|
label: $t('re.dictionary.importSample.grid.toolbar.import'), |
||||
|
icon: 'bi-database-up', |
||||
|
enableIf: (arg) => { |
||||
|
return arg.ticked; |
||||
|
}, |
||||
|
click: (arg) => { |
||||
|
if (arg.tickeds && arg.tickeds.length > 0) { |
||||
|
const ids = Tools.extractProperties(arg.tickeds, 'id'); |
||||
|
console.log(ids); |
||||
|
DialogManager.confirm($t('re.dictionary.importSample.grid.toolbar.import.tip'), () => { |
||||
|
axios.post(Environment.apiContextPath('/api/re/dictionary/createExample'), ids).then(() => { |
||||
|
close(); |
||||
|
emit('afterImported'); |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
]" |
||||
|
:query-form-fields="[]" |
||||
|
:auto-fetch-data="false" |
||||
|
:fetch-data-url="Environment.apiContextPath('/api/re/dictionary/listDictionaryExampleContributionItems')" |
||||
|
foreign-key="parentId" |
||||
|
:columns="[ |
||||
|
{ |
||||
|
width: 200, |
||||
|
name: 'name', |
||||
|
label: $t('name'), |
||||
|
format: (value, row) => { |
||||
|
return $t(row.id); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
width: '100%', |
||||
|
name: 'description', |
||||
|
label: $t('description'), |
||||
|
format: (value, row) => { |
||||
|
return $t(row.id + '.description'); |
||||
|
}, |
||||
|
}, |
||||
|
]" |
||||
|
></w-grid> |
||||
|
</div> |
||||
|
</w-dialog> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref, nextTick } from 'vue'; |
||||
|
import { axios, Environment, DialogManager, Tools } from 'platform-core'; |
||||
|
|
||||
|
const emit = defineEmits<{ |
||||
|
(e: 'afterImported', evt: Event): void; |
||||
|
}>(); |
||||
|
|
||||
|
const dialogRef = ref(); |
||||
|
const gridRef = ref(); |
||||
|
|
||||
|
const open = () => { |
||||
|
dialogRef.value.show(); |
||||
|
nextTick(() => { |
||||
|
gridRef.value.refresh(); |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
const close = () => { |
||||
|
dialogRef.value.hide(); |
||||
|
}; |
||||
|
|
||||
|
defineExpose({ |
||||
|
open, |
||||
|
close, |
||||
|
}); |
||||
|
</script> |
@ -0,0 +1,166 @@ |
|||||
|
<template> |
||||
|
<div style="height: 100%"> |
||||
|
<w-grid |
||||
|
ref="gridRef" |
||||
|
:title="$t('re.lib.grid.title')" |
||||
|
dense-body |
||||
|
hide-bottom |
||||
|
:config-button="true" |
||||
|
selection="multiple" |
||||
|
:checkbox-selection="false" |
||||
|
:tree="false" |
||||
|
:fetch-data-url="Environment.apiContextPath('api/re/indicator?lib=' + lib.id)" |
||||
|
:data-url="Environment.apiContextPath('api/re/indicator')" |
||||
|
:pageable="false" |
||||
|
:toolbar-configure="{ noIcon: false }" |
||||
|
:toolbar-actions="[ |
||||
|
'query', |
||||
|
'refresh', |
||||
|
'separator', |
||||
|
[ |
||||
|
{ |
||||
|
name: 'addGroup', |
||||
|
label: $t('re.lib.grid.toolbar.addGroup'), |
||||
|
icon: 'add', |
||||
|
click: undefined, |
||||
|
}, |
||||
|
{ |
||||
|
extend: 'add', |
||||
|
name: 'addInterface', |
||||
|
label: $t('re.lib.grid.toolbar.addTop'), |
||||
|
afterClick: (arg) => { |
||||
|
arg.grid.getEditorForm().setFieldValue('type', 'FOLDER'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
extend: 'add', |
||||
|
name: 'addIndicator', |
||||
|
label: $t('re.lib.grid.toolbar.addChild'), |
||||
|
enableIf: (arg) => { |
||||
|
return arg.selected && arg.selected.type === 'FOLDER'; |
||||
|
}, |
||||
|
afterClick: (arg) => { |
||||
|
arg.grid.getEditorForm().setFieldValue('type', 'FOLDER'); |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
[ |
||||
|
{ |
||||
|
name: 'cloneGroup', |
||||
|
label: $t('re.lib.grid.toolbar.cloneGroup'), |
||||
|
icon: 'content_copy', |
||||
|
click: undefined, |
||||
|
enableIf: (arg) => { |
||||
|
return arg.selected; |
||||
|
}, |
||||
|
}, |
||||
|
'clone', |
||||
|
{ |
||||
|
extend: 'deepClone', |
||||
|
name: 'deepClone', |
||||
|
label: $t('re.lib.grid.toolbar.deepClone'), |
||||
|
icon: 'bi-copy', |
||||
|
enableIf: (arg) => { |
||||
|
return arg.selected && arg.selected.type !== 'FOLDER'; |
||||
|
}, |
||||
|
click: (arg) => { |
||||
|
DialogManager.confirm($t('re.lib.grid.toolbar.deepClone.tip'), () => { |
||||
|
axios.post(Environment.apiContextPath('/api/re/lib/deepClone/' + arg.selected.id)).then(() => { |
||||
|
libTreeGridRef.refresh(); |
||||
|
}); |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
'separator', |
||||
|
'edit', |
||||
|
'remove', |
||||
|
'separator', |
||||
|
'view', |
||||
|
'separator', |
||||
|
'export', |
||||
|
]" |
||||
|
:query-form-fields="[ |
||||
|
{ name: 'code', label: $t('code'), type: 'text', clearable: true }, |
||||
|
{ name: 'name', label: $t('name'), type: 'text', clearable: true }, |
||||
|
]" |
||||
|
:columns="[ |
||||
|
{ width: 60, name: 'order', label: $t('order'), align: 'right' }, |
||||
|
{ width: 250, name: 'name', label: $t('name') }, |
||||
|
{ width: 100, name: 'type', label: $t('type'), format: Formater.enum(Enums.IndicatorType) }, |
||||
|
{ |
||||
|
width: 100, |
||||
|
name: 'valueType', |
||||
|
label: $t('valueType'), |
||||
|
format: (value, row) => { |
||||
|
return ValueTypeMap[value]; |
||||
|
}, |
||||
|
}, |
||||
|
{ width: 80, name: 'valueTypeIsList', label: $t('re.resources.designer.parameter.grid.entity.valueTypeIsList'), format: Formater.checkTag() }, |
||||
|
{ width: '100%', name: 'defaultValue', label: $t('defaultValue') }, |
||||
|
]" |
||||
|
:editor="{ |
||||
|
dialog: { |
||||
|
width: '600px', |
||||
|
}, |
||||
|
form: { |
||||
|
colsNum: 1, |
||||
|
fields: [], |
||||
|
}, |
||||
|
}" |
||||
|
:viewer="{ |
||||
|
panel: { |
||||
|
columnNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
||||
|
{ name: 'creator', label: $t('creator') }, |
||||
|
{ name: 'createDate', label: $t('createDate') }, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() }, |
||||
|
{ name: 'corporationCode', label: $t('corporationCode') }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
v-bind="attrs" |
||||
|
></w-grid> |
||||
|
<ImportDialog ref="importDialogRef"></ImportDialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref, useAttrs, onMounted } from 'vue'; |
||||
|
import { axios, Environment, EnumTools, Formater, DialogManager } from 'platform-core'; |
||||
|
import ImportDialog from './ImportDialog.vue'; |
||||
|
|
||||
|
const attrs = useAttrs(); |
||||
|
|
||||
|
const props = defineProps({ |
||||
|
lib: { type: Object, default: undefined }, |
||||
|
}); |
||||
|
|
||||
|
const gridRef = ref(); |
||||
|
|
||||
|
const refresh = () => { |
||||
|
gridRef.value.refresh(); |
||||
|
}; |
||||
|
|
||||
|
onMounted(() => { |
||||
|
gridRef.value.refresh(); |
||||
|
}); |
||||
|
|
||||
|
defineExpose({ |
||||
|
refresh, |
||||
|
}); |
||||
|
|
||||
|
const Enums = await EnumTools.fetch(['io.sc.engine.rule.core.enums.IndicatorType', 'io.sc.engine.rule.core.enums.DeployStatus']); |
||||
|
let ValueTypeMap = {}; |
||||
|
const ValueTypeList = []; |
||||
|
const response = await axios.get(Environment.apiContextPath('/api/re/dictionary/getAllDictionaryMap')); |
||||
|
if (response && response.data) { |
||||
|
ValueTypeMap = {}; |
||||
|
ValueTypeList.splice(0, ValueTypeList.length); |
||||
|
for (const item of response.data) { |
||||
|
ValueTypeMap[item.key] = item.value; |
||||
|
ValueTypeList.push({ value: item.key, label: item.value }); |
||||
|
} |
||||
|
} |
||||
|
</script> |
@ -1,4 +1,99 @@ |
|||||
<template> |
<template> |
||||
<div>Lib</div> |
<q-splitter :model-value="450" unit="px" separator-style="width: 3px;" class="w-full" style="height: 100%"> |
||||
|
<template #before> |
||||
|
<LibGrid |
||||
|
ref="libTreeGridRef" |
||||
|
@row-click=" |
||||
|
(evt, row, index) => { |
||||
|
if (row.type === 'INDICATOR') { |
||||
|
currentSelectedLibRef = row; |
||||
|
showStatus.detail = true; |
||||
|
indicatorGridRef?.refresh(); |
||||
|
} else { |
||||
|
currentSelectedLibRef = {}; |
||||
|
showStatus.detail = false; |
||||
|
} |
||||
|
} |
||||
|
" |
||||
|
@before-request-data=" |
||||
|
() => { |
||||
|
showStatus.detail = false; |
||||
|
} |
||||
|
" |
||||
|
></LibGrid> |
||||
|
</template> |
||||
|
<template #after> |
||||
|
<div v-if="showStatus.detail" style="height: 100%" class="pl-1"> |
||||
|
<q-tabs v-model="currentSelectedIndicatorOrTestcaseTabNameRef" no-caps inline-label align="left"> |
||||
|
<q-tab name="indicator" :label="$t('re.lib.tab.indicator.title')" icon="bi-card-list" /> |
||||
|
<q-tab name="testcase" :label="$t('re.lib.tab.testcase.title')" icon="bi-receipt" /> |
||||
|
</q-tabs> |
||||
|
<q-tab-panels v-model="currentSelectedIndicatorOrTestcaseTabNameRef" animated style="height: calc(100% - 48px)"> |
||||
|
<q-tab-panel name="indicator" class="px-0 pb-0" style="height: 100%"> |
||||
|
<q-splitter :model-value="indicatorSplitterRef" unit="px" separator-style="width: 3px;" horizontal class="w-full" style="height: 100%"> |
||||
|
<template #before> |
||||
|
<IndicatorGrid |
||||
|
ref="indicatorGridRef" |
||||
|
:lib="currentSelectedLibRef" |
||||
|
@row-click=" |
||||
|
(evt, row, index) => { |
||||
|
currentSelectedIndicatorRef = row; |
||||
|
if (row.type === 'INTERFACE') { |
||||
|
showStatus.validator = true; |
||||
|
showStatus.processor = false; |
||||
|
validatorGridRef?.refresh(); |
||||
|
} else if (row.type === 'INDICATOR') { |
||||
|
showStatus.validator = false; |
||||
|
showStatus.processor = true; |
||||
|
processorGridRef?.refresh(); |
||||
|
} else { |
||||
|
showStatus.validator = false; |
||||
|
showStatus.processor = false; |
||||
|
} |
||||
|
} |
||||
|
" |
||||
|
@before-request-data=" |
||||
|
() => { |
||||
|
showStatus.validator = false; |
||||
|
showStatus.processor = false; |
||||
|
} |
||||
|
" |
||||
|
></IndicatorGrid> |
||||
|
</template> |
||||
|
<template #after> |
||||
|
<ValidatorGrid v-if="showStatus.validator" ref="validatorGridRef" :indicator="currentSelectedIndicatorRef"></ValidatorGrid> |
||||
|
<ProcessorGrid v-if="showStatus.processor" ref="processorGridRef" :indicator="currentSelectedIndicatorRef"></ProcessorGrid> |
||||
|
</template> |
||||
|
</q-splitter> |
||||
|
</q-tab-panel> |
||||
|
<q-tab-panel name="testcase" class="px-0 pb-0" style="height: 100%"> </q-tab-panel> |
||||
|
</q-tab-panels> |
||||
|
</div> |
||||
|
</template> |
||||
|
</q-splitter> |
||||
</template> |
</template> |
||||
<script setup lang="ts"></script> |
<script setup lang="ts"> |
||||
|
import { ref, reactive } from 'vue'; |
||||
|
import LibGrid from './LibGrid.vue'; |
||||
|
import IndicatorGrid from './IndicatorGrid.vue'; |
||||
|
import ValidatorGrid from './ValidatorGrid.vue'; |
||||
|
import ProcessorGrid from './ProcessorGrid.vue'; |
||||
|
|
||||
|
const indicatorSplitterRef = ref(400); //特征库上下分割符上面的高度 |
||||
|
const testcaseSplitterRef = ref(300); //测试用例上下分割符上面的高度 |
||||
|
const libTreeGridRef = ref(); //特征库树 |
||||
|
const indicatorGridRef = ref(); //指标 |
||||
|
const testcaseGridRef = ref(); //测试用例 |
||||
|
const validatorGridRef = ref(); //验证器 |
||||
|
const processorGridRef = ref(); //处理器 |
||||
|
|
||||
|
const currentSelectedIndicatorOrTestcaseTabNameRef = ref('indicator'); |
||||
|
//显示状态 |
||||
|
const showStatus = reactive({ |
||||
|
detail: false, //详情 |
||||
|
validator: false, //验证器 |
||||
|
processor: false, //处理器 |
||||
|
}); |
||||
|
const currentSelectedLibRef = ref({}); |
||||
|
const currentSelectedIndicatorRef = ref({}); |
||||
|
</script> |
||||
|
@ -0,0 +1,275 @@ |
|||||
|
<template> |
||||
|
<div class="pr-1" style="height: 100%"> |
||||
|
<w-grid |
||||
|
ref="treeGridRef" |
||||
|
:title="$t('re.lib.grid.title')" |
||||
|
dense-body |
||||
|
hide-bottom |
||||
|
:config-button="true" |
||||
|
selection="multiple" |
||||
|
:checkbox-selection="false" |
||||
|
:tree="true" |
||||
|
:tree-icon=" |
||||
|
(row) => { |
||||
|
if (row.type === 'FOLDER') { |
||||
|
return { name: 'folder', color: 'amber' }; |
||||
|
} else { |
||||
|
return { name: 'bi-card-list' }; |
||||
|
} |
||||
|
} |
||||
|
" |
||||
|
ticked-field="selected" |
||||
|
:data-url="Environment.apiContextPath('/api/re/lib')" |
||||
|
:pageable="false" |
||||
|
:toolbar-configure="{ noIcon: false }" |
||||
|
:toolbar-actions="[ |
||||
|
'refresh', |
||||
|
'separator', |
||||
|
'expand', |
||||
|
[ |
||||
|
{ |
||||
|
name: 'addGroup', |
||||
|
label: $t('re.lib.grid.toolbar.addGroup'), |
||||
|
icon: 'add', |
||||
|
click: undefined, |
||||
|
}, |
||||
|
{ |
||||
|
extend: 'addTop', |
||||
|
name: 'addTop', |
||||
|
label: $t('re.lib.grid.toolbar.addTop'), |
||||
|
afterClick: (arg) => { |
||||
|
arg.grid.getEditorForm().setFieldValue('type', 'FOLDER'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
extend: 'addChild', |
||||
|
name: 'addChild', |
||||
|
label: $t('re.lib.grid.toolbar.addChild'), |
||||
|
enableIf: (arg) => { |
||||
|
return arg.selected && arg.selected.type === 'FOLDER'; |
||||
|
}, |
||||
|
afterClick: (arg) => { |
||||
|
arg.grid.getEditorForm().setFieldValue('type', 'FOLDER'); |
||||
|
}, |
||||
|
}, |
||||
|
'separator', |
||||
|
{ |
||||
|
name: 'addLib', |
||||
|
extend: 'addChild', |
||||
|
label: $t('re.lib.grid.toolbar.addLib'), |
||||
|
icon: 'playlist_add', |
||||
|
enableIf: (arg) => { |
||||
|
return arg.selected && arg.selected.type === 'FOLDER'; |
||||
|
}, |
||||
|
afterClick: (arg) => { |
||||
|
arg.grid.getEditorForm().setFieldValue('type', 'INDICATOR'); |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
[ |
||||
|
{ |
||||
|
name: 'cloneGroup', |
||||
|
label: $t('re.lib.grid.toolbar.cloneGroup'), |
||||
|
icon: 'content_copy', |
||||
|
click: undefined, |
||||
|
enableIf: (arg) => { |
||||
|
return arg.selected; |
||||
|
}, |
||||
|
}, |
||||
|
'clone', |
||||
|
{ |
||||
|
extend: 'deepClone', |
||||
|
name: 'deepClone', |
||||
|
label: $t('re.lib.grid.toolbar.deepClone'), |
||||
|
icon: 'bi-copy', |
||||
|
enableIf: (arg) => { |
||||
|
return arg.selected && arg.selected.type !== 'FOLDER'; |
||||
|
}, |
||||
|
click: (arg) => { |
||||
|
DialogManager.confirm($t('re.lib.grid.toolbar.deepClone.tip'), () => { |
||||
|
axios.post(Environment.apiContextPath('/api/re/lib/deepClone/' + arg.selected.id)).then(() => { |
||||
|
treeGridRef.refresh(); |
||||
|
}); |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
extend: 'clone', |
||||
|
name: 'deepCloneNew', |
||||
|
label: $t('re.lib.grid.toolbar.deepCloneNew'), |
||||
|
icon: 'bi-copy', |
||||
|
enableIf: (arg) => { |
||||
|
return arg.selected && arg.selected.type !== 'FOLDER'; |
||||
|
}, |
||||
|
click: (arg) => { |
||||
|
DialogManager.confirm($t('re.lib.grid.toolbar.deepCloneNew.tip'), () => { |
||||
|
axios.post(Environment.apiContextPath('/api/re/lib/deepCloneNew/' + arg.selected.id)).then(() => { |
||||
|
treeGridRef.refresh(); |
||||
|
}); |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
|
||||
|
'separator', |
||||
|
'edit', |
||||
|
'remove', |
||||
|
'separator', |
||||
|
{ |
||||
|
name: 'generateGroovy', |
||||
|
label: $t('re.lib.grid.toolbar.generateGroovy'), |
||||
|
icon: 'bi-code', |
||||
|
enableIf: (arg) => { |
||||
|
return arg.selected && arg.selected.type === 'INDICATOR'; |
||||
|
}, |
||||
|
click: (arg) => { |
||||
|
axios.post(Environment.apiContextPath('/api/re/lib/generateUserDefinedJavaClassDictionarySampleJsonCode/' + arg.selected.id)).then((response) => { |
||||
|
libGroovyDialogRef.open(response.data.source); |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
'separator', |
||||
|
{ |
||||
|
name: 'deploy', |
||||
|
label: $t('re.lib.grid.toolbar.deploy'), |
||||
|
icon: 'bi-balloon', |
||||
|
enableIf: (arg) => { |
||||
|
return arg.selected && arg.selected.type !== 'FOLDER' && arg.selected.status === 'SKETCH'; |
||||
|
}, |
||||
|
click: (arg) => { |
||||
|
DialogManager.confirm($t('re.lib.grid.toolbar.deploy.tip'), () => { |
||||
|
axios.post(Environment.apiContextPath('/api/re/lib/deploy/' + arg.selected.id)).then(() => { |
||||
|
treeGridRef.refresh(); |
||||
|
}); |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
'separator', |
||||
|
[ |
||||
|
{ |
||||
|
name: 'importGroup', |
||||
|
label: $t('re.lib.grid.toolbar.importGroup'), |
||||
|
icon: 'file_upload', |
||||
|
click: undefined, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'import', |
||||
|
label: $t('re.lib.grid.toolbar.import'), |
||||
|
icon: 'file_upload', |
||||
|
click: () => { |
||||
|
importDialogRef.open(); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'importSample', |
||||
|
label: $t('re.lib.grid.toolbar.importSample'), |
||||
|
icon: 'bi-database-up', |
||||
|
click: () => { |
||||
|
importSampleDialogRef.open(); |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
'separator', |
||||
|
'view', |
||||
|
'separator', |
||||
|
{ |
||||
|
extend: 'export', |
||||
|
enableIf: (arg) => { |
||||
|
return arg.selected; |
||||
|
}, |
||||
|
click: (arg) => { |
||||
|
let url = Environment.apiContextPath('/api/re/lib/export/' + arg.selected.id); |
||||
|
downloadIframe.src = url; |
||||
|
}, |
||||
|
}, |
||||
|
]" |
||||
|
:columns="[ |
||||
|
{ |
||||
|
width: '100%', |
||||
|
name: 'name', |
||||
|
label: $t('name'), |
||||
|
}, |
||||
|
{ |
||||
|
width: 80, |
||||
|
name: 'type', |
||||
|
label: $t('type'), |
||||
|
format: (value) => { |
||||
|
if (value !== 'FOLDER') { |
||||
|
return Formater.enum(Enums.LibType)(value); |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
{ width: 60, name: 'version', label: $t('version') }, |
||||
|
{ width: 60, name: 'status', label: $t('status'), format: Formater.enum(Enums.DeployStatus) }, |
||||
|
]" |
||||
|
:editor="{ |
||||
|
dialog: { |
||||
|
width: '600px', |
||||
|
}, |
||||
|
form: { |
||||
|
colsNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'parent', label: $t('parent'), type: 'text', hidden: true }, |
||||
|
{ name: 'type', label: $t('type'), type: 'text', hidden: true }, |
||||
|
{ |
||||
|
name: 'code', |
||||
|
label: $t('code'), |
||||
|
type: 'text', |
||||
|
showIf: (arg) => { |
||||
|
const type = arg.form.getFieldValue('type'); |
||||
|
return type !== 'FOLDER'; |
||||
|
}, |
||||
|
}, |
||||
|
{ name: 'name', label: $t('name'), type: 'text', required: true }, |
||||
|
{ name: 'description', label: $t('description'), type: 'text' }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
:viewer="{ |
||||
|
panel: { |
||||
|
columnNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'type', label: $t('type') }, |
||||
|
{ name: 'id', label: $t('id') }, |
||||
|
{ name: 'code', label: $t('code') }, |
||||
|
{ name: 'name', label: $t('name') }, |
||||
|
{ name: 'description', label: $t('description') }, |
||||
|
{ name: 'order', label: $t('order') }, |
||||
|
|
||||
|
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
||||
|
{ name: 'creator', label: $t('creator') }, |
||||
|
{ name: 'createDate', label: $t('createDate') }, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() }, |
||||
|
{ name: 'corporationCode', label: $t('corporationCode') }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
v-bind="attrs" |
||||
|
></w-grid> |
||||
|
<ImportDialog ref="importDialogRef"></ImportDialog> |
||||
|
<ImportSampleDialog ref="importSampleDialogRef"></ImportSampleDialog> |
||||
|
<iframe ref="downloadIframe" src="javascript:;" style="width: 0px; height: 0px"></iframe> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { useAttrs } from 'vue'; |
||||
|
import { axios, Environment, Formater, EnumTools, DialogManager } from 'platform-core'; |
||||
|
import ImportDialog from './ImportDialog.vue'; |
||||
|
import ImportSampleDialog from './ImportSampleDialog.vue'; |
||||
|
|
||||
|
const attrs = useAttrs(); |
||||
|
|
||||
|
const Enums = await EnumTools.fetch(['io.sc.engine.rule.core.enums.LibType', 'io.sc.engine.rule.core.enums.DeployStatus']); |
||||
|
let ValueTypeMap = {}; |
||||
|
const ValueTypeList = []; |
||||
|
const response = await axios.get(Environment.apiContextPath('/api/re/dictionary/getAllDictionaryMap')); |
||||
|
if (response && response.data) { |
||||
|
ValueTypeMap = {}; |
||||
|
ValueTypeList.splice(0, ValueTypeList.length); |
||||
|
for (const item of response.data) { |
||||
|
ValueTypeMap[item.key] = item.value; |
||||
|
ValueTypeList.push({ value: item.key, label: item.value }); |
||||
|
} |
||||
|
} |
||||
|
</script> |
@ -0,0 +1,337 @@ |
|||||
|
<template> |
||||
|
<w-grid |
||||
|
ref="gridRef" |
||||
|
:title="$t('re.resources.designer.processor.grid.title')" |
||||
|
dense-body |
||||
|
hide-bottom |
||||
|
:config-button="false" |
||||
|
selection="multiple" |
||||
|
:checkbox-selection="false" |
||||
|
:tree="false" |
||||
|
:fetch-data-url="Environment.apiContextPath('/api/re/indicator/processor?indicator=' + indicator.id)" |
||||
|
:data-url="Environment.apiContextPath('/api/re/indicator/processor')" |
||||
|
:pageable="false" |
||||
|
:toolbar-configure="{ noIcon: false }" |
||||
|
:toolbar-actions="[ |
||||
|
'refresh', |
||||
|
'separator', |
||||
|
[ |
||||
|
{ |
||||
|
extend: 'add', |
||||
|
click: undefined, |
||||
|
}, |
||||
|
{ |
||||
|
extend: 'add', |
||||
|
name: 'arithmetic', |
||||
|
label: Formater.enum(Enums.ProcessorType)('ARITHMETIC'), |
||||
|
icon: 'bi-calculator', |
||||
|
enableIf: (arg) => { |
||||
|
return indicator.type !== 'RULE_RESULT' && indicator.type !== 'SINGLE_RULE_RESULT'; |
||||
|
}, |
||||
|
afterClick: (arg) => { |
||||
|
arg.grid.getEditorForm().setFieldValue('type', 'ARITHMETIC'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
extend: 'add', |
||||
|
name: 'ternary', |
||||
|
label: Formater.enum(Enums.ProcessorType)('TERNARY'), |
||||
|
icon: 'bi-question', |
||||
|
enableIf: (arg) => { |
||||
|
return indicator.type !== 'RULE_RESULT' && indicator.type !== 'SINGLE_RULE_RESULT'; |
||||
|
}, |
||||
|
afterClick: (arg) => { |
||||
|
arg.grid.getEditorForm().setFieldValue('type', 'TERNARY'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
extend: 'add', |
||||
|
name: 'whenThen', |
||||
|
label: Formater.enum(Enums.ProcessorType)('WHEN_THEN'), |
||||
|
icon: 'bi-sliders', |
||||
|
enableIf: (arg) => { |
||||
|
return indicator.type !== 'RULE_RESULT' && indicator.type !== 'SINGLE_RULE_RESULT'; |
||||
|
}, |
||||
|
afterClick: (arg) => { |
||||
|
arg.grid.getEditorForm().setFieldValue('type', 'WHEN_THEN'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
extend: 'add', |
||||
|
name: 'numberRange', |
||||
|
label: Formater.enum(Enums.ProcessorType)('NUMBER_RANGE'), |
||||
|
icon: 'bi-justify', |
||||
|
enableIf: (arg) => { |
||||
|
return indicator.type !== 'RULE_RESULT' && indicator.type !== 'SINGLE_RULE_RESULT'; |
||||
|
}, |
||||
|
afterClick: (arg) => { |
||||
|
arg.grid.getEditorForm().setFieldValue('type', 'NUMBER_RANGE'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
extend: 'add', |
||||
|
name: 'conditionRange', |
||||
|
label: Formater.enum(Enums.ProcessorType)('CONDITION_RANGE'), |
||||
|
icon: 'bi-rainbow', |
||||
|
enableIf: (arg) => { |
||||
|
return indicator.type !== 'RULE_RESULT' && indicator.type !== 'SINGLE_RULE_RESULT'; |
||||
|
}, |
||||
|
afterClick: (arg) => { |
||||
|
arg.grid.getEditorForm().setFieldValue('type', 'CONDITION_RANGE'); |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
extend: 'add', |
||||
|
name: 'groovyScript', |
||||
|
label: Formater.enum(Enums.ProcessorType)('GROOVY_SCRIPT'), |
||||
|
icon: 'bi-code', |
||||
|
enableIf: (arg) => { |
||||
|
return indicator.type !== 'RULE_RESULT' && indicator.type !== 'SINGLE_RULE_RESULT'; |
||||
|
}, |
||||
|
afterClick: (arg) => { |
||||
|
arg.grid.getEditorForm().setFieldValue('type', 'GROOVY_SCRIPT'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
extend: 'add', |
||||
|
name: 'sql', |
||||
|
label: Formater.enum(Enums.ProcessorType)('SQL'), |
||||
|
icon: 'bi-filetype-sql', |
||||
|
enableIf: (arg) => { |
||||
|
return indicator.type !== 'RULE_RESULT' && indicator.type !== 'SINGLE_RULE_RESULT'; |
||||
|
}, |
||||
|
afterClick: (arg) => { |
||||
|
arg.grid.getEditorForm().setFieldValue('type', 'SQL'); |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
'clone', |
||||
|
'edit', |
||||
|
'remove', |
||||
|
'separator', |
||||
|
'view', |
||||
|
'separator', |
||||
|
'export', |
||||
|
]" |
||||
|
:columns="[ |
||||
|
{ width: 60, name: 'order', label: $t('order'), sortable: false, align: 'right' }, |
||||
|
{ width: 120, name: 'type', label: $t('type'), sortable: false, format: Formater.enum(Enums.ProcessorType) }, |
||||
|
{ |
||||
|
width: '100%', |
||||
|
name: 'content', |
||||
|
label: $t('re.resources.designer.processor.grid.entity.content'), |
||||
|
sortable: false, |
||||
|
format: (value, row) => { |
||||
|
const type = row.type; |
||||
|
|
||||
|
return ''; |
||||
|
}, |
||||
|
}, |
||||
|
]" |
||||
|
:editor="{ |
||||
|
dialog: { |
||||
|
width: '600px', |
||||
|
}, |
||||
|
form: { |
||||
|
colsNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'indicator', label: 'indicator', type: 'text', defaultValue: indicator.id, hidden: true }, |
||||
|
{ name: 'id', label: $t('id'), type: 'text', hidden: true }, |
||||
|
{ name: 'order', label: $t('order'), type: 'number', hidden: true }, |
||||
|
{ name: 'type', label: $t('type'), type: 'text', hidden: true }, |
||||
|
{ name: 'description', label: $t('description'), type: 'text' }, |
||||
|
{ |
||||
|
name: 'arithmetic', |
||||
|
label: $t('re.resources.designer.processor.grid.entity.arithmetic'), |
||||
|
type: 'code-mirror', |
||||
|
showIf: (arg) => { |
||||
|
return 'ARITHMETIC' === arg.form.getFieldValue('type'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'ternaryCondition', |
||||
|
label: $t('re.resources.designer.processor.grid.entity.ternaryCondition'), |
||||
|
type: 'code-mirror', |
||||
|
rows: 1, |
||||
|
showIf: (arg) => { |
||||
|
return 'TERNARY' === arg.form.getFieldValue('type'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'ternaryTrue', |
||||
|
label: $t('re.resources.designer.processor.grid.entity.ternaryTrue'), |
||||
|
type: 'code-mirror', |
||||
|
rows: 1, |
||||
|
showIf: (arg) => { |
||||
|
return 'TERNARY' === arg.form.getFieldValue('type'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'ternaryFalse', |
||||
|
label: $t('re.resources.designer.processor.grid.entity.ternaryFalse'), |
||||
|
type: 'code-mirror', |
||||
|
lang: 'groovy', |
||||
|
rows: 1, |
||||
|
showIf: (arg) => { |
||||
|
return 'TERNARY' === arg.form.getFieldValue('type'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'when', |
||||
|
label: $t('re.resources.designer.processor.grid.entity.when'), |
||||
|
type: 'code-mirror', |
||||
|
lang: 'groovy', |
||||
|
rows: 1, |
||||
|
showIf: (arg) => { |
||||
|
return 'WHEN_THEN' === arg.form.getFieldValue('type'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'then', |
||||
|
label: $t('re.resources.designer.processor.grid.entity.then'), |
||||
|
type: 'code-mirror', |
||||
|
lang: 'groovy', |
||||
|
rows: 1, |
||||
|
showIf: (arg) => { |
||||
|
return 'WHEN_THEN' === arg.form.getFieldValue('type'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'isWhenThenShorted', |
||||
|
label: $t('re.resources.designer.processor.grid.entity.isWhenThenShorted'), |
||||
|
type: 'checkbox', |
||||
|
showIf: (arg) => { |
||||
|
return 'WHEN_THEN' === arg.form.getFieldValue('type'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'numberRange', |
||||
|
label: $t('re.resources.designer.processor.grid.entity.numberRange'), |
||||
|
type: 'code-mirror', |
||||
|
rows: 1, |
||||
|
showIf: (arg) => { |
||||
|
return 'NUMBER_RANGE' === arg.form.getFieldValue('type'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'conditionRange', |
||||
|
label: $t('re.resources.designer.processor.grid.entity.conditionRange'), |
||||
|
type: 'code-mirror', |
||||
|
rows: 1, |
||||
|
showIf: (arg) => { |
||||
|
return 'CONDITION_RANGE' === arg.form.getFieldValue('type'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'groovyScript', |
||||
|
label: $t('re.resources.designer.processor.grid.entity.groovyScript'), |
||||
|
type: 'code-mirror', |
||||
|
rows: 1, |
||||
|
showIf: (arg) => { |
||||
|
return 'GROOVY_SCRIPT' === arg.form.getFieldValue('type'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'sqlDatasourceName', |
||||
|
label: $t('re.resources.designer.processor.grid.entity.sqlDatasourceName'), |
||||
|
type: 'select', |
||||
|
rows: 1, |
||||
|
showIf: (arg) => { |
||||
|
return 'SQL' === arg.form.getFieldValue('type'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'sql', |
||||
|
label: $t('re.resources.designer.processor.grid.entity.sql'), |
||||
|
type: 'select', |
||||
|
rows: 1, |
||||
|
showIf: (arg) => { |
||||
|
return 'SQL' === arg.form.getFieldValue('type'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'sqlParameterValues', |
||||
|
label: $t('re.resources.designer.processor.grid.entity.sqlParameterValues'), |
||||
|
type: 'select', |
||||
|
rows: 1, |
||||
|
showIf: (arg) => { |
||||
|
return 'SQL' === arg.form.getFieldValue('type'); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'sqlFieldMapping', |
||||
|
label: $t('re.resources.designer.processor.grid.entity.sqlFieldMapping'), |
||||
|
type: 'select', |
||||
|
rows: 1, |
||||
|
showIf: (arg) => { |
||||
|
return 'SQL' === arg.form.getFieldValue('type'); |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
:viewer="{ |
||||
|
panel: { |
||||
|
columnNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'id', label: $t(''), primaryKey: true }, |
||||
|
{ name: 'parameter', label: $t('') }, |
||||
|
{ name: 'description', label: $t('') }, |
||||
|
{ name: 'order', label: $t('') }, |
||||
|
{ name: 'enable', label: $t('') }, |
||||
|
{ name: 'type', label: $t('') }, |
||||
|
|
||||
|
{ name: 'arithmetic', label: $t('re.resources.designer.processor.grid.entity.arithmetic') }, |
||||
|
{ name: 'ternaryCondition', label: $t('re.resources.designer.processor.grid.entity.ternaryCondition') }, |
||||
|
{ name: 'ternaryTrue', label: $t('re.resources.designer.processor.grid.entity.ternaryTrue') }, |
||||
|
{ name: 'ternaryFalse', label: $t('re.resources.designer.processor.grid.entity.ternaryFalse') }, |
||||
|
{ name: 'when', label: $t('re.resources.designer.processor.grid.entity.when') }, |
||||
|
{ name: 'then', label: $t('re.resources.designer.processor.grid.entity.then') }, |
||||
|
{ name: 'isWhenThenShorted', label: $t('re.resources.designer.processor.grid.entity.isWhenThenShorted') }, |
||||
|
{ name: 'rule', label: $t('re.resources.designer.processor.grid.entity.rule') }, |
||||
|
{ name: 'singleRule', label: $t('re.resources.designer.processor.grid.entity.singleRule') }, |
||||
|
{ name: 'numberRange', label: $t('re.resources.designer.processor.grid.entity.numberRange') }, |
||||
|
{ name: 'conditionRange', label: $t('re.resources.designer.processor.grid.entity.conditionRange') }, |
||||
|
{ name: 'groovyScript', label: $t('re.resources.designer.processor.grid.entity.groovyScript') }, |
||||
|
|
||||
|
{ name: 'sqlDatasourceName', label: $t('re.resources.designer.processor.grid.entity.sqlDatasourceName') }, |
||||
|
{ name: 'sql', label: $t('re.resources.designer.processor.grid.entity.sql') }, |
||||
|
{ name: 'sqlParameterValues', label: $t('re.resources.designer.processor.grid.entity.sqlParameterValues') }, |
||||
|
{ name: 'sqlFieldMapping', label: $t('re.resources.designer.processor.grid.entity.sqlFieldMapping') }, |
||||
|
|
||||
|
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
||||
|
{ name: 'creator', label: $t('creator') }, |
||||
|
{ name: 'createDate', label: $t('createDate') }, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() }, |
||||
|
{ name: 'corporationCode', label: $t('corporationCode') }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
></w-grid> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref, onMounted } from 'vue'; |
||||
|
import { Environment, Formater, EnumTools, Options } from 'platform-core'; |
||||
|
|
||||
|
const props = defineProps({ |
||||
|
indicator: { type: Object, default: undefined }, |
||||
|
}); |
||||
|
|
||||
|
const gridRef = ref(); |
||||
|
|
||||
|
const refresh = () => { |
||||
|
gridRef.value.refresh(); |
||||
|
}; |
||||
|
|
||||
|
onMounted(() => { |
||||
|
gridRef.value.refresh(); |
||||
|
}); |
||||
|
|
||||
|
defineExpose({ |
||||
|
refresh, |
||||
|
}); |
||||
|
|
||||
|
const Enums = await EnumTools.fetch(['io.sc.engine.rule.core.enums.ProcessorType']); |
||||
|
</script> |
@ -0,0 +1,217 @@ |
|||||
|
<template> |
||||
|
<div style="height: 100%"> |
||||
|
<w-grid |
||||
|
ref="gridRef" |
||||
|
:title="$t('re.resources.designer.validator.grid.title')" |
||||
|
dense-body |
||||
|
hide-bottom |
||||
|
:config-button="false" |
||||
|
selection="multiple" |
||||
|
:checkbox-selection="false" |
||||
|
:tree="false" |
||||
|
:fetch-data-url="Environment.apiContextPath('/api/re/indicator/validator?indicator=' + indicator.id)" |
||||
|
:data-url="Environment.apiContextPath('/api/re/indicator/validator')" |
||||
|
:pageable="false" |
||||
|
:toolbar-configure="{ noIcon: false }" |
||||
|
:toolbar-actions="['refresh', 'separator', 'add', 'edit', 'remove', 'separator', 'view', 'separator', 'export']" |
||||
|
:columns="[ |
||||
|
{ width: 60, name: 'order', label: $t('order'), sortable: false, align: 'right' }, |
||||
|
{ width: 100, name: 'type', label: $t('type'), sortable: false, format: Formater.enum(Enums.ValidatorType) }, |
||||
|
{ |
||||
|
width: 300, |
||||
|
name: 'content', |
||||
|
label: $t('re.resources.designer.validator.grid.entity.content'), |
||||
|
sortable: false, |
||||
|
format: (value, row) => { |
||||
|
const type = row.type; |
||||
|
if (type == 'EMPTY' || type == 'NOT_EMPTY' || type == 'TRUE' || type == 'FALSE' || type == 'EMAIL') { |
||||
|
return ''; |
||||
|
} else if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') { |
||||
|
return Tools.generateIntervalRange(row.minInclude, row.minValue, row.maxValue, row.maxInclude); |
||||
|
} else if (type == 'PATTERN') { |
||||
|
return row.pattern; |
||||
|
} |
||||
|
return ''; |
||||
|
}, |
||||
|
}, |
||||
|
{ width: '100%', name: 'tip', label: $t('re.resources.designer.validator.grid.entity.tip'), sortable: false }, |
||||
|
]" |
||||
|
:editor="{ |
||||
|
dialog: { |
||||
|
width: '600px', |
||||
|
}, |
||||
|
form: { |
||||
|
colsNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'indicator', label: 'indicator', type: 'text', defaultValue: indicator.id, hidden: true }, |
||||
|
{ name: 'id', label: $t('id'), type: 'text', hidden: true }, |
||||
|
{ |
||||
|
name: 'description', |
||||
|
label: $t('description'), |
||||
|
type: 'text', |
||||
|
}, |
||||
|
{ |
||||
|
name: 'type', |
||||
|
label: $t('type'), |
||||
|
type: 'select', |
||||
|
required: true, |
||||
|
options: |
||||
|
ValueTypeAndValidatorTypeMapping[ValueTypeAndValidatorTypeMapping[indicator.valueType] == null ? 'java.lang.Object' : indicator.valueType], |
||||
|
}, |
||||
|
{ |
||||
|
name: 'minValue', |
||||
|
label: $t('minValue'), |
||||
|
type: 'text', |
||||
|
showIf: (arg) => { |
||||
|
const type = arg.form.getFieldValue('type'); |
||||
|
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') { |
||||
|
return true; |
||||
|
} |
||||
|
return false; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'minInclude', |
||||
|
label: $t('isMinValueInclude'), |
||||
|
type: 'checkbox', |
||||
|
showIf: (arg) => { |
||||
|
const type = arg.form.getFieldValue('type'); |
||||
|
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') { |
||||
|
return true; |
||||
|
} |
||||
|
return false; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'maxValue', |
||||
|
label: $t('maxValue'), |
||||
|
type: 'text', |
||||
|
showIf: (arg) => { |
||||
|
const type = arg.form.getFieldValue('type'); |
||||
|
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') { |
||||
|
return true; |
||||
|
} |
||||
|
return false; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'maxInclude', |
||||
|
label: $t('isMaxValueInclude'), |
||||
|
type: 'checkbox', |
||||
|
showIf: (arg) => { |
||||
|
const type = arg.form.getFieldValue('type'); |
||||
|
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') { |
||||
|
return true; |
||||
|
} |
||||
|
return false; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'pattern', |
||||
|
label: $t('RegExp'), |
||||
|
type: 'text', |
||||
|
showIf: (arg) => { |
||||
|
const type = arg.form.getFieldValue('type'); |
||||
|
if (type == 'PATTERN') { |
||||
|
return true; |
||||
|
} |
||||
|
return false; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'tip', |
||||
|
label: $t('re.resources.designer.validator.grid.entity.tip'), |
||||
|
type: 'text', |
||||
|
}, |
||||
|
{ name: 'order', label: $t('order'), type: 'number', hidden: false }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
:viewer="{ |
||||
|
panel: { |
||||
|
columnNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'id', label: $t('id') }, |
||||
|
{ name: 'order', label: $t('order') }, |
||||
|
{ name: 'type', label: $t('type'), format: Formater.none() }, |
||||
|
{ name: 'description', label: $t('description') }, |
||||
|
{ name: 'tip', label: $t('re.resources.designer.validator.grid.entity.tip') }, |
||||
|
{ name: 'minInclude', label: $t('isMinValueInclude') }, |
||||
|
{ name: 'minValue', label: $t('minValue') }, |
||||
|
{ name: 'maxValue', label: $t('maxValue') }, |
||||
|
{ name: 'maxInclude', label: $t('isMaxValueInclude') }, |
||||
|
{ name: 'pattern', label: $t('RegExp') }, |
||||
|
|
||||
|
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
||||
|
{ name: 'creator', label: $t('creator') }, |
||||
|
{ name: 'createDate', label: $t('createDate') }, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() }, |
||||
|
{ name: 'corporationCode', label: $t('corporationCode') }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
></w-grid> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref, onMounted } from 'vue'; |
||||
|
import { useI18n } from 'vue-i18n'; |
||||
|
import { Environment, EnumTools, Formater, Tools } from 'platform-core'; |
||||
|
|
||||
|
const props = defineProps({ |
||||
|
indicator: { type: Object, default: undefined }, |
||||
|
}); |
||||
|
|
||||
|
const { t } = useI18n(); |
||||
|
const gridRef = ref(); |
||||
|
|
||||
|
const ValueTypeAndValidatorTypeMapping = { |
||||
|
'java.lang.Boolean': [ |
||||
|
{ value: 'NOT_EMPTY', label: t('io.sc.engine.rule.core.enums.ValidatorType.NOT_EMPTY') }, |
||||
|
{ value: 'EMPTY', label: t('io.sc.engine.rule.core.enums.ValidatorType.EMPTY') }, |
||||
|
{ value: 'TRUE', label: t('io.sc.engine.rule.core.enums.ValidatorType.TRUE') }, |
||||
|
{ value: 'FALSE', label: t('io.sc.engine.rule.core.enums.ValidatorType.FALSE') }, |
||||
|
], |
||||
|
'java.lang.Long': [ |
||||
|
{ value: 'NOT_EMPTY', label: t('io.sc.engine.rule.core.enums.ValidatorType.NOT_EMPTY') }, |
||||
|
{ value: 'EMPTY', label: t('io.sc.engine.rule.core.enums.ValidatorType.EMPTY') }, |
||||
|
{ value: 'INTEGER_RANGE', label: t('io.sc.engine.rule.core.enums.ValidatorType.INTEGER_RANGE') }, |
||||
|
], |
||||
|
'java.math.BigDecimal': [ |
||||
|
{ value: 'NOT_EMPTY', label: t('io.sc.engine.rule.core.enums.ValidatorType.NOT_EMPTY') }, |
||||
|
{ value: 'EMPTY', label: t('io.sc.engine.rule.core.enums.ValidatorType.EMPTY') }, |
||||
|
{ value: 'DECIMAL_RANGE', label: t('io.sc.engine.rule.core.enums.ValidatorType.DECIMAL_RANGE') }, |
||||
|
], |
||||
|
'java.lang.String': [ |
||||
|
{ value: 'NOT_EMPTY', label: t('io.sc.engine.rule.core.enums.ValidatorType.NOT_EMPTY') }, |
||||
|
{ value: 'EMPTY', label: t('io.sc.engine.rule.core.enums.ValidatorType.EMPTY') }, |
||||
|
{ value: 'LENGTH_RANGE', label: t('io.sc.engine.rule.core.enums.ValidatorType.LENGTH_RANGE') }, |
||||
|
{ value: 'EMAIL', label: t('io.sc.engine.rule.core.enums.ValidatorType.EMAIL') }, |
||||
|
{ value: 'PATTERN', label: t('io.sc.engine.rule.core.enums.ValidatorType.PATTERN') }, |
||||
|
], |
||||
|
'java.util.Date': [ |
||||
|
{ value: 'NOT_EMPTY', label: t('io.sc.engine.rule.core.enums.ValidatorType.NOT_EMPTY') }, |
||||
|
{ value: 'EMPTY', label: t('io.sc.engine.rule.core.enums.ValidatorType.EMPTY') }, |
||||
|
{ value: 'DATE_RANGE', label: t('io.sc.engine.rule.core.enums.ValidatorType.DATE_RANGE') }, |
||||
|
], |
||||
|
'java.lang.Object': [ |
||||
|
{ value: 'NOT_EMPTY', label: t('io.sc.engine.rule.core.enums.ValidatorType.NOT_EMPTY') }, |
||||
|
{ value: 'EMPTY', label: t('io.sc.engine.rule.core.enums.ValidatorType.EMPTY') }, |
||||
|
], |
||||
|
}; |
||||
|
|
||||
|
const refresh = () => { |
||||
|
gridRef.value.refresh(); |
||||
|
}; |
||||
|
|
||||
|
onMounted(() => { |
||||
|
gridRef.value.refresh(); |
||||
|
}); |
||||
|
|
||||
|
defineExpose({ |
||||
|
refresh, |
||||
|
}); |
||||
|
|
||||
|
const Enums = await EnumTools.fetch(['io.sc.engine.rule.core.enums.ValidatorType']); |
||||
|
</script> |
@ -1,4 +1,147 @@ |
|||||
<template> |
<template> |
||||
<div>migeration</div> |
<div> |
||||
|
<div class="row" style="padding-top: 50px"> |
||||
|
<div class="col-1"></div> |
||||
|
<div class="col-4"> |
||||
|
<q-card> |
||||
|
<q-card-section> |
||||
|
<div class="text-h6">{{ $t('re.migration.import.title') }}</div> |
||||
|
<div class="text-subtitle2">{{ $t('re.migration.import.subTitle') }}</div> |
||||
|
</q-card-section> |
||||
|
|
||||
|
<q-separator /> |
||||
|
|
||||
|
<q-card-section> |
||||
|
<q-file ref="fileRef" v-model="fileValueRef" :label="$t('file.single.tip')" dense outlined clearable counter accept=".json"> |
||||
|
<template #prepend> |
||||
|
<q-icon name="cloud_upload" /> |
||||
|
</template> |
||||
|
</q-file> |
||||
|
</q-card-section> |
||||
|
|
||||
|
<q-card-actions align="right"> |
||||
|
<q-btn |
||||
|
color="primary" |
||||
|
:label="$t('re.migration.import.action')" |
||||
|
@click=" |
||||
|
() => { |
||||
|
axios |
||||
|
.post( |
||||
|
Environment.apiContextPath('/api/re/migration/import'), |
||||
|
{ |
||||
|
file: fileRef.value.nativeEl.files[0], |
||||
|
}, |
||||
|
{ |
||||
|
headers: { |
||||
|
'Content-Type': 'multipart/form-data', |
||||
|
}, |
||||
|
}, |
||||
|
) |
||||
|
.then(() => { |
||||
|
NotifyManager.info($t('operationSuccess')); |
||||
|
}); |
||||
|
} |
||||
|
" |
||||
|
></q-btn> |
||||
|
</q-card-actions> |
||||
|
</q-card> |
||||
|
</div> |
||||
|
<div class="col-1"></div> |
||||
|
<div class="col-5"> |
||||
|
<q-card> |
||||
|
<q-card-section> |
||||
|
<div class="text-h6">{{ $t('re.migration.export.title') }}</div> |
||||
|
<div class="text-subtitle2">{{ $t('re.migration.export.subTitle') }}</div> |
||||
|
</q-card-section> |
||||
|
|
||||
|
<q-separator /> |
||||
|
|
||||
|
<q-card-actions align="right"> |
||||
|
<q-btn |
||||
|
color="primary" |
||||
|
:label="$t('re.migration.export.action')" |
||||
|
@click=" |
||||
|
() => { |
||||
|
let url = Environment.apiContextPath('/api/re/migration/export'); |
||||
|
downloadIframeRef.src = url; |
||||
|
} |
||||
|
" |
||||
|
></q-btn> |
||||
|
</q-card-actions> |
||||
|
</q-card> |
||||
|
</div> |
||||
|
<div class="col-1"></div> |
||||
|
</div> |
||||
|
<div class="row" style="padding-top: 50px"> |
||||
|
<div class="col-1"></div> |
||||
|
<div class="col-4"> |
||||
|
<q-card> |
||||
|
<q-card-section> |
||||
|
<div class="text-h6">{{ $t('re.migration.importFromServer.title') }}</div> |
||||
|
<div class="text-subtitle2">{{ $t('re.migration.importFromServer.subTitle') }}</div> |
||||
|
</q-card-section> |
||||
|
|
||||
|
<q-separator /> |
||||
|
|
||||
|
<q-card-section> |
||||
|
<q-input v-model="serverFilePathRef" outlined dense></q-input> |
||||
|
</q-card-section> |
||||
|
|
||||
|
<q-card-actions align="right"> |
||||
|
<q-btn |
||||
|
color="primary" |
||||
|
:label="$t('re.migration.importFromServer.action')" |
||||
|
@click=" |
||||
|
() => { |
||||
|
axios |
||||
|
.post(Environment.apiContextPath('/api/re/migration/importFromServerFile?filePath=' + encodeURIComponent(serverFilePathRef))) |
||||
|
.then(() => { |
||||
|
NotifyManager.info($t('operationSuccess')); |
||||
|
}); |
||||
|
} |
||||
|
" |
||||
|
></q-btn> |
||||
|
</q-card-actions> |
||||
|
</q-card> |
||||
|
</div> |
||||
|
<div class="col-1"></div> |
||||
|
<div class="col-5"> |
||||
|
<q-card> |
||||
|
<q-card-section> |
||||
|
<div class="text-h6">{{ $t('re.migration.remove.title') }}</div> |
||||
|
<div class="text-subtitle2">{{ $t('re.migration.remove.subTitle') }}</div> |
||||
|
</q-card-section> |
||||
|
|
||||
|
<q-separator /> |
||||
|
|
||||
|
<q-card-actions align="right"> |
||||
|
<q-btn |
||||
|
color="primary" |
||||
|
:label="$t('re.migration.remove.action')" |
||||
|
@click=" |
||||
|
() => { |
||||
|
DialogManager.confirm($t('re.migration.remove.action.tip'), () => { |
||||
|
axios.post(Environment.apiContextPath('/api/re/migration/removeAll')).then(() => { |
||||
|
NotifyManager.info($t('operationSuccess')); |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
" |
||||
|
></q-btn> |
||||
|
</q-card-actions> |
||||
|
</q-card> |
||||
|
</div> |
||||
|
<div class="col-1"></div> |
||||
|
</div> |
||||
|
<iframe ref="downloadIframeRef" src="javascript:;" style="width: 0px; height: 0px"></iframe> |
||||
|
</div> |
||||
</template> |
</template> |
||||
<script setup lang="ts"></script> |
<script setup lang="ts"> |
||||
|
import { ref } from 'vue'; |
||||
|
import { axios, Environment, NotifyManager, DialogManager } from 'platform-core'; |
||||
|
|
||||
|
const fileRef = ref(); |
||||
|
const fileValueRef = ref(); |
||||
|
const serverFilePathRef = ref(); |
||||
|
const downloadIframeRef = ref(); |
||||
|
</script> |
||||
|
@ -0,0 +1,16 @@ |
|||||
|
/* |
||||
|
* 国际化消息源插件配置 |
||||
|
* 功能: 该插件配置为框架提供国际化消息资源 |
||||
|
* 使用说明: |
||||
|
* includes: 包含国际化消息资源列表 |
||||
|
* excludes: 排除国际化消息资源列表 |
||||
|
* 注意: 当一个包名同时存在于 includes 和 excludes 中, excludes 优先, 即该包不会被自动扫描 |
||||
|
*/ |
||||
|
|
||||
|
|
||||
|
{ |
||||
|
"includes":[ |
||||
|
"io/sc/engine/rule/sample/i18n/messages" |
||||
|
], |
||||
|
"excludes":[] |
||||
|
} |
@ -0,0 +1,70 @@ |
|||||
|
[ |
||||
|
//应用示例 |
||||
|
{"id":"re.engine.sample.resource.app","order":200}, |
||||
|
//应用示例/非零售内评 |
||||
|
{"id":"re.engine.sample.resource.app.irs","parentId":"re.engine.sample.resource.app","order":100}, |
||||
|
//应用示例/非零售内评/汉口银行-内部评级模型(非零售) |
||||
|
{ |
||||
|
"order" :100, |
||||
|
"parentId" :"re.engine.sample.resource.app.irs", |
||||
|
"id" :"re.engine.sample.resource.app.irs.hankou", |
||||
|
"file" :"classpath:/io/sc/engine/rule/sample/app/irs/hankou/汉口银行-内部评级模型(非零售).json" |
||||
|
}, |
||||
|
//应用示例/零售内评 |
||||
|
{"id":"re.engine.sample.resource.app.rirs","parentId":"re.engine.sample.resource.app","order":200}, |
||||
|
//应用示例/零售内评/汉口银行-内部评级模型(零售) |
||||
|
{ |
||||
|
"order" :200, |
||||
|
"parentId" :"re.engine.sample.resource.app.rirs", |
||||
|
"id" :"re.engine.sample.resource.app.rirs.hankou", |
||||
|
"file" :"classpath:/io/sc/engine/rule/sample/app/rirs/hankou/汉口银行-内部评级模型(零售).json" |
||||
|
}, |
||||
|
//应用示例/零售内评/天府银行-风险定价模型 |
||||
|
{ |
||||
|
"order" :100, |
||||
|
"parentId" :"re.engine.sample.resource.app.rirs", |
||||
|
"id" :"re.engine.sample.resource.app.rirs.tianfu", |
||||
|
"file" :"classpath:/io/sc/engine/rule/sample/app/rirs/tianfu/天府银行-风险定价模型.json" |
||||
|
}, |
||||
|
//应用示例/预警 |
||||
|
{"id":"re.engine.sample.resource.app.warning","order":300}, |
||||
|
//应用示例/预警/平安租赁-财务分析预警 |
||||
|
{ |
||||
|
"order" :100, |
||||
|
"parentId" :"re.engine.sample.resource.app.warning", |
||||
|
"id" :"re.engine.sample.resource.app.warning.pingan.financial", |
||||
|
"file" :"classpath:/io/sc/engine/rule/sample/app/warning/pingan/平安租赁-财报分析预警.json", |
||||
|
"dictionary":"classpath:/io/sc/engine/rule/sample/app/warning/pingan/平安租赁-财报分析预警(数据字典).json", |
||||
|
"lib" :"classpath:/io/sc/engine/rule/sample/app/warning/pingan/平安租赁-财报分析预警(指标库).json" |
||||
|
}, |
||||
|
//应用示例/预警/平安租赁-租后预警 |
||||
|
{ |
||||
|
"order" :200, |
||||
|
"parentId" :"re.engine.sample.resource.app.warning", |
||||
|
"id" :"re.engine.sample.resource.app.warning.pingan.after_lease", |
||||
|
"file" :"classpath:/io/sc/engine/rule/sample/app/warning/pingan/平安租赁-租后预警规则.json" |
||||
|
}, |
||||
|
//应用示例/其他 |
||||
|
{"id":"re.engine.sample.resource.app.other","order":400}, |
||||
|
//应用示例/其他/昆山农商行-反洗钱模型(机器学习模型) |
||||
|
{ |
||||
|
"order" :100, |
||||
|
"parentId" :"re.engine.sample.resource.app.other", |
||||
|
"id" :"re.engine.sample.resource.app.other.aml", |
||||
|
"file" :"classpath:/io/sc/engine/rule/sample/app/other/昆山农商行-反洗钱模型(机器学习模型).json" |
||||
|
}, |
||||
|
//应用示例/其他/昆山农商行-非法集资(规则) |
||||
|
{ |
||||
|
"order" :200, |
||||
|
"parentId" :"re.engine.sample.resource.app.other", |
||||
|
"id" :"re.engine.sample.resource.app.other.illegal_saving", |
||||
|
"file" :"classpath:/io/sc/engine/rule/sample/app/other/昆山农商行-非法集资(规则).json" |
||||
|
}, |
||||
|
//应用示例/其他/个人消费贷模型(英语) |
||||
|
{ |
||||
|
"order" :300, |
||||
|
"parentId" :"re.engine.sample.resource.app.other", |
||||
|
"id" :"re.engine.sample.resource.app.other.PersonalConsumptionLoanEnglish", |
||||
|
"file" :"classpath:/io/sc/engine/rule/sample/app/other/个人消费贷模型(英语).json" |
||||
|
} |
||||
|
] |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
File diff suppressed because one or more lines are too long
@ -0,0 +1,34 @@ |
|||||
|
re.engine.sample.resource.app=Application Sample |
||||
|
re.engine.sample.resource.app.description= |
||||
|
|
||||
|
# \u975E\u96F6\u552E\u5185\u8BC4 |
||||
|
re.engine.sample.resource.app.irs=IRS Model Sample |
||||
|
re.engine.sample.resource.app.irs.description= |
||||
|
re.engine.sample.resource.app.irs.hankou=Not Retail Rate Model |
||||
|
re.engine.sample.resource.app.irs.hankou.description=Not Retail Rate Model |
||||
|
|
||||
|
# \u96F6\u552E\u5185\u8BC4 |
||||
|
re.engine.sample.resource.app.rirs=RIRS Model Sample |
||||
|
re.engine.sample.resource.app.rirs.description= |
||||
|
re.engine.sample.resource.app.rirs.hankou=Retail Rate Model |
||||
|
re.engine.sample.resource.app.rirs.hankou.description=Retail Rate Model |
||||
|
re.engine.sample.resource.app.rirs.tianfu=Price Model |
||||
|
re.engine.sample.resource.app.rirs.tianfu.description=Price Model |
||||
|
|
||||
|
# \u9884\u8B66 |
||||
|
re.engine.sample.resource.app.warning=Warning Sample |
||||
|
re.engine.sample.resource.app.warning.description= |
||||
|
re.engine.sample.resource.app.warning.pingan.financial=Financial Warning Rule |
||||
|
re.engine.sample.resource.app.warning.pingan.financial.description=Financial Warning Rule |
||||
|
re.engine.sample.resource.app.warning.pingan.after_lease=Post-Loan Warning Rules |
||||
|
re.engine.sample.resource.app.warning.pingan.after_lease.description=Post-Loan Warning Rules |
||||
|
|
||||
|
# \u5176\u4ED6 |
||||
|
re.engine.sample.resource.app.other=Other Sample |
||||
|
re.engine.sample.resource.app.other.description= |
||||
|
re.engine.sample.resource.app.other.aml=AML (Machine Learning Model) |
||||
|
re.engine.sample.resource.app.other.aml.description=AML (Machine Learning Model) |
||||
|
re.engine.sample.resource.app.other.illegal_saving=Illegal Saving Rule |
||||
|
re.engine.sample.resource.app.other.illegal_saving.description=Illegal Saving Rule |
||||
|
re.engine.sample.resource.app.other.PersonalConsumptionLoanEnglish=Personal Consumption Loan Model |
||||
|
re.engine.sample.resource.app.other.PersonalConsumptionLoanEnglish.description=Personal Consumption Loan Model |
@ -0,0 +1,35 @@ |
|||||
|
re.engine.sample.resource.app=\u61C9\u7528\u793A\u4F8B |
||||
|
re.engine.sample.resource.app.description= |
||||
|
|
||||
|
# \u975E\u96F6\u552E\u5185\u8BC4 |
||||
|
re.engine.sample.resource.app.irs=\u975E\u96F6\u552E\u5167\u8A55 |
||||
|
re.engine.sample.resource.app.irs.description= |
||||
|
re.engine.sample.resource.app.irs.hankou=\u5167\u90E8\u8A55\u7D1A\u6A21\u578B(\u975E\u96F6\u552E) |
||||
|
re.engine.sample.resource.app.irs.hankou.description=\u975E\u96F6\u552E\u5167\u8A55\u6A21\u578B(\u91D1\u878D\u6A5F\u69CB\u3001\u767C\u50B5\u4F01\u696D\u3001\u4E00\u822C\u4F01\u696D) |
||||
|
|
||||
|
# \u96F6\u552E\u5185\u8BC4 |
||||
|
re.engine.sample.resource.app.rirs=\u96F6\u552E\u5167\u8A55 |
||||
|
re.engine.sample.resource.app.rirs.description= |
||||
|
re.engine.sample.resource.app.rirs.hankou=\u5167\u90E8\u8A55\u7D1A\u6A21\u578B(\u96F6\u552E) |
||||
|
re.engine.sample.resource.app.rirs.hankou.description=\u96F6\u552E\u8A55\u5206\u5361 |
||||
|
re.engine.sample.resource.app.rirs.tianfu=\u98A8\u96AA\u5B9A\u50F9\u6A21\u578B |
||||
|
re.engine.sample.resource.app.rirs.tianfu.description=\u98A8\u96AA\u5B9A\u50F9\u6A21\u578B(A\u3001B\u3001C\u5361;\u5B9A\u50F9\u6A21\u578B;\u9650\u984D\u6A21\u578B;\u8CC7\u7522\u7D44\u5408) |
||||
|
|
||||
|
# \u9884\u8B66 |
||||
|
re.engine.sample.resource.app.warning=\u9810\u8B66 |
||||
|
re.engine.sample.resource.app.warning.description= |
||||
|
re.engine.sample.resource.app.warning.pingan.financial=\u8CA1\u52D9\u5206\u6790\u9810\u8B66 |
||||
|
re.engine.sample.resource.app.warning.pingan.financial.description=\u8CA1\u52D9\u5206\u6790\u9810\u8B66\u898F\u5247 |
||||
|
re.engine.sample.resource.app.warning.pingan.after_lease=\u8CB8\u5F8C\u9810\u8B66 |
||||
|
re.engine.sample.resource.app.warning.pingan.after_lease.description=\u8CB8\u5F8C\u9810\u8B66\u898F\u5247 |
||||
|
|
||||
|
# \u5176\u4ED6 |
||||
|
re.engine.sample.resource.app.other=\u5176\u4ED6 |
||||
|
re.engine.sample.resource.app.other.description= |
||||
|
re.engine.sample.resource.app.other.aml=\u53CD\u6D17\u9322\u6A21\u578B(\u6A5F\u5668\u5B78\u7FD2\u6A21\u578B) |
||||
|
re.engine.sample.resource.app.other.aml.description=\u53CD\u6D17\u9322\u6A21\u578B(\u6A5F\u5668\u5B78\u7FD2\u6A21\u578B) |
||||
|
re.engine.sample.resource.app.other.illegal_saving=\u975E\u6CD5\u96C6\u8CC7(\u898F\u5247) |
||||
|
re.engine.sample.resource.app.other.illegal_saving.description=\u975E\u6CD5\u96C6\u8CC7(\u898F\u5247) |
||||
|
re.engine.sample.resource.app.other.PersonalConsumptionLoanEnglish=\u500B\u4EBA\u6D88\u8CBB\u8CB8\u6A21\u578B(\u82F1\u8A9E) |
||||
|
re.engine.sample.resource.app.other.PersonalConsumptionLoanEnglish.description=\u500B\u4EBA\u6D88\u8CBB\u8CB8\u6A21\u578B(\u82F1\u8A9E) |
||||
|
|
@ -0,0 +1,35 @@ |
|||||
|
re.engine.sample.resource.app=\u5E94\u7528\u793A\u4F8B |
||||
|
re.engine.sample.resource.app.description= |
||||
|
|
||||
|
# \u975E\u96F6\u552E\u5185\u8BC4 |
||||
|
re.engine.sample.resource.app.irs=\u975E\u96F6\u552E\u5185\u8BC4 |
||||
|
re.engine.sample.resource.app.irs.description= |
||||
|
re.engine.sample.resource.app.irs.hankou=\u5185\u90E8\u8BC4\u7EA7\u6A21\u578B(\u975E\u96F6\u552E) |
||||
|
re.engine.sample.resource.app.irs.hankou.description=\u975E\u96F6\u552E\u5185\u8BC4\u6A21\u578B(\u91D1\u878D\u673A\u6784\u3001\u53D1\u503A\u4F01\u4E1A\u3001\u4E00\u822C\u4F01\u4E1A) |
||||
|
|
||||
|
# \u96F6\u552E\u5185\u8BC4 |
||||
|
re.engine.sample.resource.app.rirs=\u96F6\u552E\u5185\u8BC4 |
||||
|
re.engine.sample.resource.app.rirs.description= |
||||
|
re.engine.sample.resource.app.rirs.hankou=\u5185\u90E8\u8BC4\u7EA7\u6A21\u578B(\u96F6\u552E) |
||||
|
re.engine.sample.resource.app.rirs.hankou.description=\u96F6\u552E\u8BC4\u5206\u5361 |
||||
|
re.engine.sample.resource.app.rirs.tianfu=\u98CE\u9669\u5B9A\u4EF7\u6A21\u578B |
||||
|
re.engine.sample.resource.app.rirs.tianfu.description=\u98CE\u9669\u5B9A\u4EF7\u6A21\u578B(A\u3001B\u3001C\u5361;\u5B9A\u4EF7\u6A21\u578B;\u9650\u989D\u6A21\u578B;\u8D44\u4EA7\u7EC4\u5408) |
||||
|
|
||||
|
# \u9884\u8B66 |
||||
|
re.engine.sample.resource.app.warning=\u9884\u8B66 |
||||
|
re.engine.sample.resource.app.warning.description= |
||||
|
re.engine.sample.resource.app.warning.pingan.financial=\u8D22\u52A1\u5206\u6790\u9884\u8B66 |
||||
|
re.engine.sample.resource.app.warning.pingan.financial.description=\u8D22\u52A1\u5206\u6790\u9884\u8B66\u89C4\u5219 |
||||
|
re.engine.sample.resource.app.warning.pingan.after_lease=\u8D37\u540E\u9884\u8B66 |
||||
|
re.engine.sample.resource.app.warning.pingan.after_lease.description=\u8D37\u540E\u9884\u8B66\u89C4\u5219 |
||||
|
|
||||
|
# \u5176\u4ED6 |
||||
|
re.engine.sample.resource.app.other=\u5176\u4ED6 |
||||
|
re.engine.sample.resource.app.other.description= |
||||
|
re.engine.sample.resource.app.other.aml=\u53CD\u6D17\u94B1\u6A21\u578B(\u673A\u5668\u5B66\u4E60\u6A21\u578B) |
||||
|
re.engine.sample.resource.app.other.aml.description=\u53CD\u6D17\u94B1\u6A21\u578B(\u673A\u5668\u5B66\u4E60\u6A21\u578B) |
||||
|
re.engine.sample.resource.app.other.illegal_saving=\u975E\u6CD5\u96C6\u8D44(\u89C4\u5219) |
||||
|
re.engine.sample.resource.app.other.illegal_saving.description=\u975E\u6CD5\u96C6\u8D44(\u89C4\u5219) |
||||
|
re.engine.sample.resource.app.other.PersonalConsumptionLoanEnglish=\u4E2A\u4EBA\u6D88\u8D39\u8D37\u6A21\u578B(\u82F1\u8BED) |
||||
|
re.engine.sample.resource.app.other.PersonalConsumptionLoanEnglish.description=\u4E2A\u4EBA\u6D88\u8D39\u8D37\u6A21\u578B(\u82F1\u8BED) |
||||
|
|
@ -0,0 +1,8 @@ |
|||||
|
<template> |
||||
|
<q-icon v-if="value" name="bi-check-lg" size="xs"></q-icon> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
const props = defineProps({ |
||||
|
value: { type: Boolean, default: true }, |
||||
|
}); |
||||
|
</script> |
Loading…
Reference in new issue