|  |  |  | @ -3,7 +3,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |     <el-form :model="formData" :rules="formRules" ref="dataForm"> | 
			
		
	
		
			
				
					|  |  |  |  |       <el-card style="margin-top: -30px"> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-button-group style="display: flex"> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-button type="primary" @click.native="submitUpload" style="margin: 0 60px 10px auto; height: 35px" | 
			
		
	
		
			
				
					|  |  |  |  |           <el-button type="primary" @click.native="submitUpload()" style="margin: 0 60px 10px auto; height: 35px" | 
			
		
	
		
			
				
					|  |  |  |  |                      :loading="loading">提交 | 
			
		
	
		
			
				
					|  |  |  |  |           </el-button> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-button-group> | 
			
		
	
	
		
			
				
					|  |  |  | @ -97,49 +97,41 @@ | 
			
		
	
		
			
				
					|  |  |  |  |         <!--                    </el-col>--> | 
			
		
	
		
			
				
					|  |  |  |  |         <!--                </el-row>--> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | <!--        <el-row>--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--          <el-col :span="3">--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--            <div class="ao-text">--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--              <span>文件:</span>--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--            </div>--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--          </el-col>--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--          <el-col :span="8">--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--            <el-form-item>--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--              <el-upload--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                :disabled="formData.auditStatus == 1"--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                class="upload-demo"--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                ref="upload"--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                :action="this.uploadUrl"--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                :on-preview="uploadHandlePreview"--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                :on-remove="uploadHandleRemove"--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                :headers="headers"--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                :on-exceed="uploadHandleExceed"--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                accept=".jpg,.png"--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                :on-change="uploadOnchange"--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                :on-success="uploadHandleSuccess"--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                :on-error="uploadHandleError"--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                :file-list="fileList"--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                :data="{type:'image2'}"--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                :auto-upload="true">--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                <el-button slot="trigger" size="small" type="primary" :disabled="formData.auditStatus == 1">--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                  {{ choiceFile }}--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                </el-button>--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--                <div>只能上传 jpg,png 文件,且不超过 3 MB</div>--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--              </el-upload>--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--              <!–                            <el-button type="primary" size="mini" icon="search" @click="toViewCompanyCert"–>--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--              <!–                                       style="text-align:right"–>--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--              <!–                            >文件预览–>--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--              <!–                            </el-button–>--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--              <!–                            >–>--> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | <!--            </el-form-item>--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--          </el-col>--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--        </el-row>--> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-row gutter="20" class="el-row" type="flex"> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-col :span="11" class="el-col"> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-form-item label="文件:" prop="filePath"> | 
			
		
	
		
			
				
					|  |  |  |  |               <cusEditor ref="editorRef" style="width:90vh;height: 100%;overflow: auto; " :content="formData.filePath" | 
			
		
	
		
			
				
					|  |  |  |  |                          :type="`image2`"/> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-row> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-col :span="3"> | 
			
		
	
		
			
				
					|  |  |  |  |             <div class="ao-text"> | 
			
		
	
		
			
				
					|  |  |  |  |               <span>文件:</span> | 
			
		
	
		
			
				
					|  |  |  |  |             </div> | 
			
		
	
		
			
				
					|  |  |  |  |           </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-col :span="8"> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |               <el-upload | 
			
		
	
		
			
				
					|  |  |  |  |                 :disabled="formData.auditStatus == 1" | 
			
		
	
		
			
				
					|  |  |  |  |                 class="upload-demo" | 
			
		
	
		
			
				
					|  |  |  |  |                 ref="upload" | 
			
		
	
		
			
				
					|  |  |  |  |                 :action="this.uploadUrl" | 
			
		
	
		
			
				
					|  |  |  |  |                 :on-preview="uploadHandlePreview" | 
			
		
	
		
			
				
					|  |  |  |  |                 :on-remove="uploadHandleRemove" | 
			
		
	
		
			
				
					|  |  |  |  |                 :headers="headers" | 
			
		
	
		
			
				
					|  |  |  |  |                 :on-exceed="uploadHandleExceed" | 
			
		
	
		
			
				
					|  |  |  |  |                 accept=".jpg,.png" | 
			
		
	
		
			
				
					|  |  |  |  |                 :on-change="uploadOnchange" | 
			
		
	
		
			
				
					|  |  |  |  |                 :on-success="uploadHandleSuccess" | 
			
		
	
		
			
				
					|  |  |  |  |                 :on-error="uploadHandleError" | 
			
		
	
		
			
				
					|  |  |  |  |                 :file-list="fileList" | 
			
		
	
		
			
				
					|  |  |  |  |                 :data="{type:'image2'}" | 
			
		
	
		
			
				
					|  |  |  |  |                 :auto-upload="true"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-button slot="trigger" size="small" type="primary" :disabled="formData.auditStatus == 1"> | 
			
		
	
		
			
				
					|  |  |  |  |                   {{ choiceFile }} | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-button> | 
			
		
	
		
			
				
					|  |  |  |  |                 <div>只能上传 jpg,png 文件,且不超过 3 MB</div> | 
			
		
	
		
			
				
					|  |  |  |  |               </el-upload> | 
			
		
	
		
			
				
					|  |  |  |  |               <!--                            <el-button type="primary" size="mini" icon="search" @click="toViewCompanyCert"--> | 
			
		
	
		
			
				
					|  |  |  |  |               <!--                                       style="text-align:right"--> | 
			
		
	
		
			
				
					|  |  |  |  |               <!--                            >文件预览--> | 
			
		
	
		
			
				
					|  |  |  |  |               <!--                            </el-button--> | 
			
		
	
		
			
				
					|  |  |  |  |               <!--                            >--> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |           </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-row> | 
			
		
	
	
		
			
				
					|  |  |  | @ -208,8 +200,8 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |  |   components: { | 
			
		
	
		
			
				
					|  |  |  |  |     // draggable, | 
			
		
	
		
			
				
					|  |  |  |  |     // ElImageViewer | 
			
		
	
		
			
				
					|  |  |  |  |     draggable, | 
			
		
	
		
			
				
					|  |  |  |  |     ElImageViewer | 
			
		
	
		
			
				
					|  |  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |  |   methods: { | 
			
		
	
		
			
				
					|  |  |  |  |     submitUpload() { | 
			
		
	
	
		
			
				
					|  |  |  | @ -238,13 +230,23 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |     onConfirmSubmit(val) { | 
			
		
	
		
			
				
					|  |  |  |  |       this.formData.repeatUpload = val; | 
			
		
	
		
			
				
					|  |  |  |  |       console.log(this.formData) | 
			
		
	
		
			
				
					|  |  |  |  |       if (this.$isNotBlank(this.formData.filePath)) { | 
			
		
	
		
			
				
					|  |  |  |  |         if (this.$refs.upload.uploadFiles.length > 0) { | 
			
		
	
		
			
				
					|  |  |  |  |           this.$refs.upload.submit(); | 
			
		
	
		
			
				
					|  |  |  |  |           this.onSubmit(); | 
			
		
	
		
			
				
					|  |  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |  |           this.onSubmit(); | 
			
		
	
		
			
				
					|  |  |  |  |       // this.formData.repeatUpload = val; | 
			
		
	
		
			
				
					|  |  |  |  |       // if (this.$isNotBlank(this.formData.filePath)) { | 
			
		
	
		
			
				
					|  |  |  |  |       //     this.onSubmit(); | 
			
		
	
		
			
				
					|  |  |  |  |       //   }else { | 
			
		
	
		
			
				
					|  |  |  |  |       //   this.$message.warning(`请选择文件`); | 
			
		
	
		
			
				
					|  |  |  |  |       // } | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       } else { | 
			
		
	
		
			
				
					|  |  |  |  |         console.log(this.$refs.upload.uploadFiles.length); | 
			
		
	
		
			
				
					|  |  |  |  |         if (this.$refs.upload.uploadFiles.length > 0) { | 
			
		
	
		
			
				
					|  |  |  |  |           this.$refs.upload.submit(); | 
			
		
	
		
			
				
					|  |  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |  |           this.$message.warning(`请选择文件`); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     onSubmit() { | 
			
		
	
	
		
			
				
					|  |  |  | @ -260,10 +262,8 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |         this.formData.manufacturerIdFk = this.inputQuery.manufacturerIdFk; | 
			
		
	
		
			
				
					|  |  |  |  |         this.formData.productIdFk = this.inputQuery.productId; | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  |       if (this.formData.auditStatus != 1){ | 
			
		
	
		
			
				
					|  |  |  |  |       if (this.formData.auditStatus != 1) | 
			
		
	
		
			
				
					|  |  |  |  |         this.formData.auditStatus = "6"; | 
			
		
	
		
			
				
					|  |  |  |  |         this.formData.filePath = this.$refs.editorRef.html | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       if (this.editTye == 1) { | 
			
		
	
		
			
				
					|  |  |  |  |         insertCompanyCert(this.formData).then(response => { | 
			
		
	
	
		
			
				
					|  |  |  | 
 |