lb #36
| @@ -141,7 +141,7 @@ export default { | |||||||
| 					top: 48, | 					top: 48, | ||||||
| 					left: 48, | 					left: 48, | ||||||
| 					right: 24, | 					right: 24, | ||||||
| 					bottom: 24, | 					bottom: 64, | ||||||
| 				}, | 				}, | ||||||
| 				legend: { | 				legend: { | ||||||
| 					top: 0, | 					top: 0, | ||||||
| @@ -171,7 +171,10 @@ export default { | |||||||
| 						}, | 						}, | ||||||
| 					}, | 					}, | ||||||
| 					axisLabel: { | 					axisLabel: { | ||||||
| 						color: '#0007', | 						// show: true, | ||||||
|  | 						// textStyle: { | ||||||
|  | 						// 	color: '#0007', | ||||||
|  | 						// }, | ||||||
| 					}, | 					}, | ||||||
| 					data: [], | 					data: [], | ||||||
| 					// data: Array(24) | 					// data: Array(24) | ||||||
|   | |||||||
| @@ -62,7 +62,7 @@ | |||||||
| 					prop="productionLineId" | 					prop="productionLineId" | ||||||
| 					:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> | 					:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> | ||||||
| 					<el-select | 					<el-select | ||||||
| 						v-model="dataForm.productionLineId" | 						v-model="innerDataForm.productionLineId" | ||||||
| 						placeholder="请选择产线" | 						placeholder="请选择产线" | ||||||
| 						filterable | 						filterable | ||||||
| 						clearable | 						clearable | ||||||
| @@ -81,11 +81,11 @@ | |||||||
| 					prop="sectionId" | 					prop="sectionId" | ||||||
| 					:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> | 					:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> | ||||||
| 					<el-select | 					<el-select | ||||||
| 						v-model="dataForm.sectionId" | 						v-model="innerDataForm.sectionId" | ||||||
| 						placeholder="请选择工段" | 						placeholder="请选择工段" | ||||||
| 						clearable | 						clearable | ||||||
| 						filterable | 						filterable | ||||||
| 						@change="$emit('update', dataForm)"> | 						@change="$emit('update', innerDataForm)"> | ||||||
| 						<el-option | 						<el-option | ||||||
| 							v-for="opt in sectionList" | 							v-for="opt in sectionList" | ||||||
| 							:key="opt.value" | 							:key="opt.value" | ||||||
| @@ -99,9 +99,9 @@ | |||||||
| 			<el-col :span="12"> | 			<el-col :span="12"> | ||||||
| 				<el-form-item label="检测人员" prop="checkPerson"> | 				<el-form-item label="检测人员" prop="checkPerson"> | ||||||
| 					<el-input | 					<el-input | ||||||
| 						v-model="dataForm.checkPerson" | 						v-model="innerDataForm.checkPerson" | ||||||
| 						clearable | 						clearable | ||||||
| 						@change="$emit('update', dataForm)" | 						@change="$emit('update', innerDataForm)" | ||||||
| 						placeholder="请输入检测人员" /> | 						placeholder="请输入检测人员" /> | ||||||
| 				</el-form-item> | 				</el-form-item> | ||||||
| 			</el-col> | 			</el-col> | ||||||
| @@ -112,12 +112,11 @@ | |||||||
| 					prop="checkTime" | 					prop="checkTime" | ||||||
| 					:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> | 					:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> | ||||||
| 					<el-date-picker | 					<el-date-picker | ||||||
| 						v-model="dataForm.checkTime" | 						v-model="innerDataForm.checkTime" | ||||||
| 						type="datetime" | 						type="datetime" | ||||||
| 						placeholder="请选择检测时间" | 						placeholder="请选择检测时间" | ||||||
| 						value-format="timestamp" | 						value-format="timestamp" | ||||||
| 						format="yyyy-MM-dd HH:mm:ss" | 						@change="$emit('update', innerDataForm)"></el-date-picker> | ||||||
| 						clearable></el-date-picker> |  | ||||||
| 				</el-form-item> | 				</el-form-item> | ||||||
| 			</el-col> | 			</el-col> | ||||||
| 		</el-row> | 		</el-row> | ||||||
| @@ -126,15 +125,17 @@ | |||||||
| 			<el-col> | 			<el-col> | ||||||
| 				<el-form-item label="描述" prop="explainText"> | 				<el-form-item label="描述" prop="explainText"> | ||||||
| 					<el-input | 					<el-input | ||||||
| 						v-model="dataForm.explainText" | 						v-model="innerDataForm.explainText" | ||||||
| 						placeholder="请输入描述信息" | 						placeholder="请输入描述信息" | ||||||
|  | 						@change="$emit('update', innerDataForm)" | ||||||
| 						type="textarea"></el-input> | 						type="textarea"></el-input> | ||||||
| 				</el-form-item> | 				</el-form-item> | ||||||
| 			</el-col> | 			</el-col> | ||||||
| 			<el-col> | 			<el-col> | ||||||
| 				<el-form-item label="备注" prop="remark"> | 				<el-form-item label="备注" prop="remark"> | ||||||
| 					<el-input | 					<el-input | ||||||
| 						v-model="dataForm.remark" | 						v-model="innerDataForm.remark" | ||||||
|  | 						@change="$emit('update', innerDataForm)" | ||||||
| 						placeholder="请输入备注"></el-input> | 						placeholder="请输入备注"></el-input> | ||||||
| 				</el-form-item> | 				</el-form-item> | ||||||
| 			</el-col> | 			</el-col> | ||||||
| @@ -163,6 +164,7 @@ export default { | |||||||
| 			inspectionDetList: [], | 			inspectionDetList: [], | ||||||
| 			productionLineList: [], | 			productionLineList: [], | ||||||
| 			sectionList: [], | 			sectionList: [], | ||||||
|  | 			innerDataForm: {}, | ||||||
| 		}; | 		}; | ||||||
| 	}, | 	}, | ||||||
| 	mounted() { | 	mounted() { | ||||||
| @@ -173,12 +175,18 @@ export default { | |||||||
| 		); | 		); | ||||||
| 	}, | 	}, | ||||||
| 	watch: { | 	watch: { | ||||||
| 		'dataForm.productionLineId': { | 		'innerDataForm.productionLineId': { | ||||||
| 			handler: async function (plId) { | 			handler: async function (plId) { | ||||||
| 				if (plId) await this.getWorksectionList(plId); | 				if (plId) await this.getWorksectionList(plId); | ||||||
| 			}, | 			}, | ||||||
| 			immediate: true, | 			immediate: true, | ||||||
| 		}, | 		}, | ||||||
|  | 		dataForm: { | ||||||
|  | 			handler: function (dataForm) { | ||||||
|  | 				this.innerDataForm = JSON.parse(JSON.stringify(dataForm)); | ||||||
|  | 			}, | ||||||
|  | 			immediate: true, | ||||||
|  | 		}, | ||||||
| 	}, | 	}, | ||||||
| 	methods: { | 	methods: { | ||||||
| 		/** 模拟透传 ref  */ | 		/** 模拟透传 ref  */ | ||||||
| @@ -190,8 +198,8 @@ export default { | |||||||
| 		}, | 		}, | ||||||
| 		async handleProductlineChange(id) { | 		async handleProductlineChange(id) { | ||||||
| 			await this.getWorksectionList(id); | 			await this.getWorksectionList(id); | ||||||
| 			this.dataForm.sectionId = null; | 			this.innerDataForm.sectionId = null; | ||||||
| 			this.$emit('update', this.dataForm); | 			this.$emit('update', this.innerDataForm); | ||||||
| 		}, | 		}, | ||||||
| 		// getCode | 		// getCode | ||||||
| 		async getCode(url) { | 		async getCode(url) { | ||||||
|   | |||||||
| @@ -39,7 +39,7 @@ | |||||||
| 			@close="cancel" | 			@close="cancel" | ||||||
| 			@cancel="cancel" | 			@cancel="cancel" | ||||||
| 			@confirm="submitForm"> | 			@confirm="submitForm"> | ||||||
| 			<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" /> | 			<DialogForm v-if="open" ref="form" v-model="form" /> | ||||||
| 		</base-dialog> | 		</base-dialog> | ||||||
| 	</div> | 	</div> | ||||||
| </template> | </template> | ||||||
| @@ -55,13 +55,13 @@ import { | |||||||
| } from '@/api/monitoring/qualityInspectionRecord'; | } from '@/api/monitoring/qualityInspectionRecord'; | ||||||
| // import Editor from '@/components/Editor'; | // import Editor from '@/components/Editor'; | ||||||
| import moment from 'moment'; | import moment from 'moment'; | ||||||
| // import DialogForm from './dialogForm.vue' | import DialogForm from './dialogForm.vue'; | ||||||
|  |  | ||||||
| import basicPageMixin from '@/mixins/lb/basicPageMixin'; | import basicPageMixin from '@/mixins/lb/basicPageMixin'; | ||||||
| export default { | export default { | ||||||
| 	name: 'QualityInspectionRecord', | 	name: 'QualityInspectionRecord', | ||||||
| 	components: { | 	components: { | ||||||
| 		// DialogForm | 		DialogForm, | ||||||
| 	}, | 	}, | ||||||
| 	mixins: [basicPageMixin], | 	mixins: [basicPageMixin], | ||||||
| 	data() { | 	data() { | ||||||
| @@ -276,6 +276,12 @@ export default { | |||||||
| 		// this.getProductLineList(); | 		// this.getProductLineList(); | ||||||
| 	}, | 	}, | ||||||
| 	watch: { | 	watch: { | ||||||
|  | 		form: { | ||||||
|  | 			handler: function (val) { | ||||||
|  | 				console.log('form change:', val); | ||||||
|  | 			}, | ||||||
|  | 			deep: true | ||||||
|  | 		} | ||||||
| 		// 注册弹窗里产线改变时的监听事件 | 		// 注册弹窗里产线改变时的监听事件 | ||||||
| 		// 'form.productionLineId': { | 		// 'form.productionLineId': { | ||||||
| 		// 	handler: function (val) { | 		// 	handler: function (val) { | ||||||
| @@ -367,7 +373,11 @@ export default { | |||||||
| 			const id = row.id; | 			const id = row.id; | ||||||
| 			getQualityInspectionRecord(id).then((response) => { | 			getQualityInspectionRecord(id).then((response) => { | ||||||
| 				/** 因为后端返回的时间是时间戳格式,需转换 */ | 				/** 因为后端返回的时间是时间戳格式,需转换 */ | ||||||
| 				this.form = this.filterData(response.data, Object.keys(this.form)); | 				const info = {} | ||||||
|  | 				Object.keys(this.form).forEach(key => { | ||||||
|  | 					info[key] = response.data[key] | ||||||
|  | 				}); | ||||||
|  | 				this.form = info; | ||||||
| 				this.open = true; | 				this.open = true; | ||||||
| 				this.title = '修改质量检查信息记录表'; | 				this.title = '修改质量检查信息记录表'; | ||||||
| 			}); | 			}); | ||||||
|   | |||||||
		Verwijs in nieuw issue
	
	Block a user