index.js 1.93 KB
Newer Older
fukai committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
import event from "../../tdo/event";

export default {
	mixins: [event],
	methods:{
		save() {
			this.$refs['modelForm'].validate(async (validStatic) => {
				if (validStatic) {
					if (this.model.pblmod.dectyp === "D") {
						this.$confirm('系统将删除主信息,是否确认?', '提示', {
							confirmButtonText: '确定',
							cancelButtonText: '取消',
							type: 'warning'
						}).then(() => {
							this.saveTdo();
						})
					}
				} else {
					// 前端校验失败
					this.$notify({
						title: '失败',
						message: '校验失败',
						type: 'error',
					});
				}
			})
		},
   		// commitDel() {
		// 		this.$refs['modelForm'].validate(async (validStatic) => {
		// 			if (validStatic) {
		// 				if (this.model.pblmod.dectyp === "D") {
		// 					this.$confirm('系统将删除主信息,是否确认?', '提示', {
		// 						confirmButtonText: '确定',
		// 						cancelButtonText: '取消',
		// 						type: 'warning'
		// 					}).then(() => {
		// 						this.del();
		// 					})
		// 				}
		// 			} else {
		// 				// 前端校验失败
		// 				this.$notify({
		// 					title: '失败',
		// 					message: '校验失败',
		// 					type: 'error',
		// 				});
		// 			}
		// 		})
		// 	},
		// 	async del() {
		// 		let data = {
		// 			inr:this.model.pblmod.pbl.inr,
		// 			tdoVo:this.model.recgrp.ads,
		// 		}
		// 		let rtnmsg = await Api.post('/report/rmbsel/deleteTdo', data)
		// 		if (rtnmsg.respCode == SUCCESS) {
		// 			this.$notify({
		// 				title: "成功",
		// 				message: "提交成功",
		// 				type: "success",
		// 			});
		// 			this.$store.commit('delTagsArry', this.$route.path);
		// 			this.$router.back()
		// 		}else{
		// 			this.$notify({
		// 				title: "失败",
		// 				message: "提交失败",
		// 				type: "error",
		// 			});
		// 		}
		// 	},
		// 	commitAdd(){},
		// 	commitEdit(){},
		// 	commitDelete(){},
		// 	checkAdd(){},
		// 	checkEdit(){},
		// 	checkDelete(){}
	}
}