Просмотр исходного кода

Merge branch 'blueBranch' into allTestUrgent

qymljy 9 месяцев назад
Родитель
Сommit
60700e15b2

+ 5 - 3
src/HManagement/siteManage/securityConfig/index.vue

@@ -85,7 +85,7 @@
             </p>
           </div>
         </div>
-        <customerCheckRule  @queryRule="queryRule"></customerCheckRule>
+        <customerCheckRule  @queryRule="queryRule" ></customerCheckRule>
       </div>
     </div>
     <div class="panel" style="margin-bottom:16px">
@@ -124,7 +124,7 @@
             </div>
           </div>
         </div>
-        <projectCheckRule   @queryRule="queryRule"></projectCheckRule>
+        <projectCheckRule @queryRule="queryRule();querySite_Parameter()" :setNumber="projectrepeatnum"></projectCheckRule>
       </div>
     </div>
     <div class="panel" style="margin-bottom:16px">
@@ -355,7 +355,8 @@ export default {
       querysaledata:'',
       queryhistoryproject:'',
       projectnameexcludefields:[],
-      isitemclass:''
+      isitemclass:'',
+      projectrepeatnum:''
     }
   },
   computed:{
@@ -401,6 +402,7 @@ export default {
       this.queryhistoryproject = res.data.queryhistoryproject
       this.isitemclass = res.data.isitemclass
       console.log(res.data,'数据2');
+      this.projectrepeatnum = res.data.projectrepeatnum
       this.setData = res.data
       this.$refs.messageTips.form = Object.assign({},this.$refs.messageTips.form,res.data)
       this.$refs.changeSite.form = Object.assign({},this.$refs.changeSite.form,res.data)

+ 22 - 11
src/HManagement/siteManage/securityConfig/modules/projectCheckRule.vue

@@ -161,6 +161,7 @@
 <script>
 export default {
   name: "customerCheckRule",
+  props:['setNumber'],
   data(){
     return {
       dialogEditVisible:false,
@@ -247,6 +248,8 @@ export default {
     querySite_Parameter(){
       this.dialogEditVisible = true
       this.relation = this.relations[0].value
+      console.log(this.setNumber,'setNumber')
+      this.projectrepeatnum = this.setNumber
       this.queryTable()
       this.queryRule()
     },
@@ -279,18 +282,27 @@ export default {
           },
           "projectprotectionperiod":this.projectprotectionperiod,
           "projectnameexcludefields":this.projectnameexcludefields,
-          "projectrepeatnum":this.projectrepeatnum
         },
       })
-      this.tool.showMessage(res,()=>{
-        this.$emit('queryRule')
-        this.dialogEditVisible = false
-        this.fields1 = []
-        this.fields2 = []
-        this.fields3 = []
-        this.projectprotectionperiod = 0
-        this.projectrepeatnum = 0
-      })
+      if (res.code == 0){
+        this.tool.showMessage(res,()=>{})
+      }else {
+        const res1 = await this.$api.requested({
+          "classname": "webmanage.site.site",
+          "method":"updateSite_Parameter",
+          "content": {
+            "projectrepeatnum":Number(this.projectrepeatnum)
+          }
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('queryRule')
+          this.dialogEditVisible = false
+          this.fields1 = []
+          this.fields2 = []
+          this.fields3 = []
+          this.projectprotectionperiod = 0
+        })
+      }
     },
     onClose(){
       this.dialogEditVisible = false
@@ -312,7 +324,6 @@ export default {
       this.factor2 = res.data.projectcheckrule.factor2
       this.factor3 = res.data.projectcheckrule.factor3
       this.projectprotectionperiod= res.data.projectprotectionperiod
-      this.projectrepeatnum = res.data.projectrepeatnum
       this.projectnameexcludefields = res.data.projectnameexcludefields?res.data.projectnameexcludefields:[]
     },
     /*设置排除文字*/