Sfoglia il codice sorgente

feat: 指标模型发布增加 status 参数,编辑计算公式增加括号包裹

yanglzh 4 mesi fa
parent
commit
3b908a9044

+ 1 - 1
src/views/system/datahub/modeling/calculationIndicator.vue

@@ -152,7 +152,7 @@ const onPublish = () => {
     type: 'warning',
   }).then(() => {
     publishLoading.value = true;
-    api.calculationIndicator.deploy({ dataTemplateKey: detail.value.key }).then(() => {
+    api.calculationIndicator.deploy({ dataTemplateKey: detail.value.key, status: publishStatus.value === '发布' ? 1 : 0 }).then(() => {
       ElMessage.success('操作成功');
       checkDeploy();
       typeList();

+ 1 - 1
src/views/system/datahub/modeling/component/addOrEditIndictor.vue

@@ -171,7 +171,7 @@ const assembleItem = (item: any) => {
 }
 
 const handleSelect = (value: any) => {
-  formulaForm.value.formula += value;
+  formulaForm.value.formula += `(${value})`;
 }
 
 const showformulaFormDialog = () => {