forked from mt-fe-group/mt-yd-ui
		
	update PUT-POST
This commit is contained in:
		@@ -122,8 +122,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentAlarmLog/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentAlarmLog/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							alarmId: this.dataForm.alarmId,
 | 
			
		||||
 
 | 
			
		||||
@@ -116,8 +116,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentAttr/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentAttr/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							equipmentId: this.dataForm.equipmentId,
 | 
			
		||||
 
 | 
			
		||||
@@ -140,8 +140,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentFile/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentFile/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							equipmentId: this.dataForm.equipmentId,
 | 
			
		||||
 
 | 
			
		||||
@@ -122,8 +122,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentGroup/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentGroup/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							code: this.dataForm.code,
 | 
			
		||||
 
 | 
			
		||||
@@ -152,8 +152,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentGroupAlarm/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentGroupAlarm/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							equipmentGroupId: this.dataForm.equipmentGroupId,
 | 
			
		||||
 
 | 
			
		||||
@@ -170,8 +170,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentPlc/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentPlc/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							plcType: this.dataForm.plcType,
 | 
			
		||||
 
 | 
			
		||||
@@ -116,8 +116,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentPlcConnect/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentPlcConnect/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							plcId: this.dataForm.plcId,
 | 
			
		||||
 
 | 
			
		||||
@@ -200,8 +200,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentPlcParam/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentPlcParam/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							plcConId: this.dataForm.plcConId,
 | 
			
		||||
 
 | 
			
		||||
@@ -146,8 +146,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentQuantity/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentQuantity/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							externalCode: this.dataForm.externalCode,
 | 
			
		||||
 
 | 
			
		||||
@@ -140,8 +140,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentStatusLog/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentStatusLog/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							externalCode: this.dataForm.externalCode,
 | 
			
		||||
 
 | 
			
		||||
@@ -200,8 +200,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipment/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipment/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							code: this.dataForm.code,
 | 
			
		||||
 
 | 
			
		||||
@@ -134,8 +134,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentType/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentType/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							code: this.dataForm.code,
 | 
			
		||||
 
 | 
			
		||||
@@ -140,8 +140,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentTypeFile/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/equipmentTypeFile/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							equipmentTypeId: this.dataForm.equipmentTypeId,
 | 
			
		||||
 
 | 
			
		||||
@@ -134,8 +134,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/factory/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/factory/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							code: this.dataForm.code,
 | 
			
		||||
 
 | 
			
		||||
@@ -140,8 +140,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/productArrt/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/productArrt/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							code: this.dataForm.code,
 | 
			
		||||
 
 | 
			
		||||
@@ -158,8 +158,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/product/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/product/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							code: this.dataForm.code,
 | 
			
		||||
 
 | 
			
		||||
@@ -146,8 +146,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/productionLine/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/productionLine/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							factoryId: this.dataForm.factoryId,
 | 
			
		||||
 
 | 
			
		||||
@@ -86,8 +86,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/productionLineRecSch/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/productionLineRecSch/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							productionLineId: this.dataForm.productionLineId,
 | 
			
		||||
 
 | 
			
		||||
@@ -116,8 +116,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/qualityInspectionDet/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/qualityInspectionDet/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							typeId: this.dataForm.typeId,
 | 
			
		||||
 
 | 
			
		||||
@@ -146,8 +146,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/qualityInspectionRecord/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/qualityInspectionRecord/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							inspectionDetId: this.dataForm.inspectionDetId,
 | 
			
		||||
 
 | 
			
		||||
@@ -110,8 +110,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/qualityInspectionType/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/qualityInspectionType/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							name: this.dataForm.name,
 | 
			
		||||
 
 | 
			
		||||
@@ -128,8 +128,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/reportSheetCategory/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/reportSheetCategory/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							code: this.dataForm.code,
 | 
			
		||||
 
 | 
			
		||||
@@ -146,8 +146,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/reportSheet/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/reportSheet/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							category: this.dataForm.category,
 | 
			
		||||
 
 | 
			
		||||
@@ -122,8 +122,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/sysFile/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/sysFile/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							typeCode: this.dataForm.typeCode,
 | 
			
		||||
 
 | 
			
		||||
@@ -110,8 +110,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/sysFileType/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/sysFileType/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							typeCode: this.dataForm.typeCode,
 | 
			
		||||
 
 | 
			
		||||
@@ -140,8 +140,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/workShopSection/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/workShopSection/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							productionLineId: this.dataForm.productionLineId,
 | 
			
		||||
 
 | 
			
		||||
@@ -116,8 +116,8 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate(valid => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					this.$http({
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/workShopSectionEquipment/${!this.dataForm.id ? 'save' : 'update'}`),
 | 
			
		||||
						method: 'post',
 | 
			
		||||
						url: this.$http.adornUrl(`/monitoring/workShopSectionEquipment/${!this.dataForm.id ? '' : this.dataForm.id}`),
 | 
			
		||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
			
		||||
						data: this.$http.adornData({
 | 
			
		||||
							id: this.dataForm.id || undefined,
 | 
			
		||||
							workshopSectionId: this.dataForm.workshopSectionId,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user