mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-01 02:38:43 +08:00 
			
		
		
		
	v3.8.0 新增通用方法简化模态/缓存使用
This commit is contained in:
		| @@ -347,7 +347,7 @@ export default { | ||||
|         // 修改的提交 | ||||
|         if (this.form.${primaryColumn.javaField} != null) { | ||||
|           update${simpleClassName}(this.form).then(response => { | ||||
|             this.msgSuccess("修改成功"); | ||||
|             this.$modal.msgSuccess("修改成功"); | ||||
|             this.open = false; | ||||
|             this.getList(); | ||||
|           }); | ||||
| @@ -355,7 +355,7 @@ export default { | ||||
|         } | ||||
|         // 添加的提交 | ||||
|         create${simpleClassName}(this.form).then(response => { | ||||
|           this.msgSuccess("新增成功"); | ||||
|           this.$modal.msgSuccess("新增成功"); | ||||
|           this.open = false; | ||||
|           this.getList(); | ||||
|         }); | ||||
| @@ -364,15 +364,11 @@ export default { | ||||
|     /** 删除按钮操作 */ | ||||
|     handleDelete(row) { | ||||
|       const ${primaryColumn.javaField} = row.${primaryColumn.javaField}; | ||||
|       this.$confirm('是否确认删除${table.classComment}编号为"' + ${primaryColumn.javaField} + '"的数据项?', "警告", { | ||||
|           confirmButtonText: "确定", | ||||
|           cancelButtonText: "取消", | ||||
|           type: "warning" | ||||
|         }).then(function() { | ||||
|       this.$model.confirm('是否确认删除${table.classComment}编号为"' + ${primaryColumn.javaField} + '"的数据项?').then(function() { | ||||
|           return delete${simpleClassName}(${primaryColumn.javaField}); | ||||
|         }).then(() => { | ||||
|           this.getList(); | ||||
|           this.msgSuccess("删除成功"); | ||||
|           this.$modal.msgSuccess("删除成功"); | ||||
|         }).catch(() => {}); | ||||
|     }, | ||||
|     /** 导出按钮操作 */ | ||||
| @@ -390,11 +386,7 @@ export default { | ||||
|       #end | ||||
|       #end | ||||
|       // 执行导出 | ||||
|       this.$confirm('是否确认导出所有${table.classComment}数据项?', "警告", { | ||||
|           confirmButtonText: "确定", | ||||
|           cancelButtonText: "取消", | ||||
|           type: "warning" | ||||
|         }).then(() => { | ||||
|       this.$model.confirm('是否确认导出所有${table.classComment}数据项?').then(() => { | ||||
|           this.exportLoading = true; | ||||
|           return export${simpleClassName}Excel(params); | ||||
|         }).then(response => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV