test #47

Merged
gtz217 merged 273 commits from test into master 2023-10-17 08:53:54 +08:00
3 changed files with 40 additions and 19 deletions
Showing only changes of commit a4594426c3 - Show all commits

View File

@ -141,7 +141,7 @@ export default {
top: 48,
left: 48,
right: 24,
bottom: 24,
bottom: 64,
},
legend: {
top: 0,
@ -171,7 +171,10 @@ export default {
},
},
axisLabel: {
color: '#0007',
// show: true,
// textStyle: {
// color: '#0007',
// },
},
data: [],
// data: Array(24)

View File

@ -62,7 +62,7 @@
prop="productionLineId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.productionLineId"
v-model="innerDataForm.productionLineId"
placeholder="请选择产线"
filterable
clearable
@ -81,11 +81,11 @@
prop="sectionId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.sectionId"
v-model="innerDataForm.sectionId"
placeholder="请选择工段"
clearable
filterable
@change="$emit('update', dataForm)">
@change="$emit('update', innerDataForm)">
<el-option
v-for="opt in sectionList"
:key="opt.value"
@ -99,9 +99,9 @@
<el-col :span="12">
<el-form-item label="检测人员" prop="checkPerson">
<el-input
v-model="dataForm.checkPerson"
v-model="innerDataForm.checkPerson"
clearable
@change="$emit('update', dataForm)"
@change="$emit('update', innerDataForm)"
placeholder="请输入检测人员" />
</el-form-item>
</el-col>
@ -112,12 +112,11 @@
prop="checkTime"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-date-picker
v-model="dataForm.checkTime"
v-model="innerDataForm.checkTime"
type="datetime"
placeholder="请选择检测时间"
value-format="timestamp"
format="yyyy-MM-dd HH:mm:ss"
clearable></el-date-picker>
@change="$emit('update', innerDataForm)"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
@ -126,15 +125,17 @@
<el-col>
<el-form-item label="描述" prop="explainText">
<el-input
v-model="dataForm.explainText"
v-model="innerDataForm.explainText"
placeholder="请输入描述信息"
@change="$emit('update', innerDataForm)"
type="textarea"></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="备注" prop="remark">
<el-input
v-model="dataForm.remark"
v-model="innerDataForm.remark"
@change="$emit('update', innerDataForm)"
placeholder="请输入备注"></el-input>
</el-form-item>
</el-col>
@ -163,6 +164,7 @@ export default {
inspectionDetList: [],
productionLineList: [],
sectionList: [],
innerDataForm: {},
};
},
mounted() {
@ -173,12 +175,18 @@ export default {
);
},
watch: {
'dataForm.productionLineId': {
'innerDataForm.productionLineId': {
handler: async function (plId) {
if (plId) await this.getWorksectionList(plId);
},
immediate: true,
},
dataForm: {
handler: function (dataForm) {
this.innerDataForm = JSON.parse(JSON.stringify(dataForm));
},
immediate: true,
},
},
methods: {
/** 模拟透传 ref */
@ -190,8 +198,8 @@ export default {
},
async handleProductlineChange(id) {
await this.getWorksectionList(id);
this.dataForm.sectionId = null;
this.$emit('update', this.dataForm);
this.innerDataForm.sectionId = null;
this.$emit('update', this.innerDataForm);
},
// getCode
async getCode(url) {

View File

@ -39,7 +39,7 @@
@close="cancel"
@cancel="cancel"
@confirm="submitForm">
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" />
<DialogForm v-if="open" ref="form" v-model="form" />
</base-dialog>
</div>
</template>
@ -55,13 +55,13 @@ import {
} from '@/api/monitoring/qualityInspectionRecord';
// import Editor from '@/components/Editor';
import moment from 'moment';
// import DialogForm from './dialogForm.vue'
import DialogForm from './dialogForm.vue';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
export default {
name: 'QualityInspectionRecord',
components: {
// DialogForm
DialogForm,
},
mixins: [basicPageMixin],
data() {
@ -276,6 +276,12 @@ export default {
// this.getProductLineList();
},
watch: {
form: {
handler: function (val) {
console.log('form change:', val);
},
deep: true
}
// 线
// 'form.productionLineId': {
// handler: function (val) {
@ -367,7 +373,11 @@ export default {
const id = row.id;
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.title = '修改质量检查信息记录表';
});