Browse Source

技术指标限制修改

duy 1 month ago
parent
commit
95d1a68d5b
1 changed files with 10 additions and 1 deletions
  1. 10 1
      src/views/codeRule/ruleManage.vue

+ 10 - 1
src/views/codeRule/ruleManage.vue

@@ -282,7 +282,7 @@
                 </div>
                 <div class="add-yp-title">
                   <span>{{ isEditJs?'编辑':'新增' }}</span>
-                  <div v-if="isEditJs">
+                  <div>
                      <el-button  size="small" style="background: rgb(168, 86, 248);color: white;" icon="el-icon-office-building" @click="conditionsSet">条件设置</el-button>
                          <el-button  size="small" style="background:rgb(37, 80, 162);;color: white;" icon="el-icon-connection" @click="linkEle">关联元素</el-button>
                   </div>
@@ -1285,6 +1285,11 @@ import { getStore, setStore } from "@/util/store";
     },
     //条件设置
     conditionsSet(){
+      
+        if(!this.jsDetail.id){
+          this.$message.error('请先保存技术指标信息');
+          return;
+        }
       if(this.jsDetail.info[0].name === '') {
         this.$message.error('请先添加技术指标内容');
         return;
@@ -1301,6 +1306,10 @@ import { getStore, setStore } from "@/util/store";
     },
     //关联元素
     linkEle() {
+         if(!this.jsDetail.id){
+          this.$message.error('请先保存技术指标信息');
+          return;
+        }
       if(this.jsDetail.info[0].name === '') {
         this.$message.error('请先添加技术指标内容');
         return;