소스 검색

Merge branch 'test' of http://192.168.2.236:10080/zhouna/platformFront into test

Luolei 6 년 전
부모
커밋
ae2f693220

+ 4 - 1
src/components/admin/ChangePwd.vue

@@ -20,7 +20,7 @@
 					<el-input type="password" ref="newPass" v-model="ruleForm2.newPass" clearable></el-input>
 				</el-form-item>
 				<el-form-item>
-					<button class="subBtn" @click="submitForm('ruleForm2')">确定</button>
+					<button class="subBtn" :disabled="saveDisable" @click="submitForm('ruleForm2')">确定</button>
 					<!-- <button class="subBtn2" @click="resetForm('ruleForm2')">重置</button> -->
 				</el-form-item>
 			</el-form>
@@ -80,6 +80,7 @@
 				}
 			};
 			return {
+				saveDisable: false,
 				ruleForm2: {
 					pass: '',
 					checkPass: '',
@@ -118,6 +119,7 @@
 				};
 				this.$refs[formName].validate((valid) => {
 					if (valid) {
+						this.saveDisable = true
 						api.midifyPassword(params).then((res) => {
 							if (res.data.code == '0') {
 								this.$message({
@@ -134,6 +136,7 @@
 									type: 'error'
 								});
 							}
+							this.saveDisable = false
 						}).catch((error) => {
 							console.log(error)
 						});

+ 5 - 1
src/components/icss/AddAssaySon.vue

@@ -58,6 +58,7 @@
         <div class="btn">
             <el-button
             type="primary"
+            :disabled = 'saveDisable'
             @click="submitForm('ruleForm')"
             >确 定</el-button>
         </div>
@@ -83,7 +84,8 @@
         searchConcept: '',
         searchIndexVal: '',
         isEdit: false,
-        nodeList:[] //化验子项列表
+        nodeList:[], //化验子项列表
+        saveDisable: false 
       }
     },
     created(){
@@ -185,6 +187,7 @@
             "sonRelationId": 18
           }
           this.showConfirmDialog('是否建立该关联?', () => {
+              this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
               api.addAssaySon(param).then((res) => {
               if (res.data.code  === '0') {
                   this.warning(res.data.msg || '关联成功', 'success','1000')
@@ -196,6 +199,7 @@
               } else {
                   this.warning(res.data.msg)
               }
+              this.saveDisable = false
               }).catch((err) => {
                   this.warning(err);
               })

+ 8 - 4
src/components/icss/AddChemicalAndCommonMapping.vue

@@ -82,10 +82,11 @@
                 </div>
             </div>
         </div>
-       <div class="sumbitBox">
+       <div class="btn">
            <!-- <span class="sumbit" @click="submitForm">建立关联</span> -->
            <el-button
                 type="primary"
+                :disabled = 'saveDisable'
                 @click="submitForm"
             >建立关联</el-button>
         </div> 
@@ -110,7 +111,8 @@ export default {
                 mealName: '', //大项名称
                 itemName: '',   //小项名称
                 uniqueName: '',    //公表名称,必填
-            }
+            },
+            saveDisable: false  //保存按钮禁止点击
             
         }
     },
@@ -226,7 +228,6 @@ export default {
             "mealName": mealName,
             "uniqueName": uniqueName
         }
-        console.log(param);
         this.showSaveDialog(param);
       },
       saveLisMapping(param, msg, type) {
@@ -238,6 +239,7 @@ export default {
             } else {
                 this.warning(res.data.msg)
             }
+            this.saveDisable = false
         })
       },
       showSaveDialog(param) {
@@ -245,6 +247,7 @@ export default {
         //   if(this.isEdit) {
         //       this.saveLisMapping(param)
         //   } else {
+            this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
             api.hasLisMapping(param).then((res) => {
                 if (!res.data.data) {
                     this.saveLisMapping(param, '关联建立成功', 'success' )
@@ -269,6 +272,7 @@ export default {
         }).then(() => {
           resolve();
         }).catch(() => {
+            this.saveDisable = false
             this.warning('建立失败','error')
         });
       },
@@ -398,7 +402,7 @@ export default {
         display: inline-block;
         width: calc(100% - 160px);
     }
-    .sumbitBox {
+    .btn {
          position: relative;
             background-color: #fff;
             margin: 0px 20px;

+ 5 - 1
src/components/icss/AddChronicAndIndexRelation.vue

@@ -62,6 +62,7 @@
         <div class="btn">
             <el-button
             type="primary"
+            :disabled = 'saveDisable'
             @click="submitForm('ruleForm')"
             >确 定</el-button>
         </div>
@@ -72,7 +73,7 @@
 <script>
   import api from '@api/icss.js';
   export default {
-    name: 'AddDisAndScaleRelationWrapper',
+    name: 'AddChronicAndIndexRelation',
     data() {
         return{
             
@@ -88,6 +89,7 @@
             searchDiagVal: '',
             searchIndexVal: '',
             isEdit: false,
+            saveDisable: false 
         }
     },
     created(){
@@ -209,6 +211,7 @@
             }
             this.showConfirmDialog('是否建立该关联?', () => {
                 const  url = this.isEdit ?api.updateIndexConfigList(param) : api.saveIndexConfigLists(param) 
+                this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
                 url.then((res) => {
                 if (res.data.code  === '0') {
                     this.warning(res.data.msg || '关联成功', 'success','1000')
@@ -220,6 +223,7 @@
                 } else {
                     this.warning(res.data.msg)
                 }
+                this.saveDisable = false
                 }).catch((err) => {
                     this.warning(err);
                 })

+ 5 - 1
src/components/icss/AddConceptRelation.vue

@@ -92,6 +92,7 @@
 <div class="btn">
   <el-button
   type="primary"
+  :disabled = 'saveDisable'
   @click="submitForm('ruleForm')"
   >确 定</el-button>
 </div>
@@ -124,7 +125,8 @@ export default {
       },
       type:'',
       typeList:[],
-      nodeList:[]
+      nodeList:[],
+      saveDisable: false  //保存按钮禁止点击
     }
   },
         created(){
@@ -311,6 +313,7 @@ export default {
           "sonRelationId": 17
         }
         this.showConfirmDialog('是否建立该关联?', () => {
+          this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
           api.addConceptRelation(param).then((res) => {
             if (res.data.code  === '0') {
               this.warning(res.data.msg || '关联成功', 'success','1000')
@@ -322,6 +325,7 @@ export default {
             } else {
               this.warning(res.data.msg)
             }
+            this.saveDisable = false
           }).catch((err) => {
             this.warning(err);
           })

+ 5 - 0
src/components/icss/AddDisAndScaleRelation.vue

@@ -84,6 +84,7 @@
         <div class="btn">
             <el-button
             type="primary"
+            :disabled = 'saveDisable'
             @click="submitForm('ruleForm')"
             >确 定</el-button>
         </div>
@@ -114,6 +115,7 @@
             styles:{
                 background:'#eae7e7'
             },
+            saveDisable: false  //保存按钮禁止点击
         }
     },
     created(){
@@ -276,7 +278,9 @@
                 "disId": this.form.disId,
                 "scaleId": scaleId
             }
+            
             this.showConfirmDialog('是否建立该关联?', () => {
+                this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
                 api.addDisScaleInfo(param).then((res) => {
                 if (res.data.code  === '0') {
                     this.warning(res.data.msg || '关联成功', 'success','1000')
@@ -288,6 +292,7 @@
                 } else {
                     this.warning(res.data.msg)
                 }
+                this.saveDisable = false
                 }).catch((err) => {
                     this.warning(err);
                 })

+ 7 - 2
src/components/icss/AddDisclInfo.vue

@@ -21,7 +21,7 @@
                       </el-option>
                     </el-select>
                 </el-form-item>
-                <el-button class="disclButn" size="small" type="primary" @click="addDiscl">{{text}}</el-button>
+                <el-button class="disclButn" size="small" :disabled = 'saveDisable' type="primary" @click="addDiscl">{{text}}</el-button>
             </el-form>
         </div>
     </div>
@@ -91,7 +91,8 @@
         },
         text:'确定添加',
         topInfo:'免责声明维护-添加免责声明',
-        toast:'添加成功'
+        toast:'添加成功',
+        saveDisable: false 
       }
     },
     created(){
@@ -138,6 +139,7 @@
                 description:this.form.description.trim(),
                 disclaimerCode:code
               }
+              this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
               api.modifDiscInformation(param).then((res) => {
                 if (res.data.code == '0') {
                   this.$message({showClose: true,message: this.toast, type: 'success'});
@@ -149,6 +151,7 @@
                     type: 'warning'
                   });
                 }
+                this.saveDisable = false
               }).catch((error) => {
                 this.$message({
                   showClose: true,
@@ -162,6 +165,7 @@
                 description:this.form.description.trim(),
                 disclaimerCode:this.form.disclaimerCode
               }
+              this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
               api.addDiscInformation(param).then((res) => {
                 if (res.data.code == '0') {
                   this.$message({showClose: true,message: this.toast, type: 'success'});
@@ -173,6 +177,7 @@
                     type: 'warning'
                   });
                 }
+                this.saveDisable = false
               }).catch((error) => {
                 this.$message({
                   showClose: true,

+ 6 - 0
src/components/icss/AddIndeptLabel.vue

@@ -23,6 +23,7 @@
                 <el-button
                         type="primary"
                         @click="submitForm"
+                        :disabled="saveDisable"
                 >确 定</el-button>
             </div>
         </div>
@@ -54,6 +55,7 @@
           ]
         },
         options: [],           //标签明细右侧操作数据
+        saveDisable: false
       }
     },
     beforeMount:function(){
@@ -164,6 +166,7 @@
       },
       showSaveDialog(param) {
         this.showConfirmDialog('是否保存该标签?', () => {
+          this.saveDisable = true
           api.saveOrUpdate(param).then((res) => {
             if (res.data.code === '0') {
               this.warning(res.data.msg || '保存成功', 'success');
@@ -171,7 +174,10 @@
             } else {
               this.warning(res.data.msg)
             }
+            this.saveDisable = false
+
           }).catch((err) => {
+            
             this.warning(err);
           })
         });

+ 5 - 1
src/components/icss/AddMedicalMultRelation.vue

@@ -59,6 +59,7 @@
         <div class="btn">
           <el-button
             type="primary"
+            :disabled = 'saveDisable'
             @click="confirm"
           >确 定</el-button>
         </div>
@@ -69,7 +70,7 @@
 <script type="text/javascript">
 import api from '@api/icss.js';
   export default {
-    name:'AddMedicalName',
+    name:'AddMedicalMultRelation',
     data(){
       const data = [
         // {
@@ -126,6 +127,7 @@ import api from '@api/icss.js';
         isEdit: false,  //是否为修改
         relationConceptId: '', //关联父类ID
         level: 0, //层级(修改时只能显示三级)
+        saveDisable: false  //保存按钮禁止点击
       }
     },
     created(){
@@ -168,6 +170,7 @@ import api from '@api/icss.js';
         const nodeListResult = []
         this.IteraNodeList(this.list[0].nodeList, nodeListResult, 0)
         param.nodeList = nodeListResult
+        this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
         api.addMultRelation(param).then((res) => {
           const { data } = res
           if(data.code == '0') {
@@ -178,6 +181,7 @@ import api from '@api/icss.js';
           } else {
             this.message(data.msg);
           }
+          this.saveDisable = false;
         })
       },
       IteraNodeList(nodeList,  nodeListResult, type, level = 1) {

+ 5 - 1
src/components/icss/AddMedicalName.vue

@@ -155,6 +155,7 @@
         <div class="btn">
           <el-button
             type="primary"
+            :disabled = 'saveDisable'
             @click="comfirn"
           >确 定</el-button>
         </div>
@@ -207,7 +208,8 @@ import pinyin from '../../js/Convert_Pinyin.js';
             value:2
           }
         ],
-        unfit:false //点确认时是否弹提示
+        unfit:false, //点确认时是否弹提示,
+        saveDisable: false  //保存按钮禁止点击
       }
     },
     created(){
@@ -495,6 +497,7 @@ import pinyin from '../../js/Convert_Pinyin.js';
             'conceptId':this.id
           }
         }
+        this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
         api.addMedicalName(params).then((res)=>{
           const result = res.data;
           if(result.code==0){
@@ -510,6 +513,7 @@ import pinyin from '../../js/Convert_Pinyin.js';
           }else{
             this.warning(res.data.msg);
           }
+          this.saveDisable = false
         })
       },
       inputAge(){

+ 5 - 1
src/components/icss/AddMedicalRelation.vue

@@ -55,6 +55,7 @@
         <div class="btn">
           <el-button
             type="primary"
+            :disabled = 'saveDisable'
             @click="comfirn"
           >建立术语关系</el-button>
         </div>
@@ -73,13 +74,14 @@
           startType:'',
           relationName:'包含于',
           endName:'',
-          endType:''
+          endType:'',
         },
         relationList:[],
         firstInput:'',
         endInput:'',
         showFlag:0,
         searchDatas:[],
+        saveDisable: false  //保存按钮禁止点击
       }
     },
     created(){
@@ -113,6 +115,7 @@
           })
           return
         }
