zhangxc преди 5 години
родител
ревизия
592c2d02c8
променени са 2 файла, в които са добавени 26 реда и са изтрити 11 реда
  1. 24 9
      src/components/recordInput/AddRecordItem.vue
  2. 2 2
      src/components/recordInput/RecordItemList.vue

+ 24 - 9
src/components/recordInput/AddRecordItem.vue

@@ -117,7 +117,6 @@
       const userLoginDTO = JSON.parse(localStorage.getItem('userLoginDTO'))
       this.modifier = userLoginDTO && userLoginDTO.linkman
      
-      console.log(data)
       if(isEdit){
         this.title = '病例条目-修改'
         this.isEdit = isEdit
@@ -157,7 +156,6 @@
           const result = res.data;
           if(result.code==0){
             this.hospitalList = result.data
-            console.log('hospitalList',this.hospitalList)
             const tableData = []
             for(let i = 0; i < this.hospitalList.length; i++){
               tableData.push({
@@ -179,7 +177,8 @@
           }else{
             this.$message({
               message:result.msg,
-              type:'warning'
+              type:'warning',
+              showClose: true
             });
           }
         })
@@ -190,11 +189,11 @@
           const result = res.data;
           if(result.code==0){
             this.caseLIst = result.data
-            console.log('caseLIst',this.caseLIst)
           }else{
             this.$message({
               message:result.msg,
-              type:'warning'
+              type:'warning',
+              showClose: true
             });
           }
         })
@@ -207,7 +206,22 @@
       },
       comfirn(form){
           const {itemName,casesId,itemCode,remark,levelNo,precond} = this.form
-         
+          if(!itemName){
+            this.$message({
+              message:"请输入条目名称",
+              type:'warning',
+              showClose: true
+            })
+            return
+          }
+          if(!itemCode){
+            this.$message({
+              message:"请输入条目编码",
+              type:'warning',
+              showClose: true
+            })
+            return
+          }
           
           let  casesEntryHospitals = []
           for(let i = 0; i < this.multipleSelection.length; i++){
@@ -234,19 +248,20 @@
             creator: '0',
             casesEntryHospitals:casesEntryHospitals
           }
-          console.log('params',params)
            api.addRecordItem(params).then((res)=>{
               if(res.data.code==0){
                 this.$message({
                   message:"添加成功",
-                  type:'success'
+                  type:'success',
+                  showClose: true
                 })
                 // this.$router.push({path: 'LT-GBBXXWH-BBXXWH'});
                 this.$router.push({name: 'RecordItemList'});
               }else{
                 this.$message({
                   message:res.data.msg,
-                  type:'warning'
+                  type:'warning',
+                  showClose: true
                 });
               }
             })

+ 2 - 2
src/components/recordInput/RecordItemList.vue

@@ -187,7 +187,8 @@
           }else{
             this.$message({
               message:result.msg,
-              type:'warning'
+              type:'warning',
+              showClose: true
             });
           }
         })
@@ -227,7 +228,6 @@
         }
        api.getRecordDetail(param).then(res =>{
          if(res.data.code == '0'){
-          console.log('res', res)
           const item = res.data.data[0]
           const pam = this.searched ? {
             currentPage: this.currentPage,