页面问题修改

dev-scheduling
taozi 4 months ago
parent 166fcc9e6e
commit d845ffb01f
  1. 25
      src/views/safetyManagement/wastewater/components/addEditDialogDischargeRec.vue
  2. 62
      src/views/safetyManagement/wastewater/components/addEditDialogDosingRecord.vue
  3. 33
      src/views/safetyManagement/wastewater/components/addEditDialogTestRecord.vue
  4. 18
      src/views/safetyManagement/wastewater/components/dosingRecord.vue

@ -83,16 +83,7 @@ export default {
data() { data() {
return { return {
openShow: false, openShow: false,
tableData: [ tableData: [],
//
{
wasteType: null, //
teamName: null, //
amount: null, //
dirDate: null, //
memo: '', //
},
],
}; };
}, },
watch: { watch: {
@ -113,21 +104,11 @@ export default {
}, },
// //
addTable() { addTable() {
this.tableData.push({ this.tableData.push({});
wasteType: null,
teamName: null,
amount: null,
dirDate: null,
memo: '',
});
}, },
// //
delTable() { delTable() {
if (this.tableData.length <= 1) { this.tableData.pop()
this.$message.warning('至少保留一行数据');
return;
}
this.tableData.pop(); //
}, },
// //
submit() { submit() {

@ -1,5 +1,5 @@
<template> <template>
<el-dialog title="新增" append-to-body v-model="openShow" width="70%" @close="closeDialog"> <el-dialog title="新增" append-to-body v-model="openShow" width="70%" @close="closeDialog" destroy-on-close>
<div style="margin-bottom: 12px" v-if="moldAddMore"> <div style="margin-bottom: 12px" v-if="moldAddMore">
<el-button type="primary" @click="addTable">插入一行</el-button> <el-button type="primary" @click="addTable">插入一行</el-button>
<el-button type="danger" @click="delTable">删除行</el-button> <el-button type="danger" @click="delTable">删除行</el-button>
@ -51,7 +51,8 @@
<span><i style="color: red">*</i>加药时间</span> <span><i style="color: red">*</i>加药时间</span>
</template> </template>
<template #default="scope"> <template #default="scope">
<el-date-picker v-model="scope.row.dosingTime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" type="datetime" placeholder="选择时间" style="width: 100%" /> <el-date-picker v-model="scope.row.dosingTime" format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss" type="datetime" placeholder="选择时间" style="width: 100%" />
</template> </template>
</el-table-column> </el-table-column>
@ -62,7 +63,6 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="closeDialog"> </el-button> <el-button @click="closeDialog"> </el-button>
@ -86,17 +86,7 @@ export default {
data() { data() {
return { return {
openShow: false, openShow: false,
tableData: [ tableData:[],
//
{
device: null,
drug: null,
dose: null,
dosingTime: null,
dosingMan: null,
memo: '', //
},
],
}; };
}, },
watch: { watch: {
@ -109,45 +99,24 @@ export default {
}, },
}, },
methods: { methods: {
show(){
this.openShow = true;
this.tableData = [];
},
closeDialog() { closeDialog() {
this.openShow = false; this.openShow = false;
this.$emit('closeDialog');
//
this.tableData =
[{ device: null, drug: null, dose: null, dosingTime: null, dosingMan: null, memo: '' }];
}, },
// //
addTable() { addTable() {
this.tableData.push({ this.tableData.push({});
device: null,
drug: null,
dose: null,
dosingTime: null,
dosingMan: null,
memo: '', //
});
}, },
// //
delTable() { delTable() {
if (this.tableData.length <= 1) { this.tableData.pop()
this.$message.warning('至少保留一行数据');
return;
}
this.tableData.pop(); //
}, },
// //
submit() { submit() {
//
const isValid = this.tableData.every(row => { const isValid = this.tableData.every(row => {
//
console.log("验证数据:", {
device: row.device,
drug: row.drug,
dose: row.dose,
dosingTime: row.dosingTime,
dosingMan: row.dosingMan
});
// //
if (!row.device || !row.drug || !row.dose || !row.dosingTime || !row.dosingMan) { if (!row.device || !row.drug || !row.dose || !row.dosingTime || !row.dosingMan) {
// //
@ -163,9 +132,14 @@ export default {
return true; return true;
}); });
if (isValid) { if (isValid) {
// //
this.$emit('submitData', this.tableData); // if(res.code == 200){
this.closeDialog(); // // this.$message.success("");
// this.closeDialog(); //
// this.$emit("submitData"); //
// }else{
// this.$message.error("");
// }
} }
}, },
}, },

@ -106,20 +106,7 @@ export default {
data() { data() {
return { return {
openShow: false, openShow: false,
tableData: [ tableData: [],
//
{
device: null,
dosingTime: null,
dosingMan: null,
itNi: null,
itCu: null,
itCr: null,
itCn2: null,
itPh: null,
memo: '',
},
],
}; };
}, },
watch: { watch: {
@ -151,25 +138,11 @@ export default {
}, },
// //
addTable() { addTable() {
this.tableData.push({ this.tableData.push({});
device: null,
dosingTime: null,
dosingMan: null,
itNi: null,
itCu: null,
itCr: null,
itCn2: null,
itPh: null,
memo: '',
});
}, },
// //
delTable() { delTable() {
if (this.tableData.length <= 1) { this.tableData.pop()
this.$message.warning('至少保留一行数据');
return;
}
this.tableData.pop(); //
}, },
// //
submit() { submit() {

@ -13,8 +13,8 @@
</template> </template>
</avue-crud> </avue-crud>
<!-- 新增弹窗 --> <!-- 新增弹窗 -->
<addEditDialogDosingRecord v-if="addOpen" :showDialog="addOpen" @closeDialog="closeDialog" <addEditDialogDosingRecord ref="addEditDialogDosingRecord"
:moldAddMore="moldAddMore" @submitData="handleSubmitData"> :moldAddMore="moldAddMore" @submitData="onLoad()">
</addEditDialogDosingRecord> </addEditDialogDosingRecord>
<!-- 导入 --> <!-- 导入 -->
<basic-import v-if="isShowImport" title="导入" :isShow="isShowImport" <basic-import v-if="isShowImport" title="导入" :isShow="isShowImport"
@ -32,7 +32,6 @@ export default {
}, },
data() { data() {
return { return {
addOpen: false, //
moldAddMore: false, moldAddMore: false,
isShowImport: false, isShowImport: false,
loading: false, loading: false,
@ -186,21 +185,13 @@ export default {
methods: { methods: {
// //
moldAddFn(row, flag) { moldAddFn(row, flag) {
console.log(1) this.$refs.addEditDialogDosingRecord.show()
this.addOpen = true
this.moldAddMore = flag this.moldAddMore = flag
}, },
// //
closeDialog() { closeDialog() {
this.addOpen = false this.addOpen = false
}, },
//
handleSubmitData(data) {
console.log("提交的数据:", data);
//
this.$message.success("数据提交成功!");
this.addOpen = false;
},
// //
handleImport() { handleImport() {
this.isShowImport = true this.isShowImport = true
@ -307,9 +298,6 @@ export default {
]; ];
this.page.total = this.data.length; this.page.total = this.data.length;
this.loading = false; this.loading = false;
setTimeout(() => {
this.selectionClear();
}, 500);
}, },
}, },
}; };

Loading…
Cancel
Save