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

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

@ -381,195 +381,31 @@
</el-col> </el-col>
</el-row> </el-row>
</el-col> </el-col>
<!-- 工程相关文件 --> <!-- 工程影像信息 -->
<el-col :span="24"> <el-col :span="24">
<el-divider> 工程相关文件 </el-divider> <el-divider> 工程相关文件 </el-divider>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-row :gutter="15"> <el-row :gutter="15">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="闸门操作规程" prop="gateOperatingProcedures"> <el-form-item label="工程照片" prop="engineeringPanoramicPhotos">
<!-- <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-input <!-- <el-input
v-model="form.engineeringPanoramicPhotos" v-model="form.engineeringPanoramicPhotos"
placeholder="请输入工程全景照片" 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="请输入降等批复文件"
/> --> /> -->
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action="thinking/common/upload" action="thinking/common/upload"
:headers="headers" :headers="headers"
:on-preview="handleOpinionPreview" :on-preview="handleOpinionPreview"
:on-remove="(file) => handleOpinionRemove(file, 'fileList9')" :on-remove="(file) => handleOpinionRemove(file, 'fileList')"
:before-remove="beforeOpinionRemove" :before-remove="beforeOpinionRemove"
multiple multiple
:on-exceed="handleOpinionExceed" :on-exceed="handleOpinionExceed"
:on-success=" :on-success="
(_, fileList) => submitOpinionUpload(fileList, 'fileList9') (_, fileList) => submitOpinionUpload(fileList, 'fileList')
" "
:file-list="fileList9" :file-list="fileList"
> >
<el-button size="small" type="primary" plain> <el-button size="small" type="primary" plain>
<i class="el-icon-upload el-icon--right"></i> <i class="el-icon-upload el-icon--right"></i>
@ -583,6 +419,26 @@
</el-col> </el-col>
</el-row> </el-row>
</el-col> </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-form>
</el-row> </el-row>
<div class="btnList"> <div class="btnList">
@ -594,19 +450,20 @@
<script> <script>
import { import {
listSluiceEngineerMangeInfo, listEngineerManageInfo,
getSluiceEngineerMangeInfo, getEngineerManageInfo,
delSluiceEngineerMangeInfo, delEngineerManageInfo,
addSluiceEngineerMangeInfo, addEngineerManageInfo,
updateSluiceEngineerMangeInfo, updateEngineerManageInfo,
exportSluiceEngineerMangeInfo, exportEngineerManageInfo,
} from "@/api/yg/sluiceEngineerMangeInfo"; } from "@/api/yg/engineerManageInfo";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { getFileStream } from "@/api/system/upload"; import { getFileStream } from "@/api/system/upload";
export default { export default {
name: "SluiceEngineerMangeInfo", name: "EngineerManageInfo",
props: ["sluiceCode"], props: ["embankmentCode"],
data() { data() {
return { return {
// //
@ -685,6 +542,7 @@ export default {
remarks: null, remarks: null,
owerDept: null, owerDept: null,
relations: null, relations: null,
monitoringType: null,
}, },
}, },
// //
@ -695,15 +553,7 @@ export default {
headers: { headers: {
shuili: "water " + getToken(), shuili: "water " + getToken(),
}, },
fileList1: [], fileList: [],
fileList2: [],
fileList3: [],
fileList4: [],
fileList5: [],
fileList6: [],
fileList7: [],
fileList8: [],
fileList9: [],
}; };
}, },
created() { created() {
@ -736,38 +586,12 @@ export default {
methods: { methods: {
/** 查询水闸工程管理信息列表 */ /** 查询水闸工程管理信息列表 */
getList() { getList() {
this.queryParams.data.sluiceCode = this.sluiceCode; this.queryParams.data.embankmentCode = this.embankmentCode;
listSluiceEngineerMangeInfo(this.queryParams).then((response) => { listEngineerManageInfo(this.queryParams).then((response) => {
if (response.records.length > 0) { if (response.records.length > 0) {
this.form = response.records[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) { if (this.form.engineeringPanoramicPhotos) {
this.fileList8 = JSON.parse(this.form.engineeringPanoramicPhotos); this.fileList = JSON.parse(this.form.engineeringPanoramicPhotos);
}
if (this.form.approvalDocumentsDowngrade) {
this.fileList9 = JSON.parse(this.form.approvalDocumentsDowngrade);
} }
} }
console.log("this.form", this.form); console.log("this.form", this.form);
@ -832,7 +656,8 @@ export default {
}, },
// //
cancel() { cancel() {
this.open = false; // this.open = false;
this.$router.back();
this.reset(); this.reset();
}, },
// //
@ -875,6 +700,7 @@ export default {
remarks: null, remarks: null,
owerDept: null, owerDept: null,
relations: null, relations: null,
monitoringType: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -921,6 +747,7 @@ export default {
remarks: null, remarks: null,
owerDept: null, owerDept: null,
relations: null, relations: null,
monitoringType: null,
}, },
}; };
this.resetForm("form"); this.resetForm("form");
@ -951,7 +778,7 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getSluiceEngineerMangeInfo(id).then((response) => { getEngineerManageInfo(id).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改水闸工程管理信息"; this.title = "修改水闸工程管理信息";
@ -961,21 +788,12 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.sluiceCode = this.sluiceCode; this.form.embankmentCode = this.embankmentCode;
this.form.delimitationEvidence = JSON.stringify(this.fileList1);
this.form.confirmationEvidence = JSON.stringify(this.fileList2); this.form.engineeringPanoramicPhotos = JSON.stringify(this.fileList);
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);
if (this.form.id != null) { if (this.form.id != null) {
updateSluiceEngineerMangeInfo(this.form).then((response) => { updateEngineerManageInfo(this.form).then((response) => {
if (response.code === 200) { if (response.code === 200) {
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
this.open = false; this.open = false;
@ -983,7 +801,7 @@ export default {
} }
}); });
} else { } else {
addSluiceEngineerMangeInfo(this.form).then((response) => { addEngineerManageInfo(this.form).then((response) => {
if (response.code === 200) { if (response.code === 200) {
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.open = false; this.open = false;
@ -1004,7 +822,7 @@ export default {
type: "warning", type: "warning",
}) })
.then(function () { .then(function () {
return delSluiceEngineerMangeInfo(ids); return delEngineerManageInfo(ids);
}) })
.then(() => { .then(() => {
this.getList(); this.getList();

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

@ -29,7 +29,29 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="上传图片" prop="photo"> <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-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -42,6 +64,8 @@
</el-row> </el-row>
</template> </template>
<script> <script>
import { getToken } from "@/utils/auth";
import { getFileStream } from "@/api/system/upload";
export default { export default {
props: { props: {
formName: { formName: {
@ -90,6 +114,11 @@ export default {
return { return {
form: {}, form: {},
valid: false, valid: false,
//
headers: {
shuili: "water " + getToken(),
},
fileList: [],
}; };
}, },
created() { created() {
@ -100,6 +129,9 @@ export default {
this.form.type = this.type; this.form.type = this.type;
this.form.sluiceName = this.comForm.sluiceName; this.form.sluiceName = this.comForm.sluiceName;
this.form.sluiceCode = this.comForm.sluiceCode; this.form.sluiceCode = this.comForm.sluiceCode;
if (this.form.photo) {
this.fileList = JSON.parse(this.form.photo);
}
} else { } else {
this.form = { this.form = {
id: null, id: null,
@ -188,6 +220,52 @@ export default {
validateForm() { validateForm() {
this.$refs.form.validate((valid) => (this.valid = valid)); 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> </script>

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

@ -917,18 +917,30 @@ export default {
// //
let isAllTrue = true; let isAllTrue = true;
this.counter0.forEach((item, index) => { this.counter0.forEach((item, index) => {
this.counter0[index].photo = JSON.stringify(
this.$refs["noticeForm" + index][0].fileList
);
this.$refs["noticeForm" + index][0].validateForm(); this.$refs["noticeForm" + index][0].validateForm();
isAllTrue = isAllTrue && this.$refs["noticeForm" + index][0].valid; isAllTrue = isAllTrue && this.$refs["noticeForm" + index][0].valid;
}); });
this.counter1.forEach((item, index) => { this.counter1.forEach((item, index) => {
this.counter1[index].photo = JSON.stringify(
this.$refs["warnForm" + index][0].fileList
);
this.$refs["warnForm" + index][0].validateForm(); this.$refs["warnForm" + index][0].validateForm();
isAllTrue = isAllTrue && this.$refs["warnForm" + index][0].valid; isAllTrue = isAllTrue && this.$refs["warnForm" + index][0].valid;
}); });
this.counter2.forEach((item, index) => { this.counter2.forEach((item, index) => {
this.counter2[index].photo = JSON.stringify(
this.$refs["guideForm" + index][0].fileList
);
this.$refs["guideForm" + index][0].validateForm(); this.$refs["guideForm" + index][0].validateForm();
isAllTrue = isAllTrue && this.$refs["guideForm" + index][0].valid; isAllTrue = isAllTrue && this.$refs["guideForm" + index][0].valid;
}); });
this.counter3.forEach((item, index) => { this.counter3.forEach((item, index) => {
this.counter3[index].photo = JSON.stringify(
this.$refs["nameForm" + index][0].fileList
);
this.$refs["nameForm" + index][0].validateForm(); this.$refs["nameForm" + index][0].validateForm();
isAllTrue = isAllTrue && this.$refs["nameForm" + index][0].valid; 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>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="上传图片" prop="photo"> <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-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-button-group> <el-button-group>
<el-button icon="el-icon-plus" @click="addFormFarther"></el-button> <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-button-group>
</el-col> </el-col>
</el-form> </el-form>
</el-row> </el-row>
</template> </template>
<script> <script>
import { getToken } from "@/utils/auth";
import { getFileStream } from "@/api/system/upload";
export default { export default {
props: { props: {
formName: { formName: {
@ -90,6 +118,11 @@ export default {
return { return {
form: {}, form: {},
valid: false, valid: false,
//
headers: {
shuili: "water " + getToken(),
},
fileList: [],
}; };
}, },
created() { created() {
@ -100,6 +133,9 @@ export default {
this.form.type = this.type; this.form.type = this.type;
this.form.sluiceName = this.comForm.sluiceName; this.form.sluiceName = this.comForm.sluiceName;
this.form.sluiceCode = this.comForm.sluiceCode; this.form.sluiceCode = this.comForm.sluiceCode;
if (this.form.photo) {
this.fileList = JSON.parse(this.form.photo);
}
} else { } else {
this.form = { this.form = {
id: null, id: null,
@ -125,7 +161,7 @@ export default {
this.form.sluiceName = this.comForm.sluiceName; this.form.sluiceName = this.comForm.sluiceName;
this.form.sluiceCode = this.comForm.sluiceCode; this.form.sluiceCode = this.comForm.sluiceCode;
} }
console.log("this.form in components", this.form); // console.log("this.form in components", this.form);
// form // form
// if (this.isFirst) { // if (this.isFirst) {
// this.form = this.firstForm; // this.form = this.firstForm;
@ -135,6 +171,14 @@ export default {
// console.log("markTypeOptions", this.markTypeOptions); // console.log("markTypeOptions", this.markTypeOptions);
}, },
watch: { watch: {
editItem: {
deep: true,
handler(newVal, oldVal) {
//
this.form = newVal;
// console.log("name", newVal);
},
},
"comForm.sluiceName": { "comForm.sluiceName": {
// deep: true, // true // deep: true, // true
handler(newVal, oldVal) { handler(newVal, oldVal) {
@ -185,9 +229,58 @@ export default {
addFormFarther() { addFormFarther() {
this.addForm(this.index, this.type, this.formName); this.addForm(this.index, this.type, this.formName);
}, },
delFormFarther() {
this.$emit("delForm", this.form.id, this.type, this.index);
},
validateForm() { validateForm() {
this.$refs.form.validate((valid) => (this.valid = valid)); 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> </script>

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

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

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

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

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

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

Loading…
Cancel
Save