| 
					
				 | 
			
			
				@@ -3,7 +3,13 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <el-row :gutter="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-col :span="4"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-card style="height: 100%; min-height: 100vh;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <a href="#/basicData/productClass"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <span style="font-size: 23px;">产品分类</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <img style="margin-left: 40px;" src="../../../assets/images/bj1.png"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </a> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div style="marginTop:20px;margin-left: 10px;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          
			 | 
		
	
		
			
				 | 
				 | 
			
			
				          <el-tree 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            :data="productNameList" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            v-model="table.getdataListParm.parammaps.categoryId" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -94,21 +100,26 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-table-column label="产品图片" min-width="150px" align="center"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <template slot-scope="scope"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <el-popover placement="right" title="" trigger="hover"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <img 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       slot="reference" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       :src="scope.row.imagePath" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       style="height: 100px; width: 100px" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     <!-- 悬停时显示的内容 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     <img 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       :src="scope.row.imagePath" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       style="height: 200px; width: 200px" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              </el-popover> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  <template slot-scope="scope"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <el-popover placement="right" title="" trigger="hover"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <!-- 判断 imagePath 是否存在 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <template v-if="scope.row.imagePath"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <img 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          slot="reference" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :src="scope.row.imagePath" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          style="height: 100px; width: 100px" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <!-- 悬停时显示的内容 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <img 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :src="scope.row.imagePath" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          style="height: 200px; width: 200px" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <!-- 如果 imagePath 不存在,不显示任何内容 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <template v-else></template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </el-popover> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+</el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-table-column label="备注" min-width="150px" align="center"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <template slot-scope="scope"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -293,13 +304,13 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           sort: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           enable: 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           pcode:'', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          pImage:'', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          pImage:'0', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         rules: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           pname: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           model: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          Specifications: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          sort: [{ validator: isIntegerZero, trigger: 'blur' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          // Specifications: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          // sort: [{ validator: isIntegerZero, trigger: 'blur' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           pcode: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -342,6 +353,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 document.getElementById('uploadPic').lastChild.style.display = "none" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 document.getElementById('uploadPic').lastChild.style.display = "inline-block" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                this.$set(this.create.temp, 'pImage', '0'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+       
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handlePicSuccess(response, file, fileList) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -352,6 +365,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         document.getElementById('uploadPic').lastChild.style.display = "inline-block" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$set(this.create.temp, 'pImage', response.execresult.LastInsertId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+       
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     andlePictureCardPreview(file) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.dialogImageUrl = file.url; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -412,13 +426,14 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               response.data.list[i].imagePath = process.env.VUE_APP_BASE_API + response.data.list[i].imagePath; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 response.data.list[i].imagePath = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.table.list = response.data.list 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.table.pageNum = response.data.pageNum 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.table.pageSize = response.data.pageSize 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.table.total = response.data.total 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          console.log(this.table.list) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.table.list = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -435,6 +450,11 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (response.data.list !== null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           for (var i = 0; i < response.data.list.length; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             response.data.list[i].enable = parseInt(response.data.list[i].enable) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if ( response.data.list[i].pImage !== '') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              response.data.list[i].imagePath = process.env.VUE_APP_BASE_API + response.data.list[i].imagePath; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                response.data.list[i].imagePath = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.table.list = response.data.list 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -484,6 +504,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // this.dialogImageUrl = row.imagePath; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.create.dialogStatus = 'create' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.create.dialogFormVisible = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+       document.getElementById('uploadPic').lastChild.style.display = "inline-block" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.fileList = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // if (row.imagePath !== ''){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       //   const fileList = []; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -500,8 +521,11 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       console.log('点击了新增保存') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$refs['temp'].validate(valid => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (valid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          console.log(this.create.temp) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           //新增保存 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if (this.create.temp.pImage == null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.create.temp.pImage = '0' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.requestParam.name = 'insertProducts' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.requestParam.parammaps = this.create.temp 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -524,7 +548,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           ExecDataByConfig(this.requestParam).then(response => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            console.log('新增保存发送参数', this.requestParam) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // console.log('新增保存发送参数', this.requestParam) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (response.msg !== 'fail') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               this.defaultCheckedKeys = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 }) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -550,8 +574,9 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.create.dialogFormVisible = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // this.create.pcode = row.pcode; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.defaultCheckedKeys =[row.categoryId] ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // this.fileList = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       console.log(row.imagePath); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if (row.pImage !== ''){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (row.imagePath !== ''){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const fileList = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         var urlObj = { "url": "", "response": { "execresult": { "LastInsertId": "" } } }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         urlObj.url = row.imagePath; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -561,7 +586,14 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.fileList  = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.dialogImageUrl = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // this.isView = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+         document.getElementById('uploadPic').lastChild.style.display = "inline-block" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      console.log( 11111); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      console.log( this.dialogVisible); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      console.log( this.dialogImageUrl); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      console.log( 22222); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 编辑保存 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -570,7 +602,14 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (valid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           // this.requestParam.name = 'updateProducts' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           // this.requestParam.parammaps = this.create.temp 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if (this.create.temp.pImage === ""){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.create.temp.pImage = '0' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if (this.create.temp.sort === ""){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.create.temp.sort = '0' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+           
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.requestParam = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             data: [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -593,6 +632,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (response.msg !== 'fail') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               this.create.dialogFormVisible = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               this.defaultCheckedKeys = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               this.get_table_data() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } else { 
			 |