+        this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
         api.addRelationConcept(this.data).then((res)=>{
           const result = res.data;
           if(result.code==0){
@@ -127,6 +130,7 @@
               message:result.msg
             })
           }
+          this.saveDisable = false
         })
       },
       search(type){

+ 5 - 1
src/components/icss/AddMedicinePrompt.vue

@@ -37,6 +37,7 @@
             <div class="btn">
                 <el-button
                         type="primary"
+                        :disabled = 'saveDisable'
                         @click="submitForm"
                 >确 定</el-button>
             </div>
@@ -84,7 +85,8 @@
           selectedTerm: [
             { required: true, message: '请选择术语标签', trigger: 'change' }
           ]
-        }
+        },
+        saveDisable: false  //保存按钮禁止点击
       }
     },
     watch:{
@@ -188,6 +190,7 @@
       },
       showSaveDialog(param,msg) {
         this.showConfirmDialog(msg, () => {
+          this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
           api.saveTermPrompts(param).then((res) => {
             if (res.data.code === '0') {
               this.warning(res.data.msg || '保存成功', 'success');
@@ -195,6 +198,7 @@
             } else {
               this.warning(res.data.msg)
             }
+            this.saveDisable = false
           }).catch((err) => {
             this.warning(err);
           })

+ 4 - 0
src/components/icss/AddPhysicalExamTemp.vue

@@ -72,6 +72,7 @@
             <el-button
             type="primary"
             @click="submitForm('ruleForm')"
+            :disabled = 'saveDisable'
             >确 定</el-button>
         </div>
     </div>
@@ -102,6 +103,7 @@
             styles:{
                 background:'#eae7e7'
             },
+            saveDisable: false  //保存按钮禁止点击
         }
     },
     created(){
@@ -268,6 +270,7 @@
                 return
             }
             this.showConfirmDialog('是否保存该模板?', () => {
+                this.saveDisable = false  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
                 api.savePhysicalExamTemp(param).then((res) => {
                 if (res.data.code  === '0') {
                     this.warning(res.data.msg || '保存成功', 'success','1000')
@@ -279,6 +282,7 @@
                 } else {
                     this.warning(res.data.msg)
                 }
+                this.saveDisable = true
                 }).catch((err) => {
                     this.warning(err);
                 })

+ 7 - 2
src/components/icss/AddVersion.vue

@@ -24,7 +24,7 @@
           <el-form-item label="版本说明:" v-if="list&&list.length>0">
           </el-form-item>
           <VersionDesc :detail="list" :versionId="id" :isFirst="isFirst" :isCopy="copy" @func="getDetailList"/>
-          <el-button class="disclButn" size="small" type="primary" @click="comfirn('form')">确定</el-button>
+          <el-button class="disclButn" size="small" type="primary" :disabled = 'saveDisable' @click="comfirn('form')">确定</el-button>
         </el-form>
         <!-- <VersionDesc :detail="list" :versionId="id" :isFirst="isFirst" :isCopy="copy" @func="getDetailList"/>
         <el-button class="disclButn" size="small" type="primary" @click="comfirn">确定</el-button> -->
@@ -86,7 +86,8 @@
             return time.getTime() < Date.now();
           },
         },
-        copy:null
+        copy:null,
+        saveDisable: false  //保存按钮禁止点击
       }
     },
     created(){
@@ -131,6 +132,7 @@
           if (valid) {
             if(this.id && !this.copy){//修改
               const param = Object.assign({},this.form,{id:this.id})
+              this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
               api.updateVersInfo(param).then((res)=>{
                 if(res.data.code==0){
                   this.$message({
@@ -144,6 +146,7 @@
                     type:'warning'
                   });
                 }
+                this.saveDisable = false
               })
             }else{//添加
               // 复制时把list多余字段过滤掉,如id等
@@ -160,6 +163,7 @@
               }
               const params = Object.assign({},this.form,{'versionDetail':copyDetail});
               // api.addVersInfo(this.form).then((res)=>{
+              this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
               api.addVersInfo(params).then((res)=>{
                 if(res.data.code==0){
                   this.$message({
@@ -173,6 +177,7 @@
                     type:'warning'
                   });
                 }
+                this.saveDisable = false
               })
             }  
           } else {

+ 5 - 0
src/components/icss/ChronicDiseaseAdd.vue

@@ -65,6 +65,7 @@
         <div class="btn">
           <el-button
             type="primary"
+            :disabled = 'saveDisable'
             @click="submitForm"
           >确 定</el-button>
         </div>
@@ -107,6 +108,7 @@ export default {
       selectLeftPart:{},//左侧选中
       selectRightPart:{},//右侧选中
       contentPool:[], //内容池
+      saveDisable: false  //保存按钮禁止点击
     }
   },
   beforeMount:function(){
@@ -272,6 +274,7 @@ export default {
         return
       }
       this.showConfirmDialog('是否保存该量表结构?', () => {
+        this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
         api.insertOrUpdate(param).then((res) => {
           if (res.data.code === '0') {
             this.warning(res.data.msg || '保存成功', 'success');
@@ -281,7 +284,9 @@ export default {
               })
             }, 1000);
           }
+          this.saveDisable = false
         })
