Browse Source

堤防结构

master_tdsql
xzt 1 year ago
parent
commit
1df7e3d1a1
  1. 8
      src/api/yg/sluiceMark.js
  2. 1278
      src/views/dyke/engineeringCondition/dykeBaseInfo/index.vue
  3. 812
      src/views/dyke/engineeringCondition/dykeBaseInfo/options/basePage.vue
  4. 14
      src/views/dyke/engineeringCondition/dykeBaseInfo/options/index.vue
  5. 286
      src/views/dyke/engineeringCondition/dykeBaseInfo/options/projectManagement.vue
  6. 80
      src/views/dyke/engineeringCondition/identificationPlate/components/markForm.vue
  7. 12
      src/views/dyke/engineeringCondition/identificationPlate/index.vue
  8. 99
      src/views/sluice/engineeringCondition/identificationPlate/components/markForm.vue
  9. 37
      src/views/sluice/engineeringCondition/identificationPlate/index.vue
  10. 8
      src/views/sluice/engineeringCondition/sluiceBaseInfo/index.vue
  11. 2
      src/views/sluice/engineeringCondition/sluiceBaseInfo/options/basePage.vue

8
src/api/yg/sluiceMark.js

@ -35,6 +35,14 @@ export function updateSluiceMark(data) {
})
}
// 删除整个水闸标识标牌
export function delSluiceMarkAll(sluiceCode) {
return request({
url: '/sz/sluiceMark/del/' + sluiceCode,
method: 'delete'
})
}
// 删除水闸标识标牌
export function delSluiceMark(id) {
return request({

1278
src/views/dyke/engineeringCondition/dykeBaseInfo/index.vue

File diff suppressed because it is too large

812
src/views/dyke/engineeringCondition/dykeBaseInfo/options/basePage.vue

File diff suppressed because it is too large

14
src/views/dyke/engineeringCondition/dykeBaseInfo/options/index.vue

@ -21,7 +21,7 @@
@tab-click="handleClick"
style="margin-bottom: 20px"
>
<el-tab-pane label="水闸基本信息" name="basePage" :lazy="true">
<el-tab-pane label="堤防基本信息" name="basePage" :lazy="true">
<basePage ref="basePage" />
</el-tab-pane>
<el-tab-pane
@ -31,7 +31,7 @@
:lazy="true"
>
<projectManagement
:sluiceCode="$refs.basePage.copyForm.sluiceCode"
:embankmentCode="$refs.basePage.copyForm.embankmentCode"
v-if="activeName === 'projectManagement'"
/>
</el-tab-pane>
@ -41,7 +41,7 @@
<script>
import basePage from "./basePage.vue";
import projectManagement from "./projectManagement.vue";
import { getSluiceInfo } from "@/api/yg/sluiceInfo";
// import { getSluiceInfo } from "@/api/yg/sluiceInfo";
export default {
components: {
basePage,
@ -76,10 +76,10 @@ export default {
},
getList() {
const id = this.$route.query.baseDataId;
getSluiceInfo(id).then((response) => {
this.formData = response.data;
// console.log("this.formData", this.formData);
});
// getSluiceInfo(id).then((response) => {
// this.formData = response.data;
// // console.log("this.formData", this.formData);
// });
},
//
handleClick(tab, event) {

286
src/views/dyke/engineeringCondition/dykeBaseInfo/options/projectManagement.vue

@ -381,195 +381,31 @@
</el-col>
</el-row>
</el-col>
<!-- 工程相关文件 -->
<!-- 工程影像信息 -->
<el-col :span="24">
<el-divider> 工程相关文件 </el-divider>
</el-col>
<el-col :span="24">
<el-row :gutter="15">
<el-col :span="8">
<el-form-item label="闸门操作规程" prop="gateOperatingProcedures">
<!-- <el-input
v-model="form.gateOperatingProcedures"
placeholder="请输入闸门操作规程"
/> -->
<el-upload
class="upload-demo"
action="thinking/common/upload"
:headers="headers"
:on-preview="handleOpinionPreview"
:on-remove="(file) => handleOpinionRemove(file, 'fileList4')"
:before-remove="beforeOpinionRemove"
multiple
:on-exceed="handleOpinionExceed"
:on-success="
(_, fileList) => submitOpinionUpload(fileList, 'fileList4')
"
:file-list="fileList4"
>
<el-button size="small" type="primary" plain>
<i class="el-icon-upload el-icon--right"></i>
点击上传
</el-button>
<div slot="tip" class="el-upload__tip">
支持jpg/png/pdf/word/excel文件等不超过100M
</div>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="水闸控制运用计划(方案)批复文件"
prop="waterGateControlOperation"
>
<!-- <el-input
v-model="form.waterGateControlOperation"
placeholder="请输入水闸控制运用计划(方案)批复文件"
/> -->
<el-upload
class="upload-demo"
action="thinking/common/upload"
:headers="headers"
:on-preview="handleOpinionPreview"
:on-remove="(file) => handleOpinionRemove(file, 'fileList5')"
:before-remove="beforeOpinionRemove"
multiple
:on-exceed="handleOpinionExceed"
:on-success="
(_, fileList) => submitOpinionUpload(fileList, 'fileList5')
"
:file-list="fileList5"
>
<el-button size="small" type="primary" plain>
<i class="el-icon-upload el-icon--right"></i>
点击上传
</el-button>
<div slot="tip" class="el-upload__tip">
支持jpg/png/pdf/word/excel文件等不超过100M
</div>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="工程竣工验收鉴定书"
prop="engineeringCompletionAcceptance"
>
<!-- <el-input
v-model="form.engineeringCompletionAcceptance"
placeholder="请输入工程竣工验收鉴定书"
/> -->
<el-upload
class="upload-demo"
action="thinking/common/upload"
:headers="headers"
:on-preview="handleOpinionPreview"
:on-remove="(file) => handleOpinionRemove(file, 'fileList6')"
:before-remove="beforeOpinionRemove"
multiple
:on-exceed="handleOpinionExceed"
:on-success="
(_, fileList) => submitOpinionUpload(fileList, 'fileList6')
"
:file-list="fileList6"
>
<el-button size="small" type="primary" plain>
<i class="el-icon-upload el-icon--right"></i>
点击上传
</el-button>
<div slot="tip" class="el-upload__tip">
支持jpg/png/pdf/word/excel文件等不超过100M
</div>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8">
<el-form-item label="工程图表" prop="engineeringChart">
<!-- <el-input
v-model="form.engineeringChart"
placeholder="请输入工程图表"
/> -->
<el-upload
class="upload-demo"
action="thinking/common/upload"
:headers="headers"
:on-preview="handleOpinionPreview"
:on-remove="(file) => handleOpinionRemove(file, 'fileList7')"
:before-remove="beforeOpinionRemove"
multiple
:on-exceed="handleOpinionExceed"
:on-success="
(_, fileList) => submitOpinionUpload(fileList, 'fileList7')
"
:file-list="fileList7"
>
<el-button size="small" type="primary" plain>
<i class="el-icon-upload el-icon--right"></i>
点击上传
</el-button>
<div slot="tip" class="el-upload__tip">
支持jpg/png/pdf/word/excel文件等不超过100M
</div>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="工程全景照片"
prop="engineeringPanoramicPhotos"
>
<el-form-item label="工程照片" prop="engineeringPanoramicPhotos">
<!-- <el-input
v-model="form.engineeringPanoramicPhotos"
placeholder="请输入工程全景照片"
/> -->
<el-upload
class="upload-demo"
action="thinking/common/upload"
:headers="headers"
:on-preview="handleOpinionPreview"
:on-remove="(file) => handleOpinionRemove(file, 'fileList8')"
:before-remove="beforeOpinionRemove"
multiple
:on-exceed="handleOpinionExceed"
:on-success="
(_, fileList) => submitOpinionUpload(fileList, 'fileList8')
"
:file-list="fileList8"
>
<el-button size="small" type="primary" plain>
<i class="el-icon-upload el-icon--right"></i>
点击上传
</el-button>
<div slot="tip" class="el-upload__tip">
支持jpg/png/pdf/word/excel文件等不超过100M
</div>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="降等批复文件"
prop="approvalDocumentsDowngrade"
>
<!-- <el-input
v-model="form.approvalDocumentsDowngrade"
placeholder="请输入降等批复文件"
placeholder="请输入工程照片"
/> -->
<el-upload
class="upload-demo"
action="thinking/common/upload"
:headers="headers"
:on-preview="handleOpinionPreview"
:on-remove="(file) => handleOpinionRemove(file, 'fileList9')"
:on-remove="(file) => handleOpinionRemove(file, 'fileList')"
:before-remove="beforeOpinionRemove"
multiple
:on-exceed="handleOpinionExceed"
:on-success="
(_, fileList) => submitOpinionUpload(fileList, 'fileList9')
(_, fileList) => submitOpinionUpload(fileList, 'fileList')
"
:file-list="fileList9"
:file-list="fileList"
>
<el-button size="small" type="primary" plain>
<i class="el-icon-upload el-icon--right"></i>
@ -583,6 +419,26 @@
</el-col>
</el-row>
</el-col>
<!-- 划界确权 -->
<el-col :span="24">
<el-divider> 监控类型 </el-divider>
</el-col>
<el-col :span="8">
<el-form-item label="监控类型(可多选)" prop="monitoringType">
<!-- <el-select
v-model="form.monitoringType"
placeholder="监控类型(可多选)"
style="width: 100%"
>
<el-option
v-for="dict in administrationDepartmentNatureOptions"
:key="dict.dictValue + '监控类型'"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select> -->
</el-form-item>
</el-col>
</el-form>
</el-row>
<div class="btnList">
@ -594,19 +450,20 @@
<script>
import {
listSluiceEngineerMangeInfo,
getSluiceEngineerMangeInfo,
delSluiceEngineerMangeInfo,
addSluiceEngineerMangeInfo,
updateSluiceEngineerMangeInfo,
exportSluiceEngineerMangeInfo,
} from "@/api/yg/sluiceEngineerMangeInfo";
listEngineerManageInfo,
getEngineerManageInfo,
delEngineerManageInfo,
addEngineerManageInfo,
updateEngineerManageInfo,
exportEngineerManageInfo,
} from "@/api/yg/engineerManageInfo";
import { getToken } from "@/utils/auth";
import { getFileStream } from "@/api/system/upload";
export default {
name: "SluiceEngineerMangeInfo",
props: ["sluiceCode"],
name: "EngineerManageInfo",
props: ["embankmentCode"],
data() {
return {
//
@ -685,6 +542,7 @@ export default {
remarks: null,
owerDept: null,
relations: null,
monitoringType: null,
},
},
//
@ -695,15 +553,7 @@ export default {
headers: {
shuili: "water " + getToken(),
},
fileList1: [],
fileList2: [],
fileList3: [],
fileList4: [],
fileList5: [],
fileList6: [],
fileList7: [],
fileList8: [],
fileList9: [],
fileList: [],
};
},
created() {
@ -736,38 +586,12 @@ export default {
methods: {
/** 查询水闸工程管理信息列表 */
getList() {
this.queryParams.data.sluiceCode = this.sluiceCode;
listSluiceEngineerMangeInfo(this.queryParams).then((response) => {
this.queryParams.data.embankmentCode = this.embankmentCode;
listEngineerManageInfo(this.queryParams).then((response) => {
if (response.records.length > 0) {
this.form = response.records[0];
if (this.form.delimitationEvidence) {
this.fileList1 = JSON.parse(this.form.delimitationEvidence);
}
if (this.form.confirmationEvidence) {
this.fileList2 = JSON.parse(this.form.confirmationEvidence);
}
if (this.form.protectionEvidence) {
this.fileList3 = JSON.parse(this.form.protectionEvidence);
}
if (this.form.gateOperatingProcedures) {
this.fileList4 = JSON.parse(this.form.gateOperatingProcedures);
}
if (this.form.waterGateControlOperation) {
this.fileList5 = JSON.parse(this.form.waterGateControlOperation);
}
if (this.form.engineeringCompletionAcceptance) {
this.fileList6 = JSON.parse(
this.form.engineeringCompletionAcceptance
);
}
if (this.form.engineeringChart) {
this.fileList7 = JSON.parse(this.form.engineeringChart);
}
if (this.form.engineeringPanoramicPhotos) {
this.fileList8 = JSON.parse(this.form.engineeringPanoramicPhotos);
}
if (this.form.approvalDocumentsDowngrade) {
this.fileList9 = JSON.parse(this.form.approvalDocumentsDowngrade);
this.fileList = JSON.parse(this.form.engineeringPanoramicPhotos);
}
}
console.log("this.form", this.form);
@ -832,7 +656,8 @@ export default {
},
//
cancel() {
this.open = false;
// this.open = false;
this.$router.back();
this.reset();
},
//
@ -875,6 +700,7 @@ export default {
remarks: null,
owerDept: null,
relations: null,
monitoringType: null,
};
this.resetForm("form");
},
@ -921,6 +747,7 @@ export default {
remarks: null,
owerDept: null,
relations: null,
monitoringType: null,
},
};
this.resetForm("form");
@ -951,7 +778,7 @@ export default {
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getSluiceEngineerMangeInfo(id).then((response) => {
getEngineerManageInfo(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改水闸工程管理信息";
@ -961,21 +788,12 @@ export default {
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.sluiceCode = this.sluiceCode;
this.form.delimitationEvidence = JSON.stringify(this.fileList1);
this.form.confirmationEvidence = JSON.stringify(this.fileList2);
this.form.protectionEvidence = JSON.stringify(this.fileList3);
this.form.gateOperatingProcedures = JSON.stringify(this.fileList4);
this.form.waterGateControlOperation = JSON.stringify(this.fileList5);
this.form.engineeringCompletionAcceptance = JSON.stringify(
this.fileList6
);
this.form.engineeringChart = JSON.stringify(this.fileList7);
this.form.engineeringPanoramicPhotos = JSON.stringify(this.fileList8);
this.form.approvalDocumentsDowngrade = JSON.stringify(this.fileList9);
this.form.embankmentCode = this.embankmentCode;
this.form.engineeringPanoramicPhotos = JSON.stringify(this.fileList);
if (this.form.id != null) {
updateSluiceEngineerMangeInfo(this.form).then((response) => {
updateEngineerManageInfo(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
@ -983,7 +801,7 @@ export default {
}
});
} else {
addSluiceEngineerMangeInfo(this.form).then((response) => {
addEngineerManageInfo(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
@ -1004,7 +822,7 @@ export default {
type: "warning",
})
.then(function () {
return delSluiceEngineerMangeInfo(ids);
return delEngineerManageInfo(ids);
})
.then(() => {
this.getList();

80
src/views/dyke/engineeringCondition/identificationPlate/components/markForm.vue

@ -29,7 +29,29 @@
</el-col>
<el-col :span="12">
<el-form-item label="上传图片" prop="photo">
<el-input v-model="form.photo" placeholder="请输入上传图片" />
<!-- <el-input v-model="form.photo" placeholder="请输入上传图片" /> -->
<el-upload
class="upload-demo"
action="thinking/common/upload"
:headers="headers"
:on-preview="handleOpinionPreview"
:on-remove="(file) => handleOpinionRemove(file, 'fileList')"
:before-remove="beforeOpinionRemove"
multiple
:on-exceed="handleOpinionExceed"
:on-success="
(_, fileList) => submitOpinionUpload(fileList, 'fileList')
"
:file-list="fileList"
>
<el-button size="small" type="primary" plain>
<i class="el-icon-upload el-icon--right"></i>
点击上传
</el-button>
<div slot="tip" class="el-upload__tip">
支持jpg/png文件等不超过100M
</div>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="12">
@ -42,6 +64,8 @@
</el-row>
</template>
<script>
import { getToken } from "@/utils/auth";
import { getFileStream } from "@/api/system/upload";
export default {
props: {
formName: {
@ -90,6 +114,11 @@ export default {
return {
form: {},
valid: false,
//
headers: {
shuili: "water " + getToken(),
},
fileList: [],
};
},
created() {
@ -100,6 +129,9 @@ export default {
this.form.type = this.type;
this.form.sluiceName = this.comForm.sluiceName;
this.form.sluiceCode = this.comForm.sluiceCode;
if (this.form.photo) {
this.fileList = JSON.parse(this.form.photo);
}
} else {
this.form = {
id: null,
@ -188,6 +220,52 @@ export default {
validateForm() {
this.$refs.form.validate((valid) => (this.valid = valid));
},
//
submitOpinionUpload(fileList, name) {
console.log(name, fileList);
this[name].push({
name: fileList.name,
fileName: fileList.response.fileName,
url: fileList.response.url,
uid: fileList.uid,
});
console.log(name, this[name]);
},
handleOpinionRemove(file, name) {
// console.log(file, fileList1);
let index = this[name].findIndex((item) => item.uid === file.uid);
//
this[name].splice(index, 1);
},
//
handleOpinionPreview(file) {
// console.log(file);
getFileStream({ fileName: file.fileName }).then((res) => {
const blob = new Blob([res], {
// type
// application/xlsx application/zip
type: "application/xlsx",
}); //excel,pdf
const href = URL.createObjectURL(blob); //URLblob
const a = document.createElement("a"); //a
a.style.display = "none";
a.href = href; //
a.download = file.name; //
a.click(); //
URL.revokeObjectURL(a.href); //URL
});
},
handleOpinionExceed(files, fileList) {
this.$message.warning(
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
files.length + fileList.length
} 个文件`
);
},
beforeOpinionRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
},
};
</script>

12
src/views/dyke/engineeringCondition/identificationPlate/index.vue

@ -917,18 +917,30 @@ export default {
//
let isAllTrue = true;
this.counter0.forEach((item, index) => {
this.counter0[index].photo = JSON.stringify(
this.$refs["noticeForm" + index][0].fileList
);
this.$refs["noticeForm" + index][0].validateForm();
isAllTrue = isAllTrue && this.$refs["noticeForm" + index][0].valid;
});
this.counter1.forEach((item, index) => {
this.counter1[index].photo = JSON.stringify(
this.$refs["warnForm" + index][0].fileList
);
this.$refs["warnForm" + index][0].validateForm();
isAllTrue = isAllTrue && this.$refs["warnForm" + index][0].valid;
});
this.counter2.forEach((item, index) => {
this.counter2[index].photo = JSON.stringify(
this.$refs["guideForm" + index][0].fileList
);
this.$refs["guideForm" + index][0].validateForm();
isAllTrue = isAllTrue && this.$refs["guideForm" + index][0].valid;
});
this.counter3.forEach((item, index) => {
this.counter3[index].photo = JSON.stringify(
this.$refs["nameForm" + index][0].fileList
);
this.$refs["nameForm" + index][0].validateForm();
isAllTrue = isAllTrue && this.$refs["nameForm" + index][0].valid;
});

99
src/views/sluice/engineeringCondition/identificationPlate/components/markForm.vue

@ -29,19 +29,47 @@
</el-col>
<el-col :span="12">
<el-form-item label="上传图片" prop="photo">
<el-input v-model="form.photo" placeholder="请输入上传图片" />
<!-- <el-input v-model="form.photo" placeholder="请输入上传图片" /> -->
<el-upload
class="upload-demo"
action="thinking/common/upload"
:headers="headers"
:on-preview="handleOpinionPreview"
:on-remove="(file) => handleOpinionRemove(file, 'fileList')"
:before-remove="beforeOpinionRemove"
multiple
:on-exceed="handleOpinionExceed"
:on-success="
(_, fileList) => submitOpinionUpload(fileList, 'fileList')
"
:file-list="fileList"
>
<el-button size="small" type="primary" plain>
<i class="el-icon-upload el-icon--right"></i>
点击上传
</el-button>
<div slot="tip" class="el-upload__tip">
支持jpg/png文件等不超过100M
</div>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="12">
<el-button-group>
<el-button icon="el-icon-plus" @click="addFormFarther"></el-button>
<el-button icon="el-icon-minus" v-if="!isFirst"></el-button>
<el-button
icon="el-icon-minus"
@click="delFormFarther"
v-if="!isFirst"
></el-button>
</el-button-group>
</el-col>
</el-form>
</el-row>
</template>
<script>
import { getToken } from "@/utils/auth";
import { getFileStream } from "@/api/system/upload";
export default {
props: {
formName: {
@ -90,6 +118,11 @@ export default {
return {
form: {},
valid: false,
//
headers: {
shuili: "water " + getToken(),
},
fileList: [],
};
},
created() {
@ -100,6 +133,9 @@ export default {
this.form.type = this.type;
this.form.sluiceName = this.comForm.sluiceName;
this.form.sluiceCode = this.comForm.sluiceCode;
if (this.form.photo) {
this.fileList = JSON.parse(this.form.photo);
}
} else {
this.form = {
id: null,
@ -125,7 +161,7 @@ export default {
this.form.sluiceName = this.comForm.sluiceName;
this.form.sluiceCode = this.comForm.sluiceCode;
}
console.log("this.form in components", this.form);
// console.log("this.form in components", this.form);
// form
// if (this.isFirst) {
// this.form = this.firstForm;
@ -135,6 +171,14 @@ export default {
// console.log("markTypeOptions", this.markTypeOptions);
},
watch: {
editItem: {
deep: true,
handler(newVal, oldVal) {
//
this.form = newVal;
// console.log("name", newVal);
},
},
"comForm.sluiceName": {
// deep: true, // true
handler(newVal, oldVal) {
@ -185,9 +229,58 @@ export default {
addFormFarther() {
this.addForm(this.index, this.type, this.formName);
},
delFormFarther() {
this.$emit("delForm", this.form.id, this.type, this.index);
},
validateForm() {
this.$refs.form.validate((valid) => (this.valid = valid));
},
//
submitOpinionUpload(fileList, name) {
console.log(name, fileList);
this[name].push({
name: fileList.name,
fileName: fileList.response.fileName,
url: fileList.response.url,
uid: fileList.uid,
});
console.log(name, this[name]);
},
handleOpinionRemove(file, name) {
// console.log(file, fileList1);
let index = this[name].findIndex((item) => item.uid === file.uid);
//
this[name].splice(index, 1);
},
//
handleOpinionPreview(file) {
// console.log(file);
getFileStream({ fileName: file.fileName }).then((res) => {
const blob = new Blob([res], {
// type
// application/xlsx application/zip
type: "application/xlsx",
}); //excel,pdf
const href = URL.createObjectURL(blob); //URLblob
const a = document.createElement("a"); //a
a.style.display = "none";
a.href = href; //
a.download = file.name; //
a.click(); //
URL.revokeObjectURL(a.href); //URL
});
},
handleOpinionExceed(files, fileList) {
this.$message.warning(
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
files.length + fileList.length
} 个文件`
);
},
beforeOpinionRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
},
};
</script>

37
src/views/sluice/engineeringCondition/identificationPlate/index.vue

@ -274,6 +274,7 @@
:index="index"
:type="0"
:comForm="comForm"
@delForm="delForm"
/>
</template>
</div>
@ -296,6 +297,7 @@
:index="index"
:type="1"
:comForm="comForm"
@delForm="delForm"
/>
</template>
<!-- <el-row :gutter="15">
@ -367,6 +369,7 @@
:index="index"
:type="2"
:comForm="comForm"
@delForm="delForm"
/>
</template>
@ -439,6 +442,7 @@
:index="index"
:type="3"
:comForm="comForm"
@delForm="delForm"
/>
</template>
@ -505,6 +509,7 @@
import {
listSluiceMark,
getSluiceMark,
delSluiceMarkAll,
delSluiceMark,
addSluiceMark,
updateSluiceMark,
@ -593,6 +598,7 @@ export default {
counter1: [{}],
counter2: [{}],
counter3: [{}],
delIdList: [],
};
},
created() {
@ -745,6 +751,7 @@ export default {
},
//
reset() {
this.delIdList = [];
this.counter0 = [{}];
this.counter1 = [{}];
this.counter2 = [{}];
@ -877,7 +884,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.ids = selection.map((item) => item.sluiceCode);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@ -917,18 +924,30 @@ export default {
//
let isAllTrue = true;
this.counter0.forEach((item, index) => {
this.counter0[index].photo = JSON.stringify(
this.$refs["noticeForm" + index][0].fileList
);
this.$refs["noticeForm" + index][0].validateForm();
isAllTrue = isAllTrue && this.$refs["noticeForm" + index][0].valid;
});
this.counter1.forEach((item, index) => {
this.counter1[index].photo = JSON.stringify(
this.$refs["warnForm" + index][0].fileList
);
this.$refs["warnForm" + index][0].validateForm();
isAllTrue = isAllTrue && this.$refs["warnForm" + index][0].valid;
});
this.counter2.forEach((item, index) => {
this.counter2[index].photo = JSON.stringify(
this.$refs["guideForm" + index][0].fileList
);
this.$refs["guideForm" + index][0].validateForm();
isAllTrue = isAllTrue && this.$refs["guideForm" + index][0].valid;
});
this.counter3.forEach((item, index) => {
this.counter3[index].photo = JSON.stringify(
this.$refs["nameForm" + index][0].fileList
);
this.$refs["nameForm" + index][0].validateForm();
isAllTrue = isAllTrue && this.$refs["nameForm" + index][0].valid;
});
@ -976,6 +995,7 @@ export default {
this.getList();
}
});
if (this.delIdList.length > 0) delSluiceMark(this.delIdList);
} else {
addSluiceMark([
...C0,
@ -1001,9 +1021,10 @@ export default {
// });
});
},
/** 删除按钮操作 */
/** l列表的删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
const ids = row.sluiceCode || this.ids;
console.log(4444, ids);
if (ids) {
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
@ -1011,7 +1032,7 @@ export default {
type: "warning",
})
.then(function () {
return delSluiceMark(ids);
return delSluiceMarkAll(ids);
})
.then(() => {
this.getList();
@ -1022,6 +1043,14 @@ export default {
this.$message.warning("请选择要删除的数据!!");
}
},
//
delForm(itemId, type, index) {
console.log(111, itemId, type, index);
this["counter" + type].splice(index, 1);
// console.log("counter" + type, this["counter" + type]);
this.delIdList.push(itemId);
console.log(222, this.delIdList);
},
},
};
</script>

8
src/views/sluice/engineeringCondition/sluiceBaseInfo/index.vue

@ -1193,14 +1193,14 @@ export default {
sluiceName: null,
adcd: null,
sluiceCode: null,
location: null,
location: [],
plottingSluice: null,
acceptanceStatus: null,
riskEliminationStatus: null,
isHubProject: null,
isGateStation: null,
isSetGateProject: null,
sluiceType: null,
sluiceType: [],
designGateFlow: null,
verifiedGateFlow: null,
projectScale: null,
@ -1214,8 +1214,8 @@ export default {
gateHoleWidth: null,
gateType: [],
hoistsNumber: null,
observationProject: null,
lockChamberStructure: null,
observationProject: [],
lockChamberStructure: [],
machineForm: [],
energyDissipationMethod: [],
automationControl: [],

2
src/views/sluice/engineeringCondition/sluiceBaseInfo/options/basePage.vue

@ -463,7 +463,7 @@ import {
} from "@/api/yg/sluiceInfo";
export default {
name: "SluiceInfo",
name: "sluiceInfo",
data() {
return {
//

Loading…
Cancel
Save