Browse Source

Merge branch 'master' into release-sy-v1.0.0

master_tdsql
panyuyi 1 month ago
parent
commit
94f4a33965
  1. 28
      src/assets/styles/index.scss
  2. 1
      src/components/linkNameSelect/linkDike.vue
  3. 1
      src/components/linkNameSelect/linkSluice.vue
  4. 2
      src/components/myUpload/index.vue
  5. 4
      src/utils/request.js
  6. 155
      src/views/dike/engineeringCondition/dikeBaseInfo/options/historyOverflowsRecords.vue
  7. 32
      src/views/dike/engineeringCondition/dikeBaseInfo/options/index.vue
  8. 130
      src/views/dike/engineeringCondition/identificationPlate/components/markForm.vue
  9. 515
      src/views/dike/engineeringCondition/identificationPlate/index.vue
  10. 2
      src/views/dike/safetyManage/declarationManage/declare/components/listPage/index.vue
  11. 4
      src/views/dike/safetyManage/declarationManage/declare/index.vue
  12. 4
      vue.config.js

28
src/assets/styles/index.scss

@ -1,12 +1,22 @@
@use './variables.scss'; // @use './variables.scss';
@use './mixin.scss'; // @use './mixin.scss';
@use './transition.scss'; // @use './transition.scss';
@use './element-ui.scss'; // @use './element-ui.scss';
@use './sidebar.scss'; // @use './sidebar.scss';
@use './btn.scss'; // @use './btn.scss';
@use './space.scss'; // @use './space.scss';
@use './flex.scss'; // @use './flex.scss';
@use './color.scss'; // @use './color.scss';
@import './variables.scss';
@import './mixin.scss';
@import './transition.scss';
@import './element-ui.scss';
@import './sidebar.scss';
@import './btn.scss';
@import './space.scss';
@import './flex.scss';
@import './color.scss';
body { body {
height: 100%; height: 100%;

1
src/components/linkNameSelect/linkDike.vue

@ -61,6 +61,7 @@ export default {
pageSize: 10, pageSize: 10,
ids: null, ids: null,
data: { data: {
status:6,
dikeName: null, dikeName: null,
dikeCode: null, dikeCode: null,
}, },

1
src/components/linkNameSelect/linkSluice.vue

@ -106,6 +106,7 @@ export default {
pageSize: 10, pageSize: 10,
ids: null, ids: null,
data: { data: {
status:6,
wagaName: null, wagaName: null,
wagaCode: null, wagaCode: null,
}, },

2
src/components/myUpload/index.vue

@ -63,7 +63,7 @@ export default {
// //
handlePreview(file) { handlePreview(file) {
// console.log(file); console.log(file);
getFileStream({ fileName: file.fileName }).then((res) => { getFileStream({ fileName: file.fileName }).then((res) => {
const blob = new Blob([res], { const blob = new Blob([res], {
// type // type

4
src/utils/request.js

@ -48,7 +48,7 @@ service.interceptors.response.use(
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
store.dispatch('LogOut').then(() => { store.dispatch('LogOut').then(() => {
location.href = '/'; location.href = 'https://210.76.82.26/wr-portal';
}); });
}); });
} }
@ -59,7 +59,7 @@ service.interceptors.response.use(
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
store.dispatch('LogOut').then(() => { store.dispatch('LogOut').then(() => {
location.href = '/'; location.href = 'https://210.76.82.26/wr-portal';
}); });
}); });
} else if (code !== 200) { } else if (code !== 200) {

155
src/views/dike/engineeringCondition/dikeBaseInfo/options/historyOverflowsRecords.vue

@ -1,5 +1,60 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- <el-descriptions-->
<!-- class="margin-top"-->
<!-- :column="2"-->
<!-- border-->
<!-- :labelStyle="{-->
<!-- 'text-align': 'left',-->
<!-- width: '180px',-->
<!-- height: '50px',-->
<!-- }"-->
<!-- :contentStyle="{ minWidth: '350px' }"-->
<!-- >-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label"> 堤防代码 </template>-->
<!-- {{ dikeCode }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label"> 记录更新时间 </template>-->
<!-- {{ this.form.updateDate }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label"> 决溢地点 </template>-->
<!-- {{ this.form.brspPl }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label"> 决溢时间 </template>-->
<!-- {{ this.form.brspDatetime }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label"> 决溢形式 </template>-->
<!-- {{ this.form.brspForm }}-->
<!-- </el-descriptions-item>-->
<!--&lt;!&ndash; <el-descriptions-item>&ndash;&gt;-->
<!--&lt;!&ndash; <template slot="label"> 决溢损失 </template>&ndash;&gt;-->
<!--&lt;!&ndash; {{ this.form.brspLs }}&ndash;&gt;-->
<!--&lt;!&ndash; </el-descriptions-item>&ndash;&gt;-->
<!--&lt;!&ndash; <el-descriptions-item>&ndash;&gt;-->
<!--&lt;!&ndash; <template slot="label"> 修复日期 </template>&ndash;&gt;-->
<!--&lt;!&ndash; {{ this.form.rpTime }}&ndash;&gt;-->
<!--&lt;!&ndash; </el-descriptions-item>&ndash;&gt;-->
<!--&lt;!&ndash; <el-descriptions-item>&ndash;&gt;-->
<!--&lt;!&ndash; <template slot="label"> 淹没范围 </template>&ndash;&gt;-->
<!--&lt;!&ndash; {{ this.form.inRn }}&ndash;&gt;-->
<!--&lt;!&ndash; </el-descriptions-item>&ndash;&gt;-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label"> 备注 </template>-->
<!-- {{ this.form.note }}-->
<!-- </el-descriptions-item>-->
<!-- </el-descriptions>-->
<el-dialog
:title="viewTitle"
:visible.sync="viewOpen"
width="1200px"
append-to-body
:close-on-click-modal="false"
>
<el-descriptions <el-descriptions
class="margin-top" class="margin-top"
:column="2" :column="2"
@ -48,6 +103,93 @@
{{ this.form.note }} {{ this.form.note }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-dialog>
<el-table
v-loading="loading"
:data="tableData"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" fixed />
<el-table-column
label="序号"
type="index"
width="50"
align="center"
fixed
/>
<el-table-column
label="堤防代码"
align="center"
prop="dikeCode"
min-width="120"
/>
<el-table-column
label="记录更新时间"
align="center"
prop="updateDate"
min-width="120"
/>
<el-table-column
label="决溢地点"
align="center"
prop="brspPl"
min-width="120"
/>
<el-table-column
label="决溢时间"
align="center"
prop="brspDatetime"
min-width="120"
/>
<el-table-column
label=""
align="决溢形式"
prop="brspForm"
min-width="120"
/>
<!-- <el-table-column
label="责任人类型"
align="center"
prop="personResponsibleType"
:formatter="personResponsibleTypeFormat"
min-width="120"
/> -->
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="180"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="viewInFo(scope.row)"
v-hasPermi="['yg:fzr:view']"
>查看</el-button
>
<!-- <el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['yg:fzr:edit']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['yg:fzr:remove']"
>删除</el-button
> -->
</template>
</el-table-column>
</el-table>
<!-- <div class="btnList"> <!-- <div class="btnList">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -72,7 +214,7 @@ export default {
data() { data() {
return { return {
// //
loading: true, loading: false,
// //
ids: [], ids: [],
// //
@ -81,6 +223,10 @@ export default {
multiple: true, multiple: true,
// //
showSearch: true, showSearch: true,
tableData:[],
viewTitle: "",
//
viewOpen: false,
// //
total: 0, total: 0,
// //
@ -128,12 +274,19 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
viewInFo(row) {
this.form = row;
this.viewTitle = "历史决溢记录信息";
this.viewOpen = true;
},
/** 查询决溢记录列表 */ /** 查询决溢记录列表 */
getList() { getList() {
this.queryParams.data.dikeCode = this.dikeCode; this.queryParams.data.dikeCode = this.dikeCode;
listJyjl(this.queryParams).then((response) => { listJyjl(this.queryParams).then((response) => {
if (response.records[0]) { if (response.records[0]) {
this.form = response.records[0]; this.form = response.records[0];
this.tableData=response.record;
this.loading=false
} }
}); });
}, },

32
src/views/dike/engineeringCondition/dikeBaseInfo/options/index.vue

@ -27,14 +27,14 @@
<basePage ref="basePage" /> <basePage ref="basePage" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane <!-- <el-tab-pane-->
label="堤防横断面" <!-- label="堤防横断面"-->
name="dikeCrossSection" <!-- name="dikeCrossSection"-->
:disabled="!routeList[1].isEdit" <!-- :disabled="!routeList[1].isEdit"-->
:lazy="true" <!-- :lazy="true"-->
> <!-- >-->
<dikeCrossSection :dikeCode="this.formData.dikeCode" /> <!-- <dikeCrossSection :dikeCode="this.formData.dikeCode" />-->
</el-tab-pane> <!-- </el-tab-pane>-->
<el-tab-pane <el-tab-pane
label="堤防横断面特征值" label="堤防横断面特征值"
name="dikeCrossSectionTrait" name="dikeCrossSectionTrait"
@ -43,14 +43,14 @@
> >
<dikeCrossSectionTrait :dikeCode="this.formData.dikeCode" /> <dikeCrossSectionTrait :dikeCode="this.formData.dikeCode" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane <!-- <el-tab-pane-->
label="水文特征" <!-- label="水文特征"-->
name="hydrologicalCharacteristics" <!-- name="hydrologicalCharacteristics"-->
:disabled="!routeList[1].isEdit" <!-- :disabled="!routeList[1].isEdit"-->
:lazy="true" <!-- :lazy="true"-->
> <!-- >-->
<hydrologicalCharacteristics :dikeCode="this.formData.dikeCode" /> <!-- <hydrologicalCharacteristics :dikeCode="this.formData.dikeCode" />-->
</el-tab-pane> <!-- </el-tab-pane>-->
<el-tab-pane <el-tab-pane
label="管理体制" label="管理体制"

130
src/views/dike/engineeringCondition/identificationPlate/components/markForm.vue

@ -56,12 +56,16 @@
</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 @click="addFormFarther" type="primary">{{
!rowIsEdit ? "添加" : "修改"
}}</el-button>
<!-- <el-button icon="el-icon-plus" @click="addFormFarther"></el-button>
<el-button <el-button
icon="el-icon-minus" icon="el-icon-minus"
@click="delFormFarther" @click="delFormFarther"
v-if="!isFirst" v-if="!isFirst"
></el-button> ></el-button> -->
</el-button-group> </el-button-group>
</el-col> </el-col>
</el-form> </el-form>
@ -109,10 +113,26 @@ export default {
}, },
}, },
index: {}, index: {},
type: {}, type: {
type: Number,
default() {
return 1;
},
},
editItem: {}, editItem: {},
status: {}, status: {
type: Boolean,
default() {
return false;
},
},
comForm: {}, comForm: {},
rowIsEdit: {
type: Boolean,
default() {
return false;
},
},
}, },
data() { data() {
return { return {
@ -127,17 +147,19 @@ export default {
}, },
created() { created() {
// //
if (this.status) { // if (this.status) {
this.form = this.editItem; // this.form = this.editItem;
this.form.type = this.type; // this.form.type = this.type;
this.form.dikeName = this.comForm.dikeName; // this.form.dikeName = this.comForm.dikeName;
this.form.dikeCode = this.comForm.dikeCode; // this.form.dikeCode = this.comForm.dikeCode;
this.form.adcd = this.comForm.adcd; // this.form.adcd = this.comForm.adcd;
if (this.form.photo) { // if (this.editItem.photo) {
this.fileList = JSON.parse(this.form.photo); // console.log("", this.editItem.photo);
}
} else { // this.fileList = this.editItem.photo;
// }
// } else {
this.form = { this.form = {
id: null, id: null,
adcd: null, adcd: null,
@ -163,7 +185,7 @@ export default {
this.form.dikeName = this.comForm.dikeName; this.form.dikeName = this.comForm.dikeName;
this.form.dikeCode = this.comForm.dikeCode; this.form.dikeCode = this.comForm.dikeCode;
this.form.adcd = this.comForm.adcd; this.form.adcd = this.comForm.adcd;
} // }
console.log("this.form in components", this.form); console.log("this.form in components", this.form);
// form // form
// if (this.isFirst) { // if (this.isFirst) {
@ -174,12 +196,42 @@ export default {
// console.log("markTypeOptions", this.markTypeOptions); // console.log("markTypeOptions", this.markTypeOptions);
}, },
watch: { watch: {
// status: {
// handler(newVal, oldVal) {
// console.log("status", newVal, oldVal);
// console.log("this.editItem", this.editItem);
// if (newVal) {
// this.form = this.editItem;
// this.form.type = this.type;
// this.form.dikeName = this.comForm.dikeName;
// this.form.dikeCode = this.comForm.dikeCode;
// this.form.adcd = this.comForm.adcd;
// if (this.editItem.photo) {
// console.log("", this.editItem.photo);
// this.fileList = this.editItem.photo;
// }
// }
// },
// },
editItem: { editItem: {
deep: true, deep: true,
handler(newVal, oldVal) { handler(newVal, oldVal) {
// //
// this.form = newVal;
this.form = newVal; this.form = newVal;
// console.log("name", newVal);
this.form.type = this.type;
this.form.dikeName = this.comForm.dikeName;
this.form.dikeCode = this.comForm.dikeCode;
this.form.adcd = this.comForm.adcd;
if (newVal.photo) {
console.log("文件列表", newVal.photo);
this.fileList = JSON.parse(newVal.photo);
}
}, },
}, },
"comForm.dikeName": { "comForm.dikeName": {
@ -238,8 +290,52 @@ export default {
// }, // },
}, },
methods: { methods: {
resetForm() {
this.$refs["form"].resetFields();
this.form = {
id: null,
adcd: null,
dikeCode: null,
markName: null,
dikeName: null,
markLocation: null,
type: null,
markType: null,
photo: null,
markCode: null,
proNo: null,
proCode: null,
createUid: null,
updateUid: null,
createTime: null,
updateTime: null,
owerDept: null,
remark: null,
};
this.fileList = [];
this.$nextTick(() => {
this.form.type = this.type;
console.log(7777777777, this.comForm, this.type);
this.form.dikeName = this.comForm.dikeName;
this.form.dikeCode = this.comForm.dikeCode;
this.form.adcd = this.comForm.adcd;
});
},
addFormFarther() { addFormFarther() {
this.addForm(this.index, this.type, this.formName); this.$refs["form"].validate((valid) => {
if (valid) {
// this.addForm(this.index, this.type, this.form)
this.form.photo = JSON.stringify(this.fileList);
this.addForm({
formData: JSON.parse(JSON.stringify(this.form)),
type: this.type,
});
this.resetForm();
} else {
console.log("error submit!!");
return false;
}
});
}, },
delFormFarther() { delFormFarther() {
this.$emit("delForm", this.form.id, this.type, this.index); this.$emit("delForm", this.form.id, this.type, this.index);

515
src/views/dike/engineeringCondition/identificationPlate/index.vue

@ -11,7 +11,6 @@
</el-breadcrumb-item> </el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<div class="mainCon"> <div class="mainCon">
<div class="list"> <div class="list">
<el-form <el-form
:model="queryParams" :model="queryParams"
@ -297,249 +296,115 @@
</el-col> </el-col>
</el-form> </el-form>
</el-row> </el-row>
<!-- ========================水闸公告类======================== -->
<div class="listTitle" style="margin-top: 0"> <div class="biaopai-wrap">
<span>堤防公告类</span> <div class="tabs">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
v-for="item in tabsOpt"
:key="item.type"
:label="`${item.label}(${getCounterLen(item.type)})`"
:name="item.name"
></el-tab-pane>
</el-tabs>
</div> </div>
<div class="noticePart" ref="noticePart"> <div class="form-wrap">
<template v-for="(item, index) in counter0">
<markForm <markForm
:ref="'noticeForm' + index" ref="markForm"
:key="item + index"
:editItem="item"
:status="isEdit" :status="isEdit"
:formName="'noticeForm'" :formName="getTabsOpt.name"
:rules="rules" :rules="rules"
:markTypeOptions="markTypeOptions1" :markTypeOptions="getTabsOpt.markTypeOptions"
:isFirst="index == 0 ? isFirst : false" :isFirst="true"
:addForm="addForm" :addForm="addForm1"
:index="index" :type="getTabsOpt.type"
:type="0" :editItem="editItem"
:rowIsEdit="rowIsEdit"
:comForm="comForm" :comForm="comForm"
@delForm="delForm" @delForm="delForm"
/> />
</template>
</div> </div>
<!-- ========================水闸警告类======================== --> <div class="table-wrap">
<div class="listTitle" style="margin-top: 0"> <el-table
<span>堤防警告类</span> :data="
</div> getDialogTabelData.filter(
<div class="warnPart" ref="warnPart"> (data) =>
<template v-for="(item, index) in counter1"> !search ||
<markForm data.markName.toLowerCase().includes(search.toLowerCase())
:ref="'warnForm' + index" )
:key="item + index" "
:editItem="item" border
:status="isEdit"
:formName="'warnForm'"
:rules="rules"
:markTypeOptions="markTypeOptions2"
:isFirst="index == 0 ? isFirst : false"
:addForm="addForm"
:index="index"
:type="1"
:comForm="comForm"
@delForm="delForm"
/>
</template>
<!-- <el-row :gutter="15">
<el-form
ref="warnForm"
:model="warnForm"
:rules="rules"
label-width="80px"
>
<el-col :span="12">
<el-form-item label="标志名称" prop="markName">
<el-input
v-model="warnForm.markName"
placeholder="请输入标志名称"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="标识位置" prop="markLocation">
<el-input
v-model="warnForm.markLocation"
placeholder="请输入标识位置"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="标识类型" prop="markType">
<el-select
v-model="warnForm.markType"
placeholder="请选择标识类型"
style="width: 100%" style="width: 100%"
height="290"
> >
<el-option <el-table-column prop="markName" label="标志名称" width="250">
v-for="dict in markTypeOptions2" </el-table-column>
:key="dict.dictValue" <el-table-column
:label="dict.dictLabel" prop="markLocation"
:value="dict.dictValue" label="标识位置"
></el-option> width="200"
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上传图片" prop="photo">
<el-input
v-model="warnForm.photo"
placeholder="请输入上传图片"
/>
</el-form-item>
</el-col>
</el-form>
</el-row> -->
</div>
<!-- ========================水闸指引类======================== -->
<div class="listTitle" style="margin-top: 0">
<span>堤防指引类</span>
</div>
<div class="guidePart">
<template v-for="(item, index) in counter2">
<markForm
:ref="'guideForm' + index"
:key="item + index"
:editItem="item"
:status="isEdit"
:formName="'guideForm'"
:rules="rules"
:markTypeOptions="markTypeOptions3"
:isFirst="index == 0 ? isFirst : false"
:addForm="addForm"
:index="index"
:type="2"
:comForm="comForm"
@delForm="delForm"
/>
</template>
<!-- <el-row :gutter="15">
<el-form
ref="guideForm"
:model="guideForm"
:rules="rules"
label-width="80px"
> >
<el-col :span="12"> </el-table-column>
<el-form-item label="标志名称" prop="markName"> <el-table-column prop="markType" label="标识类型">
<el-input <template slot-scope="scope">
v-model="guideForm.markName" {{ formatType(scope.row) }}
placeholder="请输入标志名称" </template>
/> </el-table-column>
</el-form-item> <el-table-column prop="photo" label="图片文件">
</el-col> <template slot-scope="scope">
<el-col :span="12"> {{ JSON.parse(scope.row.photo).length ? "已上传" : "" }}
<el-form-item label="标识位置" prop="markLocation"> </template>
<el-input </el-table-column>
v-model="guideForm.markLocation" <el-table-column
placeholder="请输入标识位置" label="操作"
/> align="center"
</el-form-item> class-name="small-padding fixed-width"
</el-col> width="220"
<el-col :span="12"> fixed="right"
<el-form-item label="标识类型" prop="markType">
<el-select
v-model="guideForm.markType"
placeholder="请选择标识类型"
style="width: 100%"
> >
<el-option <template slot="header" slot-scope="scope">
v-for="dict in markTypeOptions3"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上传图片" prop="photo">
<el-input <el-input
v-model="guideForm.photo" v-model="search"
placeholder="请输入上传图片" size="mini"
/> placeholder="输入标志名称搜索"
</el-form-item> clearable
</el-col>
</el-form>
</el-row> -->
</div>
<!-- ========================水闸名称类======================== -->
<div class="listTitle" style="margin-top: 0">
<span>堤防名称类</span>
</div>
<div class="namePart">
<template v-for="(item, index) in counter3">
<markForm
:ref="'nameForm' + index"
:key="item + index"
:editItem="item"
:status="isEdit"
:formName="'nameForm'"
:rules="rules"
:markTypeOptions="markTypeOptions4"
:isFirst="index == 0 ? isFirst : false"
:addForm="addForm"
:index="index"
:type="3"
:comForm="comForm"
@delForm="delForm"
/> />
</template> </template>
<template slot-scope="scope">
<!-- <el-row :gutter="15"> <el-button
<el-form size="mini"
ref="nameForm" type="text"
:model="nameForm" icon="el-icon-edit"
:rules="rules" @click="
label-width="80px" handleDialogUpdate(
scope.row,
scope.column,
scope.$index
)
"
>修改</el-button
> >
<el-col :span="12"> <el-button
<el-form-item label="标志名称" prop="markName"> size="mini"
<el-input type="text"
v-model="nameForm.markName" icon="el-icon-delete"
placeholder="请输入标志名称" @click="
/> handleDialogDelete(
</el-form-item> scope.row,
</el-col> scope.column,
<el-col :span="12"> scope.$index
<el-form-item label="标识位置" prop="markLocation"> )
<el-input "
v-model="nameForm.markLocation" >删除</el-button
placeholder="请输入标识位置"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="标识类型" prop="markType">
<el-select
v-model="nameForm.markType"
placeholder="请选择标识类型"
style="width: 100%"
> >
<el-option </template>
v-for="dict in markTypeOptions4" </el-table-column>
:key="dict.dictValue" </el-table>
:label="dict.dictLabel" </div>
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上传图片" prop="photo">
<el-input
v-model="nameForm.photo"
placeholder="请输入上传图片"
/>
</el-form-item>
</el-col>
</el-form>
</el-row> -->
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm1"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -606,7 +471,7 @@ export default {
// //
title: "", title: "",
// //
open: false, open: true,
// //
typeOptions: [], typeOptions: [],
// //
@ -658,13 +523,66 @@ export default {
}, },
dikeNameOptions: [], dikeNameOptions: [],
isEdit: false, isEdit: false,
counter0: [{}], counter0: [],
counter1: [{}], counter1: [],
counter2: [{}], counter2: [],
counter3: [{}], counter3: [],
delIdList: [], delIdList: [],
activeName: "noticeForm",
editItem: {},
editIndex: null,
rowIsEdit: false,
search: "",
}; };
}, },
computed: {
tabsOpt() {
return [
{
label: "堤防公告类",
name: "noticeForm",
type: 0,
markTypeOptions: this.markTypeOptions1,
},
{
label: "堤防警告类",
name: "warnForm",
type: 1,
markTypeOptions: this.markTypeOptions2,
},
{
label: "堤防指引类",
name: "guideForm",
type: 2,
markTypeOptions: this.markTypeOptions3,
},
{
label: "堤防名称类",
name: "nameForm",
type: 3,
markTypeOptions: this.markTypeOptions4,
},
];
},
getTabsOpt() {
return this.tabsOpt.filter((item) => {
return item.name === this.activeName;
})[0];
},
getDialogTabelData() {
return this[`counter${this.getTabsOpt.type}`];
// switch (this.activeName) {
// case "noticeForm":
// return this.counter0;
// case "noticeForm":
// return this.counter0;
// case "noticeForm":
// return this.counter0;
// case "noticeForm":
// return this.counter0;
// }
},
},
created() { created() {
this.getList(); this.getList();
this.getDicts("breastplate_type").then((response) => { this.getDicts("breastplate_type").then((response) => {
@ -691,6 +609,47 @@ export default {
// this.counter1[0] = this.noticeForm; // this.counter1[0] = this.noticeForm;
// }, // },
methods: { methods: {
formatType(row) {
console.log("row", row);
let { type, markType } = row;
if (markType) {
const markTypeOptions = "markTypeOptions" + (parseInt(type) + 1);
return this[markTypeOptions].filter((item) => {
return item.dictValue == markType;
})[0].dictLabel;
} else {
return "--";
}
},
handleDialogUpdate(row, col, index) {
console.log("row", row, col, index);
this.rowIsEdit = true;
this.editIndex = index;
this.editItem = JSON.parse(JSON.stringify(row));
},
handleDialogDelete(row, col, index) {
let { type } = row;
const counterType = "counter" + type;
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
console.log("删除", row, index);
this[counterType].splice(index, 1);
})
.catch(function () {});
},
getCounterLen(type) {
const counterType = "counter" + type;
return this[counterType].length;
},
handleClick() {
this.search = "";
this.$refs.markForm.resetForm();
},
formatAdcd(row) { formatAdcd(row) {
if (row.adcd) { if (row.adcd) {
let provinceCode = row.adcd.slice(0, 2); let provinceCode = row.adcd.slice(0, 2);
@ -713,6 +672,19 @@ export default {
} }
} }
}, },
addForm1(rowData) {
console.log("rowData", rowData);
let { type, formData } = rowData;
const counterType = "counter" + type;
console.log(formData);
if (this.rowIsEdit) {
this[counterType].splice(this.editIndex, 1, formData);
this.rowIsEdit = false;
} else {
this[counterType].push(formData);
}
},
addForm(index, type, formName) { addForm(index, type, formName) {
console.log("index和type", index, type); console.log("index和type", index, type);
const counterType = "counter" + type; const counterType = "counter" + type;
@ -837,10 +809,10 @@ export default {
// //
reset() { reset() {
this.delIdList = []; this.delIdList = [];
this.counter0 = [{}]; this.counter0 = [];
this.counter1 = [{}]; this.counter1 = [];
this.counter2 = [{}]; this.counter2 = [];
this.counter3 = [{}]; this.counter3 = [];
this.comForm = { this.comForm = {
dikeName: null, dikeName: null,
dikeCode: null, dikeCode: null,
@ -1001,13 +973,13 @@ export default {
this.comForm.adcd = response.data[0].adcd; this.comForm.adcd = response.data[0].adcd;
console.log("this.comForm", this.comForm); console.log("this.comForm", this.comForm);
this.counter0 = response.data.filter((item) => item.type == 0); this.counter0 = response.data.filter((item) => item.type == 0);
if (this.counter0.length == 0) this.counter0 = [{}]; if (this.counter0.length == 0) this.counter0 = [];
this.counter1 = response.data.filter((item) => item.type == 1); this.counter1 = response.data.filter((item) => item.type == 1);
if (this.counter1.length == 0) this.counter1 = [{}]; if (this.counter1.length == 0) this.counter1 = [];
this.counter2 = response.data.filter((item) => item.type == 2); this.counter2 = response.data.filter((item) => item.type == 2);
if (this.counter2.length == 0) this.counter2 = [{}]; if (this.counter2.length == 0) this.counter2 = [];
this.counter3 = response.data.filter((item) => item.type == 3); this.counter3 = response.data.filter((item) => item.type == 3);
if (this.counter3.length == 0) this.counter3 = [{}]; if (this.counter3.length == 0) this.counter3 = [];
console.log("回显的数据时的counter0", this.counter0); console.log("回显的数据时的counter0", this.counter0);
console.log("回显的数据时的counter1", this.counter1); console.log("回显的数据时的counter1", this.counter1);
console.log("回显的数据时的counter2", this.counter2); console.log("回显的数据时的counter2", this.counter2);
@ -1017,6 +989,73 @@ export default {
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm1() {
let isAllTrue =
this.counter0.length ||
this.counter1.length ||
this.counter2.length ||
this.counter3.length
? true
: false;
this.$refs["comForm"].validate((valid0) => {
if (valid0) {
if (!isAllTrue) {
this.msgError("堤防标识标牌列表数据为空");
return;
}
this.counter0.forEach((item) => {
if (item) {
item = { ...item, ...this.comForm };
}
});
this.counter1.forEach((item) => {
if (item) {
item = { ...item, ...this.comForm };
}
});
this.counter2.forEach((item) => {
if (item) {
item = { ...item, ...this.comForm };
}
});
this.counter3.forEach((item) => {
if (item) {
item = { ...item, ...this.comForm };
}
});
if (this.isEdit) {
updateDikeMark([
...this.counter0,
...this.counter1,
...this.counter2,
...this.counter3,
]).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
if (this.delIdList.length > 0) delDikeMark(this.delIdList);
} else {
addDikeMark([
...this.counter0,
...this.counter1,
...this.counter2,
...this.counter3,
]).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
submitForm() { submitForm() {
// console.log(1111111111, this.$refs.noticeForm0[0].$refs.form); // console.log(1111111111, this.$refs.noticeForm0[0].$refs.form);
// //

2
src/views/dike/safetyManage/declarationManage/declare/components/listPage/index.vue

@ -1338,7 +1338,7 @@ export default {
} }
}); });
} else { } else {
this.chartEleGetData(); // this.chartEleGetData();
addJbxx(this.form).then((response) => { addJbxx(this.form).then((response) => {
if (response.code === 200) { if (response.code === 200) {
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");

4
src/views/dike/safetyManage/declarationManage/declare/index.vue

@ -11,7 +11,7 @@
</el-breadcrumb-item> </el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<!-- <dataCharts ref="dataCharts" />--> <!-- <dataCharts ref="dataCharts" />-->
<listPage :chartEleGetData="chartEleGetData" /> <listPage />
</div> </div>
</template> </template>
<script> <script>
@ -42,7 +42,7 @@ export default {
// }, // },
// }, // },
mounted() { mounted() {
this.chartEleGetData = this.$refs.dataCharts?.getData; // this.chartEleGetData = this.$refs.dataCharts?.getData;
}, },
}; };
</script> </script>

4
vue.config.js

@ -80,8 +80,8 @@ module.exports = {
changeOrigin: true, changeOrigin: true,
}, },
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: "http://shuili.product.dev.com:30115/", target: "http://shuili.product.dev.com:30115/",
target: "http://172.16.34.80:18082/", // target: "http://192.168.31.26:18082/",
// target: 'http://172.16.32.62:18888/', // target: 'http://172.16.32.62:18888/',
// target: "http://172.16.34.27:18082", // target: "http://172.16.34.27:18082",
changeOrigin: true, changeOrigin: true,

Loading…
Cancel
Save