+        
       })
     },
     showConfirmDialog(msg, resolve) {

+ 4 - 0
src/components/icss/NoiseTemplate.vue

@@ -93,6 +93,7 @@
         <el-button
           type="primary"
           @click="submitForm"
+          :disabled="saveDisable"
         >确 定</el-button>
       </div>
     </div>
@@ -127,6 +128,7 @@ export default {
         ]
       },
       sendIds: [[], [], [], [], [], []],           //标签明细右侧操作数据
+      saveDisable: false //保存按钮是否可点击
     }
   },
   beforeMount:function(){
@@ -223,6 +225,7 @@ export default {
     },
     showDelDialog(param) {
       this.showConfirmDialog('是否保存该标签组?', () => {
+        this.saveDisable = true
         api.saveOrUpdate(param).then((res) => {
           if (res.data.code === '0') {
             this.warning(res.data.msg || '保存成功', 'success','1000')
@@ -234,6 +237,7 @@ export default {
           } else {
             this.warning(res.data.msg)
           }
+          this.saveDisable = false
         }).catch((err) => {
           this.warning(err);
         })

+ 5 - 2
src/components/icss/TemplateMaintenanceWrap.vue

@@ -27,7 +27,7 @@
       <div class="btn">
         <el-button
           type="primary"
-          :disabled="dataPub.isCopy && staticOwnTo == dataPub.region4"
+          :disabled="(dataPub.isCopy && staticOwnTo == dataPub.region4) || saveDisable"
           :plain="dataPub.isCopy && staticOwnTo == dataPub.region4"
           @click="submitForm"
         >确 定</el-button>
@@ -52,7 +52,8 @@ export default {
       dataPub: {},                    //公用组件传的值都在这
       editData:{},                    //编辑数据
       sendIds: [],           //标签明细右侧操作数据
-      staticOwnTo:''
+      staticOwnTo:'',
+      saveDisable: false  //保存按钮禁止点击
     }
   },
   beforeMount:function(){
@@ -146,6 +147,7 @@ export default {
     showDelDialog(param) {
       this.showConfirmDialog('是否保存该模板?', () => {
         if(this.editData.id){
+          this.saveDisable = false  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
           api.updateModuleInfo(param).then((res) => {
             if (res.data.code === '0') {
               this.warning(res.data.msg || '修改成功', 'success','1000')
@@ -157,6 +159,7 @@ export default {
             } else {
               this.warning(res.data.msg)
             }
+            this.saveDisable = true
           }).catch((err) => {
             this.warning(err);
           })

+ 10 - 0
src/less/admin.less

@@ -167,4 +167,14 @@
 .el-tooltip__popper {
   max-width: 900px;
   line-height: 180%;
+}
+
+
+.is-disabled[type=button] {
+  background: @adminBase;
+  color: #fff
+}
+.is-disabled[type=button]:hover {
+  background: @adminBase;
+  color: #fff
 }

+ 3 - 1
src/less/common.less

@@ -175,4 +175,6 @@
 }
 .activeBgcF5 {
   background-color: #f5f5f5;
-}
+}
+
+