Browse Source

规范更新修改

duy 1 month ago
parent
commit
7a9133d0b5

+ 8 - 0
src/api/ruleManage/fileRule.js

@@ -156,4 +156,12 @@ export const updateTypeByTwo = (data) => {
         'Content-Type': 'multipart/form-data'
         },
     });
+}
+
+export const standardUpdate = (params) => {
+    return request({
+        url: '/api/blade-business/PrivateStandard/standardUpdate',
+        method: 'get',
+        params
+    })
 }

+ 2 - 0
src/views/codeRule/ConditionsSet.vue

@@ -397,6 +397,8 @@ export default {
       saveCondition() {
 
         const filteredArr = this.paramList.filter(item => item.standardInfos.length !== 0);
+        console.log(this.linkListData,'this.linkListData');
+        
         this.linkListData = JSON.parse(JSON.stringify(filteredArr));
 
    

+ 1 - 1
src/views/codeRule/PreviewResult.vue

@@ -29,7 +29,7 @@
             </div>
         <div class="tech-content" v-for="item in jsList" :key="item.id" >
           <div class="tech-item">
-            <div class="tech-label">{{ item.name }}</div>
+            <div class="tech-label">筛选结果</div>
             <div class="tech-val">{{ item.symbolName }}</div>
           </div>
 

+ 27 - 7
src/views/codeRule/ruleManage.vue

@@ -173,7 +173,7 @@
                     </div>
                     <div  class="box-card-content1-right">
                         <el-button type="danger" size="small" @click="previewRes">效果预览</el-button>
-                        <el-button type="warning" size="small" @click="refreshRule">规范更新</el-button>
+                        <el-button type="warning" size="small" @click="refreshRule" :loading="refreshLoad">规范更新</el-button>
                     </div>
                 </div>
                 <div class="box-card-content2">
@@ -450,7 +450,7 @@ import {getLazytree} from "@/api/manager/wbsprivate";
 import ConditionsSet from './ConditionsSet.vue'
 import LinkEle from "./LinkEle.vue";
 import PreviewResult from './PreviewResult.vue'
-import {getPage,edit,add,deleteItem,getById, addInfo,editInfo,getInfoPage,deleteItemInfo,updateTypeByTwo } from "@/api/ruleManage/fileRule.js";
+import {getPage,edit,add,deleteItem,getById, addInfo,editInfo,getInfoPage,deleteItemInfo,updateTypeByTwo,standardUpdate } from "@/api/ruleManage/fileRule.js";
 import { getStore, setStore } from "@/util/store";
  import { getDictionary } from "@/api/system/dict";
   export default {
@@ -525,10 +525,10 @@ import { getStore, setStore } from "@/util/store";
             { required: true, message: '请输入规范名称', trigger: 'blur' }
           ],
           issueDate: [
-            { required: true, message: '请输入规范名称', trigger: 'blur' }
+            { required: true, message: '请输入下达日期', trigger: 'blur' }
           ],
           actualizeDate: [
-            { required: true, message: '请输入规范名称', trigger: 'blur' }
+            { required: true, message: '请输入实施日期', trigger: 'blur' }
           ],
         },
         ypList:[
@@ -562,8 +562,8 @@ import { getStore, setStore } from "@/util/store";
         conditionsSetVisible:false,//条件设置弹窗是否显示
         isUploadVisible:false,//上传文件弹窗是否显示
         delIds:[],
-        delFileIds:[]
-
+        delFileIds:[],
+        refreshLoad:false
 
        
       };
@@ -670,6 +670,8 @@ import { getStore, setStore } from "@/util/store";
          goBack1() {
           
           this.isShowDetail = false;
+           this.getRuleDetail(this.ruleItem)
+
          },
          addRule(){
           this.titleInput = '';
@@ -1338,8 +1340,26 @@ import { getStore, setStore } from "@/util/store";
     previewRes() {
       this.$refs.previewResultRef.show()
     },
+    //更新
     refreshRule(){
-      
+      this.refreshLoad=true
+         standardUpdate({
+          id: this.ruleItemDetail.id,
+     
+        }).then((res) => {
+  
+          if(res.data.code==200){
+              this.$message.success(res.data.msg)
+           
+             this.getRuleDataDetail({id:res.data.data});
+            this.getRuleDataDetail1({id:res.data.data});
+               
+          }else{
+              this.$message.error(res.data.msg)
+          }
+          }).finally(() => {
+                      this.refreshLoad=false
+          });
     }
   }
   }